Bear with me today while I explore the pleasures of the Infinite Monkey Theorem. We’re all familiar with it: Set a monkey typing for an infinite amount of time and eventually the works of Shakespeare emerge. It’s a pleasing thought experiment because it’s so visual and involves animals that are like us in many ways. Now we learn from a new paper that the amount of time involved to reproduce the Bard is actually longer than the age of the universe. About which more in a moment, but indulge me again as I explore infinite monkeys as they appear in fictional form in the mid-20th Century.

In “Inflexible Logic,” which ran in The New Yorker‘s February 3, 1940 issue, Russell Maloney tells the tale of a man named Bainbridge, a bachelor, dilettante and wealthy New Yorker who lived in luxury in a remote part of Connecticut, “in a large old house with a carriage drive, a conservatory, a tennis court, and a well-selected library.” He has about him the air of an English country gentlemen of the 18th Century, interested in both the arts and science. An eccentric.

One night at a party in the city, Bainbridge enters into conversation with literary critic Bernard Weiss, who he overhears saying of a lionized author: “Of course he wrote one good novel. It’s not surprising. After all, we know that if six chimpanzees were set to work pounding six typewriters at random, they would, in a million years, write all the books in the British Museum.”

Impressed, Bainbridge learns that the experiment has never been tried. He acquires six chimpanzees and provides them with paper and typewriters. Some weeks later, he is with James Mallard, an assistant professor of mathematics at Yale, whom he has asked to his estate to discuss the ongoing experiment. Showing him the monkeys at work, he points to tall piles of manuscript along the wall, containing in each complete works by writers such as Charles Dickens, Anatole France, Somerset Maugham and Marcel Proust.

Image credit: Amazingly generated by Gemini AI. Note that the three foreground monkeys have their typewriters facing the wrong way, but I suppose it doesn’t matter, as they can still reach the keys.

Indeed, since the beginning of the experiment over a month before, not a single monkey has spoiled a single sheet of paper. Great literary works continue to pile up. After Mallard leaves, the weeks go by and the monkeys never cease their labors. They produce Trevelyan’s Life of Macaulay, The Confessions of St. Augustine, Vanity Fair and more. Bainbridge keeps passing this information on to Mallard, who grows increasingly confounded. And worried.

Finally, when leafing through a manuscript of Pepys’ Diary produced by Chimpanzee F (named Corky), a work that contains material not in his own abridged edition, Bainbridge is again visited by Mallard at his home. Taken back to the scene of the experiment, Mallard pulls out two revolvers and shoots the chimpanzees. Both men end up, after a fight, shooting each other and both die. Mallard’s last words: “The human equation…always the enemy of science… I deserve a Nobel.”

And so the story concludes:

“When the old butler came running into the conservatory to investigate the noises, his eyes were met by a truly appalling sight. A newly risen moon shone in through the conservatory windows on the corpses of the two gentlemen, each clutching a smoking revolver. Five of the chimpanzees were dead. The sixth was Chimpanzee I. His right arm disabled, obviously bleeding to death, he was slumped before his typewriter. Painfully, with his left hand, he took from the machine the completed last page of Florio’s Montaigne. Groping for a fresh sheet, he inserted it, and typed with one finger, “UNCLE TOM’S CABIN, by Harriett Beecher Stowe. Chapte…” Then he too was dead.”

Maloney was a Harvard grad who seeded ideas for many of The New Yorker‘s cartoons; he became editor and writer of the Talk of the Town section. Here he shows us what happens when something absurd becomes true. The story was reprinted in Clifton Fadiman’s Fantasia Mathematica (Simon and Schuster, 1958).

What would actually happen if we set up Bainbridge’s test? The new work exploring this is out of the University of Sydney, where Stephen Woodcock and Jay Falletta considered the problem within a more spacious context. Bainbridge was dealing with a tiny cadre of six monkeys. But most versions of the thought experiment involve infinity. Woodcock explains:

“The Infinite Monkey Theorem only considers the infinite limit, with either an infinite number of monkeys or an infinite time period of monkey labour. We decided to look at the probability of a given string of letters being typed by a finite number of monkeys within a finite time period consistent with estimates for the lifespan of our universe.”

This is the kind of thing mathematicians do, and I have often wished I had the slightest gift for math so I could join the company of such a jolly group. Or maybe that’s only in Australia, because I’ve known a few grim mathematicians as well. Whatever the case, the new paper appears in a peer-reviewed journal called Franklin Open. The authors assume a keyboard with 30 keys, which allows for all the letters of English along with the most common of the punctuation marks. They assumed that one key would be pressed every second until the end of the universe in 10100 years.

The latter are bold assumptions considering monkey finger dexterity as well as attention span, and I’ll also note that the end of universe calculation is very much up for grabs, although excellent books like Fred Adams and Greg Laughlin’s The Five Ages of the Universe deal with numbers like this. Still, we’re not exactly sure that the accelerating expansion of the universe is stable, or what it might do one day.

But enough of that.

Get this: There is a 5% chance that a single chimpanzee might type the word ‘bananas’ in its lifetime. But Woodcock and Falletta worked out two sets calculations, the second involving a population of 200,000 chimpanzees (200,000 is apparently the current global population of chimpanzees, although that number seems low to me). Anyway, if you throw the entire 200,000-strong retinue at Shakespeare, the Bard’s 884,647 words will not be typed before the end of the universe. As the authors point out:

“It is not plausible that, even with improved typing speeds or an increase in chimpanzee populations, monkey labour will ever be a viable tool for developing non-trivial written works.”

AI is another matter…

Of course, Mr. Bainbridge used only six monkeys, and look what he got. I think we can take the ending of the Russell Maloney story to be saying something about our attitudes toward science. Our essential understanding of probability had better be right. If it turns out we unleash monkeys who begin typing out For Whom the Bell Tolls, we are confronted with not just an improbability, but an assault on the structure of the cosmos. We can see why professor Mallard lost his wits and blew the monkeys away, an outcome that, had the story been written in our more animal-considerate times, would not have been allowed by the editor.

Mallard thought an impossibility could not be allowed to exist. He had saved science.

And I have to add the delightful conclusion from the paper:

Given plausible estimates of the lifespan of the universe and the amount of possible monkey typists available, this still leaves huge orders of magnitude differences between the resources available and those required for non-trivial text generation. As such, we have to conclude that Shakespeare himself inadvertently provided the answer as to whether monkey labour could meaningfully be a replacement for human endeavour as a source of scholarship or creativity. To quote Hamlet, Act 3, Scene 3, Line 87: “No”.

The paper is Woodcock and Falletta, “A Numerical Evaluation of the Finite Monkeys Theorem,” Franklin Open Vol. 9 (December, 2024) 100171 (full text).