Infinite Monkey Theorem
Main Concept

The Infinite Monkey Theorem is a popular demonstration of mathematical probability, stating that
A monkey hitting keys at random on a typewriter keyboard, given enough time and typewriters, will reproduce the entire works of Shakespeare.
In mathematical terms, the text typed by a monkey for an infinite period of time can be interpreted as an infinite string with uniformly chosen random characters. The probability that a finite substring of length does not occur in the first blocks of characters is
assuming a keyboard with 26 different keys. As , the probability that a monkey fails to reproduce any text of finite length is
=







The following demonstration generates random strings of characters and attempts to build sentences containing predefined types of words. Experiment with the sentence structure and see how many sensible sentences you can generate. Use the "Word complexity" slider to influence the chance of generating longer strings.
Sentence structure:
Number of attempted sentences
Word complexity





Download Help Document
Was this information helpful?