Dean's World

Defending the liberal tradition in history, science, and philosophy.

A Million Monkeys on a Million Typewriters

The old saw is that if you let enough monkeys randomly bang on enough typewriters for a long enough period of time, they'll eventually type the complete works of Shakespeare. The first time I heard that proposition it was "a million monkeys on a million typewriters in a million years," but I'm pretty sure that anyone with a decent understanding of statistics (and who thought very hard about it) found the proposition doubtful. So nowadays it's usually phrased more vaguely: enough monkeys on enough typewriters given enough time will produce the works of Shakespeare.

There is currently a computer simulation testing this proposition.

So far a simply extraordinary number of virtual monkeys (5.67088e+47 as I write this--the population continuously expands) have typed 1 letter per second each for 5.01633e+48 virtual years, and haven't managed to get much past a couple of dozen letters of any given play.

Just from the rate they're going I'd imagine that the number of monkeys would have to exceed the total mass of the universe and be at it well the heat-death of the universe before they managed to pull it off, but that'd just be my guess.... if I weren't lazy I'd try to figure out how much 5.67088e+47 monkeys would weigh anyway.

Man. Wait long enough and you could have a black hole made out of monkeys! Boy that would be a weird event horizon to cross wouldn't it?

Heh.

(Via Tall Dave.)

Related Posts (on one page):

  1. A Million Monkeys on a Million Typewriters
  2. The Intelligent Design Four
Posted by Dean | Permalink | Technorati Trackbacks
triticale (mail) (www):
This is not a valid experiment because monkeys do not in actuality tend to type randomly. An experiment using real monkeys with real keyboards demonstrated that they instead press a single key repeatedlyyyyyyy.
7.18.2005 9:09am
pennywit (mail) (www):
Maybe they'll write a steamy jungle romance first?

--|PW|--
7.18.2005 9:55am
Chris of Dangerous Logic (www):
Can you imagine the quantity of poop that could be hurled out of a Monkey Singularity?

OK, it was a trick question - nothing can escape a black hole, not even monkey poop.

But still.
7.18.2005 11:05am
Kacie Landrum (mail) (www):
Of course, the analogy, at least as far as it is used as proof of evolution, is flawed. When a monkey has typed a full page of paper, a human being examines it and determines if anything typed on it makes sense. If it does, the page is saved. If not, the page is tossed out.

Your DNA doesn't exactly work that way. When a mutation changes it and fails to produce a meaningful gene, it doesn't toss out your entire DNA and start again from scratch. No, the next mutation must take your DNA as it exists and use that as the starting point for new mutations.

So, to correct the analogy, the monkeys would each type one piece of paper. Then, if every letter on that piece of paper did not make perfect sense, they would start over again with that SAME piece of paper, randomly changing one letter at a time.

So, say after four or five repetitions of this process the monkey managed to produce a simple phrase like "I AM". The next time through the page, isn't the monkey more likely to destroy the "I AM" than to add new information to it, making it "I AM THE"?

Consider, for example, the sentence "I LIKE ICE CREAM". If I replaced letters in that sentence with other letters chosen at random, what are the odds I'll create a sentence that actually makes sense, and what are the odds that I'll be destroying a perfectly good sentence? It's much, much easier to destroy information than to create new information.

So, with the corrected analogy, a monkey is far more likely to destroy any positive advance he makes the next time he mutates the page than he is to continue making positive advances. I'm no good at statistics, so I'll leave someone like Dean to calculate the odds of the monkey ever creating a page of good, solid information that way.
7.18.2005 11:53am
Fred (mail) (www):

if I weren't lazy I'd try to figure out how much 5.67088e+47 would weigh.

This would, of course, depend on the monkey. If you use the average mass of a male chimpanzee, you get about 3.17e+49 kg. IIRC, the total mass of the visible universe is roughly 6e+51. Use a bigger monkey or add more monkeys, and you're there.
7.18.2005 12:32pm
Martin L. Shoemaker (www):
I always heard it as an infinite number of monkeys with an infinite length of time, in which case it's incontrovertibly true. It's a mathematical given. An infinite number of monkeys with an infinite length of time will type every possible combination of letters and other symbols; and the works of Shakespeare are necessarily a subset of that. The only way this would not be true is if some sort of bias mechanism pushed the monkeys away from certain letters or combinations.

As for this "experiment": it's doomed to failure, because it will never come close to an infinite number of monkeys. Let's look at a single example, a manuscript I'm reviewing right now, so I have it in electronic form and can count the characters: 750406. Now my count says there are 76 typeable characters on my keyboard. So that means there are 76^750406 possible letter combinations of this length. That's a really big number, way too large for Excel to calculate directly; but indirectly (if I'm doing the math right, which is questionable, since I'm tired) I think the result is in the vicinity of 1 * 10^4840. Now that is B*I*G! The manuscript is only one possible combination out of all of those. The "experiment" can't possibly reach that big.

