CampusDownWiki
Total citations 55,364한국어KO 4,076EnglishEN 39,253日本語JA 4,144中文ZH 7,891
CampusDown ↗
English

Infinite Monkey Theorem

➗ Mathematics & Statistics By CampusDown Wiki Editorial Team Last updated
The infinite monkey theorem states that a monkey hitting keys at random on a typewriter for an infinite amount of time will almost surely type any given text, such as the complete works of Shakespeare; it illustrates how probability behaves with infinity.

Popular Guides

Contents
  1. 1. The idea in plain terms
  2. 2. Origin
  3. 3. How big the numbers are
  4. 4. US cases
  5. 5. Common misunderstandings
  6. 6. Related concepts
  7. 7. Frequently asked questions
  8. 8. References

Could a monkey banging on a typewriter ever produce Hamlet? Mathematically, yes, if it types forever. The infinite monkey theorem says that a random typist given infinite time will almost surely produce any given text. It is a vivid way to show how strange infinity is, and how enormous "very unlikely" can be.

Illustration of a monkey at a vintage typewriter with a long paper trail of random marks and one small glowing segment
With enough time, random typing will hit any pattern, but "enough" is staggeringly large

The idea in plain terms

Imagine a keyboard with about 30 keys and a monkey that presses one at random every second. The chance of typing the word "banana" in six key presses is (1/30)⁶, about 1 in 729 million. That is tiny but not zero. If the monkey keeps going without end, every attempt is another independent chance, so the probability of never typing "banana" shrinks toward zero.

The same logic applies to any finite text, even all of Shakespeare. With infinite time, the probability of eventually producing it is 1, which mathematicians describe as "almost surely."

Key idea

The theorem is about infinity, not about real monkeys. With any realistic amount of time, the chance of typing even one page of Shakespeare by pure chance is effectively zero.

Origin

The French mathematician Émile Borel used the image of monkeys at typewriters in a 1913 essay about statistical mechanics, to describe events that are possible but so improbable they never happen in practice. The idea was later popularized in English by writers and scientists, including Arthur Eddington, and it appears in pop culture from novels to TV comedies.

Illustration of a programmer at a home computer linked to a cloud of many tiny virtual monkeys typing
A 2011 project used virtual monkeys and a filtering trick to "finish" Shakespeare

How big the numbers are

Shakespeare's complete works contain several million characters. The odds against typing them randomly in one attempt are so vast that even if every atom in the observable universe were a monkey typing since the Big Bang, the expected time to succeed would still be far, far longer than the age of the universe. That is why the theorem is often used to separate "possible in principle" from "possible in practice."

US cases

Real-world case: The "million monkeys" computer project
When and where
August–October 2011, Reno, Nevada
What happened
Programmer Jesse Anderson used software "monkeys" running on Amazon's cloud and later his home computer to generate random nine-letter strings. Each string was checked against Shakespeare's texts from Project Gutenberg, and matching pieces were kept. On October 6, 2011, he announced that every work had been covered. The BBC and other outlets reported the result.
Why it matters
Anderson himself explained that keeping matches as you go is what made it possible, which shows the gap between pure randomness and random variation plus selection.

Common misunderstandings

  • It does not prove randomness can create meaning quickly. The theorem says nothing about realistic time frames.
  • It is not an argument for or against evolution. Biologists point out that evolution includes selection, which, as Anderson's project shows, changes the odds dramatically.
  • "Almost surely" is not "surely." In infinite probability spaces, an event with probability 1 can still, in principle, fail to occur.

The theorem relates to the law of large numbers and to ideas about randomness in finance such as the random walk hypothesis. People who expect random events to "balance out" commit the gambler's fallacy. Like Zeno's paradoxes, it shows how infinity defies intuition.

Frequently asked questions

Is the infinite monkey theorem true?
Yes, as a mathematical statement about infinite time; it does not mean a real monkey could type Shakespeare.
Who came up with the infinite monkey theorem?
The French mathematician Émile Borel used the image in 1913.
Did anyone actually test it?
A 2011 computer project by Jesse Anderson used virtual monkeys, but it kept matching fragments as it went, so it was not pure random typing.

References

  1. Wikipedia: Infinite monkey theorem
  2. BBC News (2011): Virtual monkeys write Shakespeare
  3. Jesse Anderson (2011): A Few Million Monkeys Randomly Recreate Every Work of Shakespeare

Found this helpful? Share it

Send it to a friend who needs it.

X Facebook Threads

Papers and study materials that use this theory (in Korean)

There are no materials on this theory yet, but you can search related papers in the CampusDown library (in Korean).

Search more papers in the CampusDown library (in Korean) →

Featured Guides

You may also like

This article was last updated on November 28, 2026. It is based on widely recognized original works and textbooks; when citing it in a paper, please check the original sources listed in the references.