The absolute insanity of Graham's number
A while ago I was listening to this episode of The Rest is Science1 about huge numbers, when the topic of Graham’s number came up. This is an unimaginably large number defined by a mathematician named Ronald Graham in response to a mathematical problem. Hannah explained the absurdity of the number beautifully, but dumbed it down significantly, which is totally reasonable for a casual podcast. I was immediately intrigued by this topic so I did some research of my own, and I therefore present to you, the absolute insanity of Graham’s number.
Graham’s number is not “the biggest number” by any means, popularly being overshadowed by TREE(3) and Rayo’s number. But Graham’s number is still my favourite for two reasons. Firstly, it can be calculated by hand using just multiplication2. Secondly, we can build it up from smaller and smaller numbers, so it’s much easier to understand and appreciate the enormity of.
The question
Graham’s number is connected to a problem in a branch of mathematics called combinatorics (dealing with counting, permutations and the like). More specifically, it’s a problem from Ramsey theory, a field of combinatorics which typically asks questions of the following format (I’ve stolen this from Wikipedia):
How big must some structure be to guarantee that a particular property holds?
Graham’s number is the solution to the following problem (we’ll break it down shortly).
Connect each pair of geometric vertices of an -dimensional hypercube to obtain a complete graph on vertices. Colour each of the edges of this graph either red or blue. What is the smallest value of for which every such colouring contains at least one single-coloured complete subgraph on four coplanar vertices?
A hypercube is the evolution of a square in higher dimensions. Imagine a square with all vertices joined by lines, coloured red or blue at random.
The square has four edges and two diagonals, for a total of 6 lines. Can you find four coplanar vertices such that all lines connecting those vertices have the same colour? Well we only have four vertices to work with, all of them are coplanar since we’re in two dimensions, and the edges are assigned one of the two colours at random. Of course there’s no guarantee that all lines will have the same colour. So our answer is no.
Let’s move up to three dimensions, i.e. a cube. We now have 12 edges, 12 face diagonals (2 on each of its 6 faces), and 4 space diagonals (connecting opposite corners of the cube) - a total of 28 lines to play with. We assign each of these one of the two colours arbitrarily, and ask the same question. “Can we find four coplanar vertices such that all lines connecting those vertices have the same colour?” In this example, we do have a square that obeys this rule, but this won’t always be the case, so once again our answer is no.
The original problem asks what’s the smallest dimension you need to get to, before it is inevitable that you will always find four coplanar vertices with all edges having the same colour, even if the colours were initially chosen at random.
Ronald Graham posited that the answer to this problem was above 6 and below a number he defined, called Graham’s number. To even be able to read this number, we first need to learn a new mathematical symbol.
A primer on Knuth’s up-arrow notation
Because Graham’s number is so big, it’s impossible to represent it using regular algebraic symbols in a reasonable amount of time or space. It is instead represented using a special notation called an up-arrow (), introduced by the computer scientist Donald Knuth in 1976.
Let’s start simple. A single represents exponentiation. So for example,
So far so good. Like most operators, you can have multiple s in an expression, which are evaluated from right to left.
The interesting part about this notation is that you can chain multiple s together, which escalates things rapidly.
represents repeated multiplication, i.e. exponentiation.
represents repeated exponentiation, i.e. tetration.
It’s possible to break down the into a series of s, which I’ll demonstrate with an example.
But is just 3, like how . So we end up with the following result.
According to Wolfram Alpha, this number has 3,638,334,640,025 digits! You can see how repeated applications of the can blow things out of proportion rapidly.
represents repeated tetration, i.e. pentation.
Here’s an example.
Just like the rest of the operations, , so we can simplify as follows.
Now imagine being broken down into a huge expression as we did with , and you end up with a power tower of 3s whose height is .
If you recall the earlier example, i.e. was a number with over 3 trillion digits. The scale of our new number is beyond human comprehension. Of course we could keep chaining together s to get to newer hyperoperations like hexation & heptation, producing even more incomprehensible numbers.
Now that you understand the up-arrow notation, let’s finally define Graham’s number.
Defining Graham’s number
Graham starts by defining a number called , with the value as follows.
This is already past the limits of human imagination. From the earlier example,
As large as this number is, this isn’t Graham’s number. He instead goes on to define a second number, as follows.
Next comes with s between two 3s. Eventually we reach
This is Graham’s number, denoted by .