Skip to content
Home

Infinite monkey theorem

A probability thought experiment that a random sequence generator will eventually produce any given finite text, often illustrated by monkeys typing Shakespeare; mathematically true but practically unattainable.

Overview

The infinite monkey theorem is a well known thought experiment in probability and popular culture. It imagines a hypothetical monkey or a device that hits keys at random on a typewriter. The claim is that, given unlimited time, the random output will eventually contain any finite text one might specify — for example, a complete play by William Shakespeare or the full text of Hamlet.

Image gallery

3 Images

Formal idea and mathematical meaning

Formally, the statement rests on a model of random independent letters drawn repeatedly from a finite alphabet in which every symbol has positive probability of appearing. Under that model, the probability that a particular finite sequence appears at least once somewhere in an infinite sequence is 1 — often expressed as "almost surely." That means the event has probability one but is not a literal absolute certainty in every conceivable outcome.

Characteristics and implications

Key points about the theorem include:

  • It applies to any fixed finite target string: no matter how long, some occurrence will appear eventually in an infinite random sequence.
  • "Almost surely" differs from deterministic guarantee: there are possible random outcomes with no occurrence, but they form a set of probability zero.
  • The expected waiting time for a specific long passage is astronomically large for realistic alphabets, making physical realization effectively impossible.

History and cultural context

The phrase and its intuitive example date from informal popularization of probabilistic ideas; writers and educators have used it to illustrate randomness, infinity, and the distinction between mathematical limits and practical feasibility. It has entered literature, journalism, and philosophy as a metaphor for chance producing order.

Uses, examples and misconceptions

The theorem is used pedagogically to explain infinite probability, measure-zero events, and the difference between theoretical possibility and practicable likelihood. Common misconceptions include treating the theorem as evidence that real monkeys will eventually type famous works within any feasible time or conflating "probability one" with absolute inevitability in individual experiments.

Notable distinctions

Variants of the idea examine many independent typists, nonuniform symbol probabilities, or constraints on memory and editing. In computing and information theory, related concepts connect to algorithmic randomness and the behavior of long random sequences. While the mathematical statement is simple and robust, its practical consequences remain largely philosophical and illustrative rather than operational.

Questions and answers

Q: What is the infinite monkey theorem?

A: The infinite monkey theorem states that a monkey randomly hitting keys on a typewriter will eventually type out one of William Shakespeare's works.

Q: Is the "monkey" referred to in the theorem always a real monkey?

A: No, the "monkey" is not always a real monkey - it can be an example of a device that produces random letters.

Q: Is it likely that a monkey will actually type out a text like Hamlet?

A: No, the chances of a monkey actually typing a text, like Shakespeare's Hamlet, are very small.

Q: What does the infinite monkey theorem demonstrate?

A: The infinite monkey theorem demonstrates the concept of probability and the idea that given enough time, even the most unlikely of events could happen.

Q: Who came up with the infinite monkey theorem?

A: The infinite monkey theorem has been attributed to a variety of people, but its origins are unclear.

Q: Is the infinite monkey theorem applicable to other works of literature besides Shakespeare's?

A: Yes, the theorem can apply to any written work - as long as the monkey has an infinite amount of time to type.

Q: What type of device could be used as a "monkey" in the infinite monkey theorem?

A: Any device that generates random letters, such as a computer program or a machine that simulates button presses on a typewriter, can be used as a "monkey" in the infinite monkey theorem.

Related articles

Author

AlegsaOnline.com Infinite monkey theorem

URL: https://en.alegsaonline.com/art/47280

Share

Sources
  • skylla.wz-berlin.de : Monkeys, Typewriters and Networks
  • wired.com : "Monkeys Don't Write Shakespeare"