It has been said that enough monkeys, pounding on enoughkeyboards for enough time, will eventually produce the completeworks of William Shakespeare. Let’s examine this.
Suppose we have 10 billion galaxies, each containing 10 billionplanets populated by 10 billion immortal monkeys with extremeinsomnia. We provide each with a keyboard consisting of 26 keys (wewon’t insist on capitalization, punctuation, or even spaces). Themonkeys proceed to randomly strike 10 keys per second for the ageof the universe (10^18 s).
To improve our odds, we’ll calculate the probability that one ofour 1030 monkeys produces a text sequence that merely matchesHamlet: ~1.33 x 105 alphabetic characters.
(a) Show that the probability of any given sequence of 1.33 x10^5 characters typed at random to match the characters of Hamletis approximately (1/26)^133300 = 10^-188191
(b) Show that the probability of at least one monkey producing acopy of Hamlet in the age of the universe is approximately10^-188142