The impossible librarian

The futile search for meaning in the digits of numbers.


Every year on the 14th day of March a lot of people celebrate π day (written Pi day). Now Pi is by far one of the most interesting numbers in all of mathematics. The reason is because it belongs to a very large class of interesting numbers and it is conjectured to belong to another very interesting class. The first class is that of transcendental numbers; the second is that of normal numbers. Whatever those two words mean, I want to state now the message of this piece: trying to find meaning in the digits of Pi makes no sense.

First things first: one of the reason there’s such a craze about Pi is because of the digits after the decimal point. Let’s recall that Pi starts like this: 3.1415926536… The ellipsis serve a very specific yet very vague purpose: they indicate that the expansion continues, but it is not possible to predict what digit will appear after the last computed digit; in other words: the sequence of digits after the decimal point is “random”. This is the key word. The sort of reasoning that makes Pi interesting for a lot of people with what I call “mystical inclinations” is the fact that randomness seem to entail the possibility of finding any possible sequence of numbers in the digits of Pi; another leap of reason leads to the following “conclusion”: if we codify Joyce’s Ulysses, or Milton’s Paradise Lost, or the Book of Psalms in King James’ Bible as a string of numbers (and there are many ways of doing this) then the digits of Pi will contain them all. Yet another leap of faith leads to the “conlusion” that any possible story, work of art, biography or musical composition will be found within the digits of Pi. This is what I propose to show that is nonsense.

Now to our first digression: transendental numbers.

Different kinds of numbers

Very early in our mathematical education we get acquainted with these old chaps: 1,2,3,4,5,… (the positive integers). The ellipsis here is very precise: we know what number comes next, just add 1 to the last one appearing in the sequence. Among the many things one can do with these numbers is dividing them:

\displaystyle \frac{1}{16}=0.0625,\quad\frac{17}{3}=5.666666\ldots,\quad,\frac{22}{7}=3.142857142857\ldots

These three examples will suffice to make my point; I want to discuss what happens after the decimal point in each of these numbers. In the first one things are as simple as can be: some digits (in this case, four) and that’s it, no more. The second case is just an “infinite” string of sixes; this means we know exactly what digit to expect after the last one: the same one. The last one repeats after 6 digits, so we also know exactly what digit will appear next: we just have to count in the repeating string. By the way: this last number is one of the first of the approximations of Pi and it dates back to Archimedes in the third century before Christ.

For the three numbers above there are knowable, exact patterns to compute the decimal expansion (that is, the string of digits after the decimal point): it is either finite or it becomes repetitive after a certain number of digits (which can be VEEEERY large; try dividing 355 by 113). It so happens that this is always possible for numbers that result from the division of two integers; they are called rational numbers. These numbers, then, are the ones for which the decimal expansion is completely determined and knowable (though it may take a long time to compute it in practice). Another way of saying this is that the decimal expansion is not random.

A number that is not rational, meaning it is not the result of dividing two integers, is called irrational. Pi is irrational. So from what we said above it follows that the decimal expansion of Pi is not determined exactly, we have to settle for some approximation. Restating this: if we are given a long string of digits of Pi it is not possible to know which digit comes next just by looking at all the digits we are given, other methods are necessary (but I won’t talk about them here). A number is irrational if its decimal expansion is infinite and non-repeating.

Another irrational number is \sqrt{2} which is approximately 1.414213. The difference between this number and Pi is that \sqrt{2} can be computed as the solution to the equation x^{2}-2=0 (which also returns its negative); Pi on the other hand is not the solution of such an equation; of course, Pi is the solution of x-\pi=0, but that is like saying something like “the blue sky is blue”; what I meant earlier is that Pi cannot be expressed as the solution of a polynomial equation with integer coefficients, such as

\displaystyle 155836x^{14}+35x^{2}-35561235=0

Meaning: equations in which powers of an unkown quantity \displaystyle x appear multiplied by only integer numbers (the sort of thing one does in an algebra class). Such numbers form the first class Pi belongs to: transcendental numbers are those which are not solution to equations with integer coefficients (like the one above, or x^3+4x^{2}-135x+1965=0).

The second class I referred to above, that of normal numbers, is a little more tricky, so here goes a second digression: probability.

Probability of things

If I put three yellow marbles and four blue ones on a bag, shake it and without peeking into it take a marble out, will it be yellow or blue? There is no way of knowing for certain the colour of the marble but one thing is certain: it is more “probable” that a blue one comes out, because there are more blue marbles than yellow ones. More precisely: there are seven marbles in total of which three are yellow and four are blue. In this case the probability of getting a yellow marble is

\displaystyle \frac{\text{number of yellow marbles}}{\text{total number of marbles}}=\frac{3}{7}=0.42857...

or about 42.8%; similarly the probability of extracting a blue one is \frac{4}{7}=0.571428... or about 57.2% (I cheated here; both numbers’ decimal expansion repeat the sequence before the ellipsis; I rounded them up in percentage so they add 100%). The conclusion is that the probabilites are not equal.

