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!
===Probabilities=== However, for physically meaningful numbers of monkeys typing for physically meaningful lengths of time the results are reversed. If there were as many monkeys as there are atoms in the observable universe typing extremely fast for trillions of times the life of the universe, the probability of the monkeys replicating even a ''single page'' of Shakespeare is unfathomably small. Ignoring punctuation, spacing, and capitalization, a monkey typing letters uniformly at random has a chance of one in 26 of correctly typing the first letter of ''[[Hamlet]].'' It has a chance of one in 676 (26 Γ 26) of typing the first two letters. Because the probability shrinks [[exponential growth|exponentially]], at 20 letters it already has only a chance of one in 26<sup>20</sup> = 19,928,148,895,209,409,152,340,197,376{{efn|Nearly 20 octillion}} (almost 2 Γ 10<sup>28</sup>). In the case of the entire text of ''Hamlet'', the probabilities are so vanishingly small as to be inconceivable. The text of ''Hamlet'' contains approximately 130,000 letters.{{efn|Using the Hamlet text {{cite web |url=http://www.gutenberg.org/dirs/etext99/1ws2611.txt |title=from gutenberg.org}}, there are 132680 alphabetical letters and 199749 characters overall}} Thus, there is a probability of one in 3.4 Γ 10<sup>183,946</sup> to get the text right at the first trial. The average number of letters that needs to be typed until the text appears is also 3.4 Γ 10<sup>183,946</sup>,{{efn|For any required string of 130,000 letters from the set 'a'-'z', the average number of letters that needs to be typed until the string appears is (rounded) 3.4 Γ 10<sup>183,946</sup>, except in the case that all letters of the required string are equal, in which case the value is about 4% more, 3.6 Γ 10<sup>183,946</sup>. In that case failure to have the correct string starting from a particular position reduces with about 4% the probability of a correct string starting from the next position (i.e., for overlapping positions the events of having the correct string are not independent; in this case there is a positive correlation between the two successes, so the chance of success after a failure is smaller than the chance of success in general). The figure 3.4 Γ 10<sup>183,946</sup> is derived from ''n'' {{=}} 26<sup>130000</sup> by taking the logarithm of both sides: log<sub>10</sub>(''n'') {{=}} 1300000Γlog<sub>10</sub>(26) {{=}} 183946.5352, therefore ''n'' {{=}} 10<sup>0.5352</sup> Γ 10<sup>183946</sup> {{=}} 3.429 Γ 10<sup>183946</sup>.}} or including punctuation, 4.4 Γ 10<sup>360,783</sup>.{{efn|26 letters Γ2 for capitalisation, 12 for punctuation characters {{=}} 64, 199749Γlog<sub>10</sub>(64) {{=}} 4.4 Γ 10<sup>360,783</sup> (this is generous as it assumes capital letters are separate keys, as opposed to a key combination, which makes the problem vastly harder).}} Even if every proton in the observable universe (which is [[Eddington number|estimated]] at roughly 10<sup>80</sup>) were a monkey with a typewriter, typing from the [[Big Bang]] until the [[end of the universe]] (when protons [[Proton decay|might no longer exist]]), they would still need a far greater amount of time β more than three hundred and sixty thousand ''orders of magnitude'' longer β to have even a 1 in 10<sup>500</sup> chance of success. To put it another way, for a one in a trillion chance of success, there would need to be 10<sup>360,641</sup> observable universes made of protonic monkeys.{{efn|There are β10<sup>80</sup> protons in the observable universe. Assume the monkeys write for 10<sup>38</sup> years (10<sup>20</sup> years is when [[Future of an expanding universe#Stellar remnants escape galaxies or fall into black holes|all stellar remnants will have either been ejected from their galaxies or fallen into black holes]], 10<sup>38</sup> years is when all but 0.1% of [[Future of an expanding universe#All nucleons decay|protons have decayed]]). Assuming the monkeys type non-stop at a ridiculous 400 [[words per minute]] (the world record is 216 [[words per minute|WPM]] for a single minute), that is about 2,000 characters per minute (Shakespeare's average word length is a bit under 5 letters). There are about half a million minutes in a year, this means each monkey types half a billion characters per year. This gives a total of 10{{sup|80}}Γ10{{sup|38}}Γ10{{sup|9}} {{=}} 10{{sup|127}} letters typed β which is still zero in comparison to 10{{sup|360,783}}. For a one in a trillion chance, multiply the letters typed by a trillion: 10<sup>127</sup>Γ10<sup>15</sup> {{=}} 10<sup>145</sup>. 10<sup>360,783</sup>/10<sup>145</sup> {{=}} 10<sup>360,641</sup>.}} As [[Charles Kittel|Kittel]] and [[Herbert Kroemer|Kroemer]] put it in their textbook on [[thermodynamics]], the field whose statistical foundations motivated the first known expositions of typing monkeys,<ref name="KK">{{cite book |last1=Kittel |first1=Charles |title=Thermal Physics |last2=Kroemer |first2=Herbert |publisher=W.H. Freeman Company |year=1980 |isbn=0-7167-1088-9 |edition=2nd |location=San Francisco |page=53 |oclc=5171399 |author1-link=Charles Kittel |author2-link=Herbert Kroemer}}</ref> "The probability of ''Hamlet'' is therefore zero in any operational sense of an event ...", and the statement that the monkeys must eventually succeed "gives a misleading conclusion about very, very large numbers." In fact, there is less than a one in a trillion chance of success that such a universe made of monkeys could type any particular document a mere 79 characters long.{{efn|As explained at {{cite web |url=http://www.nutters.org/docs/more-monkeys |title=More monkeys |access-date=2013-12-04 |url-status=dead |archive-url=https://web.archive.org/web/20150418004018/https://www.nutters.org/docs/more-monkeys |archive-date=2015-04-18 |df=dmy-all}} The problem can be approximated further: 10<sup>145</sup>/log<sub>10</sub>(64) {{=}} 78.9 characters.}} An online demonstration showed that short random programs can produce highly structured outputs more often than classical probability suggests, aligning with [[Gregory Chaitin]]'s modern theorem and building on [[Algorithmic Information Theory]] and [[Algorithmic probability]] by [[Ray Solomonoff]] and [[Leonid Levin]].<ref name="ZenilSolerToscano2013">{{cite web|title=Infinite Monkey Theorem |url=https://demonstrations.wolfram.com/InfiniteMonkeyTheorem/ |website=Wolfram Demonstrations Project |author=Zenil, Hector and Soler-Toscano, Fernando |date=October 2013 |access-date=May 24, 2024}}</ref> The demonstration illustrates that the chance of producing a specific binary sequence is not shorter than the base-2 logarithm of the sequence length, showing the difference between [[Algorithmic probability]] and [[classical probability]], as well as between random programs and random letters or digits.
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)