MathDB
2 player game with n sweets on a table, winning strategy

Source: 1996 Estonia National Olympiad Final Round grade 10

March 11, 2020
gamegame strategywinning strategycombinatorics

Problem Statement

John and Mary play the following game. First they choose integers n>m>0n > m > 0 and put nn sweets on an empty table. Then they start to make moves alternately. A move consists of choosing a nonnegative integer kmk\le m and taking kk sweets away from the table (if k=0k = 0 , nothing happens in fact). In doing so no value for kk can be chosen more than once (by none of the players) or can be greater than the number of sweets at the table at the moment of choice. The game is over when one of the players can make no more moves. John and Mary decided that at the beginning Mary chooses the numbers mm and nn and then John determines whether the performer of the last move wins or looses. Can Mary choose mm and nn in such way that independently of John’s decision she will be able to win?