Infinite monkey theorem

The **infinite monkey theorem** says that a monkey randomly hitting keys on a typewriter will eventually type out one of William Shakespeare's works. When people talk about the infinite monkey theorem, the "monkey" is not always a real monkey. Instead, it is an example of a device that produces random letters. However, the chances of a monkey actually typing a text, like Shakespeare's _Hamlet_, are very small.

The "Monkey" does not need to type Shakespeare's work. This theorem simply states that a monkey can type anything in an infinite amount of time.

## Simplified Proof

For example, let it be that Shakespeare wrote "Wikipedia is the best website in the world". If the monkey does not have extra characters like numbers (example: 4, 2) and symbols (example: #, ~) then the monkey will only have 53 things on his keyboard to press. Those are: a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, y, z, A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V, W, X, Y, Z, and the spacebar.

Since there are only 53 buttons the monkey is allowed to press, eventually, he will hit the "W" button. This is because the monkey has infinite time to press the buttons and has a 1 in 53 chance of pressing the W button. Then, he will probably hit another button and not type the sentence "Wikipedia is the best website in the world".

But, the monkey has infinite time. That means, in total, he will press the "W" button infinite times. After every time the monkey presses the "W" button, he has a 1 in 53 chance of pressing the "i" button. But, since the "W" button will be pressed infinite times, the word "Wi" will appear infinite times too. This is because the chance of "i" following "W" is equal to the chance of "W" which is 1/53 multiplied by the chance of "i" following it which is 1/53. That is 1/2809. That is really small, but since "W" and "i" appear an infinite amount of times in the monkey's words it becomes certain. Meaning there is a 100% chance that _eventually_, the word "Wi" will appear. However, since "W" and "i" both will be pressed by the monkey an infinite amount of time, "Wi" will actually appear an infinite amount of times too.

This goes on and on. Eventually, after even longer time, there will be the word "Wik" because "Wi" appears infinite times and "k" has a 1 in 53 chance of following it. Now, since "Wik" appears infinite times, we know that "Wiki" will eventually appear too. Not only that, we know "Wiki" will appear an infinite amount of times.

Following this logic, we will see "Wikip" and "Wikipe" and "Wikiped" and "Wikipedi" all the way until we will see "Wikipedia is the best website in the world". Not only that, but we will see it infinite times.

Since the sentence "Wikipedia is the best website in the world" was just any sentence, by using the proof above, one can know _anything_ appears an infinite amount of times. Therefore, we know that all of Shakespeare's things will appear. Even the things he threw away, even the thoughts he had at night, and even Hamlet.

The above proof was an example of a Proof by induction.

## Related pages

- Law of truly large numbers
- Randomness
- Law of large numbers
- Probability
- Infinity

## Other websites

- The Million Monkey Room , an essay by D.R. Belz from The Baltimore Examiner
- RFC 2795 - The Infinite Monkey Protocol Suite (IMPS)