How to make sure Player 2 always wins in 23 NIM game?

927 Views Asked by At

Game begins with a pile of 23 toothpicks. Players take turns, withdrawing either 1, 2, 3 toothpicks at a time. The player to withdraw the last toothpick loses the game.

We need to make player 2 to always win the game. How do I do this?

I've been working on this question for hours but I still can't solve it. Thank you for your help.

1

There are 1 best solutions below

0
On

You can’t do it: if Player $1$ takes $2$ toothpicks on the first move, Player $1$ can always win. Specifically, from that point on if Player $2$ takes $n$ toothpicks on a turn, Player $1$ should respond by taking $4-n$ toothpicks.

  • Show that if Player $1$ uses this strategy, there will be exactly $1$ toothpick left after $6$ plays by Player $1$ and $5$ by player $2$ no matter how Player $2$ plays, so that Player $2$ will be forced to take the last toothpick.