But that number may be big, but it's practically zero compared to infinity.

And as for the whole monkey typing experiment: it demonstrates infinity, in a way, but that's about all it demonstrates. It says nothing about evolution, because it leaves out the fact that certain combinations are naturally drawn together, and certain combinations can reproduce themselves, and certain combinations can build upon other combinations, and certain combinations can compete with other combinations. The monkey typing assumes no rules; evolution relies on rules, not just random chance.
7.18.2005 12:54pm
M. Scott Eiland (mail):
Bob Newhart did a short routine on the "infinite monkeys" theory many years ago--he portrayed the poor soul who was tasked with seeing what the monkeys were producing. After shaking his head and commenting that one monkey would never produce anything, he "spotted" something promising:

Wait! Number 22 has something--I think this is famous. [pauses to read] "To be or not to be? That is the gzortnplatt."
7.18.2005 1:14pm
M. Scott Eiland (mail):
Oh, and for a *real* test of the infinite monkeys theory? Try the Harry Potter section at fanfiction.net--all 194,511 stories of it. The quality varies from brilliant to, well, something that does indeed closely resemble what the legions of bored monkeys might produce.
7.18.2005 1:19pm
Donald S. Crankshaw (mail) (www):
Fred, I very much do not want to meet the monkey who's 200 times heavier than a chimpanzee. I'm not sure even King Kong qualifies.

Anyway, Dean, Fred has a point, you already have enough monkeys for a Black Hole. Just from a quick Google search, one of the heavier suspected black holes weighs in at 2.8e+31 kg, so that even with a bunch of measly 1 kg baby monkeys you could have 20 quadrillion black holes.
7.18.2005 1:23pm
michaelreynolds (mail) (www):
I was very depressed to discover that it only took nine monkeys and hour and a half to write my blog.
7.18.2005 2:25pm
Matthew B. (mail) (www):
Dean,

There's an old scifi short story called "Been a Long, Long Time" where an "angel" is punished via this very method, although I don't remember computers being mentioned. I've Googled the story and cannot find it posted online anywhere. It's pretty funny, and clearly illustrates the enormity of the task at hand.
7.18.2005 2:58pm
Dean Esmay:
I hate to be anal-retentive, but chimps aren't monkeys, they're apes. And some species of monkey can be only a kilogram or so, although others get pretty big.

My own instinct here is to go for the howler monkey. Although I'm sure a Howler Monkey Singularity would probably first produce the works of Daily Kos before Shakespeare....
7.18.2005 3:38pm
Fred (mail) (www):
First time I did the calculation, I used Squirrel Monkeys, which gives you 5.1038e+47. But then I thought, what monkey/ape would be the best typist? This is what happens to your brain when you play the "just a couple more pages of Harry Potter, then I'll sleep, I really mean it" game.
7.18.2005 4:48pm
Tito (mail):
There is a huge way that this is different from evolution. The "million monkey" or whatever analogy is crap and always has been. The theory of evolution has never made this claim, only people who don't understand it. It's a strawman.

