The infinite monkey theorem has been documented to exhaustion: If a monkey sits at a typewriter and pounds the keys for an infinite amount of time, there is a probability, however remote and insignificant, that the result will be the works of William Shakespeare, or essentially any other text. The mathematical proof is relatively simple, but not everyone knows that a project sought to reproduce the works of the famous Bard using millions of virtual monkeys…

The Infinite Monkey Theorem, Put to the Test?
Infinite Monkey Theorem

The Wikipedia article on the infinite monkey theorem offers some interesting examples: First, if the probability of rain in Moscow on a particular day is 0.4, and the probability of an earthquake in San Francisco is 0.00003, then the probability of both happening on the same day is the product of their multiplication, that is, 0.4 × 0.00003 = 0.000012.

Now, what about words? If we calculate the probability of producing the word "banana" on a typewriter with 50 keys, we have a ratio of 1/50 for each letter. The result is 1/50^6, or a probability of 1 in 15.625 million. This helps visualize the most extreme aspect of the theorem: the probability decreases exponentially, but since it is not zero, it leads us to the misleading conclusion that it is possible... unless we cheat a little, of course.

William Shakespeare and virtual monkeys

The Infinite Monkey Theorem, Put to the Test?
Without restrictions, millions of universes wouldn't be enough. But with some rules and millions of virtual monkeys... everything changes.

With that in mind, we travel to September 2011, when a programmer named Jesse Anderson created the Million Monkeys Project, with millions of virtual monkeys and their respective typewriters on Amazon EC2 and local hardware. In relaxed terms, the "garbage" written by the monkeys had a limit of nine characters, and was constantly compared with the text in Shakespeare's works.

If the result was negative, the system discarded the character string. At the same time, Anderson's virtual monkeys had the advantage of ignoring spaces, punctuation, and capital letters. Logically, those and other artificial restrictions were essential: the monkeys processed an average of 180,000 million character groups daily for a month and a half... but they got there in the end, reproducing all of Shakespeare's works.

And in real life? The closest we have is an experiment at Paignton Zoo (United Kingdom) in 2002, organized and funded by students from the University of Plymouth. The people in charge installed a computer in front of a group of six Sulawesi macaques. What did they get? Five pages of the letter S, the occasional appearance of A, J, L, and M... and a keyboard covered in excrement. From a certain point of view, the monkeys had effectively shat on Shakespeare.

Sources: IFLScience!, The Guardian, Jesse Anderson.