An Introduction to Nimbers
The title isn't just me misspelling numbers, as much as Google may try to infer with its attempts to correct my spelling when I was doing the research for this article.
In the first half (part 0) of his seminal work On Numbers and Games, John Conway (more famous for his work on Conway’s Game of Life and a frequent face on this website) set out to create an axiomatic system of mathematics more general than the way that numbers are usually defined. Then in the second half, part 1, he applied exactly the same procedure to games, showing that all games are just numbers in disguise: that there was a 1 to 1 relationship between the two systems. The same ways we have of analysing numbers could be applied to get new results in game theory.
It isn't an easy read and while many of the results are surprising and were completely ground-breaking back in the 70s, the book uses very sophisticated mathematics which require an understanding of university level mathematics to interpret the formal logic involved; it is a serious textbook rather than a pop-maths book. It has the best contents page I've seen, with every chapter showing which chapters you have to have read in order to access the others. Just the chapter titles alone are minimalist and symbolic:
I want to focus on one idea from chapter 6 which is in the number half of the book. Nimbers are a different way to define a structure of mathematics similar to numbers. Let's start with defining addition. Throughout this article I'm going to try and simplify the language used, so while it may feel like there are either occasional gaps or a bit of handwaving going on, know that it isn't some gap in the actual logic from Conway, but rather some technical point which I've glossed over in my attempt at translation into something written in plain English. I'm walking a fine line here.
The result of each addition is defined to be the least conceivable answer that doesn't cause any contradiction. So if we start with 0+0=0 that works because 0 is the least result that it could possible be. Now 0+1=0 doesn't work because we can't have two different numbers that we can add to 0 and get the same result, so 0+1=1 is the least possible answer that could work. Everything is commutative so 1+0=1 as well. So far everything is just like normal. However, for 1+1=0 there is no contradiction. Here's the table so far:
Extending it a bit, 2+0=2 and 2+1=3 are both the least conceivable answers so they are fine. As is 3+0=3, but there is nothing stopping 3+1=2 so that becomes fixed as the result:
Similarly we can go further and fill in the rest of the grid. We call this a complete field of order 4, which you will come across in the first term of a maths degree if you choose that route. But to strip back the terminology a bit, it just means it is consistent: you can play around with it and you're not going to find any contradictions. If we extend this to the next field up we get the table below:
There are plenty of patterns to notice here. Anything added to itself cancels out to zero, but even more usefully is what happens when you add powers of two to each other. When you add a power of two to any power of two other than itself you get the same answer that you would normally expect; a fact we are going to abuse. If you want to add any two numbers you can do it but splitting each into a sum of distinct powers of two like so: 7+5=(4+2+1)+(4+1)=(4+4)+(2)+(1+1)=(0)+(2)+(0)=2 By comparing the powers of 2 and eliminating pairs of them we can sum the remaining powers to get the result. This type of addition is used in solving the game of Nim which Conway’s book spends some time on, but I'm going to save for another article. Just know that they are called Nimbers for a reason.
You are probably used to multiplication being defined as repeated addition, but there is plenty of scope for defining it in different ways. The first time you come across this concept in A level mathematics is in the matrices in FP1, but as you go further into pure mathematics this becomes a bigger area to play in. Once again I'm going to limit the scope of this article to just Nimbers. We can define multiplication as being the least conceivable result which works consistently although there are some traps beneath the waves on this one which Conway avoids for us.
0x0=0 and in fact 0xn=0. 1xn=n just like with numbers and we have consistency. This gives us a field of order 2:
To extend it to a field of order 4 we want all of the multiplications from elements of the set [0,1,2,3] to also produce elements from that same set. Thus 2x2=3, 2x3=1 and 3x3=2 all fit and (handwaving here) are the minimal results which keep everything consistent:
These results may seem arbitrary compared with the addition cases, but they are the best at making everything work. Just like with addition case there are some easy rules to work out the result of number multiplication easily. Firstly, the product of two distinct Fermat powers of two is the same as the result you would get with regular multiplication. (A Fermat power is one where the power is itself a power of 2. Each is the square of the preceding term, so 2, 4, 16, 256, 65536…) So 4x2=8 just like normal. However, if the two Fermat powers are not distinct then the result is 3/2 times the regular answer. It works, I promise. Let's have a look at the grid so far:
How can we evaluate 4x3? We actually already have everything we need. 4x3=4x(2+1)=4x2+4x1=8+4=12. The tactic is to split the numbers into distinct Fermat powers of 2. Try evaluating 6x7. Well, 6x7=(4+2)(4+2+1)=4x4+4x2+4x1+2x4+2x2+2x1=6+8+4+8+3+2 noting that the first and fifth terms are using the 3/2 rule for non distinct powers of two. Now it is tempting to sum those six terms to get 31, but these aren’t numbers, but nimbers. Powers of 2 cancel each other out, so we can get rid of the 8s straight away. Similarly the 6 is really 4+2 so that cancels out with the other 4 and the other 2. That leaves only one term left, so 6x7=3. The whole process is quite therapeutic to work through.
As the numbers get larger than 7 we sometimes have to use other tricks. For instance 10x3=(4x2+2)(2+1)=4x2^2+4x2+2x2+2x1=4x3+8+3+2=4x(2+1)+8+1=8+4+8+1=5 It's like a puzzle to evaluate the big multiplicatons.
Here's the finished grid from before:
I'm going to continue this investigation of nimbers tomorrow by looking at square nimbers.