In evolution, each "round" or "page" if you prefer, is based on the previous page. Some form of "fitness function" (jargon from Genetic Algorithm research) eliminates the less successful. Then the next round occurs. (obviously in the real world, "rounds" aren't discrete, like they are in genetic algorithms.)

A better example would be each round, randomly change a few letters, then evaluate based on the number of letters in the correct position. The top 20% (or whatever) you keep. Then each surviving one spawns 5 more with a handful of changes and evaluation continues.

And even better, would be "sexual reproduction" which would have the "reproduction" take 50% from two parents, so that different lines could cross, speeding up the process.

Great, now I want to create a quick program and see how many generations it takes to produce a page....
7.18.2005 4:57pm
IB Bill (mail) (www):
The monkeys will not only produce the complete works of Shakespeare, they will produce the story of your life, including your entire future. Tomorrow's lottery winnings in the newspaper. Everything.

To see this idea dramatized, see Borges' Library of Babel.
7.18.2005 8:40pm
Dean Esmay:
The million monkeys thing isn't an assault on the theory of evolution, although I must admit it opens the questions of life origins since it still remains a completely mystery how the first and most life forms came into being, with our having only vague ideas of what that process was or looks like, it is no more scientific to say that there can't have been a creator than that there might have been one.

Of course the question then comes: what created the creator, and so on and so forth. Still, why some people are so very anxious to avoid even having this conversation I have no idea.
7.18.2005 9:00pm
Steven Malcolm Anderson (www):
In a parallel universe, an infinite number of monkeys, or mosquitos, or moonbats, or whatever, typing at random over an infinite amount of time, may have produced the complete works of Shakespeare, the complete works of Arnold Harris, the complete story of my life, etc., etc..

But in the universe I'm living in right now, Shakespeare and only Shakespeare (and not Bacon, or Lettuce, or Tomatoes, or anybody else) wrote the works of Shakeapeare, only Arnold Harris has written the works of the Sage of Mount Horeb, WI., I'm still writing (badly) the story of my life, and monkeys are still eating bananas while being worshipped by evolutionists.

As to who created the Creator, countless mythologies have genealogies of the Gods and the Goddesses, while Jews and Christians usually argue that God (YHVH, Elohim, or the Holy Trinity) is eternal and, hence, beyond time as we know it. In Christian theology, the Son (Christ) is eternally being begotten (not created) by the Father, and the Holy Spirit (conceived by many Christians I have known as feminine) proceeds from both of them. In my own Catholic-style polytheist theology, I would only add that the Holy Trinity created the universe, and man and woman (in Their image), for the Virgin Mother, the Queen of Heaven, the Most High Goddess, Who also is eternal.
7.18.2005 10:28pm
Steven Malcolm Anderson (www):
Donald S. Crankshaw wrote:
"Anyway, Dean, Fred has a point, you already have enough monkeys for a Black Hole. Just from a quick Google search, one of the heavier suspected black holes weighs in at 2.8e+31 kg, so that even with a bunch of measly 1 kg baby monkeys you could have 20 quadrillion black holes."

Scientific question: Would that constitute enough mass, enough gravity, to counteract the "dark energy" which astronomers have theorized is accelerating the expansion of our universe?
7.18.2005 10:35pm
Dean Esmay:
I've only read a few articles on it and none I've seen has given estimates.
7.19.2005 2:02am
Donald S. Crankshaw (mail) (www):
Probably not, Steven. I'm not an astrophysicist, but the estimated amount of visible matter in the universe is 1e+50 kg. The necessary matter to cause the universe to collapse in on itself is 1e+52. I think the mass necessary to counteract this "dark energy," if we could summon these monkeys ex nihilo--or maybe just import them from the monkey universe--would be on that order.
7.19.2005 5:27pm
Eric R. Ashley (mail) (www):
Just wrote up a rough draft of a short story based on this thread...

Monkey Singularity is suitably demented.
7.20.2005 2:19am
maor (mail):
"I hate to be anal-retentive"

This statement is almost always false.
:)
7.20.2005 10:17am
Steven Malcolm Anderson (www):
I like being anal-retentive.

I think this whole monkeys=Shakespeare or Shakespeare=monkeys nonsense is an expression of the ideological war between what C. P. Snow back in the 1950s called "the two cultures", i.e., the physical sciences (and their Comtean "social science" camp followers who try to (to use the evolutionists' favorite word) "ape" the physical sciences) vs. the arts, history, philosophy, religion, etc. (what are called "the humanities"). In other words, once again, the left (or "math") hemisphere vs. the right (or "myth") hemisphere. Wanda vs. Dawn....?

I have no doubt that it all started when some professor of philosophy was arguing with a professor of physics, expressing an Aristotelean contempt for servile "nuts and bolts", when the physicist replied:
"Oh, yeah, you think your Shakespeare is so great. Why, I bet one of our mathematicians could prove statistically that a million monkeys banging away randomly on a million typewriters for a million years could produce all the works of Shakespeare."
To which the philosopher replied:
"Maybe so, maybe not -- but could they understand what they had written?"
And the physicist replied:
"Probably not, but our evolutionary biologists could show that, within that time, that same million monkeys would eventually breed a Shakespeare. Man is nothing more than a monkey with delusions of grandeur."

Unfortunately, right now, we don't need the evolutionists in the science departments to destoy Shakespeare. Within the humanities departments, we already have Politically Correct professors "de-constructing" Shakespeare to "prove" that he was an evil racist, sexist, imperialist.

This all ties in with what Whittaker Chambers warned us of, the great dualism: "Man, Mind, and Communism" vs. "God, Soul, and Freedom"....
7.20.2005 12:02pm
Martin L. Shoemaker (www):
Dean,


The million monkeys thing isn't an assault on the theory of evolution...


While that's true of the original proposition, I'll bet it gets cited in the evolution/creation debated more often than just about anywhere else. Not by actual scholars, but by people reaching for a very simple yet visual analogy. One side will use it to show how simple, purposeless processes can add up to rich, complex systems. The other side will point at failures (like this experiment) to "prove" that complex living systems cannot arise without purpose and direction. Neither side seems to understand that the example has no relevance to their debate.
7.20.2005 5:41pm
Danyouyou (mail):
Unfortunately, right now, we don't need the evolutionists in the science departments to destoy Shakespeare. Within the humanities departments, we already have Politically Correct auto parts professors "de-constructing" Shakespeare to "prove" that he was an evil racist, sexist, imperialist.
7.21.2005 4:26am
Steven Malcolm Anderson (www):
The "square" style of those auto parts -- created by some intelligent designers....
7.21.2005 7:25pm