Lifestyle & Belief

Virtual monkeys on typewriters re-create works of Shakespeare


A one-month-old baby lion-tailed macaque clings to its mother at Berlin's Zoologischer Garten Zoo August 23, 2011. The lion-tailed macaque (Macaca silenus) is an Old World monkey that is endemic to the Western Ghats of south India, it ranks among the rarest and most threatened primates. Some 3000-3500 of these animals live scattered over several areas in Karnataka, Kerala and Tamil Nadu.



Can a few million virtual monkeys type the complete works of Shakespeare by randomly hitting keys on virtual typewriters?

An American computer programmer has started a project that is a modern-day test of the theory of an infinite number of monkeys typing on an infinite number of typewriters, BBC News reports.

More from GlobalPost: Tiny squirrel monkeys jailed after luxury life

Jesse Anderson said he started the project on Aug. 21 as a way of learning the Hadoop programming tool, and to put Amazon's web services to the test. The monkeys are "typing" via a home PC on Amazon's EC2 cloud computing system.

"A running total of how well they are doing shows that the re-creation is 99.990% complete," the BBC says. "The first single work to be completed was the poem 'A Lover's Complaint.'"

Anderson's virtual monkeys are small computer programs uploaded to Amazon servers that produce random sequences of text, the BBC says. The sequences are nine characters long, and each is checked for matches in any of Shakespeare's works. If there is no match, it is discarded.

"To get a sense of the scale of the project, there are about 5.5 trillion different combinations of any nine characters from the English alphabet," the BBC says.

But to make it easier, punctuation and spaces have been removed from the text being sampled.

Mathematicians told the BBC that the constraints put on the project mean that it can be completed in a reasonable amount of time.

Without these constraints, "it would take far, far longer."