The Game of Nimby


How to Play Nimby

The game of nimby, which is based on the game of nim, consists of a matrix of boxes, arranged in rows and columns Each box is either empty or contains at most one matchstick. The rows are labeled alphabetically, as is shown in the accompanying illustration. The columns are labeled by numbers in descending order from left to right.  Boxes can be referred to by the combination of their row and column labels.

There is also a reserve of matchsticks located off the board.  The total number of matchsticks on the board and in the reserve needs to be equal to at least the number of boxes on the board.

Each player takes turns altering the configuration of a single row.  On each turn, a player may choose any row that contains any matchsticks. A player's turn proceeds in two steps.

  1. During this step, which is mandatory, the player chooses one of the matchsticks in the selected row, removes it, and places it in the reserve. The boxes within the selected row that have lower column numbers than the box from which the matchstick was removed are referred to as the low order remainder.
  2. During this step, which is optional, the player may reconfigure the contents of the low order remainder. This can be accomplihsed by: a) moving matchsticks between boxes within the low order remainder, b) removing matchsticks from the low order remainder and placing them in the reserve, c) taking matchsticks from the reserve and placing them in the low order remainder, or d) any combination of a, b, and c.  As a result of this reconfiguration, the low order remainder may wind up with every box having a matchstick, some of the boxes having matchsticks, or all boxes being empty. It is important to remember that no box may contain more than one matchstick.

The player who removes the last matchstick from the board wins the game.

Suggested Configurations and Variations

Printable image of a nimby board


How to Win at Nimby

Quite simply, if you can take you turn, and leave the board with an even number or 0 matchsticks in each column, you have the advantage, and the board is said to have an even nimby sum.  However, if it becomes your turn, and the nimby sum is even, there is no move you can make that will leave the board with an even nimby sum.  In this situation, your opponent has the advantage. Only if the nimby sum is odd when your turn arrives, can you make it even.

A Practice Problem

In the starting configuration suggested here, is the nimby sum odd or even?  If it is odd, what can you do during your turn to make it even?