Skip to content

Can monkeys really type all of Shakespeare?

    Science generally does not tolerate frivolity, but the infinite monkey theorem has an exception. The question it poses is downright bizarre: could an infinite number of monkeys, each given an infinite amount of time to peck at a typewriter (presumably supplied with an infinite supply of paper), eventually produce the complete works of William Shakespeare by sheer chance? ?

    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. Nowadays the problem occurs in computer science and astrophysics, among others.

    In 1979, The New York Times reported on a Yale professor who, using a computer program to prove this “venerable hypothesis,” managed to produce “surprisingly comprehensible, if not quite Shakespearean” strings of text. In 2003, British scientists placed a computer in a monkey cage at Paignton Zoo. The result was “five pages of text, mostly 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 those of the Yale professor – reduced the odds.

    A new paper by Stephen Woodcock, a mathematician at the University of Technology Sydney, suggests that these efforts may have been in vain: it concludes that there simply isn't enough time until the universe expires before a certain number of hypothetical primates can faithfully reproduce . reproduction of 'Curious George', let alone 'King Lear'. Don't worry, scientists believe we'll still have googol years – 10¹⁰⁰, or 1 followed by 100 zeros – until the lights go out. But when the end comes, the typing monkeys will have made no more progress than their Paignton Zoo counterparts, Dr Woodcock said.

    “It doesn't happen,” said Dr. Woodcock in an interview. The odds of a monkey typing the first word of Hamlet's famous soliloquy “To be or not to be” on a 30-key keyboard were 1 in 900, he said. Not bad, you might say, but every new letter offers 29 new opportunities for error. The chance of a monkey spelling “banana” is “about 1 in 22 billion,” said Dr. Woodcock.

    The idea for the article came from Dr. Woodcock during a lunch conversation with Jay Falletta, a water consumption researcher at the University of Technology Sydney. The two worked on a project about washing machines, which put a strain on Australia's extremely limited water resources. They were “a little bored” by the task, Dr. acknowledged. Woodcock. (Mr. Falletta is a co-author of the new article.)

    If the resources for washing clothes are limited, why shouldn't typing monkeys be similarly limited? By neglecting to impose a time or monkey limit on the experiment, the infinite monkey theorem essentially contains its own cheat code. Dr. Woodcock, on the other hand, opted for an appearance of reality – or as much reality as a screenplay with 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 lifespan of the universe were extended billions of times, the monkeys still wouldn't complete the task, the researchers concluded. Their article calls the infinite monkey theorem “misleading” in its fundamental assumptions. It's perhaps a fitting conclusion for a moment when human ingenuity seems to be running headlong against natural limitations.

    However small the chance is of a monkey spelling “banana,” it's still “an order of magnitude within the realm of our universe,” said Dr. Woodcock. This is not the case with longer material such as the children's classic “Curious George” by Margret Rey and HA Rey, which contains approximately 1,800 words. The chance of a monkey replicating that book is 1 in 10¹⁵⁰⁰⁰ (a 1 followed by 15,000 zeros). And at nearly 836,000 words, Shakespeare's collected plays are about 464 times longer than “Curious George.”

    “If we replaced every atom in the universe with a universe the size of ours, we would still be an order of magnitude away from making monkey typing likely to succeed,” said Dr. Woodcock.

    Like other monkey theorem enthusiasts, Dr. Woodcock mentioned a famous episode of “The Simpsons” in which crusty plutocrat C. Montgomery Burns attempts the experiment but flies into a rage when a monkey repeats the opening line of Charles Dickens' “A Tale of Two Cities .” In reality, the monkey's feat (“It was the best of times, it was the blur of times”) would have been a stunning victory over randomness.

    Outside of cartoons, such successes are unlikely. First, there is cosmic death to consider. Many physicists believe that in 10¹⁰⁰ years – a much greater number than it appears in type – entropy will have caused all the heat in the universe to disappear. However far away that moment may be, experts believe it is coming.

    Then there is the availability of monkeys. From more than 250 possible species, Dr. Woodcock chimpanzees, our closest genomic relatives, to mimic the Bard. He recruited 200,000 people – the entire population of chimpanzees currently living on Earth – until the end of time. (Optimistically, he did not plan for the species' extinction or extinction. Nor did he consider limitations such as the availability of paper or electricity; the study does not specify which platform the monkeys might use.)

    Monkeys who want to recreate Shakespeare also need editors, with a strict reinforcement training program that allows for learning – and lots of it, as Dr. Woodcock determined the lifespan of each monkey at 30 years. “If it's cumulative, obviously you can get somewhere,” says Richard Dawkins, the evolutionary biologist, who discusses the typical apes in “The Blind Watchmaker,” his 1986 book on evolution. But unless typing were “iterative,” Dr. Dawkins said in an interview, progress would be impossible.

    The new paper has been mocked online for its authors' apparent failure to grapple with infinity. Even the title of the paper, “A Numerical Evaluation of the Finite Monkey Theorem,” seems like a mathematical lure. Isn't infinity a basic condition of the infinite monkey theorem?

    That shouldn't be the case, seems Dr. Woodcock to say. “The research we did was entirely a finite calculation of a finite problem,” he wrote in an email. “The main point made was how limited the resources of our universe are. Mathematicians can enjoy the luxury of infinity as a concept, but if we want to derive meaning from results with infinite limits, we need to know whether they have any relevance in our finite universe.

    This conclusion goes back to the French mathematician Borel, who took an unlikely turn in politics and ended up fighting 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 sufficiently small probability will never occur.” That's also true Dr. Woodcock ends up. (Mathematicians who believe the infinite monkey theorem to be true cite two related, smaller theorems known as the Borel-Cantelli lemmas, developed in the pre-war years.)

    The new article offers a subtle commentary on the seemingly unbridled optimism of some artificial intelligence proponents. Dr. Woodcock and Mr Falletta note, without really elaborating, that the monkey problem could be “highly relevant” to current debates about artificial intelligence.

    For starters, just as the typing apes will never write Twelfth Night without superhuman editors looking over their shoulders, increasingly powerful artificial intelligences will require ever more intensive human input and supervision. “If you live in the real world, you have to do real world constraints,” said Mr. Anderson, who conducted the 2011 monkey experiment.

    There is no free lunch, so to speak, says Eric Werner, a research scientist who runs the Oxford Advanced Research Foundation and has studied various forms of complexity. In a 1994 article about ants, Dr. Werner lays out a guiding principle that, in his view, applies both to typing monkeys and to current models of language learning: “Complex structures can only be generated by more complex structures.” In the absence of constant curation, the result will be a parade of disjointed letters or what has become known as “AI slop.”

    A monkey will never understand the fear of Hamlet or the bawdy humor of Falstaff. But the limits of AI cognition are less clear. “The big question in the industry is when and if AI will understand what it writes,” 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: “Will we become the monkeys of AI?”