The infinite monkey theorem states that a monkey hitting keys at random on a typewriter keyboard for an infinite amount of time will almost surely type a given text, such as the complete works of William Shakespeare.

In this context, “almost surely” is a mathematical term with a precise meaning, 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. The relevance of the theorem is questionable - the probability of a monkey exactly typing a complete work such as Shakespeare’s *Hamlet* is so tiny that the chance of it occurring during a period of time even a hundred thousand orders of magnitude longer than theage of the universe is extremely low - but not zero.

Variants of the theorem include multiple and even infinitely many typists, and the target text varies between an entire library and a single sentence.

There is a straightforward proof of this theorem. As an introduction, recall that if two events are statistically independent, then the probability of both happening equals the product of the probabilities of each one happening independently. For example, if the chance of rain in Moscow on a particular day in the future is 0.4 and the chance of an earthquake in San Francisco on that same day is 0.00003, then the chance of both happening on that day is 0.4 × 0.00003 = 0.000012, assuming that they are indeed independent.

Suppose the typewriter has 50 keys, and the word to be typed is *banana*. If the keys are pressed randomly and independently, it means that each key has an equal chance of being pressed. Then, the chance that the first letter typed is ‘b’ is 1/50, and the chance that the second letter typed is *a* is also 1/50, and so on. Therefore, the chance of the first six letters spelling *banana* is

(1/50) × (1/50) × (1/50) × (1/50) × (1/50) × (1/50) = (1/50)^6 = 1/15 625 000 000

less than one in 15 billion, but not zero, hence a possible outcome.

Ignoring punctuation, spacing, and capitalization, a monkey typing letters uniformly at random has a chance of one in 26 of correctly typing the first letter of *Hamlet.* It has a chance of one in 676 (26 × 26) of typing the first two letters. Because the probability shrinks exponentially, at 20 letters it already has only a chance of one in 26^20 = 19,928,148,895,209,409,152,340,197,376 (almost 2 × 10^28). In the case of the entire text of *Hamlet*, the probabilities are so vanishingly small they can barely be conceived in human terms. The text of Hamlet contains approximately 130,000 letters. Thus there is a probability of one in 3.4 × 10^183,946 to get the text right at the first trial. The average number of letters that needs to be typed until the text appears is also 3.4 × 10^183,946, or including punctuation, 4.4 × 10^360,783.^{}

Even if the observable universe were filled with monkeys the size of atoms typing from now until the end of the universe, their total probability to produce a single instance of *Hamlet* would still be a great many orders of magnitude less than one in 10^183,800.^{}

In one of the forms in which probabilists now know this theorem, with its “dactylographic” [i.e., typewriting] monkeys appeared in Émile Borel’s 1913 article “*Mécanique Statistique et Irréversibilité*" (*Statistical mechanics and irreversibility*), and in his book “Le Hasard” in 1914. His “monkeys” are not actual monkeys; rather, they are a metaphor for an imaginary way to produce a large, random sequence of letters. Borel said that if a million monkeys typed ten hours a day, it was extremely unlikely that their output would exactly equal all the books of the richest libraries of the world; and yet, in comparison, it was even more unlikely that the laws of statistical mechanics would ever be violated, even briefly.

In 2003, lecturers and students from the University of Plymouth MediaLab Arts course used a £2,000 grant from the Arts Council to study the literary output of real monkeys. They left a computer keyboard in the enclosure of six Celebes Crested Macaques in Paignton Zoo in Devon in England for a month, with a radio link to broadcast the results on a website.^{}

Not only did the monkeys produce nothing but five pages consisting largely of the letter S, the lead male began by bashing the keyboard with a stone, and the monkeys continued by urinating and defecating on it. Phillips said that the artist-funded project was primarily performance art, and they had learned “an awful lot” from it. He concluded that monkeys “are not random generators. They’re more complex than that. They were quite interested in the screen, and they saw that when they typed a letter, something happened. There was a level of intention there.”^{}

[via]

## 264 Notes/ Hide

- temperedtorture likes this
- boundobedience reblogged this from traits-of-a-mad-man
- traits-of-a-mad-man reblogged this from sometimes-i-post-porn
- geioelle likes this
- sometimes-i-post-porn reblogged this from fourminustwoeyes
- sometimes-i-post-porn likes this
- fourminustwoeyes reblogged this from abadplanwellexecuted
- thepowertoturnoffthestars reblogged this from we-are-star-stuff
- cosmic-edge likes this
- shakespeareneverdidthis likes this
- vanesa reblogged this from we-are-star-stuff
- themasters-tardis reblogged this from we-are-star-stuff
- slytherinheadboy reblogged this from teo--torriatte
- whoilluminatedpotter likes this
- cosmicpi reblogged this from rosethi and added:
So in a followup to recent posts, I had basically calculated that the chance of an electron to be reflected from a...

- fourminustwoeyes likes this
- rosethi reblogged this from abadplanwellexecuted and added:
The most important question is did anyone film this and put it on youtube? ANYONE?

- forthelove-of-tom reblogged this from funkyjosuke
- alaricseer likes this
- funkyjosuke reblogged this from luftnarp
- seniba42 reblogged this from abadplanwellexecuted
- luftnarp reblogged this from abadplanwellexecuted
- halloweenierogers likes this
- abadplanwellexecuted reblogged this from redtailedhawk90
- thenameisroxylalonde likes this
- dreamlordmorpheus reblogged this from thekimedian
- ameliamarieka likes this
- zoeshade reblogged this from songofsunset
- sevinup07 reblogged this from avengingbadwolfwizard
- stitchers reblogged this from songofsunset
- thekimedian reblogged this from theperfectlysafepenguin
- theperfectlysafepenguin reblogged this from avengingbadwolfwizard
- giraffepoliceforce likes this
- rustystringsandloudthings reblogged this from songofsunset
- avengingbadwolfwizard reblogged this from strong-pup and added:
"Ford! There’s an infinite number of moneys outside who want to talk to us about this script for Hamlet they’ve worked...

- songofsunset reblogged this from strong-pup
- wakinguptocuriosity likes this
- strong-pup reblogged this from femmert15
- rockymthorrorshow likes this
- femmert15 reblogged this from rachelbearenson
- abadplanwellexecuted likes this
- steelplatedhearts likes this
- rachelbearenson reblogged this from walkingsaladshooterfromheaven
- walkingsaladshooterfromheaven reblogged this from redtailedhawk90
- redtailedhawk90 reblogged this from we-are-star-stuff
- teo--torriatte reblogged this from we-are-star-stuff
- lawlcaptain reblogged this from we-are-star-stuff
- creationismyprescription reblogged this from ennuiandthesea
- almostparadigm likes this
- Show more notes