The idea is known as the Infinite Monkey Theorem. It says that if you had an infinite number of monkeys randomly hitting keys on an infinite number of typewriters for an infinite amount of time, eventually one of them would type the complete works of Shakespeare — including Hamlet, Macbeth, Romeo and Juliet, and everything else.
The important word is infinite. It isn't saying that a few monkeys will eventually become Shakespearean authors. It is a statement about probability: given unlimited random attempts, any particular finite sequence of characters has a probability approaching certainty of eventually appearing.
And then somebody actually tried it! 🐒⌨️
In 2002, researchers and artists associated with the University of Plymouth put a computer keyboard inside the enclosure of six Sulawesi crested macaques at Paignton Zoo in Devon, England.
Their names were:
Elmo, Gum, Heather, Holly, Mistletoe and Rowan.
The keyboard was protected inside a Perspex enclosure, but the monkeys could reach the keys. The project ran for about four weeks and was intended partly as an art/performance project exploring the relationship between animals, computers and randomness.
So what did the monkeys write?
Shakespeare?
No.
A sentence?
No.
A recognisable word?
Nope. 😂
They produced about five pages of material, overwhelmingly consisting of the letter:
SSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSS
Toward the end, a few other letters appeared, including A, J, L and M, but nothing resembling a human word.
And the monkeys weren't exactly behaving like aspiring authors. One reportedly used a stone to attack the equipment, while the keyboard also received some decidedly non-literary attention from the animals. The researchers concluded that the monkeys weren't actually behaving like random-number generators: they had preferences, became bored, interacted deliberately with the machine and responded to what happened when they pressed keys.
But here's the fascinating part
The experiment didn't disprove the Infinite Monkey Theorem.
The theorem doesn't say:
"Give six monkeys a keyboard and they'll eventually write Shakespeare."
It says, essentially:
Give a truly random process unlimited attempts, and any finite sequence will eventually appear with probability 1.
Six monkeys typing for a month is nowhere remotely close to infinity.
And Shakespeare is an absolutely enormous target. Hamlet alone contains tens of thousands of words. The complete Shakespearean corpus contains millions of characters. The probability of randomly generating a particular long passage becomes unimaginably tiny as the passage gets longer.
There's another subtle point: real monkeys aren't random typing machines. A monkey doesn't think, "I'll press Q this time." It might repeatedly hit the same key, bang the keyboard, pull keys off, stop typing, or deliberately interact with the equipment. That's why the Paignton experiment wasn't really a mathematical test of the theorem.
And there's a great distinction: monkey vs. chimpanzee
The famous saying usually talks about monkeys, but people often picture a chimpanzee sitting at a typewriter.
Chimpanzees aren't monkeys. They're apes, along with gorillas, orangutans, bonobos and humans.
So the classic cartoon image of a chimpanzee wearing spectacles and typing:
“To be, or not to be…”
is actually an ape rather than a monkey. 🐒➡️🦍
Could a computer do it?
Absolutely — and that's where things get really interesting.
Instead of using actual animals, computers can simulate random typing billions or trillions of times faster. Researchers and programmers have created simulations in which virtual "monkeys" generate random characters and search for Shakespearean sequences. Some approaches don't even use pure randomness; they use algorithms that preserve useful fragments once they appear, making the process dramatically faster.
But once you start doing that, you're no longer really demonstrating the classic theorem. You're using computer algorithms to search for the desired text.
So, sadly, the six macaques of Paignton Zoo never gave us The Tragedy of Elmo, Prince of Denmark.
Their literary masterpiece was essentially:
SSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSS














