Extremely silly math musing
Jan. 22nd, 2004 10:56 am![[personal profile]](https://www.dreamwidth.org/img/silk/identity/user.png)
Question:
If the popular version of Moore's law (computing speed increases by a factor of 2 every 18 months) were to apply continuously,(which it doesn't) at what point does a process become not worth hitting start on.
That is, if I have a program that takes 80 years to run, I shouldn't start it now. I can get it done in 23 years by waiting 3 years, at which point the program will only take 20 years. So at what point (expressed as current time to completion) should I hit start?
I have an answer, but I'd like someone to check my math. So if you're interested in trying it yourself, do so before clicking on the cut-tag.
My thinking:
So, the time to complete the project can be expressed in years as:
y = x + T / 2 ^(x/1.5)
where
T = the time it takes at time 0
and
x = the time at which it is started.
We (okay, I, since you're not insane) want the value of T that puts the minimum of y at x=0. The minimum of this function occurs when the slope of y=x and y=T/2^(x/1.5) balance each other out.
d(T/2^(x/1.5))/dx - dx/dx = 0
d(T/2^(x/1.5))/dx = -1
which gets me (via calculus I had to look up again) to
(-2T*ln(2)/3)*(2^(-2x/3) = -1
but since we're interested in x=0, we get
1* -2T*ln(2)/3 = -1
T = 3/2*ln(2)
T = 2 years and just under 59 days.
So don't hit go until the ETA is two years and two months away.
(does quick check)
At which point the speed will have increased by e. That seems right.
I wonder if there's a shorter way to get to that result.
If the popular version of Moore's law (computing speed increases by a factor of 2 every 18 months) were to apply continuously,(which it doesn't) at what point does a process become not worth hitting start on.
That is, if I have a program that takes 80 years to run, I shouldn't start it now. I can get it done in 23 years by waiting 3 years, at which point the program will only take 20 years. So at what point (expressed as current time to completion) should I hit start?
I have an answer, but I'd like someone to check my math. So if you're interested in trying it yourself, do so before clicking on the cut-tag.
My thinking:
So, the time to complete the project can be expressed in years as:
y = x + T / 2 ^(x/1.5)
where
T = the time it takes at time 0
and
x = the time at which it is started.
We (okay, I, since you're not insane) want the value of T that puts the minimum of y at x=0. The minimum of this function occurs when the slope of y=x and y=T/2^(x/1.5) balance each other out.
d(T/2^(x/1.5))/dx - dx/dx = 0
d(T/2^(x/1.5))/dx = -1
which gets me (via calculus I had to look up again) to
(-2T*ln(2)/3)*(2^(-2x/3) = -1
but since we're interested in x=0, we get
1* -2T*ln(2)/3 = -1
T = 3/2*ln(2)
T = 2 years and just under 59 days.
So don't hit go until the ETA is two years and two months away.
(does quick check)
At which point the speed will have increased by e. That seems right.
I wonder if there's a shorter way to get to that result.
no subject
Date: 2004-01-22 09:02 am (UTC)Also, hi! I only just now figured out who you (and other JBPers with non-obvious LiveJournal userids) are. You were right about the stomach flu warning, by the way. :(
no subject
Date: 2004-01-22 09:32 am (UTC)no subject
Date: 2004-01-23 04:13 am (UTC)By the time I had enough energy to drive down to Brooks to pick up some Gatorade, I was probably past the point of needing it, although it was refreshing. Maybe I should just always keep a few bottles around for emergencies.
no subject
Date: 2004-01-22 10:19 am (UTC)Because if you can swap out part of your system (say, in a grid) while you're running, you want to start now no matter what the speed will be henceforth.
Or have I missed something?
no subject
Date: 2004-01-22 10:24 am (UTC)no subject
Date: 2004-01-22 11:34 am (UTC)no subject
Date: 2004-01-22 11:51 am (UTC)Tx = T0/2^(x2/3)
So:
Tx = T0/2^((3/2ln(2))2/3)
Tx = T0/2^(1/ln(2))
So the speed has increased by 2^(1/ln(2)), which is e.
no subject
Date: 2004-01-22 12:12 pm (UTC)no subject
Date: 2004-01-22 12:18 pm (UTC)no subject
Date: 2004-01-22 12:27 pm (UTC)no subject
Date: 2004-01-22 12:30 pm (UTC)no subject
Date: 2004-01-22 03:44 pm (UTC)