NEWS: Tom Gutierrez Physics Thomas D. Gutierrez Physics Tom Gutierrez Music Thomas D. Gutierrez Music Tom Gutierrez Atheist Thomas D. Gutierrez Atheist Tom Gutierrez Tom Gutierrez Thomas D. Gutierrez Thomas D. Gutierrez


Pi and Infinity

The number pi (aka 3.1415926…) is a transcendental number most commonly known as the ratio of the circumference to the diameter of a circle. But there is a lot more to this number than most people know. Many books have been written on the properties of pi and there are many web sites dedicated to it (check out the Wikipedia link above). There is even a great off-the-wall independent movie called Pi.

One fascinating property is that while pi is obviously a very specific number, the sequence of digits in pi are, by any statistical measure, random. The numbers can be calculated out to any value you want in principle with enough time and computing power, but there is no (known) pattern to the numbers as a string of numbers. They are so random, in fact, you can use them as a random number generator and then do some fun analysis with it. For example, to celebrate Veterans Day, I wrote a quick little program that determines when my birthday 112368 (or any number you select) appears in pi out to a desired number of digits. For a number like 112368 you might expect roughly an average of 10 hits for any 10 million digits if the numbers in pi were random (taking all numbers between 0 and 999999 as the sample space). The actual number of times my birthday in that format appears is 8 for the first 10 million digits of pi, which is consistent with the random number idea.

Go to this web site (by David Anderson at CMU) and tinker around. Be sure and check out the FAQs and other pi resources.

There are some very strange consequences to the idea that the digits of pi form a random sequence. First, it is intrinsically unnerving to think a number with distinctly non-random utility is made of an infinitely long random group of numbers. It is a humble reminder that random and arbitrary do not mean the same thing: pi is made of a random string of numbers, but is by no means an arbitrary set nor is each number in that set arbitrary. If you changed just one digit in that infinite collection, it would by definition alter the very nature of (Euclidian) geometry. Interestingly, other transcendental numbers like e (~2.71828…) and irrational numbers like the square root of 2 (~1.41421) or the Golden Ratio (~1.61803…) have the same random properties as pi. I used the same birthday-seeking program I mentioned above for pi and found the same statistical distributions of my birthday for e and the phi. Although we may not personally know about all the digits in these numbers, they are all there pre-existing, fixed for us to discover (some of them) if we are motivated and capable.

This also highlights elements of transfinite algebra and the nature of infinity and large numbers. Georg Cantor realized that not all infinities (specifically infinitely large sets) are of equal size. It is fairly straightforward to show, for example, that the number of countable numbers (e.g. positive integers plus zero) is less than the continuum of numbers between 0 and 1 on the number line. He called that first type of infinity (number of integers) Aleph_0 and the second the “cardinality of the Reals” (conjectured to be Aleph_1). Aleph is the Hebrew letter for “A.” Strictly speaking, the aleph notion refers to the size of the set (cardinality) rather than the positioning and order of elements of the set (ordinal). These are usually one in the same for finite numbers (the number 13 tells you both its size and position in the set), but things get a little tricky for transfinite numbers. Anyway, when the dust settles, transfinite algebra is pretty easy: a finite number added to infinity is still infinity; a finite number multiplied by infinity is still infinity; a finite number divided by infinity is zero; a finite number to the power of infinity has the possibility of kicking you up to the next type of infinity (too complicated to go into here). The basic message is that any finite set (a string of everyday numbers, for example), no matter how large (in a finite sense), has no size compared to even the smallest transfinite set (Aleph_0). The number of digits in pi (which is Alpha_0) then mirrors this relationship. Keep in mind that we are not talking about some physical or “effective” infinity here. The number of atoms in the universe is very large, 10^80, but is also a set of zero size compared to the number of digits in pi.

Carl Sagan leveraged this randomness to make for a dramatic denouement in his book Contact. I won’t give anything away here (it isn’t the same ending as the 1997 movie).

The consequences of having a literally infinite set of calculable random numbers (as opposed to just a pretty big set of arbitrary numbers) is truly staggering if you give it a moment’s thought. Basically, any pattern of numbers you can image of ANY length (shy of infinitely long) exists in pi infinite times and in any form you choose to represent it. Ironically, it is exactly because the sequence of numbers in pi is random and infinite that this strangeness occurs: ALL possible patterns will be present simply by chance. Although counterintuitive, if all finite patterns are NOT present in an infinite random sequence, that is a much, much weirder situation! This is definitely freaky. In a crude analogy, to NOT have every finite pattern contained in an infinite set of random numbers would be like flipping a coin a million times and never getting the pattern tail-head-tail-head (no Rosencrantz & Guildenstern Are Dead coin flipping references intended). The probability of a specific global sample-wide configuration (e.g. “all heads”) drops as the sample space increases, but the probability of smaller sub-patterns existing SOMEWHERE in the sample goes UP as the sample space increases. In the case of pi, we have an infinitely large random sample space where all possible sub-patterns are of zero size in comparison.