If you toss a coin there are only two possible outcomes: heads or tails, each with the same probability (50-50); if you toss the coin a few times (three, five, seven) you may not notice anything particular about how many heads and how many tails appeared; but if you toss it a very large number of times (usually around twenty or thirty will suffice) the number of tails and the number of heads are more or less the same; that is, if we toss the coin seven times and register the events: heads, tails, tails, heads, heads, tails, tails, then evidently the number of times heads appears is not equal to the number of tails; however, doing it many times both events tend to even out. Another way of saying this is that we have two events with the same probability and if we repeat the experiment (tossing) long enough, the appearance of these two events will be approximately equal, that is they will appear with the same probability. This is crucial for what follows.

An irrational number is said to be normal if each digit appears with the same probability as any other digit, namely \frac{1}{10}=0.1 because there are ten digits: 0,1,2,3,4,5,6,7,8 and 9; I’ll explain what that means below. In the numbers above (all rational) there is no chance of normality: the digit 9 never appears in them (even in the ones that have an infinite decimal expansion); so 9 occurs with probability 0 (a mathematically pedantic way of saying it doesn’t occur… with some caveats, that is not what probability zero actually means in math). Now take the following number:


This is called Champernowne’s number and its just writing the sequence of positive whole numbers in order. Now, is the sequence of digits “random”? Not in the sense that we cannot predict what number follows, although for doing so we need to check all the digits preceding the one that we are interested in, which in practice is virtually impossible. However this number is normal, since all the digits will appear “equally often”. What this means is that if we take a very big chunk of the sequence of digits, every digit will appear with almost the same probability (recall the experiment of tossing the coins a large number of times); the bigger the chunk the more equal the probability of every digit will be. Of course the sequence doesn’t repeat itself so this number is irrational. This is a normal number.

Digressions over, back to Pi.

“O time thy pyramids”

So, “the randomness of the digits of Pi means that we can find anything in them”, right? Well, it depends what you mean by that. First of all, it is not known whether Pi is normal or not. Assuming it is normal, then it would follow that the digits of Pi are a random sequence of numbers; but remember, randomness only means in this sense that any digit will appear with the same probability as any other digit. Now, does this means it is possible to find “any given string of numbers” (and “therefore” any possible text, painting, symphony or Grateful Dead song) in the decimal expansion of Pi? Well, not really. In Champernowne’s number you will find it, but only because every single integer will appear there. Consider the number
which is not normal as we defined normality, but is normal in base 2; this means that all possible binary digits (namely: 0 and 1; the pattern is: one 1, one 0, two 1s, two 0s, three 1s, three 0s…) will appear equally often in the above number; what we actually defined above was normality in base 10. Nonetheless it is not possible to find the following string in the above number:
So normal numbers don’t necessarily enjoy this property of “having the meaning of life” within their digital expansion.

Even granting that a normal number will contain any sequence of numbers whatsoever, the question remains: how do we read those numbers? Encoding a text, a piece of music or a painting depends on the choice of code (it can be binary, hexadecimal, scrambling letters around or you can use a set of symbols of your own); so even if you can find whatever sequence you want inside the digits of Pi (as consecutive digits, of course) that leaves you with the daunting and virtually impossible task of encoding all of world literature ever written so you can “find” it in the digits of Pi (or any other normal number). The digits of Pi, by themselves, mean nothing; they’re just numbers that appear in the decimal expansion of one of the most important and useful numbers in math and science. There is no mysticism, no cosmic meaning, no interpretation of your dreams (dry or otherwise) in that string of numbers; if there is, it is you who puts it there, not Pi. I don’t believe in that sort of thing; I don’t have a problem with people that do, but I think they should not forget that those interpretations are not a property of the numbers themselves. In the film Pi the mentor of the main character (a mathematical genius obsessed with finding patterns in the digits of Pi) at one point warns him peremptorily: “once you discard scientific rigor you are no longer a mathematician, you’re a numerologist!”. Caveat credentes.

A lot of people draw the analogy of having whatever meaning encoded in Pi’s digits from Borges’ story The Library of Babel. In it, a library is described that contains any possible text; Borges mentions a volume that is “a mere labrynth of letters” but contains the sentence “O time thy pyramids” near the end; but this was Borges, he could do that sort of thing and besides, he (nor the narrator) doesn’t draw the conlusion that the library holds meaning; actually quite the contrary… but I wouldn’t deprive you of the pleasure of reading it by yourself. The idea that by randomly concatenating every individual on a set of symbols (be those decimal or binary digits, letters of the latin alphabet or the set of nonce words in a Monty Python sketch) you can obtain any possible meaning is not a new one: Jewish mysticism invented the Kabbalah (and incidentally, the theory of permutations) many centuries ago. Trying to attach meaning to things that intrinsically have none is a sort of mysticism, whether that meaning is of a mystic/religious/occult nature or not. Mysticism by itself is harmless but it breeds fanatism and reality-denial more often than not. Again, belivers beware!

Numbers are not the guardians of perennial wisdom, nor they hold the key to past, present or future; they are devices, tools we use to understand things around us. The Librarians of Babel, if there are such beings, are not numbers.