Pepa & Geoff, game strategy with contiguous subsequences
Source: Czech-Polish-Slovak Match 2017 day 1 P3
September 28, 2017
winning positionsgame strategySequencedivisiblenumber theory
Problem Statement
Let be a fixed positive integer. A finite sequence of integers is written on a blackboard. Pepa and Geoff are playing a game that proceeds in rounds as follows.
- In each round, Pepa first partitions the sequence that is currently on the blackboard into two or more contiguous subsequences (that is, consisting of numbers appearing consecutively). However, if the number of these subsequences is larger than , then the sum of numbers in each of them has to be divisible by .
- Then Geoff selects one of the subsequences that Pepa has formed and wipes all the other subsequences from the blackboard.
The game finishes once there is only one number left on the board. Prove that Pepa may choose his moves so that independently of the moves of Geoff, the game finishes after at most rounds.(Poland)