Saturday, April 6, 2013

Big Numbers

Warning: This post is fairly long and contains a lot more mathematical notation and jargon than I generally like to include, even when the topic is mathematical.  In this particular case it seems pretty near unavoidable, so I'm hoping that the extra work to the reader is worth it.

A wise man once said of numbers "There are too many of them" (or words to that effect).  To which I'd add "and most of them are too big."

In our minds, we have some concept of numbers beyond merely seeing two apples and two oranges and knowing there is one apple for each orange and vice versa.  If I showed you a pile of coins, say, and asked if there were a dozen or so, a hundred or so, or a thousand or so in the pile, you could probably make a reasonable guess as to which was the case, even without knowing the exact number.  Along with a concept of numbers, we have a rough concept of their size.  Which makes sense.

Mathematicians have made the concept of number rigorous in a variety of ways.  I've described some of them, particularly the natural numbers, in a previous post on counting.  The natural numbers are 0, 1, 2 and so forth on and on forever.  They answer the question "How many (of some kind of discrete object)?", which requires a whole number that may be zero but can't be negative.  They generally can't answer "How much (of some substance)?", which need not come out to a whole number of whatever unit you're using, or "What was my score for the first nine holes?" which will be a whole number of strokes but might be negative.

In some sense, the naturals the are the simplest kinds of numbers.  All other numbers can be defined in terms of them.  They certainly seem friendly and familiar at first blush.  I aim here to show that the natural numbers we're comfortable dealing with -- 0, 1, 2, 42, 1024, 14 trillion or whatever -- are an insignificant part of the mathematical picture.  Almost all numbers are far, far to big for us to comprehend in any meaningful way.

Big numbers for puny humans

Let's start with human-sized big numbers.  A thousand might seem like a big number, but if you think about it, it's pretty small, even in puny human terms:
  • You can count to 1000 in a few minutes
  • Crowds of a thousand are commonplace
  • You've probably met more than a thousand people in your life
  • Communities of a thousand or more are commonplace
  • If you can read this, you're almost certainly more than a thousand days old
  • This post has over a thousand words
and so forth.

A million is big, but still not all that big.  It is, though, probably the biggest round number that most of us can relate to directly, even if it may take a little effort.
  • If you spray a reasonably large picture window with water, there are likely a million or so droplets visible on it.
  • You can see see an individual pixel on a megapixel display.
  • Crowds of a million people or more have gathered on many occasions.
  • Many people, though certainly not most, will make $1 million in their lifetimes.
  • $1 million in $100 bills doesn't take a lot of space.  Even in dollar bills, it will fit in one room of a house.
  • Many people have practiced some basic skill a million times.  For example, a typical professional basketball player has almost certainly made a million baskets (counting practice shots); I once met a baseball scout who quite plausibly claimed to have driven a million miles; I've probably written millions of words, all told.
A billion is probably not readily comprehensible, but examples are not rare
  • Human population is a few billion.  Two countries have populations over a billion.
  • A billion dollars is about ten dollars per US household.
  • RAM is currently measured in gigabytes.
A trillion is probably the biggest with well-known commonplace examples
  • Large economies are measured in trillions of dollars.
  • You can buy terabyte disks at the store.
  • You have trillions of cells in your body (and even more bacterial cells).
It's perfectly possible to distinguish a million from billion from trillion, but it requires conscious computation ... oh, a gigabyte of disk will hold a thousand photos of a megabyte each.

A trillion, probably even a billion, is beyond the human scale.  We can speak of trillions of cells or bacteria in the human body, but these are abstractions.  No one has actually counted them, whereas a moderate team of people could count millions of objects (as happens during elections, for example).

Astronomical numbers

