The Infinite Monkey Theorem states that a monkey hitting keys independently and at random on a typewriter keyboard for an infinite amount of time will almost surely type any given text, including the complete works of William Shakespeare.
Below is a generator to show how improbable it is to randomly generate even a short string of characters. Characters are generated continuously, and the program searches for a user-inputted substring within the generated text. The "turbo mode" rapidly generates characters to increase the chances of finding the desired substring quickly.
A three character string like "jon" is expected to be found within about 15 seconds, but "jonathan santos" would take 3.7 billion years on average - the age of the Earth!
Enter a string to match!
Enter a string to match
Matched so far:
Characters generated:
Matches Found:
No matches yet...
Closest string matched so far =
Stats
Each additional character multiplies the expected time by 26×.
3 chars: 15 seconds
5 chars: ~0.0007 years (~6 hours)
6 chars: ~0.018 years (~6.5 days)
7 chars: ~0.47 years
8 chars: ~12 years
9 chars: ~300 years
10 chars: ~8,000 years
12 chars: ~5 million years
14 chars: ~3.7 billion years - roughly the age of the Earth