Gears, Computers And Number Theory
UncleJosh writes: "The latest issue of
American Scientist
has an interesting article
"On the Teeth of Wheels" about the relationship between gears, computers and number theory." It's as much a well-meshed detective story (hunting for books and obscure references) as a historical and mathematical introduction to the science of gears. Prime numbers, watchmakers and the Fibonacci sequence all play a part.
There are certain problems which are considerably easier using analog (though not necessarily mechanical) computers than to use a digital computer. The one that leaps to mind is a particular minimization problem-- given three cities, let's say, at the vertices of an equilateral triangle, what is the shortest amount of road needed to connect them? The answer is to do this: make a new vertex at the centroid of the triangle and connect roads from each of the three cities to that new vertex.
This uses considerably less road than, say, connecting city A to city B and then city B to city C. The problem gets considerably harder if you are not using a regular figure or if you are using more than three points. It's really a calculus of variations problem (I think) -- you're minimizing over an infinite number of paths so this makes it a pretty tough problem for a computer.
This problem is a piece of cake, however, if you use a very special analog computer -- namely soap bubble solution. If I make two plexiglas plates and put pins between them representing the cities I am trying to connect, then dip the construction into bubble solution, a soap film forms connecting the pins. As long as the soap film doesn't close on itself (that is, as long as it doesn't make a 'real' bubble) you will get a solution to the problem. The number of solutions to a given problem grows depending on the number of vertices, but suffice it to say it's a lot quicker to check all the solutions using soap bubbles than it is to use a computer. Also, each solution is quite close to the absolute minimal solution, so within certain parameters it may not be necessary to check every solution. My old differential geometry teacher tells me that they actually use the soap bubble method to do minimization problems for such things as highway planning.
There's a lot more interesting stuff about this problem which I shan't go into, partly because I don't remember and partly because it's not very relevant to the discussion at hand. In any case, this is a good example of an analog 'computer' being demonstrably faster than a digital one.
So he went into the auditorium and sat down. The lecturer began: "The theory of gears with a finite number of teeth is well-understood. However..."
The History of Mechanical Computers
Early Calculators
Zuse
"I believe that a scientist looking at nonscientific problems is just as dumb as the next guy." -Richard Feynman
After reading through the Scientific American article, I suddenly found I wanted to re-read The Story of Mel again, the tale of a programmer's programmer from an era gone by. Our old-timers often lament the extinction of code laboriously hand-tuned to run tight and fast on elegant machines from days gone by -- and those days have been gone only a few decades. The gear makers worked their craft a century or more ago.
Today, sometimes I wonder, what was the point? Why not just shovel in and ship out the first thing that works? A year and a half from now, the hardware will be twice as fast, and probably cost half as much. The software we wrote will be obsolete, as will be the hardware it ran on.
But maybe it does matter. It would be a terrible thing if our decendants did not surpass us. But even as they gaze back upon us from those lofty, distant heights, maybe we can give them a reason to listen to how it was done in the Good Old Days.
"Lest a whole new generation of programmers
grow up in ignorance of this glorious past,
I feel duty-bound to describe,
as best I can through the generation gap,
how a Real Programmer wrote code..."