Hey there, human — the robots need you! Vote for IEEE’s Robots Guide in the Webby Awards.

Close bar

Pi Versus Information Theory

The mathematical constant pi is packed with meanings—or it’s meaningless

3 min read
Pi Versus Information Theory
Illustration: Jesse Lefkowitz

Many years ago, while having dinner with an eminent mathematician, I mentioned a scene regarding the number pi in Carl Sagan’s novel, Contact. A scientist from Earth (Jodie Foster in the movie) visits a distant planet and learns that the aliens there have calculated pi out to many places. Very far out in the number’s expansion the decimal digits turn to a very long string of ones and zeros—a message embedded in pi.

“How can you hide a message inside pi?” asks Foster’s character. “It’s built into the fabric of the universe. And what does the message say?”

“We don’t know. We’re still working on it,” replies the alien.

This scene made an impression on me. What if there were a message in pi? It is an almost mystical number, appearing in many fundamental equations that describe physical reality, including Einstein’s theory of general relativity.

But my dinner companion stopped chewing for only a moment. “Well, of course,” he said. “It’s an irrational number and contains all possible sequences.”

“Well, duh,” I thought. Feeling stupid—more stupid than necessary, it turns out—I changed the topic of conversation.

I had occasion to remember this exchange recently when there was an outpouring of discussion on Facebook following the posting of a photo showing several thousand digits of pi in a faint background and, in the foreground, the following text: “Pi is an infinite, nonrepeating decimal—meaning that every possible number combination exists somewhere in pi. Somewhere in that infinite string of digits is the name of every person you will love, the date, time, and manner of your death, and the answers to all the great questions of the universe.” From a sampling of the thousands of comments and blogs that this posting stimulated, I was made aware of one surprising fact I wish I’d known during that dinner so long ago. It is not true that because pi is an irrational number—a nonrepeating infinite decimal—it therefore contains all possible number combinations. Oh, it almost certainly does, but this has never been proved mathematically. There are examples of irrational numbers that do not contain all possible sequences. The so-called normal numbers do contain all sequences in the same statistical frequencies as true random numbers, but it is not known if pi is normal. It has, however, passed tests for statistical randomness out to many places, and because virtually all numbers are normal anyway, we can assume pi is also.

But is all of life written in pi? No. There is nothing there. For every fact you might find, you would also find the exact opposite. For every name of someone you might love, there would be countless other names. Claude Shannon would tell us that a sequence of random numbers contains no information, which he describes as “the removal of uncertainty.” No uncertainty is removed through perusal of the digits of pi.

Moreover, the finding of any specific text is so statistically improbable that I would move it into the “impossible” category, like the old story about monkeys typing Shakespeare. To simply find your own name, for example, might require 15 ASCII characters, which would equate to 36 decimal digits. I haven’t worked out the number of digits you’d need to search to have a reasonable probability of finding a run of 36 correct decimals, but I believe it would be far more than the current record for expansion of pi, which is 1013 digits.

Still, if we expanded pi out a few more places and a message appeared, that would be scary. Something to think about.

This article originally appeared in print as “All of Life in Pi?.”

This article is for IEEE members only. Join IEEE to access our full archive.

Join the world’s largest professional organization devoted to engineering and applied sciences and get access to all of Spectrum’s articles, podcasts, and special reports. Learn more →

If you're already an IEEE member, please sign in to continue reading.

Membership includes:

  • Get unlimited access to IEEE Spectrum content
  • Follow your favorite topics to create a personalized feed of IEEE Spectrum content
  • Save Spectrum articles to read later
  • Network with other technology professionals
  • Establish a professional profile
  • Create a group to share and collaborate on projects
  • Discover IEEE events and activities
  • Join and participate in discussions