Browse · MathNet
PrintIMO2024 Shortlisted Problems
2024 counting and probability
Problem
Let be a positive integer. Geoff and Ceri play a game in which they start by writing the numbers on a board. They then take turns to make a move, starting with Geoff. Each move consists of choosing a pair of integers , where and is one of the integers on the board, and then erasing every integer on the board such that . The game continues until the board is empty. The player who erases the last integer on the board loses.
Determine all values of for which Geoff can ensure that he wins, no matter how Ceri plays.
(Indonesia)
Determine all values of for which Geoff can ensure that he wins, no matter how Ceri plays.
(Indonesia)
Solution
Lemma 1. For any set , wins if and only if wins. Similarly, wins if and only if wins.
Proof. Let be a move on , and let be the result of applying the move. Then we can reduce to by applying the move .
Conversely, let be a move on . We can express the result of this move as for some . Then we can reduce to by applying the move .
This gives us a natural bijection between games starting with and games starting with and thus proves the first part of the lemma. The second part follows by a similar argument.
Lemma 2. If and are nonempty and at least one of them loses, then wins.
Proof. If is losing, then we can delete using the move for some , which leaves the losing set . Similarly, if is losing, then we can delete using the move for some , leaving the losing set .
Lemma 3. If is nonempty and wins, then loses.
Proof. From this position, we can convert any sequence of moves into another valid sequence of moves by replacing with , and vice versa. Thus we may assume that the initial move has odd. We want to show that any such move results in a winning position for the other player.
The move loses immediately. Otherwise, the move results in the set for some set . There are three cases.
If is empty then the other player gets the winning set .
If is losing then the other player can choose the move for some , which leaves the losing set .
If is nonempty winning then the other player can choose the move , which results in the position . We can then proceed by induction on to show that this is a losing set.
Lemma 4. wins if and only if loses.
Proof. Note that . The result then follows directly from the previous two lemmas.
Lemma 5. For any integer , wins.
Proof. By Lemma 4, either or loses. If loses, then by Lemma 2 we have that wins. Otherwise, loses, and therefore wins by choosing the move for sufficiently large so that only is eliminated.
It remains to verify the original answer. We have two cases to consider:
- Suppose for some . For , every move is an instant loss for Geoff. Then by Lemma 4, Geoff wins for if and only if Geoff loses for , and thus by induction we have that Geoff wins for if and only if is odd.
- Otherwise, , for some and some with odd. By Lemma 5, Geoff wins when . Then by Lemma 4, Geoff wins for if and only if Geoff loses for , and thus by induction on we have that Geoff wins for if and only if is even.
Proof. Let be a move on , and let be the result of applying the move. Then we can reduce to by applying the move .
Conversely, let be a move on . We can express the result of this move as for some . Then we can reduce to by applying the move .
This gives us a natural bijection between games starting with and games starting with and thus proves the first part of the lemma. The second part follows by a similar argument.
Lemma 2. If and are nonempty and at least one of them loses, then wins.
Proof. If is losing, then we can delete using the move for some , which leaves the losing set . Similarly, if is losing, then we can delete using the move for some , leaving the losing set .
Lemma 3. If is nonempty and wins, then loses.
Proof. From this position, we can convert any sequence of moves into another valid sequence of moves by replacing with , and vice versa. Thus we may assume that the initial move has odd. We want to show that any such move results in a winning position for the other player.
The move loses immediately. Otherwise, the move results in the set for some set . There are three cases.
If is empty then the other player gets the winning set .
If is losing then the other player can choose the move for some , which leaves the losing set .
If is nonempty winning then the other player can choose the move , which results in the position . We can then proceed by induction on to show that this is a losing set.
Lemma 4. wins if and only if loses.
Proof. Note that . The result then follows directly from the previous two lemmas.
Lemma 5. For any integer , wins.
Proof. By Lemma 4, either or loses. If loses, then by Lemma 2 we have that wins. Otherwise, loses, and therefore wins by choosing the move for sufficiently large so that only is eliminated.
It remains to verify the original answer. We have two cases to consider:
- Suppose for some . For , every move is an instant loss for Geoff. Then by Lemma 4, Geoff wins for if and only if Geoff loses for , and thus by induction we have that Geoff wins for if and only if is odd.
- Otherwise, , for some and some with odd. By Lemma 5, Geoff wins when . Then by Lemma 4, Geoff wins for if and only if Geoff loses for , and thus by induction on we have that Geoff wins for if and only if is even.
Final answer
Write N = t · 2^n with t odd. If t = 1 (i.e., N is a power of two), then Geoff wins if and only if n is odd. If t > 1, then Geoff wins if and only if n is even.
Techniques
Games / greedy algorithmsInduction / smoothingInvariants / monovariants