So, I'm visiting my parents. I'm back on the Wirral for the weekend, mostly to fix computers at my dad's church and possibly to help my parents unpack, as they have just moved house.
So, last night I drove up from Leicester to Pensby. While driving, I listened to the original radio shows of
The Hitch-Hiker's Guide To The Galaxy on tape. A thought occurred to me... A thought that is tremendously geeky. Disturbingly, a quick search at Google suggests that while I may not be the first person to ever conceive of such a thing, I am very possibly the first person to write about them on the web. I think this probably makes it doubly geeky.
So, here goes...
Some, all or none of you will know that part of the plot of Hitch-Hikers... centres around a quest to find the ultimate question to the ultimate answer to life, the universe and everything. It is necessary to discover the question after a fancy computer spends 7 1/2 million years figuring out the answer, only to come up with
42, which is unsatisfactory to say the least.
Hold up, let's go back a bit. The fancy computer spent 7 1/2 million years coming up with this answer? The thought that occurred to me was this:
What has happened to
Moore's Law?
Broadly speaking, Moore's Law states that every 18 months the number of transistors in a computer chip doubles. This is a gross simplification, but it will serve for the purpose of this discussion. If we assume (inaccurately) that doubling the number of transistors in a computer doubles it's power and thereby halves the time needed to solve any given problem, then it should be obvious that to wait 7.5 million years for Deep Thought to arrive at the answer is foolish. It would be simpler to wait 18 months, from which point one would only have to wait 3.75 million years for the answer. Better still, wait for 3 years, and then you only have to wait for just under 2 million years for the answer. Better still, wait for... ah, you get the idea.
So, what is the optimum time to wait until building the computer, such that the time till the answer arrives is minimal? Well, if we let
t be the time till the answer is produced and
x be the number of iterations of Moore's Law, then we get this equation:
t = 1.5x + (7.5*10^6)/(2^x)
Yes, it would look better if I did it as an image or something, but I can't be bothered.
Differentiating with respect to x will allow us to find the lowest amount of time needed. This a bit hard to differentiate. I did it after midnight last night while very tired and slightly drunk after having a can of cider. As luck would have it my uni maths notes were in my room. Brilliant.
You get something like:
0 = 1.5 + (7.5*10^6)*ln(2^x)*ln2*e^(xln2)
^
EDIT: This is wrong. See Izz' comment below for correct answer.
Now, if anyone can figure out how to solve that without resorting to numerical methods then they're a better mathematician than I.
Anyway. A bit of scribbling on the back of an envelope suggests that the optimal number of iterations is somewhere around 22. In that case, you wait 33 years before building the computer, in which timeframe computing power has increased by a factor of 2^22 (=4194304) so the time taken to solve the problem is only 1.78 years. The total time to get the answer is then 34.78 years, rather than 7.5 million years.
So, they'd have been better off if they'd known about Moore's Law.
How's that for geeky

I commend anyone who has read this far. You are probably as much of a geek as me!