As an example, if you converted Hamlet to ASCII binary, it MUST be in pi someplace. Indeed, not just “must be” but it is actually there an infinite number of times! There are about 32000 words in Hamlet averaging 6 characters per word giving 192000 characters. Converted to ASCII binary, there are 8 bytes per character or 6144000 individual numbers of 1s and 0s. So somewhere in pi there is an ordered sequence of 6144000 digits consisting of a sequence of 1s and 0s that, when converted to ASCII binary, gives you Hamlet. If this seems unlikely by any normal standard of existence, then your intuition is right on. The number of places in pi (or any random sequence) you must go in order to find some pattern N elements long goes like 10^N (e.g. for a birthday like 112368 you expect to need 10^6, or one million, digits to find one occurrence). But recall this is an infinite random sequence of numbers we are talking about and a mere 10^6144000 is very literally NOTHING by comparison to what it has to work with. As mentioned above, although 10^6144000 is frickin’ HUGE compared to anything we are used to thinking about (remember there are “only” a mere 10^80 atoms in the universe), it is still finite and has a zero size compared to the number of digits in pi. Indeed, pi has every major work that has been or will be published contained in its vastness in ASCII binary form (or any other form mapped to some number system). The same goes for music (e.g. converted to .wav format) or images (converted or jpeg). Recursively, pi has all finite portions of itself in it too. As a small example, with the search link above, it is easy to show that the usual sequence of 31415926 can be found at position 50,366,472 in pi (after the initial 3).

In short, infinitely long random numbers are just plain bizarre (but cool). This is sort of in the same vein as the famous monkeys at a typewriter discussion. With pi there is an added mind blowing twist: this is built into geometry itself. Looking for structure in pi is like observational astronomy while the monkeys at a typewriter game is like doing a set of active experiments in nuclear physics. In the former case, your data are all there and prearranged, you just need to find it. In the latter, you have to generate your data with a careful setup.

As an infinitely large set, pi really does have all the answers — you just have to know what you are looking for. Oh, and an infinitely powerful computer to find it. Ay, and there’s the rub.

2 Responses to “Pi and Infinity”

  1. NOT SO PERFECT PI?

    Firstly I’ll have to apologize because I feel I’m about to dumb down this discussion of pi. As a surveyor, we utilize pi in calculating curves (is there another way). Now, we (surveyors) try to keep our “math” in the realm of trig and geometry, and try to avoid any “higher” math – “Keep it simple”– Although it seems that every once in a while we have to delve into analyzing what the numbers are actually doing. For the most part surveyors would rather go hiking than analyze numbers.

    A common task of the Surveyor is in creating “closed” geometric figures, using Cartesian Coordinate Systems, such as a property boundary or a closed traverse. These figures need to be portrayed on a map which is to become a public document and potentially used by the public and/or retraced by other surveyors. The units of these maps have a legal standard of tens and hundredths of a survey foot(00.00’) and seconds of a degree(00°00’00”). We dimension curves using 3 pieces of info. Radius, Delta and Length.

    A problem occurs when the geometric figure does not close (to within legal standards-hundredths or seconds). Sometimes this is human error which means you’re just a bad surveyor. But this mis-closure often happens when there is a curve involved in the figure. I am not a mathematician but I get the feeling this has something to do with the significant figures and/or the precision of pi (if that would be applicable).

    What in the world is pi doing to my map?

    So, I know what the problem is but not really the answer. Are the seconds of a degree more precise than the hundredths of an arc length? We chalk this up to a rounding problem. Are the characteristics of a curve not “precise” due to pi? Or can I blame this on the various programs that are trying to build curves using pi incorrectly.
    (It’s probably just me).

  2. Hey Josh!
    Good question. A modest number of sig figs of pi will usually do the job for most worldly applications (including high precision surveying). Computer programs and calculators usually use between 9 and 16 sig figs for pi (or more). It is unlikely you are limited by rounding pi in a computer program or calculator, but a quick use of pi=3.14 in the field could be a problem. To see the rough effects of rounding pi in a survey, we’ll consider a 100 meter diameter circular sample property. If we included radial error too, we would have to fold that into the analysis below. But here are some rounding errors when calculating the circumference for different values of pi assuming we know the radius exactly:

    pi=3 (one sig fig), error=about 14.16 meters in the circumference (ouch!) or about 9735 arcseconds for any radius. If you use pi=3 and are seeing lots of errors, well there’s your problem! As a bit of trivia, the state of Indiana actually tried (unsuccessfully) to pass a law in 1897 which “declared” pi to be valid to only a couple sig figs. It is an urban myth they were successful in decreeing pi=3, but the thought is still amusing. It is based on the bible passage I Kings 7:23: “And he made a molten sea, ten cubits from the one brim to the other; it was round all about, and his height was five cubits; and a line of thirty cubits did encompass it round about.” Pretty amusing stuff. Apparently god thinks pi=3; so much for intelligent design.

    pi=3.142 (4 sig figs), error=about 0.041 meters in the circumference or about 26.74 arcseconds for any radius. Still not good enough for your work.

    pi=3.1416 (5 sig figs), error=about 0.7 millimeter error in the circumference or about 0.4823 arcseconds for any radius. This is hitting your 1 arcsecond limit. You should use at least 5 sig figs to get your required angular resolution if you know your radius perfectly.

    pi=3.1415926536 (11 sig figs), error = roughly a nanometer (atomic distances — way overkill, but calculators can do it easily).

    As a fun bit of trivia, about 37 sig figs of pi (3.14159265358979323846264338327950288420) can calculate the circumference of any circle in the UNIVERSE to at least one atom’s width!

    Anyway, hope this gives you some ideas and addresses your questions.
    Tom