Shall we have a game of transfinite Nim? One of us sets up finitely many piles of wooden blocks, each pile having some ordinal height, possibly transfinite, and the other of us decides who shall make the first move. Taking turns, we each successively remove a top part of any one pile of our choosing, making it strictly shorter. Whoever takes the very last block wins. (It is fine to remove an entire pile on a turn or to remove blocks from a different pile on a later turn.)
In my challenge problem last week, for example, I set up six piles with heights:
Before proceeding with the transfinite case, however, let’s review the winning strategy in ordinary finite Nim, which I explained in my post last week concerning my visit to the 7th/8th grade Math Team at my son’s school. To say it quickly again, a finite Nim position is balanced, if when you consider the binary representations of the pile heights, there are an even number of ones in each binary place position. Another way to say this, and this is how I explained it to the school kids, is that if you think of each pile height as a sum of distinct powers of two, then any power of two that arises in any pile does so an even number of times overall for all the piles. The mathematical facts to establish are that (1) any move on a balanced position will unbalance it; and (2) any unbalanced position admits a balancing move. Since the winning move of taking the very last block is a balancing move, it follows that the winning strategy is to balance whatever position with which you are faced. At the start, if the position is unbalanced, then you should go first and balance it; if it is already balanced, then you should go second and adopt the balancing strategy. It may be interesting to note that this winning strategy is unique in the sense that any move that does not balance the position is a losing move, since the opposing player can adopt the balancing strategy from that point on. But of course there is often a choice of balancing moves.
Does this balancing strategy idea continue to apply to transfinite Nim? Yes! All we need to do is to develop a little of the theory of transfinite binary representation. Let me assume that you are all familiar with the usual ordinal arithmetic, for which
Theorem. Every ordinal
The proof is easy! We simply prove it by transfinite induction on
Thus, the theorem shows that every ordinal has a unique binary representation in the ordinals, with finitely many nonzero bits. Suppose that we are given a position in transfinite Nim with piles of ordinal heights
The mathematical facts to establish are (1) any move on a balanced position will unbalance it; and (2) every unbalanced position has a balancing move. These facts can be proved in the transfinite case in essentially the same manner as the finite case. Namely, if a position is balanced, then any move affects only one pile, changing the ordinal powers of two that appear in it, and thereby destroy the balanced parity of whichever powers of two are affected. And if a position is unbalanced, then look at the largest unbalanced ordinal power of two appearing, and make a move on any pile having such a power of two in its representation, reducing it so as exactly to balance all the smaller powers of two appearing in the position.
Finally, those two facts again imply that the balancing strategy is a winning strategy, since the winning move of taking the last block or blocks is a balancing move, down to the all-zero position, which is balanced.
In the case of my challenge problem above, we may represent the ordinals in binary. We know how to do that in the case of 1, 3, 5 and 7, and actually those numbers are balanced. Here are some other useful binary representations:
I emphasize again that this is ordinal exponentiation. The Nim position of the challenge problem above is easily seen to be unbalanced in several ways. For example, the
Special honors to Pedro Sánchez Terraf for being the only one to post the winning move in the comments on the other post!
Pingback: Win at Nim! The secret mathematical strategy for kids (with challange problems in transfinite Nim for the rest of us) | Joel David Hamkins
Made it to the front of Hacker News! https://news.ycombinator.com/item?id=9621549
This is so nice. Now I know how to beat my brother every time. The transfinite case is so hard. I only got up to .
I think the proof that the two-power-sum representation of ordinals is unique needs a minor change for finite ordinals: the supremum of the finite decreasing sums of any strictly smaller powers of two is then not the two-power but one less. Of course the conclusion that we need the larger two-power still follows.
Thanks, you are right, and I have edited.
Just finding this post now. Transfinite nim is such a cool problem! Thanks!
Pingback: Uniqueness of Cantor normal form using powers of 2 in transfinite Nim ~ Mathematics ~ mathubs.com
Are you not allowing limit ordinals beyond first countable? You haven’t mentioned them in your ordinal arithmetic expo and they cannot be obtained by exponentiation of lower ordinals (eg consider omega zero). Even inside countable you have ordinals that are beyond finite exponentiation.
Therefore, the assertion
> It turns out that is the order-type of the finite-support functions from…
confuses me. But, it’s been a while since i played with ordinals, and perhaps you proved it in your previous post.
However. In your proof of the first theorem:
> If the theorem holds below an ordinal omega, first let 2^n be the largest power of two that is at most omega.
I changed the signs for illustrative purposes, and since i cant copy them into the comment. Get it?
In this post I intend to allow any ordinal whatsoever, including uncountable. The recursive definition of ordinal exponentiation proceeds just as I wrote through the uncountable stages. And the account of in terms of finite-support functions from to also works fine with uncountable or countable ordinals.
Made it to front page of Hacker News again! https://news.ycombinator.com/item?id=42963501