Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
Infinite monkey theorem
(section)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
===Correspondence between strings and numbers=== In a simplification of the thought experiment, the monkey could have a typewriter with just two keys: 1 and 0. The infinitely long string thusly produced would correspond to the [[Binary numeral system|binary]] digits of a particular [[real number]] between 0 and 1. A countably infinite set of possible strings end in infinite repetitions, which means the corresponding real number is [[rational number|rational]]. Examples include the strings corresponding to one-third (010101...), five-sixths (11010101...) and five-eighths (1010000...). Only a subset of such real number strings (albeit a countably infinite subset) contains the entirety of ''Hamlet'' (assuming that the text is subjected to a numerical encoding, such as [[ASCII]]). Meanwhile, there is an ''[[uncountably]]'' infinite set of strings that do not end in such repetition; these correspond to the [[irrational numbers]]. These can be sorted into two uncountably infinite subsets: those that contain ''Hamlet'' and those that do not. However, the "largest" subset of all the real numbers is that which not only contains ''Hamlet'', but that also contains every other possible string of any length, and with equal distribution of such strings. These irrational numbers are called [[normal number|normal]]. Because almost all numbers are normal, almost all possible strings contain all possible finite substrings. Hence, the probability of the monkey typing a normal number is 1. The same principles apply regardless of the number of keys from which the monkey can choose; a 90-key keyboard can be seen as a generator of numbers written in base 90.
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)