Lessons taught; Lessons learnt

Maths, teaching and beyond.

Nim: The limits of visualisation

without comments

Buoyed with our success at creating a visual representation of the possible games of Nim that can result if we start from a ‘1, 2, 3′ position, why not try a more complicated game?

For example, what about the ‘2, 4, 6′ game? This is also (unusually for Nim) a loss for the player to go next. The game network for this game is:

246_nimgame

Click on the thumbnail to see it in its full majesty.

Just as before, tracing through this will give all the ’sensible’ games you can play — the ones where we make a winning move whenever we can.

This seems to me to be a much less satisfying (and also less useful) representation than a textual description of the strategy for the second player, which in this case can be summed up as follows:

  • If there is one pile, take all the counters.
  • If there are two piles, make them even.
  • If there are three piles, then move to ‘1, 2, 3′ or ‘1, 4, 5′. If you can’t, then two of the piles will be the same, and one different, so remove the odd-pile-out.

There are, in fact, only seven losing three-pile positions if we restrict piles to have less than eight counters in them (which will cover most of the games of Nim you will ever play):

1 2 3
1 4 5
2 4 6
3 5 6
1 6 7
2 5 7
3 4 7

Knowing this will let us play perfectly, for example, the ‘3, 5, 7′ game, which I would certainly not want to map out graphically!

Related Posts (automatically generated)

  1. More on Nim: The 123 game network
  2. Winning and losing at Nim
  3. Visualisation: Yet more rotating squares!

Written by Jon Ingram

February 22nd, 2009 at 10:03 pm

Posted in Maths

Tagged with ,

Leave a Reply