A subtraction game with moves 1, 3 and 4
Statement
There are stones. Two players alternately remove , or stones; the player who cannot move loses. Determine for which the first player has a winning strategy. Who wins with stones?
Hint
Compute the first few losing positions: is losing. Guess a period and prove it by induction.
Show solutionHide solution
Solution
Idea. A position is losing iff all its moves lead to winning positions. Compute the losing positions and find the pattern.
Claim. The losing positions are exactly the with or .
Proof by strong induction on .
- *From a position in every move leads outside :* if , the moves lead to , , ; if , they lead to , , . None of these is or mod .
- *From a position outside there is a move into :* : remove ; : remove ; : remove ; : remove ; : remove .
Together with losing, positions in are exactly the losing ones.
Answer. The first player wins iff . For the first player loses.
Lesson. Compute small cases, guess the periodic set of losing positions, then verify the two properties.