The Three Kings
Solution


We are going to need to pay attention to whether the number of checkers on a square is odd ("O"), divisible by 4 ("Q") or just even ("E") (though we don't rule out the possibility that such a value is also divisible by 4). The order of the values on the squares doesn't matter much, so we will feel free to list these values in any way we like. Actually, we will list the odd values first, unless there are none.

Now consider, for a moment, just the first two squares. Suppose that one is odd and one even. Since we don't care about the other, we'll suggest this by writing [O,E,*]. Suppose we look only at moves that involve just the first two squares. There will always be exactly one possible move, which doubles the smaller of the two numbers. And after that move, we will still have one odd and one even value.

There are only a finite number of possible configurations, so as we continue making the next move, eventually we must return to a configuration we saw before. But the first repeated configuration must be the initial configuration, since each configuration gives us enough information to determine not just the next move but also the previous one.

And therefore, we now know that, given any configuration [O,E,*], we can reach the "previous" configuration just by restricting our moves to the first two squares. But this previous configuration is in fact [O+E/2,E/2,*]. We will need to use this fact soon.

The case [O,E,E]: If we have the case [O,E,E], then suppose we use one E to double the other one. Then we have the case [O,Q,E]. Then, by using our "backup" trick, on [O,Q,*] we can reach [O+Q/2,Q/2,E], which we should rewrite as [O',E,E]. Our moves seem to have brought us right back to the case with which we began. Well, yes, but there's one important difference: the odd value has increased by the value Q/2. Now either Q was zero, in which case we're already done, or else O' is strictly greater than O.

But since we're back at the same case as before, we can apply the same steps again, to increase the odd value again. We can repeat this operation only finitely many times, because the odd value can't get bigger than the total of the three values we started with. So what stops us? It must be that we hit a zero in one of the even squares at some point.

Thus, if we ever reach the case [O,E,E], we are assured of victory.

The case [O,O,O]: Consider the smallest odd value, and make a move using one of the other odd values which doubles the smallest one. In doing this, both odd values become even, so we reach the case [O,E,E]. But that means we are guaranteed victory.

The case [O,O,E]: Make a move involving only the odd values. This brings us to the case [E,E,E], which we will now consider. If we can show that we can win on the case [E,E,E], then that takes care of this case as well.

The case [E,E,E]: This is the only remaining case. We note that we can divide all the values by 2, as many times as necessary, until we get at least one odd value. Dividing out the common factor is like lumping the checkers together into masses of that size. Now we must arrive at one of the cases [O,O,O], [O,O,E] or [O,E,E]. The first and third cases guarantee victory. But what do we do with [O,O,E]? As mentioned in the previous paragraph, a single move transforms [O,O,E] to [E,E,E]. Is this progress, or pointless tail-chasing?

The important thing to notice is that, starting with an [E,E,E] case, the only unresolved situation brings us to an [E,E,E] case again, but with a smaller total number of checkers. That's quite good, actually. If we divide out the 2's again, then we will either reach a guaranteed win, or hit an [O,O,E] case that takes us back to [E,E,E], but now with an even smaller sum.

So if we have a case of [E,E,E], we can't say exactly which case we will end up with, but we know that we can't fall into an infinite loop of [E,E,E] cases because the total is dropping each time, so we are guaranteed to terminate, with a zero value popping up somewhere.

And since the [E,E,E] case must terminate, we know that the related [O,O,E] case also terminates.


I thought about this problem a few years ago, imagined I had a solution, wrote it up, and later realized I was quite wrong. The solution presented here is derived from one posted on http://www.cs.cmu.edu/puzzle/, "The Puzzle Toad" web site at the Carnegie Mellon Computer Science Department, attributed to Tom Bohman, Oleg Pikhurko, Alan Frieze and Danny Sleator. In turn, they attribute the puzzle to an article called "Five Algorithmic Puzzles" by Peter Winkler, presented at a Gathering for Gardner.


Last revised on 16 January 2007.