Pebble Game
Source: KöMaL A. 790
March 24, 2022
combinatoricswinning strategykomal
Problem Statement
Andrew and Barry play the following game: there are two heaps with and pebbles, respectively. In the first round Barry chooses a positive integer and Andrew takes away pebbles from one of the two heaps (if is bigger than the number of pebbles in the heap, he takes away the complete heap). In the second round, the roles are reversed: Andrew chooses a positive integer and Barry takes away the pebbles from one of the two heaps. This goes on, in each round the two players are reversing the roles. The player that takes the last pebble loses the game.Which player has a winning strategy?Submitted by András Imolay, Budapest