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.