Browse · MathNet
PrintArgentine National Olympiad 2015
Argentina 2015 counting and probability
Problem
Given two positive integers and , a legal move is to choose a proper divisor of one of them and add it to either or . Players and make legal moves in turns; plays first. The one who obtains a number wins. Determine who wins if the game starts with:
(Here a proper divisor of means a such that divides and .)
(Here a proper divisor of means a such that divides and .)
Solution
Player wins in part a); player wins in part b). Note that, by the rules, the player to move can always add to one of the current numbers.
For , let start the game by adding to , leading to the pair . If , , 's first move is forced to be adding to one of the numbers because they are both primes. If adds it to then adds to the obtained and obtains . And if adds to the new pair is . Since is a proper divisor of , can add it to and obtain . Hence in part b) can obtain two equal numbers with his first move; can achieve the same with his first move in part a). Note that no one can win in one move in positions where .
Now it suffices to show that any position with two equal numbers , where , is losing, i.e., the player to move in this position loses. Hence obtains a new number where and , so .
Hence does not win on his first move in the position . Now the strategy of the opponent is as follows. If one of and has a proper divisor such that , adds to and wins. If not, repeats the previous move of , adding to ; note that this is possible. This yields a new pair , of equal numbers, with . Observe that now cannot reach in one move, otherwise would have done so on his previous move. Hence has to obtain again a pair of different numbers , with . Then repeats the same: he either reaches in one move if this is possible, or obtains the pair from which cannot win in one move. If follows this strategy, the numbers in the process increase, and never makes a winning move. There will come a moment when a proper divisor of in the current pair is such that ; then wins on that move.
For , let start the game by adding to , leading to the pair . If , , 's first move is forced to be adding to one of the numbers because they are both primes. If adds it to then adds to the obtained and obtains . And if adds to the new pair is . Since is a proper divisor of , can add it to and obtain . Hence in part b) can obtain two equal numbers with his first move; can achieve the same with his first move in part a). Note that no one can win in one move in positions where .
Now it suffices to show that any position with two equal numbers , where , is losing, i.e., the player to move in this position loses. Hence obtains a new number where and , so .
Hence does not win on his first move in the position . Now the strategy of the opponent is as follows. If one of and has a proper divisor such that , adds to and wins. If not, repeats the previous move of , adding to ; note that this is possible. This yields a new pair , of equal numbers, with . Observe that now cannot reach in one move, otherwise would have done so on his previous move. Hence has to obtain again a pair of different numbers , with . Then repeats the same: he either reaches in one move if this is possible, or obtains the pair from which cannot win in one move. If follows this strategy, the numbers in the process increase, and never makes a winning move. There will come a moment when a proper divisor of in the current pair is such that ; then wins on that move.
Final answer
a) Player B wins; b) Player A wins.
Techniques
Games / greedy algorithmsInvariants / monovariantsPrime numbers