MathDB
Nim-like game on four piles

Source: Dürer Competition Finals 2023/E+ 6

March 8, 2023
combinatoricsgame

Problem Statement

Two players play a game on four piles of pebbles labeled with the numbers 1,2,3,41,2,3,4 respectively. The players take turns in an alternating fashion. On his or her turn, a player selects integers mm and nn with 1m<n41\leq m<n\leq 4, removes mm pebbles from pile nn, and places one pebble in each of the piles n1,n2,,nmn-1,n-2,\dots,n-m. A player loses the game if he or she cannot make a legal move. For each starting position, determine the player with a winning strategy.