by Andrew Boyd
Today, we do a lot of typing. The University of Houston's College of Engineering presents this series about the machines that make our civilization run, and the people whose ingenuity created them.
You've likely heard the proverbial tale of monkeys locked away with typewriters. Leave them alone long enough, the story goes, and through random typing they'll create the collected works of Shakespeare. Moral of the story: given enough time, anything can happen by chance. But there's a twist that's usually overlooked.
Chimpanzee Typing, 1907, New York Zoological Society [Wikipedia/New York Zoological Society]
Let's ask a different question. How long would it take a roomful of monkeys to stumble upon Hamlet, which is about 125 double spaced pages? Well, suppose we had ten hardworking monkeys typing five characters per second. Even if we let them type from the time of the Big Bang until today, Hamlet isn't going to happen. The probability of seeing Hamlet appear is so mind-bogglingly small that to say it's miniscule is a vast overstatement.
To get a better sense at what we're up against, let's take another look. Instead of trying to recreate the lengthy Hamlet, let's try for this one episode of the Engines of Our Ingenuity, which runs just two double spaced pages. Instead of monkeys at keyboards, let's use computers capable of generating ten thousand randomly typed episodes per second. Computers come in handy not just because they're fast, but because they're reliably random and can check their own work.
Now the question's how many computers to use. Let's not short ourselves. Though we can't actually do it, let's say we use a number of computers equal to the total number of atoms in the universe. Given this generous set up, how long will it take to recreate the words you're now listening to?
If we started the computers at the time of the Big Bang and let them run until the projected end of the universe, the chance of generating this episode is still so mind-bogglingly small that there's no way to really comprehend it.
It's striking to think about. Even things that are possible and seem relatively doable can't happen in something as old and immense as the universe. That's actually a very good state of affairs, since a lot of physics depends on probability. There's a chance that the atoms in my hand could align with the atoms in my desk in such a way that my hand would pass right through it. But it's not going to happen. At least, not in this universe. The odds are too heavily stacked against it.
Andy Boyd's hand
We touch upon the possible versus not-really-possible when we look at lotteries. To win the popular Mega Millions, a player needs to pick five numbers chosen from 1 to 75 and one number from 1 to 15. Match all six and you win the jackpot, and we see jackpot winners every few weeks. If the winner had to pick twelve numbers instead of six, don't count on seeing a jackpot winner anytime in our lifetimes.
Wand in hand, magicians make a living doing the impossible. Monkeys and typewriters do just the opposite, teaching us a very different and very real lesson: sometimes even the possible really isn't.
I'm Andy Boyd at the University of Houston, where we're interested in the way inventive minds work.
Notes and references:
Calculations behind the example in this episode are as follows.
The estimated number of atoms in the observable universe is 1080.
It is, of course, not certain the universe will end or, if so, exactly how. For calculation purposes, I've chosen the end of the Degenerate Era in the Big Freeze Theory, a point where all particles found in the nuclei of atoms will cease to exist. The estimated occurrence of this event is 1040 years, or 1048 seconds, after the Big Bang. For reference, our present universe is on the order of 1010 years old. See the Wikipedia website: https://en.wikipedia.org/wiki/Future_of_an_expanding_universe.
The hypothesized calculation speed of an individual computer as stated in the episode is 10,000 = 104 character sequences/second.
The total number of random sequences of letters that can be tested (Engines wannabes) with our set up, which we call N, is:
N = (#computers) x (#sequences/sec) x (#sec) = 1080 x 104 x 1048 = 10132.
Assuming a keyboard with 40 keys (an underestimate, but things only get worse with more keys) and recognizing that the episode contains some 3000 characters, there are 403000 different sequences of characters the length of the episode. Call this number C.
A little math tells us that when N is small compared to C, as we have in our case, then the probability of the computers typing the right episode is closely approximated by the ratio N/C. In our case, N/C = 10132/403000 = 10132/104806 = 1/104674.
Summarizing, the probability of randomly typing this Engines episode with the generous computing scheme we imagined is 1/104674. Again, this is a number so small there's really nothing in the universe it can meaningfully be compared to.
Note that if the episode was only 120 characters long (just 2 lines of text), then
N/C = 10132/40120 = 10132/10192 = 1/1060, which is still unfathomably small.
This episode first aired on January 30, 2014.