Could monkeys really type all of Shakespeare?
Science doesn’t usually tolerate frivolity, but the infinite monkey theorem enjoys an exception. The question it poses is thoroughly outlandish: Could an infinite number of monkeys, each given an infinite amount of time to peck away at a typewriter (stocked with an infinite supply of paper, presumably) eventually produce, by pure chance, the complete works of William Shakespeare?
The problem was first described in a 1913 paper by French mathematician Émile Borel, a pioneer of probability theory. As modernity opened new scientific fronts, approaches to the theorem also evolved. Today, the problem pulls in computer science and astrophysics, among other disciplines.
In 1979, The New York Times reported on a Yale University professor who, using a computer program to try to prove this “venerable hypothesis,” managed to produce “startlingly intelligible, if not quite Shakespearean” strings of text. In 2003, British scientists put a computer into a monkey cage at the Paignton Zoo. The outcome was “five pages of text, primarily filled with the letter S,” according to news reports. In 2011, Jesse Anderson, an American programmer, ran a computer simulation with much better results, albeit under conditions that — like the Yale professor’s — mitigated chance.
A new paper by Stephen Woodcock, a mathematician at the University of Technology Sydney, suggests that those efforts may have been for naught: It concludes that there is simply not enough time until the universe expires for a defined number of hypothetical primates to produce a faithful reproduction of “Curious George,” let alone “King Lear.” Don’t worry, scientists believe that we still have —100100 googol years, or 1 followed by 100 zeros — until the lights go out. But when the end does come, the typing monkeys will have made no more progress than their counterparts at the Paignton Zoo, according to Woodcock.
“It’s not happening,” Woodcock said in an interview. The odds of a monkey typing out the first word of Hamlet’s famous “To be or not to be” soliloquy on a 30-key keyboard is 1 in 900, he said. Not bad, one could argue — but every new letter offers 29 fresh opportunities for error. The chances of a monkey spelling out “banana” are “approximately 1 in 22 billion,” Woodcock said.
The idea for the paper came to Woodcock during a lunchtime discussion with Jay Falletta, a water-usage researcher at the University of Technology Sydney. The two were working on a project about washing machines, which strain Australia’s extremely limited water resources. They were “a little bit bored” by the task, Woodcock acknowledged. (Falletta is a co-author on the new paper.)
If resources for washing clothes are limited, why shouldn’t typing monkeys be similarly constrained? By neglecting to impose a time or monkey limit on the experiment, the infinite monkey theorem essentially contains its own cheat code. Woodcock, on the other hand, opted for a semblance of reality — or as much reality as a scenario featuring monkeys trying to write in iambic pentameter would allow — to say something about the interplay of order and chaos in the real world.
Even if the life span of the universe were extended billions of times, the monkeys would still not accomplish the task, the researchers concluded. Their paper calls the infinite monkey theorem “misleading” in its fundamental assumptions. It is a fitting conclusion, perhaps, for a moment when human ingenuity seems to be crashing hard against natural constraints.
Low as the chances are of a monkey spelling out “banana,” they are still “an order of magnitude which is in the realm of our universe,” Woodcock said. Not so with longer material such as the children’s classic “Curious George” by Margret Rey and H.A. Rey, which contains about 1,800 words. The chances of a monkey replicating that book are 1 in 1015000 (a 1 followed by 15,000 zeros). And, at nearly 836,000 words, the collected plays of Shakespeare are about 464 times longer than “Curious George.”
“If we replaced every atom in the universe with a universe the size of ours, it would still be orders of magnitude away from making the monkey typing likely to succeed,” Woodcock said.
The new paper has been mocked online because the authors purportedly fail to grapple with infinity. Even the paper’s title, “A numerical evaluation of the Finite Monkeys Theorem,” seems to be a mathematical bait-and-switch. Isn’t infinity a basic condition of the infinite monkey theorem?
It shouldn’t be, Woodcock seems to be saying. “The study we did was wholly a finite calculation on a finite problem,” he wrote in an email. “The main point made was just how constrained our universe’s resources are. Mathematicians can enjoy the luxury of infinity as a concept, but if we are to draw meaning from infinite-limit results, we need to know if they have any relevance in our finite universe.”
This conclusion circles back to Borel, the mathematician who took an unlikely turn into politics, eventually fighting against the Nazis as part of the French Resistance. It was during the war that he introduced an elegant and intuitive law that now bears his name, and which states: “Events with a sufficiently small probability never occur.” That is where Woodcock lands, too. (Mathematicians who believe the infinite monkey theorem holds true cite two related, minor theorems known as the Borel-Cantelli lemmas, developed in the prewar years.)
The new paper offers a subtle comment on the seemingly unbridled optimism of some proponents of artificial intelligence. Woodcock and Falletta note, without truly elaborating, that the monkey problem could be “very pertinent” to today’s debates about artificial intelligence.
For starters, just as the typing monkeys will never write “Twelfth Night” without superhuman editors looking over their shoulders, so increasingly powerful artificial intelligences will require increasingly intensive human input and oversight. “If you live in the real world, you have to do real-world limitation,” said Anderson, who conducted the 2011 monkey experiment.
There is no free lunch, so to speak, said Eric Werner, a research scientist who runs the Oxford Advanced Research Foundation and has studied various forms of complexity. In a 1994 paper about ants, Werner laid out a guiding principle that, in his view, applies equally well to typing monkeys and today’s language-learning models: “Complex structures can only be generated by more complex structures.” Lacking constant curation, the result will be a procession of incoherent letters or what has come to be known as “AI slop.”
A monkey will never understand Hamlet’s angst or Falstaff’s bawdy humor. But the limits of AI cognition are less clear. “The big question in the industry is when or if AI will understand what it is writing,” Anderson said. “Once that happens, will AI be able to surpass Shakespeare in artistic merit and create something as unique as Shakespeare created?”
And when that day comes, “Do we become the monkeys to the AI?”
This article originally appeared in The New York Times.
© 2025 The New York Times Company