• ↑↓ to navigate
  • Enter to open
  • to select
  • Ctrl + Alt + Enter to open in panel
  • Esc to dismiss
⌘ '
keyboard shortcuts

Infinite monkey theorem

The Infinite monkey theorem states that a monkey hitting keys independently and at random on a typewriter keyboard for an infinite amount of time will almost surely type any given text, including the complete works of William Shakespeare. More precisely, under the assumption of independence and randomness of each keystroke, the monkey would almost surely type every possible finite text an infinite number of times. The theorem can be generalized to state that any infinite sequence of independent events whose probabilities are uniformly bounded below by a positive number will almost surely have infinitely many occurrences.

In this context, “almost surely” is a mathematical term meaning the event happens with probability 1, and the “monkey” is not an actual monkey, but a metaphor for an abstract device that produces an endless random sequence of letters and symbols. Variants of the theorem include multiple and even infinitely many independent typists, and the target text varies between an entire library and a single sentence.

One of the earliest instances of the use of the “monkey metaphor” is that of French mathematician Émile Borel in 1913, but the first instance may have been even earlier. Jorge Luis Borges traced the history of this idea from Aristotle’s On Generation and Corruption and Cicero’s De Natura Deorum (On the Nature of the Gods), through Blaise Pascal and Jonathan Swift, up to modern statements with their iconic simians and typewriters. In the early 20th century, Borel and Arthur Eddington used the theorem to illustrate the timescales implicit in the foundations of statistical mechanics.

wikipedia/en/Infinite%20monkey%20theoremWikipedia

The infinite monkey theorem is a thought experiment stating that a monkey hitting keys at random on a typewriter for an infinite amount of time will eventually type any given text, such as the complete works of Shakespeare. While theoretically true over an infinite timeframe, recent studies suggest the probability is so astronomically low that it’s practically impossible within our finite universe, especially given the universe’s limited lifespan and resources.

This video explains the concept of the infinite monkey theorem with examples: https://m.youtube.com/shorts/NAiLO1-AYjk (https://m.youtube.com/shorts/NAiLO1-AYjk)

How it works

  • Randomness and probability: The theorem is based on probability. Any specific sequence of characters has a non-zero chance of being typed randomly. [2, 8, 9, 10]
  • Infinite time: Because the process is infinite, every possible sequence will eventually be generated an infinite number of times. [1, 2]
  • The probability of “success”: For a specific text like “to be or not to be,” the chance of a single monkey typing it is extremely small. For example, a short, six-letter word like “banana” would have a probability of $1/50^6$, or 1 in 15.6 million, assuming 50 keys. [2, 10, 11]
  • The infinite advantage: Over an infinite number of attempts, even a very small probability becomes a certainty. The probability of not typing “banana” in $n$ blocks of six letters gets smaller as $n$ gets larger. As $n$ approaches infinity, the probability of not typing it approaches zero, meaning the probability of typing it approaches one. [2]

You can watch this video to learn about the probability calculations involved in the infinite monkey theorem: https://www.youtube.com/shorts/e-1KpyGerUo (https://www.youtube.com/shorts/e-1KpyGerUo)

Limitations and real-world context

  • A finite universe: The theorem relies on the concept of “infinite time,” which does not exist in our finite universe. [6]
  • Unrealistic timescales: Calculations show that the time required to produce a complex work like Shakespeare’s complete works is far longer than the expected lifespan of the universe. [7]
  • Finite resources: The number of “monkeys” is also finite. Even if every chimpanzee on Earth typed, it would not be enough to overcome the improbability of this happening within the universe’s lifespan. [5, 7, 12]
  • Real-world experiments: A real-world experiment with monkeys resulted in the monkeys producing nothing but chaotic or destructive behavior, further illustrating the impracticality of the theorem. [3]

This video explains the results of a real-world experiment related to the infinite monkey theorem: youtube/v=8ZIYeuUDKac (youtube/v=8ZIYeuUDKac)

AI responses may include mistakes.

[1] https://elgl.org/infinite-monkey-theorem/

[2] wikipedia/en/Infinite_monkey_theoremWikipedia

[3] https://www.facebook.com/groups/waywordradio/posts/10162389513308584/

[4] youtube/v=2ckcaKiyBEM

[5] https://www.npr.org/2024/11/04/nx-s1-5178097/infinite-monkey-theorem-is-impossible-within-our-universes-lifetime-study-shows

[6] youtube/v=f2bs7IMPVDA

[7] https://www.bbc.com/news/articles/c748kmvwyv9o

[8] https://www.facebook.com/ABCScience/videos/could-monkeys-really-type-all-the-works-of-shakespeare-with-julian-oshea/1410478337023673/

[9] https://www.scribd.com/document/35766391/The-Infinite-Monkey-Theorem

[10] https://www.quora.com/Can-you-explain-the-concept-of-the-infinite-monkey-theorem-and-its-implications

[11] https://www.askphilosophers.org/question/354

[12] https://math.stackexchange.com/questions/17152/given-an-infinite-number-of-monkeys-and-an-infinite-amount-of-time-would-one-of