“If you put 100 monkeys with typewriters in a room long enough, eventually you'll get Hamlet.”
A monkey on a typewriter would produce random letters. 6 random letters could be dhsllr or hamlet or klefim. Sometimes randomness produces sequences that seem not random. But the fact that snake has meaning but uvzmp has not is pretty much arbitrary. Some sequence of letters have meaning, some don’t.
Out of a random sequence of letters, it all boils down to probabilities. Out of a set of 26 letters, a sequence of 5 of them have about 1 / 12 billion (26^5) chance of being exactly the word snake. The probability of getting a certain word or sentence goes down as you add more letters.
So how about a full book ? The version of Hamlet I’m using has about 170k characters. Out of a reduced alphabet of 26 letters + 1 space (leaving out all the ponctuation), the amount of possible combinations for a set of 170000 characters is ridiculous (it’s a 240k+ digits figure).
Very unlikely, but theoretically possible. ....
Via Jacques Urbanska