Infinite monkey theorem and numbers

probabilityprobability theorystatistics

I had a discussion with a friend about the monkey infinite theorem, the theorem says that a monkey typing randomly on a keyboard will almost surely produce any given books (here let's say the bible).

I believe this experience can be reduced to choosing a random sequence among real numbers:, strictly speaking the monkey could type a sequence looking like 1/3. (Characters replaced by numbers), my friend told that it is not possible, but for me this is what pure randomness is.

I also believe that not all infinite sequences contain the bible, so it doesn't make any sense to say that the monkey will almost surely write it.

My friend is sure that the monkey will ALWAYS write everything possible, while for me this implies to always choose a "disjunctive sequence".

I understand that from a probabilistic point of view, the chance that the monkey doesn't write a particular sequence drop to 0 as the number of character increase. But probability is also the ratio of specific events on all the events, since all the sequences are not disjunctive sequence, this probability cannot be equal to 1.

Who is right here?

Best Answer

The 2 examples you made (the bible and the sequence of the number $\frac{1}{3}$) are similar, but deeply different. In fact, the bible is a finite sequence of characters, whereas the decimal digits of $\frac{1}{3}$ are infinitely many.

So, the probability that the monkey writes exactly the bible during its typing is 1, while the probability that the monkey will write exactly all the digits of $\frac{1}{3}$ is 0.

Digits of $\frac{1}{3}$

In order to write exactly the digits of $\frac{1}{3}$, from a certain digits the monkey must push the key 0 and then the key 3 infinitely many times... up to infinity! This has probability (not rigorous) $\frac{1}{10} * \frac{1}{10} * \dots * \frac{1}{10} = (\frac{1}{10})^\infty = 0$.

Sequence of letters of the bible

In order to write exactly the sequence of letters of the bible, instead, the monkey should guess a finite number of characters.

The first thing we can notice is that the probability that this happens is larger than 0. In fact, assuming that the bible is 1.000.000 letters long, the probability that the bible starts from the first letter of the first page that the monkey writes is something like $p = \frac{1}{26} * \frac{1}{26} * \dots * \frac{1}{26} = (\frac{1}{26})^{1.000.000}$, which is a very small number, but it is larger than 0.

Then, think that the bible could start from the second letter of the first page, so we have another $p$ probability that the monkey will write exactly the bible. And consider that the monkeys has infinitely many letters from which it can start to write the bible, so it has infinitely many chances to succeed in the challenge, each of them having $p$ probability to work.

Note that these infinitely many events (each corresponding to which letter the monkey is starting to write the bible from) are not independent, so the total probability will not be $\infty * p = \infty$, but they are enough to guarantee that the monkey will achieve it anyway, with probability 1.

The rigorous proof that this probability is 1 is not even difficult, but I will not write it here. You can find it on Wikipedia.

The idea of the proof is to estimate the probability that the monkey will not write the bible and eventually you can proof that that probability is 0, meaning that it is almost impossible (but still not impossible) that the monkey doesn't write the bible.

Related Question