Eclectic Wanderings

Tuesday, March 13, 2007

Monkey Business - Part I

I am sure we have all heard of the idea of having a million monkeys sitting at typewriters for 10 hours a day and typing for a year. We are told that they could, by random chance, write all the well-known text in the world, including the likes of Hamlet.

But first let's back up a bit and look where this interesting idea came from. It has often been falsely attributed to Thomas Huxley. In a debate with Bishop Wilberforce concerning Darwin's Origin of the Species the discussion wandered onto the topic of monkeys. Apparently, Wilberforce asked Huxley whether he was descended from a monkey on his grandmother's side or his grandfather's side. It seems Huxley was defending Darwin's idea that we were related to more primitive life forms. Huxley replied he would rather be related to a monkey than descended from a man of great intelligence who used his gifts in the service of falsehoods. But none of the records we have of the debate really discuss monkeys with typewriters.

The real origin of the idea came from Emile Borel, in the early 1900's. He was a French mathematician, and according to his calculations, he figured it was a very small chance the the million monkeys typing for a year wouldn't produce all the great volumes of writing that man has ever written. This novel idea was then taken up and written about by various scientists, and science fiction writers till it became a quite common idea.

So is it true? Not by a long shot. Let's do some math. There are about 50 keys on a keyboard. So there is a 1/50 chance that one monkey will hit a certain letter, say 'h'. The chance of the monkey typing 'ha' is 1/50 X 1/50, or 1/2500. The chance of him typing 'ham' would be 1/125000. And so on, and so on. So, the chance of the monkey typing a phrase with 22 characters in it are about 1 in 10 to the 38th power. That's:

1/100,000,000,000,000,000,000,000,000,000,000,000,000

Or another way to put it, it would take a billion billion monkeys, each typing 10 characters a second, for each of the billion billion seconds since the universe began to type the phrase, 'hamlet. act i, scene i.'

This example, and many many other interesting ideas about computing are to be found in a delightful book called Programming the Universe by Seth LLoyd. He is a quantum scientist and a Professor at MIT. His book has a very easy and natural style of describing the nature of computing, from a theoretical viewpoint. But he has much more profound things to say about evolution, the origin and nature of the universe, and the ultimate computer. More on that next time.

0 Comments:

Post a Comment

<< Home