But there's nothing essential about this method of coding. My friend David Ralston at the mathematics department of SUNY Old Westbury, told me about a different way to extract text from numbers.
Let's say you want to find your life story in pi. We'll assume your life story isn't going to take up more room than the Bible, around 3.5 million characters in English, according to this guy's grandfather. Close enough for me. (You can pick any upper limit to the number of characters you think you'll need; the process can handle any number.) Now you need to make a list of all possible words that are no more than 3.5 million characters long. I'd recommend writing all the one-letter words first, followed by all the two-letter words, and so on, using alphabetical order at each step. This gives you some huge but still finite list of possible words—let's say K is the number of them.
What we need now is a way to assign each word on this list to a unique chunk of information that appears in pi. In other words, we need to find at least K distinct "things" in the number pi. To do this, we exploit the fact that for any irrational number, there are at least K+1 distinct strings that are K digits long. For example, if you look for strings that are two digits long in the irrational number 0.101001000100001 … , you will find three strings: 10, 01, and 00. For strings of three digits, you will find at least four examples.
Using this fact, we look at the digits of pi in chunks of length K. To the first chunk, assign the first word on your list. To the second distinct chunk (which may overlap with the first; that's OK), assign the second word, and so on. We "only" have K words on our list, and we have at least K+1 distinct blocks of length K, so we'll run out of words before we run out of blocks. If we have more distinct blocks than we have words on our list (we will), we can just start over at the beginning of our list of words. There's nothing wrong with encoding the same word twice. That will happen anyway because some K-digit blocks will show up multiple (and even infinitely many) times.
This process is not as straightforward as ASCII coding, but for any given irrational number, it gives us all possible strings up to some finite length. It might feel like cheating because we've specified what we want to find. But I think it's like finding a needle in a haystack: It's not going to happen if you're not looking for needles. And there is no upper limit to how long the things on your list can be, Ralston wrote in an email. It could be, "for example, all strings whose length is not larger than the number of elementary particles in the observable universe, which is (I think) a reasonable restriction to place on 'all possible words,' and includes the binary code for a very high-resolution JPEG of that awkward moment from your senior prom."
We don't know for sure that pi contains all possible strings of decimal digits, but on a deeper level, the meme is right. And if it gets you pondering the mysteries of infinity, so much the better. You won't be alone. The idea that monkeys sitting at a typewriter would eventually produce the complete works of Shakespeare has been around for decades. To continue bending your mind, I recommend these variations on the theme. Jorge Luis Borges explores the darker side of the concept in his short story The Library of Babel, and the always entertaining Vi Hart's video for Pi Day 2012 tackles the question, "Are Shakespeare's Plays Encoded in Pi?" Enjoy!
TODAY IN SLATE
Smash and Grab
Will competitive Senate contests in Kansas and South Dakota lead to more late-breaking races in future elections?
Stop Panicking. America Is Now in Very Good Shape to Respond to the Ebola Crisis.
The 2014 Kansas City Royals Show the Value of Building a Mediocre Baseball Team
The GOP Won’t Win Any Black Votes With Its New “Willie Horton” Ad
Sleater-Kinney Was Once America’s Best Rock Band
Can it be again?
Forget Oculus Rift
This $25 cardboard box turns your phone into an incredibly fun virtual reality experience.