homehome Home chatchat Notifications


Can Monkeys Type Out Hamlet? Scientists Put the Infinite Monkey Theorem to the Test (And It's Pretty Funny)

Turns out that monkeys (or chimps) can't randomly type Shakespeare's works even if they were given billions of years to try.

Tibi Puiu
October 31, 2024 @ 9:09 pm

share Share

AI Image of a chimpanzee using a typewriter. Infinite monkey theorem.
AI-generated illustration/Midjourney.

In 1854, the Irish mathematician George Boole mused that probability was “expectation founded upon partial knowledge.” His insight captures an eternal question: if randomness reigns long enough, might the improbable become inevitable? And, if so, could a monkey — given infinite time — type out the works of Shakespeare?

For decades, the Infinite Monkey Theorem has toyed with this notion. It suggests that, with infinite time or an infinite number of monkeys, randomness would yield the literary marvels of humanity. But for Associate Professor Stephen Woodcock and Jay Falletta, mathematicians from the University of Technology Sydney, it begged a closer look.

“The Infinite Monkey Theorem only considers the infinite limit,” Woodcock explains. “We wanted to bring it down to Earth — or rather, to the universe as we know it.”

So they did. In a study published this week, Woodcock and Falletta set out to test the theorem using the finite lifespan of the universe itself, discarding the boundless realms of whimsical thought experiments. Their findings reveal just how much reality skews the picture.

An Unlikely Typing Test

The setup was straightforward, though somewhat sobering for the typists. It considered one chimpanzee, one typewriter, and one universe’s worth of time — roughly 10100 years. The researchers estimated that each chimp types at a modest one key per second, but would get an entire universe’s run to try typing out Shakespeare.

As a quick aside, yes, chimps aren’t monkeys — they’re apes because they lack a tail. Okay, moving on.

To spice things up, they also considered the scenario with not just one chimp but the entire current chimpanzee population. About 200,000 chimps were given typewriters and billions of years of time to randomly type out a Shakespearian sonnet. Each chimp was assumed to have the same productive, if reluctant, typing speed.

With a 30-key typewriter that included letters and punctuation, the monkeys were, in theory, well-prepared for a Shakespearean challenge. But here’s where it gets tricky: even with all chimps conscripted into literary labor, the study found that they would struggle to produce much more than random gibberish. The odds that a single chimp would type out “bananas” in its lifetime (40-50 years), for instance, hovered around 5%.

And what about the Bard himself? Even with 200,000 chimps, Woodcock’s team calculated, there is essentially no chance that they would manage to type even a fraction of Shakespeare’s complete works (884,647 words) before the universe ends.

Woodcock, amused but serious, observed that “it is not plausible that . . . monkey labor will ever be a viable tool for developing non-trivial written works.” Indeed, he adds, “This finding places the theorem among other probability puzzles and paradoxes . . . where using the idea of infinite resources gives results that don’t match up with what we get when we consider the constraints of our universe.”

Infinite Imaginations, Finite Realities

The theorem’s origins and cultural life tell a story of their own. From Aristotle to the French mathematician Emile Borel, thinkers have speculated on the border between unlikely and impossible. Borel, a politician and mathematician who mused on probability in the 1920s, concluded that events with vanishingly small probabilities could essentially be treated as impossible.

He actually proposed the Infinite Monkey Theorem in jest, to show that although some events could be mathematically possible, they should be most certainly considered impossible in the context of how humans definite reality.

The idea that randomness could eventually yield Shakespeare is one of those appealing thought experiments that has survived centuries. And this is not even the first time someone has tried to tackle it head-on. In 2003, researchers attempted to let the theorem play out by giving six Celebes crested macaques a computer at the Paignton Zoo in England. Not a single line of iambic pentameter emerged. Instead, the monkeys beat the keyboard with stones, producing only five pages of the letter “s,” punctuated by various bodily fluids. Apparently, Shakespeare was not in the cards.

More recently, in 2011, programmer Jesse Andersen spawned a million virtual monkeys that ran through 180 billion character groups per day. In 45 days, they remarkably succeeded in forming parts of Shakespeare’s texts — though through a bit of “cheating”. The software was made to spot and capture groups of nine correct characters in the right sequence.

Woodcock and Falletta’s work adds another wrinkle to the theorem’s long life. Today, in an era when artificial intelligence generates poetry, prose, and music, the thought experiment of typing monkeys feels more relevant than ever. And yet, as we ponder machines that mimic human creativity, the Infinite Monkey Theorem reminds us of a peculiar truth: randomness, without meaning, is just noise. It takes more than keystrokes to breathe life into words.

The new findings appeared in the journal Franklin Open.

share Share

This 5,500-year-old Kish tablet is the oldest written document

Beer, goats, and grains: here's what the oldest document reveals.

A Huge, Lazy Black Hole Is Redefining the Early Universe

Astronomers using the James Webb Space Telescope have discovered a massive, dormant black hole from just 800 million years after the Big Bang.

Did Columbus Bring Syphilis to Europe? Ancient DNA Suggests So

A new study pinpoints the origin of the STD to South America.

The Magnetic North Pole Has Shifted Again. Here’s Why It Matters

The magnetic North pole is now closer to Siberia than it is to Canada, and scientists aren't sure why.

For better or worse, machine learning is shaping biology research

Machine learning tools can increase the pace of biology research and open the door to new research questions, but the benefits don’t come without risks.

This Babylonian Student's 4,000-Year-Old Math Blunder Is Still Relatable Today

More than memorializing a math mistake, stone tablets show just how advanced the Babylonians were in their time.

Sixty Years Ago, We Nearly Wiped Out Bed Bugs. Then, They Started Changing

Driven to the brink of extinction, bed bugs adapted—and now pesticides are almost useless against them.

LG’s $60,000 Transparent TV Is So Luxe It’s Practically Invisible

This TV screen vanishes at the push of a button.

Couple Finds Giant Teeth in Backyard Belonging to 13,000-year-old Mastodon

A New York couple stumble upon an ancient mastodon fossil beneath their lawn.

Worms and Dogs Thrive in Chernobyl’s Radioactive Zone — and Scientists are Intrigued

In the Chernobyl Exclusion Zone, worms show no genetic damage despite living in highly radioactive soil, and free-ranging dogs persist despite contamination.