Browse · MathNet
PrintEstonian Math Competitions
Estonia counting and probability
Problem
Players , and are playing the following game. Initially, the number is written on a blackboard. On their move, each player replaces the number currently on the blackboard with either , , or at their own choice, under the condition that the new number must not be larger than . The player makes the first move, then takes turn, then , after him again etc., until some player cannot make a legal move. The player who makes the last move wins. Can any of the players win the game against every legal play by the opponents and if yes then who?
Solution
The game lasts while the number on the blackboard stays less than , because it is possible to make a move of the first kind (replace with ). As the number on the blackboard is increased by at least by every move, it cannot stay less than infinitely. When the number on the blackboard equals , there is no legal move. As numbers larger than cannot appear on the blackboard, the last move is made by the player who writes the number on the blackboard.
Let a number be written on the blackboard. Note that and . Hence all numbers that can appear on the blackboard on the next move are congruent to , whence the residues repeat in cycle . As , the number is written by the third player .
Let a number be written on the blackboard. Note that and . Hence all numbers that can appear on the blackboard on the next move are congruent to , whence the residues repeat in cycle . As , the number is written by the third player .
Final answer
Player C
Techniques
Games / greedy algorithmsInvariants / monovariantsPolynomials mod p