dcsimg
 
 
 
 
 

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.