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

Mexico Will Give U.S. More Water to Avert More Tariffs

Droughts due to climate change are making Mexico increasingly water indebted to the USA.

Chinese Student Got Rescued from Mount Fuji—Then Went Back for His Phone and Needed Saving Again

A student was saved two times in four days after ignoring warnings to stay off Mount Fuji.

The perfect pub crawl: mathematicians solve most efficient way to visit all 81,998 bars in South Korea

This is the longest pub crawl ever solved by scientists.

This Film Shaped Like Shark Skin Makes Planes More Aerodynamic and Saves Billions in Fuel

Mimicking shark skin may help aviation shed fuel—and carbon

China Just Made the World's Fastest Transistor and It Is Not Made of Silicon

The new transistor runs 40% faster and uses less power.

Ice Age Humans in Ukraine Were Masterful Fire Benders, New Study Shows

Ice Age humans mastered fire with astonishing precision.

The "Bone Collector" Caterpillar Disguises Itself With the Bodies of Its Victims and Lives in Spider Webs

This insect doesn't play with its food. It just wears it.

University of Zurich Researchers Secretly Deployed AI Bots on Reddit in Unauthorized Study

The revelation has sparked outrage across the internet.

Giant Brain Study Took Seven Years to Test the Two Biggest Theories of Consciousness. Here's What Scientists Found

Both came up short but the search for human consciousness continues.

The Cybertruck is all tricks and no truck, a musky Tesla fail

Tesla’s baking sheet on wheels rides fast in the recall lane toward a dead end where dysfunctional men gather.