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 strange rock on Mars is forcing us to rethink the Red Planet’s history

A strange rock covered in tiny spheres may hold secrets to Mars’ watery — or fiery — past.

Scientists Found a 380-Million-Year-Old Trick in Velvet Worm Slime That Could Lead To Recyclable Bioplastic

Velvet worm slime could offer a solution to our plastic waste problem.

A Dutch 17-Year-Old Forgot His Native Language After Knee Surgery and Spoke Only English Even Though He Had Never Used It Outside School

He experienced foreign language syndrome for about 24 hours, and remembered every single detail of the incident even after recovery.

Your Brain Hits a Metabolic Cliff at 43. Here’s What That Means

This is when brain aging quietly kicks in.

Scientists Just Found a Hidden Battery Life Killer and the Fix Is Shockingly Simple

A simple tweak could dramatically improve the lifespan of Li-ion batteries.

Westerners cheat AI agents while Japanese treat them with respect

Japan’s robots are redefining work, care, and education — with lessons for the world.

Scientists Turn to Smelly Frogs to Fight Superbugs: How Their Slime Might Be the Key to Our Next Antibiotics

Researchers engineer synthetic antibiotics from frog slime that kill deadly bacteria without harming humans.

This Popular Zero-Calorie Sugar Substitute May Be Making You Hungrier, Not Slimmer

Zero-calorie sweeteners might confuse the brain, especially in people with obesity

Any Kind of Exercise, At Any Age, Boosts Your Brain

Even light physical activity can sharpen memory and boost mood across all ages.

A Brain Implant Just Turned a Woman’s Thoughts Into Speech in Near Real Time

This tech restores speech in real time for people who can’t talk, using only brain signals.