Given enough time, can monkeys typing randomly come up the works of Shakespeare?…or even just 1 play?…. or just 1 sonnet?
The “infinite monkey theorem” has a long pedigree in the history of ideas – starting with Aristotle, and showing up in Jonathan Swift, Bacon, Huxley, Jorge Luis Borges, and Dawkins. There was even a real live demo of monkeys banging on (or smashing rather) typewriters in the UK. (They weren’t able to produce a single English word – even “a”).
This week I used the poor old typing monkeys to illustrate the pros and cons of intuition. Does our hunch of what is possible change when we examine mathematically how small the chance actually is?
In AP Psych, Thinking and Cognition unit, I gave a Cole’s notes summary of Daniel Kahneman’s book Thinking: Fast and Slow. Kahneman is a cognitive psychologist famous for showing how economic decision theory has not taken account the often irrational nature of our intuitions, which are influenced by recent thoughts, events, and environments. For example, participants in a study who were asked to describe their overall life happiness were told to go make a photocopy in another room. Once they returned the psychologists gave them a life happiness questionnaire. In the experiment group, psychologists placed a dime on the photocopying machine. To their amazement, the experiment group reported a higher happiness in life than their counterparts! Their judgment of the whole was influenced by a recent (and minuscule) chance event that changed slightly their thought process.
We’re also less reasonable than we think, often falling back on gullible intuition to conserve energy. For example, consider the following:
A bat and a ball cost 1.10, and the bat was 1 dollar more than the ball. How much does the ball cost?
If you answered 10 cents, you’ve fallen prey to your misguided intuition, which associates the 1 dollar difference with the easy calculation between $1.00 and 10 cents. If you think about it before jumping to conclusions, you’ll realize that if the ball cost 10 cents and the bat was 1 dollar more, then the bat would have to cost 1.10, and the total would be 1.20. But you’re in luck, because when presented to students at Ivy League schools such as Harvard, more than have of the participants made the same mistake. In my AP Psych class of 23, only 1 student caught the problem right away.
OK, back to typing monkeys. I thought of using this example after reading about atheist philosopher Anthony Flew’s famous “conversion” to theism. This conversion, also experienced by the likes of Einstein, Schrodinger, Dirac, and Heisenberg (to varying degrees), hinges on the fundamentally rational nature of the universe: 1. science assumes the rationality of the universe, 2. the universe seems to reflect some kind of order, accessible to reason (or given by reason if you’re an idealist), 3. the inherent order of the universe seems to contradict the doctrine that all events are entirely by chance, 4. Our experience of order is more real than our experience of random chance, 5. It is more rational to assume their is an ordering logic to the universe (whatever that may be) than that everything is entirely by chance.
Anthony Flew, an atheist heretic, was said to be just an old man in his 80s with the jimmies for some kind of piety. That may be the case. Nevertheless, the example he cites from the scientist Gerald Schroeder is a great illustration:
What are the chances that monkeys will type a single Shakespeare sonnet? Well, the smallest word in the English alphabet is “a”, but you need a space in front and back, so assuming that there are roughly 30 characters on a typewriter, that’s a probability of 30 x 30 x 30 , or 27,000. Now, how about a sonnet? “Shall I compare thee to a Summer’s Day” is 488 characters long. There are 26 letters in the alphabet, so the probability of generating each character in sequence is 26(power 488). In base 10, that’s 10 (power 690).
Just to give you an idea how big that number is, there are only 10 (power 80) estimated particles in the known universe. There are not enough particles in the universe to write down the trials – you’d be off by 10 (power of 600).
If each particle were somehow converted into a microcomputer and did 488 trials a million times per second, the number of trials you get from the beginning of time is 10 (power 90). You’d be off again by a factor of 10 (600 power). “Yet the world just thinks that the monkeys can do it every time.”
Again, this is simply 1 of Shakespeare’s sonnets, never the complexity of DNA or ecosystems, and it would be impossible for the entire universe converted to computers to generate it within the history of the universe.
So… how did my students react? Well, some were impressed. But most kept to their hunch – “if it is at all possible, and the universe is infinite, then sure, it’s possible for monkeys to come up with a Shakespeare sonnet.”