The old adage goes that if you give an infinite number of monkeys an infinite amount of time hitting random keys on a typewriter, one of them will eventually type out the complete works of William Shakespeare.
This concept—known as the Infinite Monkey Theorem—suggests that, given infinite time and random chance, any sequence of text, including something as complex as Shakespeare's back catalog, would ultimately be produced.
The theorem "owes its name to mathematician Émile Borel, who used the animals metaphorically to illustrate his theory of probability in 1913," according to Manon Bischoff, a theoretical physicist and editor at Spektrum, a partner publication of Scientific American, who says the "ideas behind the theorem are much older, however. In antiquity, Roman philosopher and politician Marcus Tullius Cicero wrote that one might 'believe that if a great quantity of the one-and-twenty letters, composed either of gold or any other matter, were thrown upon the ground, they would fall into such order as legibly to form [the epic poem] the Annals of Ennius. [But] I doubt whether fortune could make [even] a single verse of them.'"
However, according to a new paper in the journal Franklin Open, there is not enough time left in the universe's entire lifespan for all the chimps alive today to write out the works of the bard.
"The long-established result of the Infinite Monkeys Theorem is correct, but misleading," the University of Technology Sydney researchers wrote in the paper. "Non-trivial text generation during the lifespan of our universe is almost certainly impossible."
The "heat death" of the universe is one theory of how the universe will end and is expected to occur as a result of the gradual dispersal of energy as the universe continues to expand over trillions and trillions of years. Eventually, the universe will reach a state where no usable energy remains, and all matter will be uniformly distributed, reaching maximum entropy.
The timeline for this to occur is predicted to be over 10100 years. The universe is only currently thought to be around 13.8 billion years old, or 1.38 x 1010 years, so we have an unfathomably long time to go.
However, according to the new paper, this still may not be long enough for infinite monkeys to randomly achieve the works of Shakespeare.
"The Infinite Monkey Theorem only considers the infinite limit, with either an infinite number of monkeys or an infinite time period of monkey labor," study co-author Stephen Woodcock, an associate professor at the University of Technology Sydney, said in a statement.
"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," he said.
In the study, the researchers calculated how likely a given string of characters being typed by one of a finite number of monkeys would take. They assumed that the keyboard contained 30 keys of English characters and punctuation marks, a finite number of 200,000 monkeys—based on the current population of chimpanzees—and a typing rate of one key per ape per second for the rest of the universe's lifetime.
They discovered that, using these assumptions, it is extremely unlikely that all 884,647 words of Shakespeare's works will be typed before the heat death of the universe.
"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," the authors wrote.
In fact, there is only a 5 percent chance that one of the chimps would even get around to typing the single word "bananas" within its own lifetime.
"This finding places the theorem among other probability puzzles and paradoxes—such as the St. Petersburg paradox, Zeno's paradox, and the Ross–Littlewood paradox—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," said Woodcock.
Do you have a tip on a science story that Newsweek should be covering? Do you have a question about randomness? Let us know via science@newsweek.com.
References
Woodcock, S., & Falletta, J. (2024). A numerical evaluation of the Finite Monkeys Theorem. Franklin Open, 100171. https://doi.org/10.1016/j.fraope.2024.100171
Disclaimer: The copyright of this article belongs to the original author. Reposting this article is solely for the purpose of information dissemination and does not constitute any investment advice. If there is any infringement, please contact us immediately. We will make corrections or deletions as necessary. Thank you.