Removing matches in grid

81 Views Asked by At

Two players take turns playing a game starting with an $n\times n$ grid made up of matches. Each turn, a player can remove a match. If the player who destroys the last cell wins, who has a winning strategy? (A cell is destroyed if at least one of the four matches that makes up the cell is removed.)

The first player immediately wins when $n=1$. For $n=2$, if the first player removes one of the "inner" matches then the second player wins. So the first player should remove an outer match. The second player can remove the outer match that is adjacent to it at the corner. From here we can check by case that the second player has a winning strategy.

1

There are 1 best solutions below

0
On BEST ANSWER

For even $n$, the second player wins by always removing the match obtained from the other player's preceding move rotated by 180°.

For odd $n$, the first player wins (I think, but this may need a bit refinement): Remove a match belonging to the middle square and pretend that it is still there. After that, play the 180° strategy from above, and if that forces you to remove the pretended match, remove any other match and pretend that is still there.