Day 818: Brother Can You Spare Infinity Monkeys?

originally published March 28, 2014

Every so often I encounter one of those weary, soggy mornings when the lazy sun can’t seem to prop my fingers upon their ASDF-JKL; thrones to do their little thousand-word dance. Artificial stimulation helps – sometimes a throttle-jolt of caffeine, perhaps a bursting platter of bratwurst eggs benedict, even one of those nefarious little energy shots can bump the words past my grimy fingerprints. But what I really need?


An infinite number of monkeys huffing an infinite amount of jenkem in front of an infinite number of typewriters could eventually produce something close to an acceptable article. Probably not within my one-day deadline, but you never know.

Actually, the infinite-monkeys cliché usually posits a loftier result, either the complete works of Shakespeare or at least one of his plays. People have crunched this hypothesis into a briny pulp, sorting through the ramifications of infinity and trying to use math to uncover just how much time we’re talking about. One school even attempted a practical re-enactment of the theory. That’s good – that deposits this topic just deep enough into the Realm of Weird to warrant my attention.

Aristotle contemplated the random combinations of atoms that make up the universe, and pointed out that the only difference between a comedy and a tragedy is the arrangement of its “atoms” (meaning letters). It was French mathematician Emile Borel who first used the infinite-monkeys concept in his 1913 paper “Mécanique Statistique et Irréversibilité”. Emile’s monkeys serve as a metaphor to help us wrap our imaginations around the idea of producing a massive, random string of letters.

And that’s really the squishy innards of this little thought experiment, isn’t it? Looking at the probability of a seemingly impossible result occurring under the fictional guidelines of infinity. But why leave the concept floating about, untethered to any actual math? There are grants to be had, people. Somebody somewhere will pay money for a mathematical mind to figure out roughly how long we’d have to wait for these damn monkeys to produce something of value.

And they have.

Let’s simplify this. Instead of the works of Shakespeare, what if we wanted to see if a single monkey would arbitrarily type out ‘BANANA’ on a typewriter? Assuming a 50-key keyboard, the monkey has a 1/50 chance at typing a ‘B’ first. For each subsequent letter the odds of the little guy slapping the correct character goes up exponentially. So for him to hit all six letters of ‘BANANA’ the odds are 1/50 x 1/50 x 1/50 x 1/50 x 1/50 x 1/50, for a total of one in over 15 billion. Not likely, but it’s still possible.

But that’s just one monkey. Add more monkeys and you’re more likely to see ‘BANANA’ at the top of a page. As your number of monkeys approaches infinity, your odds of seeing the word increase to nearly 100%. But we’re only talking about one word here. Extrapolate the problem and things get messy – the text of Hamlet alone features over 130,000 letters. That’s a lot of typing.

Let’s shrink our conceptual keyboard from 50 keys to only 26 – forgetting even the space bar or any punctuation. We just want to see if these damn monkeys can get the letters of Hamlet in the correct order. There’s a 1 in 26 possibility a single monkey will type the first letter correctly (it’s a ‘W’ – I checked). Then there’s a 1 in 676 chance he’ll get the next one (1/26 x 1/26 that he lands a ‘W-H’). Even to hope a monkey will nail the first twenty letters is beyond a dream: the odds are 1 in 19,928,148,895,209,409,152,340,197,376. That’s as close to statistically zero as you’ll ever need to get, and we’ve still got 129,980 letters to go.

To be blunt, if every atom in the observable universe was a monkey equipped with a typewriter, typing from the Big Bang until the end of the universe, you would still need more time – more than 360,000 universe lifetimes – to achieve even a 1 in 10500 chance of seeing the text of Hamlet on one of those monkey’s pages. And that’s just Hamlet, not the complete works of Shakespeare. So it turns out the cliché about “given enough time…” is misleading. In 360,000 incarnations of all the time in the universe you’d still never see the result you were looking for.

So what’s the point?

Richard Dawkins, noted atheist, evolutionist, and all-around purveyor of common sense, applied the monkey conundrum to Charles Darwin’s theory of natural selection. One of the big criticisms of evolution is the apparent impossibility that a random collision of circumstances would procure our DNA – some greater power must have intervened. Not so, says Dawkins. These critics are mistaking randomness for adaptability. And he proved it.

Dawkins created a computer program called the Weasel Program. Its objective was to produce the phrase from Hamlet, “METHINKS IT IS LIKE A WEASEL” using a random letter generator. As we’ve discussed previously, the odds of this happening are somewhere outside a kajillion-zillion to one against. But if the program were to freeze a letter when happens to be correct (say, an ‘E’ in the second slot) and only allow the others to change, it wouldn’t take nearly as long to land at the desired result. In fact it only took 43 generations for “WDLTMNLT DTJBKWIRZREZLMQCO P” to transform into “METHINKS IT IS LIKE A WEASEL.”

DNA, and indeed all life on earth, adapts as it needs to in order to achieve its end result – catching prey, defending itself against pterodactyls, climbing trees, whatever. Score one for the monkeys.

Lecturers and students at the University of Plymouth in the southwest of England put this to a practical test in 2003. Using a well-spent £2000 grant, they left a computer keyboard inside the enclosure of six Celebes Crested Macaques at the Paignton Zoo in Devon, just to see what they’d create. The experiment lasted for a month and produced only five pages, mostly consisting of the letter ‘S’. This might have something to do with the alpha male monkey bashing the keyboard with a rock right away, and the batch of them spending more time urinating and defecating all over the thing instead of typing on it.

For a more accurate display of the extreme randomness of the infinite-monkeys concept, a guy named Dan Oliver in Scottsdale, Arizona developed a computer simulation, spewing a seemingly endless stream of random letters into his computer server’s ether. After more than 42,162,500,000 billion billion monkey-years, one of the so-called ‘monkeys’ produced nineteen consecutive letters that pair up with a string of nineteen letters in the text of The Two Gentlemen Of Verona.

I guess that’s a start. For now, I suppose I’ll have to keep writing these articles myself.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s