Given enough time, can monkeys actually write the complete works of Shakespeare?

The Infinite Monkey Theorem suggests monkeys could recreate Shakespeare, but a new study shows that it’s all but impossible, even with vast time.

The Infinite Monkey Theorem posits that monkeys could randomly recreate Shakespeare's works

The Infinite Monkey Theorem posits that monkeys could randomly recreate Shakespeare’s works. (CREDIT: Lise Gagne/iStockphoto)

The Infinite Monkey Theorem imagines a whimsical world where if enough monkeys typed at keyboards long enough, they'd eventually produce Shakespeare's entire works. The thought experiment, popularized in everything from science discussions to pop culture, suggests that even random keystrokes could theoretically align to reproduce great literature.

However, two Australian mathematicians recently took a serious look at this theory and found the claim to be far less likely than you'd expect—close to impossible, in fact, even with generous estimates on time, resources, and monkey manpower.

The theorem is often attributed to mathematicians and thinkers like Emile Borel or Thomas Huxley, although it may trace back as far as Aristotle. In its basic form, the theorem posits that randomness, over an infinite amount of time, could eventually lead to the creation of any conceivable text. But what if the constraints were realistic? What if the number of monkeys and the time they had to type were limited to finite values?

To answer this, mathematicians Stephen Woodcock and Jay Falletta from the University of Technology Sydney used a few real-world constraints. They calculated that even if every one of the world’s 200,000 chimpanzees typed at a rate of one keystroke per second on a 30-key keyboard for a time approaching the “heat death” of the universe—about a googol years (a one followed by 100 zeros)—it would be virtually impossible for them to replicate even a single work of Shakespeare.

The researchers imagined a monkey population typing on a 30-key keyboard, where the keys included all letters of the English alphabet and common punctuation. (CREDIT: CC BY-SA 4.0)

Published in Franklin Open, their study suggests that the probabilities involved make it all but certain that “monkey labor will never be a viable tool for developing written works of anything beyond the trivial.” The study calls the Infinite Monkey Theorem misleading and concluded that Shakespeare himself might have best answered the question of whether random typing could replace human creativity. As Hamlet says in Act 3, Scene 3: “No.”

For their calculations, the researchers imagined a monkey population typing on a 30-key keyboard, where the keys included all letters of the English alphabet and common punctuation. They assumed the chimps would spend around 30 years at the task, typing one keystroke per second. Importantly, they didn’t consider the need for food or the problem of Earth’s eventual destruction, focusing only on typing probabilities.

Under these conditions, the odds of a single chimp typing the word “banana” in its lifetime came out to just five percent. And for all of Shakespeare’s 884,647 words, they calculated the probability as so close to zero that the distinction is academic. According to Woodcock, “The chance of it happening is just orders of magnitude out.”

The sheer enormity of improbability becomes clearer when comparing the odds to the age of the universe. Even with millions of chimps typing at an unrealistic speed, the results wouldn’t change meaningfully. The paper further illustrated this by saying, “If every atom in the universe was a universe in itself, it still wouldn’t happen.”

The researchers compared the theorem to other paradoxes that demonstrate the limits of infinity, like Zeno’s Dichotomy Paradox, which suggests an object can never reach a destination if it continuously covers half the remaining distance.

Similarly, the Saint Petersburg Paradox explores how people wouldn’t be willing to pay an infinite price for a game with an infinite reward. Woodcock and Falletta’s work aligns the Infinite Monkey Theorem with these theoretical boundaries between the infinite and the finite.

The concept of infinity often leads to results that don’t align with practical experience, and the mathematicians observed that while infinite time theoretically allows for any possibility, finite resources make many outcomes impossible.

The expected number of keystrokes needed until each of the phrases presented in Table 1 would first be produced. Note the vertical scale, which is in units of log10(log10) universe deaths, truncated at 0. Points above 1 on this axis correspond to strings which are almost certain never to be typed before the universe ends. (CREDIT: Franklin Open)

Their study showed that limitations on the number of monkeys and the time available prevent even the shortest works from being replicated. For instance, the probability of producing the 1,800-word text of Curious George came out to be 6.4 x 10^-15043, which might as well be zero.

Surprisingly, Woodcock discovered that no one had formally debunked the Infinite Monkey Theorem before. He explained, “It’s one of those examples where the mathematical concept of infinity gives you a result which is grossly misleading in the real world.”

Critics of the study argue that examining the theorem with finite numbers misses the point of infinity. But Woodcock counters that limiting resources brings the theory into a realistic realm, showing that even within vast timeframes, random processes are unlikely to produce complex, meaningful texts.

The study raises questions about how accurately infinity-based theories apply to real life. Ian Stewart, an emeritus professor at Warwick University, sees the study as redundant, saying, “Every mathematician in the world knows this.” Martin Hairer from Imperial College London agreed, saying, “The universe could die and be reborn millions and millions of times, and it still wouldn’t happen.”

The expected number of keystrokes required to produce target strings of lengths up to L of 100,000. Note that the current chimpanzee population of around 200,000 is equivalent to log10(M) of around 5.3. (CREDIT: Franklin Open)

The real-world behavior of primates also complicates the theorem’s whimsical idea of monkey typists. Daniel Simmonds, a zoological manager at the London Zoo, added a practical perspective. He noted that giving a keyboard to a gorilla would likely end with the device being smashed or eaten.

Even with their cognitive abilities, Simmonds explained, “The most intelligent gorilla I’ve worked with, Zaire, would be unlikely to produce A Midsummer Night’s Dream.”

Woodcock hopes that their work will help adjust how people view randomness and probability. While the theorem will likely remain a popular thought experiment, it’s clear that, practically speaking, the results are far from probable. Woodcock concluded, “We have to accept that monkey labor isn’t a meaningful replacement for human creativity.”

The researchers argue that, with a reasonable understanding of time and numbers, the Infinite Monkey Theorem does not hold up in a finite universe. If you need a simian author, prepare for disappointment—these primates aren’t about to solve the mysteries of literature anytime soon.

Alas, as Shakespeare might have put it: “Poor ape, how thou sweat'st!”

Note: Materials provided above by The Brighter Side of News. Content may be edited for style and length.


Like these kind of feel good stories? Get The Brighter Side of News' newsletter.


Joshua Shavit
Joshua ShavitScience and Good News Writer
Joshua Shavit is a bright and enthusiastic 18-year-old student with a passion for sharing positive stories that uplift and inspire. With a flair for writing and a deep appreciation for the beauty of human kindness, Joshua has embarked on a journey to spotlight the good news that happens around the world daily. His youthful perspective and genuine interest in spreading positivity make him a promising writer and co-founder at The Brighter Side of News.