Olympiad Maths Prep

Track / Stage 10 / 8 of 40 #1968 of 2000

Problem 1968

Hardest shortlist tier
Combinatorics Difficulty 9.3 Prove it IMO2024 Shortlisted Problems · IMO

Let NN be a positive integer. Geoff and Ceri play a game in which they start by writing the numbers 1,2,,N1, 2, \ldots, N on a board. They then take turns to make a move, starting with Geoff. Each move consists of choosing a pair of integers (k,n)(k, n), where k0k \geqslant 0 and nn is one of the integers on the board, and then erasing every integer ss on the board such that 2kns2^{k} \mid n-s. The game continues until the board is empty. The player who erases the last integer on the board loses.

Determine all values of NN for which Geoff can ensure that he wins, no matter how Ceri plays.

(Indonesia)

This one wants a proof. Work it on paper, read the official solution, then mark yourself honestly — the ladder only means something if the record is true.

Official solution

Lemma 1. For any set S\mathcal{S}, S\mathcal{S} wins if and only if J(S,)J(\mathcal{S}, \varnothing) wins. Similarly, S\mathcal{S} wins if and only if J(,S)J(\varnothing, \mathcal{S}) wins.

Proof. Let (k,m)(k, m) be a move on S\mathcal{S}, and let T\mathcal{T} be the result of applying the move. Then we can reduce J(S,)J(\mathcal{S}, \varnothing) to J(T,)J(\mathcal{T}, \varnothing) by applying the move (k+1,2m1)(k+1, 2m-1).

Conversely, let (k,m)(k, m) be a move on J(S,)J(\mathcal{S}, \varnothing). We can express the result of this move as J(T,)J(\mathcal{T}, \varnothing) for some T\mathcal{T}. Then we can reduce S\mathcal{S} to T\mathcal{T} by applying the move (max(k1,0),(k+1)/2)(\max(k-1, 0), (k+1)/2).

This gives us a natural bijection between games starting with S\mathcal{S} and games starting with J(S,)J(\mathcal{S}, \varnothing) and thus proves the first part of the lemma. The second part follows by a similar argument. \square

Lemma 2. If S\mathcal{S} and T\mathcal{T} are nonempty and at least one of them loses, then J(S,T)J(\mathcal{S}, \mathcal{T}) wins.

Proof. If S\mathcal{S} is losing, then we can delete J(,T)J(\varnothing, \mathcal{T}) using the move (1,t)(1, t) for some tJ(,T)t \in J(\varnothing, \mathcal{T}), which leaves the losing set J(S,)J(\mathcal{S}, \varnothing). Similarly, if T\mathcal{T} is losing, then we can delete J(S,)J(\mathcal{S}, \varnothing) using the move (1,s)(1, s) for some sJ(S,)s \in J(\mathcal{S}, \varnothing), leaving the losing set J(,T)J(\varnothing, \mathcal{T}). \square

Lemma 3. If S\mathcal{S} is nonempty and wins, then J(S,S)J(\mathcal{S}, \mathcal{S}) loses.

Proof. From this position, we can convert any sequence of moves into another valid sequence of moves by replacing (k,2n1)(k, 2n-1) with (k,2n)(k, 2n), and vice versa. Thus we may assume that the initial move (k,m)(k, m) has mm odd. We want to show that any such move results in a winning position for the other player.

The move (0,m)(0, m) loses immediately. Otherwise, the move results in the set J(T,S)J(\mathcal{T}, \mathcal{S}) for some set T\mathcal{T}. There are three cases.

If T\mathcal{T} is empty then the other player gets the winning set J(,S)J(\varnothing, \mathcal{S}).

If T\mathcal{T} is losing then the other player can choose the move (1,s)(1, s) for some sJ(,S)s \in J(\varnothing, \mathcal{S}), which leaves the losing set J(T,)J(\mathcal{T}, \varnothing).

If T\mathcal{T} is nonempty winning then the other player can choose the move (k,m+1)(k, m+1), which results in the position J(T,T)J(\mathcal{T}, \mathcal{T}). We can then proceed by induction on S|\mathcal{S}| to show that this is a losing set. \square

Lemma 4. [2n][2n] wins if and only if [n][n] loses.

Proof. Note that [2n]=J([n],[n])[2n]=J([n],[n]). The result then follows directly from the previous two lemmas. \square

Lemma 5. For any integer n1n \geqslant 1, [2n+1][2n+1] wins.

Proof. By Lemma 4, either [n][n] or [2n][2n] loses. If [n][n] loses, then by Lemma 2 we have that [2n+1]=J([n+1],[n])[2n+1]=J([n+1],[n]) wins. Otherwise, [2n][2n] loses, and therefore [2n+1][2n+1] wins by choosing the move (k,2n+1)(k, 2n+1) for sufficiently large kk so that only 2n+12n+1 is eliminated. \square

It remains to verify the original answer. We have two cases to consider:

- Suppose N=2nN=2^{n} for some nn. For N=1N=1, every move is an instant loss for Geoff. Then by Lemma 4, Geoff wins for N=2nN=2^{n} if and only if Geoff loses for N=2n1N=2^{n-1}, and thus by induction we have that Geoff wins for N=2nN=2^{n} if and only if nn is odd.

- Otherwise, N=t2nN=t 2^{n}, for some nn and some t>1t>1 with tt odd. By Lemma 5, Geoff wins when n=0n=0. Then by Lemma 4, Geoff wins for N=t2nN=t 2^{n} if and only if Geoff loses for N=t2n1N=t 2^{n-1}, and thus by induction on nn we have that Geoff wins for N=t2nN=t 2^{n} if and only if nn is even.

Source: MathNet, licensed CC-BY-4.0. Statement and solution reproduced as published; topic, difficulty and ordering added by this site.