![]() |
Binary Multitasking
Hi,
Most of my life I have been struggling with coming up with a scheduling system to be a balanced approach to concentrating on high priority tasks as well as providing time allocation to lower priority tasks. One of the best methods I have come up with is binary multitasking. Essentially you go through a list of tasks as if they were binary digits, incrementing by 1. This way one would spend about 1/2 the total time on the 1st task, 1/4 on 2nd and so on. The problem with this method is that for lists longer than say 10 or so tasks virtually no time ends up being allocated to the tasks at the bottom. * Is there a way to increment a binary register with a constant value greater than one such that all binary digits are set at least once? If not, is there any formulaic simple parameter? Thanks in advance. ETA I assume any prime number greater than the number of the elements in the list would serve the purpose, but would such a solution end up being equivalent to incrementing 1 or would allocate more time to the items lower in the list? |
I think it would be more accurate to phrase it am as:
ETA I assume any prime number equal to the number of the items in the list would serve the purpose, but would such a solution end up being equivalent to incrementing 1 or would allocate more time to the items lower in the list? |
Here is a pseudocode for clarification:
My array tasks[26] forstep (j=0, 2197, step =13) . { . Print j in binary . Flag=0 . Exp=0 . While(flag=0) . { . Exp= exp +1 . If(j/(2^ exp)==j\(2^ exp)) . { . Tasks[Exp]=+ . Flag=1 . } . } . } For (k=1,26) . { . Print tasks[k] . } I would expect only tasks 1 to 13 to be nonzero and equal to the value if the step was equal to 1 |
Too late to edit so posing with corrections:
Here is a pseudocode for clarification: My array tasks[26] forstep (j=0, 2197, step =13) . { . Print j in binary . Flag=0 . Exp=0 . While(flag=0) . { . Exp= exp +1 . If(j/(2^ exp)!=j\(2^ exp)) . { . Tasks[Exp]=+ . Flag=1 . } . } . } For (k=1,26) . { . Print tasks[k] . } I would expect only tasks 1 to 13 to be nonzero and equal in proportion to total, to the value if the step was equal to 1 |
[QUOTE=a1call;448306]Too late to edit so posing with corrections:
Here is a pseudocode for clarification: My array tasks[26] forstep (j=0, 2197, step =13) . { . Print j in binary . Flag=0 . Exp=0 . While(flag=0) . { . Exp= exp +1 . If(j/(2^ exp)!=j\(2^ exp)) . { . Tasks[Exp]=+ . Flag=1 . } . } . } For (k=1,26) . { . Print tasks[k] . } I would expect only tasks 1 to 13 to be nonzero and equal in proportion to total, to the value if the step was equal to 1[/QUOTE] tried to make an equivalent PARI/gp code: [CODE]my(task=vector(26));forstep (j=0, 2197,13,print(binary(j));Flag=0;Exp=0;while(Flag==0,Exp+=1;if(j/(2^Exp)!=j\(2^Exp),task[Exp]+=1;Flag=1)));for(k=1,26,print(task[k]","k))[/CODE] once I got it all equivalent without changing case it basically only printed once before I lost patience.edit:of course only j that aren't divisible by powers of two will happen to be increased in task okay something still doesn't allow it to compute any being worked ot 1 |
[QUOTE=science_man_88;448311]tried to make an equivalent PARI/gp code:
[CODE]my(task=vector(26));forstep (j=0, 2197,13,print(binary(j));Flag=0;Exp=0;while(Flag==0,Exp+=1;if(j/(2^Exp)!=j\(2^Exp),task[Exp]+=1;Flag=1)));for(k=1,26,print(task[k]","k))[/CODE] once I got it all equivalent without changing case it basically only printed once before I lost patience.edit:of course only j that aren't divisible by powers of two will happen to be increased in task okay something still doesn't allow it to compute any being worked ot 1[/QUOTE] Please consider the code case insensitive. The uppercase is inevitably substituted by my swipes keyboard. |
More generally, choose any 0 < p < 1 and put 1 - p, p(1 - p), p^2(1 - p), ... effort into each task. For example, with p = 2/3, you put a third of your effort into the first task, 22% into your second, 15% into your third, 9.9% into your fourth, 6.6% into your fifth, etc.
|
[QUOTE=a1call;448260]Hi,
Most of my life I have been struggling with coming up with a scheduling system to be a balanced approach to concentrating on high priority tasks as well as providing time allocation to lower priority tasks.[/QUOTE]My approach is to use structured procrastination. If you find there is something you are not doing which ought to be done, find something else that needs to be done and don't do that instead. Works for me. |
[QUOTE=CRGreathouse;448317]More generally, choose any 0 < p < 1 and put 1 - p, p(1 - p), p^2(1 - p), ... effort into each task. For example, with p = 2/3, you put a third of your effort into the first task, 22% into your second, 15% into your third, 9.9% into your fourth, 6.6% into your fifth, etc.[/QUOTE]
That is the sort of thing I am looking for, to distribute more of the total time to lower priority items. I also think what you are proposing is equivalent to adding 1 and multitasking in bases less than 2 such as average/floor of the counter in base 1.5. I will need more time to wrap my head around that. |
| All times are UTC. The time now is 11:19. |
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2021, Jelsoft Enterprises Ltd.