If Only Monkeys Worked in IT


by Tim Moran

We've all heard of the infinite monkey theorem. As Wikipedia explains it, this is the idea that "a monkey hitting keys at random on a typewriter keyboard for an infinite amount of time will almost surely type a given text, such as the complete works of William Shakespeare."

Shakespeare himself wrote in Much Ado About Nothing, "To be a well-favoured man is the gift of fortune; but to write and read comes by nature."

In the case of virtual monkeys, the writing comes by way of Jesse Anderson, a software developer who, spurred by a Simpson's episode, has taken on the infinite monkey theorem as a personal challenge.

Anderson created millions of virtual monkeys and set them to work on virtual typewriters. And, don't you know, they have succeeded in creating all of Shakespeare's works (or at least the components of those works) as set forth by Project Gutenberg, according to Anderson.

The project was started on August 21, 2011. From then until now, 6.5 trillion character groups have been randomly generated and checked out of the 5.5 trillion possible combinations. The final work randomly recreated by the virtual typing simians was "A Lover's Complaint."

Writes Anderson on his blog: "Instead of having real monkeys typing on keyboards, I have virtual, computerized monkeys that output random gibberish. This is supposed to mimic a monkey randomly mashing the keys on a keyboard. The computer program I wrote compares that monkey's gibberish to every work of Shakespeare to see if it actually matches a small portion of what Shakespeare wrote." To accomplish all this, the developer made use of Hadoop, Amazon EC2, and Ubuntu Linux.

This is yet another example of the truism that there is no problem too small or obscure to warrant the wasting of complex algorithms and huge amounts of computing power. (We wrote about another one of these last year--A Boring Day In The Life --in which William Tunstall-Pedoe calculated the most objectively dull day since 1900. No, I'm not going to tell you; read it.)

In any case, we congratulate Anderson and his monkeys on their accomplishment--one that, only fittingly, was inspired by a cartoon.


3 Comments for "If Only Monkeys Worked in IT"

  • Ed Cone October 12, 2011 10:44 am

    I don't think it counts to just generate the component words of the texts, either -- you (or your monkeys) have to put those bits in proper order to win. That's kind of what made Shakespeare Shakespeare.

  • Michael Roark October 11, 2011 1:53 pm

    You know when you take a limit of an equation and it gets closer and closer, but never crosses the line all the way into infinity? That's what this is like. A random output program will generate text and numbers randomly, but monkeys are going to hit keys in the center and given the design of a qwerty keyboard are unlikely to make the proper combinations. I know it's all good in fun and theory, but monkeys aren't that lucky... P.S. This was typed randomly by a non-monkey.

  • Blake Southwood October 08, 2011 4:48 pm

    It doesn't count. It has to be done by real life monkey and they need to be video taped doing it to prove they did it.

Leave a Comment