spaceSpace and Physics

Researchers Tested Whether Infinite Monkeys Could Write Shakespeare, With Actual Monkeys

James Felton

James Felton

Senior Staff Writer

clockFeb 11 2022, 13:08 UTC
Monkey shakespeare

Monkey Shakespeare. Image credit: Wiratchai wansamngam/

There's something quite satisfying about the infinite monkey therorem, which goes like this: an infinite number of monkeys typing at an infinite number of typewriters would one day produce the entire works of Shakespeare, really showing that smug dead genius what's what. 

It's not just the works of Shakespeare, of course. Given enough time and monkeys, eventually, they'd write everything, including the above sentences. Please note that if you are typing up a monkey copy of this article from far in the future we'll sue. We're not above suing a monkey, Donkey Kong, and will see you in space court.


Getting your hands on infinite monkeys is a bit challenging, let alone hiring infinite zookeepers to clean up infinite piles of feces, so computer programmers have attempted to simulate the monkeys using random text generators. One of the first attempts, in 2004, saw a tiny bit of success when one of the monkeys bashed out the phrase 'VALENTINE. Cease toIdor:eFLP0FRjWK78aXzVOwm)-‘;8.t', the first part of which was in Shakespeare's The Two Gentlemen of Verona.

That took the simulated monkeys 42,162,500,000 billion billion monkey years. The entire works of Shakespeare, it's fair to say, would take a long time.

It's clear using that system of truly random typing, even if you're willing to put aside your inner editor and allow for a few monkey typos here and there, the universe would end before the monkeys had even typed out one of the lesser comedies. Sorry, Malvolio, no hilarious comedy tights for you, these lazy monkeys can't even be bothered to write episode three of The Big Bang Theory, let alone Twelfth Night.

However, using generous methods, others have been more successful. 


One researcher allowed his simulated "monkeys" to type out nine-letter strings only, then cross-checked them with all of Shakespeare's text. The nonsense is chucked away, and any fragments are kept for the Shakespeare pile. Using this method the system has successfully created every work of Shakespeare. They had a lot of help, but it's still impressive number-crunching given that there are 5.5 trillion possible different combinations of any nine characters. If they were doing it entirely at random, however, it's back to being longer than the existence of the universe.

"Along the way, there would be untold numbers of attempts with one character wrong; even more with two wrong, and so on," Dr Ian Stewart, emeritus professor of mathematics at the University of Warwick, told the BBC. "Almost all other books, being shorter, would appear (countless times) before Shakespeare did."

As for actual monkeys, they have actually been given the task before, just to see what they would do. In 2002, the University of Plymouth got funding to put a keyboard in the monkey enclosure at Paignton Zoo in Devon, England. The monkeys, and we're really being fair to them here, were awful. After a month, all they had produced was a string of letters, mainly the letter 's', and there was only one vowel in the whole document – 'a'.

What's more, the alpha male became irate and started smashing the keyboard with a stone, whilst other monkeys took a poop on it. Hey, we all need to let off steam when we get writer's block.



spaceSpace and Physics
  • tag
  • math,

  • statistics