The physical universe goes well beyond this scale.  There's a reason we talk of "astronomical" numbers.
  • The observable universe (using "comoving coordinates") is around 1,000,000,000,000,000,000,000,000,000 meters in diameter (one octillion, in US terms as I'll use here, or one thousand quadrillion in "long scale" terms).  When dealing with numbers this big, we generally just count the digits, and say, for example, 1027.
  • There are 6×1023 (Avogadro's number) atoms in a gram of hydrogen (assuming it's purely the light isotope, which it won't be).
  • There are somewhere around 1057 atoms in the sun
  • The smallest distance that can possibly be measured, even in principle, according to quantum theory, is called the Planck length (after Max Planck).  In practice, no one has come even remotely close to directly measuring anything at that small a scale.  The volume of the observable universe in Planck volumes (cubic Planck lengths), that is, the biggest volume we know of measured in the smallest measurable volume units, is on the order of 10184.
Consider that last number.  Ten is a nice, familiar number.  One hundred eighty-four is not intimidating.  So 10184 can't be that big a deal, right?  Well, let's try to put it in terms we can understand.  I've claimed a million is about as big a number as we can really grasp, but maybe we can build up from there.  I have well over a thousand digital pictures, and on average there are a few million pixels in each, so it's not too hard to imagine what a billion pixels would look like.  You can find pictures of a million people gathering, so imagine that each one of them has a similar image collection.  That's a quadrillion pixels -- a thousand million million.  Not bad.

With a little more thought, one could probably put together images for, say, a million trillion or a billion billion, but even my image for a billion pixels is stretching.  I can plausibly say that if I'm looking at a computer monitor I can imagine that each of the pixels is its own unit (it's probably not coincidence that the human eye has megapixel resolution, more or less).  If I'm imagining a thousand photos, though, I'm not imagining each of their pixels as a separate unit.  The unit is photos, not pixels.  At best there's the implication that I could mentally switch scales and think of pixels, at which point the photos fade into abstraction.

If I'm imagining a crowd of a million people with a thousand megapixel photos each, it's harder to argue that I'm really keeping the whole image in my head.  The technique of imagining collections of collections of collections gets less and less useful as we approach the limits of human short-term memory, typically seven or so items.  Maybe, maybe, a person could claim to comprehend a million million million million million million million things.  Maybe.

But 10184 is ten thousand million million million million million million million million million million million million million million million million million million million million million million million million million million million million million million.


Now we're ready to talk about some big numbers.

Archimedes' Sand Reckoner

In The Sand Reckoner, Archimedes set out to do the same kind of measurement as above, of the biggest  known volume in the smallest units.  He wanted to measure the number of sand grains it would take to fill the universe as he understood it.  This was a universe with the Sun (not the Earth) at the center, and the fixed stars in a sphere far enough out that they did not seem to move as the Earth went around the Sun.  In modern terms, it was about a light-year in radius, not too shabby coming from someone from a world with no telescopes or motorized transportation.

The number system in use at the time could count up to myriad, or 10,000.  Archimedes called the numbers from 1 to myriad the first numbers and called myriad the unit of the first numbers.  The second numbers were myriad, two myriads, three myriads and so on up to a myriad myriads (one hundred million), which he called the unit of the second numbers.  Likewise, the unit of the third numbers was that many myriads (one trillion), and so on up to the unit of the myriadth numbers.

This is a decent-sized number.  It's a one with 800 million zeroes after it, much bigger than the size of the modern universe in Planck volumes.  But Archimedes went further yet.  He called the numbers up to this number the first period, and the number itself the unit of the first period.  From that, of course, you can define the second period, and so on.  Archimedes went on to the myriad-myriadth period, ending with 108×1016, or a one with 80 quadrillion zeroes after it.  That's a huge number, but you could still print it if you had, say, enough paper to cover the surface of the Earth (and a printer to match).

As it turns out, this was overkill.  Archimedes calculated the volume of his universe in sand grains to be  1063, a number so small I can write it right here:

1,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000

Archimedes was trying to make a point.  The grains of sand are not beyond reckoning, even if no one person could possibly count them.  They are not infinite in number.

Building big numbers

To build his number system, Archimedes used a simple but powerful approach:
  • Start with some set of numbers
  • Define a rule for making bigger numbers
  • Apply that rule repeatedly to get a larger set of numbers
  • Repeat, using the new, larger set as a starting point
A slightly different way of looking at this is
  • Start with some set of numbers
  • Define a rule for making bigger numbers
  • Define a new rule, namely applying the first rule repeatedly, to get a second rule
  • Define a third rule from the second rule, and so on, repeatedly
For example, start with the numbers from 1 to N, and the simple rule of adding one
  • Starting with N and adding 1 N times gives you N + N, so the new rule is "add N"
  • Starting with N and adding N N times gives you N x N, so the new rule is "multiply by N"
  • Starting with N and multiplying by N N times gives you NN, so the new rule is "take to the Nth power"
There are various names and notations for what happens next, repeatedly taking to the Nth power, but it will get you very big numbers from small numbers very quickly.  You can actually do this two different ways:
  • First take NN, then take that to the N, and so forth. If N is 3, you get (33)3, which is 273, or 19683
  • Take NN, and then take N to that power, and so forth. If N is 3, then you get 333, which is 327, which is 7625597484987
Since the second way gets bigger numbers faster, let's do it that way.

4(44) is 

13,407,807,929,942,597,099,574,024,998,205,846,127,479,365,820,592,393,377,723,561,443,721,764,030,073,546,976,801,874,298,166,903,427,690,031,858,186,486,050,853,753,882,811,946,569,946,433,649,006,084,096

That's big, but 4444 is 4 times itself that many times. The number of digits in the result is itself a number with 154 digits.  This is already much, much, much bigger than Archimedes' big number.  Much too big to write down, even if we used the universe for paper and subatomic particles for ink.  And this is just from applying the third rule on the list to a small number.

Let's not even talk about 55555, or trying to do the same thing with myriad.

[In an earlier version, I'd taken the first option.  It still ended up with big numbers, but not as dramatically.  (44)4 is 2564, or 4,294,967,296, rather than the monster above, and 4,294,967,2964 is 340,282,366,920,938,463,463,374,607,431,768,211,456.  This is astronomically large, but not too-big-to-fit-in-the-known-universe large.  Even (((55)5)5)5 has only 437 digits --D.H. Mar 2022]

But of course, you can repeat the rule building process itself as much as you like.  What if I start with 4444 -- let's call it Fred -- and apply the Fredth rule to it.  Call that number Barney.  Now apply the Barneyth rule to Barney.  And so on.  Just as you can always add one to a number to get a bigger one, you can repeat any hairy big-number-building process some hairy big number of times to get an unimaginably hairier big-number-building process.  Or rather, you can define a process for defining processes and so forth.  You could never, ever come close to actually writing out that process.

(If all this seems similar to the process for building ordinal numbers that I described in the counting post, that's because it is similar.)

Ackermann's function

Ackermann's function, generally denoted A(m,n), boils this whole assembly down to three very simple rules which can generate mind-bogglingly big numbers much more quickly than what I've described so far.  Since we're in full-on math mode in this post, here's the usual definition (other variants are also used, but this one is as monstrous as any of them):

A(m, n) =
  • n + 1, if m = 0
  • A(m - 1, 1), if m > 0 and n = 0
  • A(m - 1, A(m, n - 1)) otherwise
We're just adding and subtracting one.  How bad can it be?

Ackermann's function normally takes two numbers and produces a number from them, but you can easily define A'(n) = A(n,n).  A'(4) is 22265536 - 3, which is vastly bigger than any number I've mentioned so far in this post except for Barney.  Howard Friedman (more from him below) has this to say about A (I've modified the notation slightly to match what's in this post):
I submit that A'(4) is a ridiculously large number, but it is not an incomprehensibly large number. One can imagine a tower of 2’s [that is, a tower of exponents] of a large height, where that height is 65,536, and 65,536 is not ridiculously large.
However, if we go much further, then a profound level of incomprehensibility emerges. The definitions are not incomprehensible, but the largeness is incomprehensible. These higher levels of largeness blur, where one is unable to sense one level of largeness from another.
For instance, A(4, 5) is an exponential tower of 2’s of height A'(4).  It seems safe to assert that, say, A'(5) = A(5, 5) is incomprehensibly large. We propose this number as a sort of benchmark. 
In other words, A'(4) is, as I've argued, far, far too big to comprehend, calculate fully or even write down, but at least we can more or less understand in principle how it could be constructed.  The recipe for constructing A'(5) contains so many levels of repetition that we can't even really understand how to construct it, much less the final  result.

Combinatorial explosions

Everything I've mentioned so far is constructive.  That is, each number is defined by stating exactly how to construct it from smaller numbers by some set of operations, ultimately by starting with zero and adding one repeatedly.  It's also possible to specify numbers non-constructively, that is, without saying exactly how one might construct them.

The field of combinatorics is particularly notorious for defining huge numbers.  Combinatorics deals with questions such as enumerating objects with some particular set of properties.  A simple example would be "How many ways can two six-sided dice show seven spots?" For bonus points, list them exactly, or at least describe their general form.  In this case, it's easy.  There are six, assuming you can tell the two dice apart: {(1,6), (2,5), (3,4), (4,3), (5,2), (6,1)}.

A slightly different kind of combinatorial question is "How large can a collection of objects subject to some particular constraint get before it has to have some property?"  For example, how many natural numbers less than 5 can you put in a set before there must be two numbers in the set that differ by 3?  So {0, 1} is fine but {1, 4} isn't since 4 - 1 = 3.  The answer in this case is 3: {0, 1, 2}, has no members that differ by three, but any larger set must.  In this case, we can easily check because there are only five sets of four natural numbers less than five.  For a larger version, say the same question but for the numbers less than 1000, there's no way to check all the combinations and you'll need a real proof.

Friedman gives a somewhat more involved example that produces large numbers astonishingly quickly.  Consider strings of letters from a given alphabet.  A string of length n has what I'll call Friedman's property if, for at least one i and j up to n/2, with i < j, the portion of the string from positions i to 2i appears in the portion from j to 2j.  In other words, cut the string into overlapping portions:
  • The first and second letters (two total)
  • The second through fourth letters (three total)
  • The third through sixth letters (four total) ...
  • ... and so forth, starting one letter later and going one letter longer each time
Friedman's property says at least one of those is contained in at least one of the later ones, and the question is, how long does a string have to be before you know it must have this property (for whatever reason, Friedman actually phrases the question as how long can a string be and not have this property, but this way seems clearer and is more in line with Ramsey Theory in general).

If the alphabet in question is just one letter, say a, then it's a simple problem:
  • Start with aa.  That's the one and only string with two letters, using our alphabet, and there is only one portion to look at (the whole string).
  • Add another a to get aaa.  There's still only the one portion, so we're still good.
  • Add another a to get aaaa.  Now there are two portions to look at 1-2 (aa) and 2-4 (aaa).  The first one is contained in the second, so we're done.  Any four-letter string (that is, the one and only four-letter string), using one letter, must have Friedman's property.
If the alphabet is just the two letters a and b, then
  • ababba, for example, has the property, because the portion from position 1 to 2 (ab) appears in the portion from 2 to 4 (bab)
  • (taking an example with three letters) aabcabbca also has the property, because abc from positions 2 to 4 appears in abbca from positions 5 to 9.  The letters in the first string don't have to be consecutive in the second one, but they do have to all appear in order.
  • abbbaaaaaaa on the other hand, does not have Friedman's property: ab doesn't appear in bbb, bbaa, baaaa or aaaaaa, and more generally, none of those portions appears in any of the ones after it.
  • If you add either an a or a b to the end of abbbaaaaaaa, though, the result has to have Friedman's property.  If you add an a then aaaaaa (positions 5-10) appears in aaaaaaa (positions 6-12).  If you add a b, then ab (positions 1-2) appears in aaaaaab (positions 6-12).
  • With some more fiddling (at the worst, trying out all 4096 12-letter strings), you can determine that any string, using two letters, 12 or more letters long has Friedman's property.
What if we use three letters, say a, b and c?  You need a somewhat longer string before you can no longer avoid Friedman's property.  How long?  Friedman finds a lower bound (the real answer may be bigger), of A(7198, 158386).  Recall that we've already established that A(5,5) is deeply incomprehensible.  Adding one to either parameter of A just kicks things up another unfathomable notch, and here we're doing so hundreds of thousands of times.

For four letters, Friedman gives a lower bound obtained by applying A' over and over again, starting with A'(1) = 3.  How many times?  A'(187196) times.

Friedman goes on to define a similar construction on trees (groups of objects with parent/child/sibling relationships, more or less like family trees but without fun stuff like double cousins).  Again, things start small but then go completely haywire.  If n is the number of letters you can use in labeling the objects in a tree, and Tree(n) is the largest sequence of trees you can have (subject to a couple of restrictions) before there must be at least one tree that's contained in a later one, then
  • Tree(1) = 1
  • Tree(2) = 3
  • Tree(3) is much, much larger than the result we got above for strings using three letters.  It's much, much larger than the result above for four letters.  It's so large that you have to dive deeply into the foundations of mathematics to be able even to describe it.  Maybe you can.  I can't.
And, of course, once you've got an out-of-control function like Tree, you can use it as grist for the constructive mill.  What's A'(Tree(Tree(Barney))) taken to its own power Fred times?  Can't tell you, but it's certainly big, and we can keep this tomfoolery up all day.

(How do we know that there is a limit on how big a set of strings or trees can get before it has to have Friedman's property?  Friedman gives a proof.  It's a pretty standard proof, but I didn't understand it and didn't take the time to dive into and figure it out.)


It's all just so ... big

As Friedman says, such gigantic numbers (whether defined constructively or non-constructively) are not at all like the numbers we're familiar with.  I can easily tell you that 493 has a remainder of one when divided by three (4+9+3 = 16, 1+6 = 7, 7 divided by three has one left over).  I can't easily tell you whether Fred has a remainder of one or two.  I know there will be a remainder, since at no point in constructing it did we multiply by three, but to figure out which remainder we'd have to carefully examine the definition of Fred and track the remainders all the way through.

Likewise I know that 17 is a prime number and 39 isn't.  With a little effort I can figure out that 14,351 isn't prime (it's 113x127), but is A'(4) - Fred a prime number?  No idea.  Probably not, as the odds of any number that size being prime are very small (though not quite zero), but I have no idea how to go about proving it.

For that matter, it's not always immediately obvious whether one huge number is larger than another.  If they were constructed by different means -- say, one uses Ackermann's function and another came out stacking up exponents some particular way and repeatedly applying three different big-making functions in turn, then there may be no feasible way to compare them.  It may even be possible to prove that the number of steps needed to make the comparison would itself be huge.


We're used to simplifying numbers when we do calculations with them.  If I tell you a room is four meters by three meters with a one meter by two meter closet cut out of it, you can easily tell me the area of the room is ten square meters.  If I did a similar calculation with four arbitrary huge numbers, quite likely all anyone can say is the answer is ab - cd, if a, b, c and d are the numbers in question.

Nonetheless, such numbers are just as mathematically real as any others.  If you make a claim about "all natural numbers", you're not just saying it's true for numbers you can easily manipulate.  You're saying it's true for really big ones as well, and keep in mind that for every huge number we can describe there are vastly many more of similar size that we have no hope of ever describing.  Fermat's last theorem doesn't just say there are no cases where a3 + b3 = c3.  It says that there are no cases where aBarney + bBarney = cBarney, and so forth for every ridiculous number I've mentioned, and all the others as well.

It's also important to point out that there is nothing particularly special about most of these numbers, unless, like Tree(3), they are the solution to some specific problem.  The number of numbers we know to be special for one reason or another is limited by our human capacity to designate things as special, which runs out long before we get to the astronomical realm, to say nothing of the territory Friedman explores.

If a number is too big to relate to our everyday experience, or to compare with other numbers, or to comprehend how it might be constructed, about the only thing we can really say about it is that it's a number, and it's big.

And that's all we can say about almost all numbers.

1 comment:

  1. Good stuff. I have, or had, on my shelves somewhere a book called "The Lore of Large Numbers," and if I can find it I'll see if it has anything to add to this discussion.

    I'm sure I don't.

    ReplyDelete