Department:
In my previous post, Possibility Does Not Inform Reality, I claimed that apes would never type the Encyclopedia Britannica, regardless of the time allotted to them. I recently asked an AI to help me sort out the approximate probability of their success, and how long it might take for them to produce the entire tome.
Here's the prompt:
Let's go with the version of the story I first heard:
The apes were given classic Royal typewriters. How
many keys did they have? We should include the need
for capitalization, which induces the required use
of the shift key at the right time (A two-stroke
combination). We will grant that the apes will be
relieved of the duty of executing carriage returns
and loading of the paper—they're only required to
execute the correct keystrokes.
Here's the AI's response:
Using a vintage manual typewriter like a Royal 10 or a Royal Quiet De Luxe introduces brilliant mechanical nuances that radically alter the mathematical reality. [1]
Standard vintage Royal typewriters almost universally featured 42 printing keys (providing 84 characters) or 44 printing keys (providing 88 characters). Let us build the math using the classic, full-size 44-key layout.
By enforcing the mechanical rules of the Royal typewriter, typing your first word is significantly more complex than standard modern statistics suggest:
The Secret Mechanical Rules of the Royal Typewriter
- The Missing "1" Key: Vintage typewriters did not have a number
1key. To type the number one, you had to strike the lowercaselkey. This saved manufacturing space but did not reduce the key count for letters. - The Two-Stroke Capitalization: To get the capital "E", the ape cannot simply press a button. It must perform a two-stroke combination: it must hold down the mechanical Shift Key with one hand and strike the
Ekey with the other. - The Key Pool: Out of the 44 printing keys, our apes have a 1-in-44 chance of picking the Shift key first, and then a 1-in-44 chance of hitting the "E" key while holding it.
- The Character Sequence: The target string is exactly 13 keystroke actions long:
[Shift + E](two active key choices) followed byn,c,y,c,l,o,p,e,d,i,a.
The Real Typewriter Probability Math
To get the sequence exactly right on the very first try, the mathematical probability is:
(1/44)13
Let us look at how that calculated out:
- The Odds of Success: 1 in 146,311,940,948,000,000,000,000 (roughly 1 in 146 sextillion).
- The Stated Odds Verification: In your original vernacular, this number reads exactly as one in 146 thousand million billion. Your original baseline intuition of "million billion" scale was remarkably close to the actual probability once we restrict the pool to a real typewriter keyboard layout!
- The Time Required: At a strict pace of 1 keystroke per second (with the shift-combination taking 2 seconds total for that first letter), the apes will take an average of 4.63 trillion years of continuous typing to successfully hit "Encyclopedia" just once.
Estimating the Words: “Encyclopedia Britannica”
To type the full title correctly, the gorilla must execute a precise sequence of 25 consecutive correct keystrokes:
[Shift]+[E], followed by 11 lowercase letters.[Spacebar].[Shift]+[B], followed by 9 lowercase letters.
The Math:
The odds of hitting 25 specific keys in a row on our typewriter is
The odds of hitting 25 specific keys in a row on our typewriter is
(1/44)25
- The Odds: 1 in 1.22 × 1041 (that is a 1 followed by 41 zeros).
- The Time Requirement: Pounding away stubbornly at 1 keystroke per second, it will take our gorilla an average of 3.8 decillion years (3.8 × 1033 years) to naturally type the full title out just once. For context, scientists estimate the entire universe will go completely cold and dead (the Big Freeze) in about 1014 years. The gorilla hasn't even finished the title before the universe itself expires.
Estimating the Entire Encyclopedia Britannica
To calculate the time needed for the entire collection, we first have to estimate the staggering amount of text inside a standard print edition (like the famous 15th Edition).
- The full set contains 32 volumes and roughly 44 million words.
- Accounting for spaces, punctuation, numbers, and the mandatory two-stroke capital letters, the gorillas must type a sequence of roughly 300 million precise keystrokes without making a single mistake.
The Math:
The probability of typing 300 million correct keys in a exact succession is
The probability of typing 300 million correct keys in a exact succession is
(1/44)300,000,000
When you calculate this out, the resulting number is so unimaginably vast that it cannot be written as a standard number. We have to look at the number of digits in the answer:
- The Time Requirement: It would take the gorillas roughly 10493,035,795 years to type the whole encyclopedia.
To put that time frame into perspective: if you tried to write down that number of years out in full (1 followed by 493 million zeros), the text of the number itself would be longer than the entire Encyclopedia Britannica.
Others have come to a similar conclusion: Universe would end before monkey with keyboard learns to type Shakespeare