Register FAQ Search Today's Posts Mark Forums Read

 2016-12-03, 01:56 #1 a1call     "Rashid Naimi" Oct 2015 Out of my Body 2·17·53 Posts 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? Last fiddled with by a1call on 2016-12-03 at 02:28
 2016-12-03, 03:25 #2 a1call     "Rashid Naimi" Oct 2015 Out of my Body 70A16 Posts 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?
 2016-12-03, 16:16 #3 a1call     "Rashid Naimi" Oct 2015 Out of my Body 34128 Posts 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 Last fiddled with by a1call on 2016-12-03 at 16:18
 2016-12-03, 17:44 #4 a1call     "Rashid Naimi" Oct 2015 Out of my Body 34128 Posts 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
2016-12-03, 18:30   #5
science_man_88

"Forget I exist"
Jul 2009
Dumbassville

20C016 Posts

Quote:
 Originally Posted by a1call 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
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))
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

Last fiddled with by science_man_88 on 2016-12-03 at 18:52

2016-12-03, 19:09   #6
a1call

"Rashid Naimi"
Oct 2015
Out of my Body

2×17×53 Posts

Quote:
 Originally Posted by science_man_88 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)) 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
Please consider the code case insensitive.
The uppercase is inevitably substituted by my swipes keyboard.

 2016-12-03, 19:30 #7 CRGreathouse     Aug 2006 22×5×293 Posts 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. Last fiddled with by CRGreathouse on 2016-12-03 at 19:34
2016-12-03, 19:34   #8
xilman
Bamboozled!

May 2003
Down not across

23·1,249 Posts

Quote:
 Originally Posted by a1call 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.
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.

Last fiddled with by xilman on 2016-12-03 at 21:03

2016-12-03, 21:20   #9
a1call

"Rashid Naimi"
Oct 2015
Out of my Body

70A16 Posts

Quote:
 Originally Posted by CRGreathouse 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.
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.

 Similar Threads Thread Thread Starter Forum Replies Last Post Karl M Johnson GPU Computing 15 2015-10-13 04:44 jasonp GMP-ECM 8 2012-02-12 22:25 Andi47 Msieve 12 2010-02-01 19:30 only_human Miscellaneous Math 9 2009-02-23 00:11 tinhnho Miscellaneous Math 8 2005-09-18 15:14

All times are UTC. The time now is 03:42.

Sun May 31 03:42:10 UTC 2020 up 67 days, 1:15, 1 user, load averages: 1.14, 1.26, 1.30