Skip to main content
OlympiadHQ

Browse · MathNet

Print

SELECTION TESTS FOR THE 2019 BMO AND IMO

Romania 2019 counting and probability

Problem

Alice and Bob are given an integer and a token to play the following game. Initially, Alice chooses an order of the numbers , and writes them down in a row, in that order, on a sheet of paper. Next, Bob chooses one of these numbers and places the token on that number. Continuing, Alice moves the token on one of the neighbouring numbers, then Bob moves the token on one of the neighbouring numbers of the current position, and so on and so forth in turns. For each in the range , the token may be placed on number at most times; Bob's first move is counted. The player who can no longer move the token loses. Determine the values of for which Alice has a winning strategy.

Mathematical Olympiad Rioplatense, 2010, Level 3
Solution
Alice has a winning strategy if and only if is congruent to or modulo .

Looking upon placing the token on a number as a one unit drop of that number, a move is possible if and only if the current position of the token is not flanked by two zeroes. Notice that each player places the token on positions of like parity rank.

An arrangement of an -element collection of non-negative integers is suitable if there exist non-negative integers such that

Notice that, in a suitable arrangement, the add up to twice the sum of the , to infer that, for a collection of non-negative integers to have a suitable arrangement, it is necessary that the numbers in the collection add up to an even number. Otherwise, the collection has no suitable arrangement. In particular, if is congruent to or modulo , there is no suitable arrangement of the collection . If , then is a suitable arrangement of the collection . Clearly, removal of provides a suitable arrangement in case .

We first prove that, if the initial arrangement is suitable, then Alice wins. The idea is that Alice can counter any legal move of Bob, in a suitable arrangement, so as to make the new arrangement again suitable. Since the initial arrangement is suitable, and the game eventually comes to an end, Bob ultimately gets stuck and loses.

Let be a suitable arrangement, and let Bob place the token on the -th position. Since Bob's move is legal, . Without loss of generality, we may and will assume that , so , showing that the -st position is available for Alice to place the token on. After having done so, the new arrangement is again suitable, since changed to , changed to , and the other numbers are left unchanged. This establishes one implication.

Next, we show that, if the initial arrangement is not suitable, then Bob has a winning strategy. The idea is that this time Bob can achieve a suitable subarrangement just before one of Alice's moves, reset the whole game with this suitable subarrangement as initial arrangement, and then set on to win by using the strategy described in the previous paragraph.

Let be the initial arrangement; by assumption, it is not suitable. Let further , and let , . Setting , it follows that for some positive integer : Indeed, if for all indices , then are all non-negative; since the arrangement is not suitable, . Let be the least index such that , so for all indices .

Bob's first move consists in placing the token on the -th position. After Bob's first move, changes to . He may therefore place the token on the -th position at least another times, regardless of Alice's placing the token on one of the neighbouring positions — at most times on the -st position, and at most times on the -st position (set if need be). Since (recall that for all indices ), Bob is able to exhaust Alice's allowed choices of the -st position by keeping on placing the token on the -th position. Thus, if still legal, her -st move — call it move — consists in placing the token on the -st position.

Just before move , the first positions in the arrangement are , since dropped by , and no move has been made on one of the first positions. At this stage, Bob can reset the whole game within the first positions: The -element arrangement is suitable, since , and he may reset to fulfil the conditions in the definition. If still legal, move can now be looked upon as the first move in this suitable arrangement. Finally, by keeping on placing the token on one of these positions, Bob forces Alice to do so: Indeed, recall that just before resetting the game, his last move was on position ; if he now places the token on position , then , since and must share parity. This completes the argument and concludes the proof.
Final answer
n ≡ 0 or 3 (mod 4)

Techniques

Games / greedy algorithmsInvariants / monovariantsCounting two waysRecurrence relations