Maths Olympiad Prep

Library / /52 of 60

Combinatorics Difficulty 7.8 National Olympiad, round 2 Prove it Asia Pacific Mathematics Olympiad (APMO)

Let nn and kk be positive integers. Cathy is playing the following game. There are nn marbles and kk boxes, with the marbles labelled 11 to nn. Initially, all marbles are placed inside one box. Each turn, Cathy chooses a box and then moves the marbles with the smallest label, say ii, to either any empty box or the box containing marble i+1i+1. Cathy wins if at any point there is a box containing only marble nn.
Determine all pairs of integers (n,k)(n, k) such that Cathy can win this game.

Solution

We claim Cathy can win if and only if n2k1n \leq 2^{k-1}.
First, note that each non-empty box always contains a consecutive sequence of labeled marbles. This is true since Cathy is always either removing from or placing in the lowest marble in a box. As a consequence, every move made is reversible.

Next, we prove by induction that Cathy can win if n=2k1n=2^{k-1}. The base case of n=k=1n=k=1 is trivial. Assume a victory can be obtained for mm boxes and 2m12^{m-1} marbles. Consider the case of m+1m+1 boxes and 2m2^{m} marbles. Cathy can first perform a sequence of moves so that only marbles 2m1,,2m2^{m-1}, \ldots, 2^{m} are left in the starting box, while keeping one box, say BB, empty. Now move the marble 2m12^{m-1} to box BB, then reverse all of the initial moves while treating BB as the starting box. At the end of that, we will have marbles 2m1+1,,2m2^{m-1}+1, \ldots, 2^{m} in the starting box, marbles 1,2,,2m11,2, \ldots, 2^{m-1} in box BB, and m1m-1 empty boxes. By repeating the original sequence of moves on marbles 2m1+1,,2m2^{m-1}+1, \ldots, 2^{m}, using the mm boxes that are not box BB, we can reach a state where only marble 2m2^{m} remains in the starting box. Therefore
a victory is possible if n=2k1n=2^{k-1} or smaller.

We now prove by induction that Cathy loses if n=2k1+1n=2^{k-1}+1. The base case of n=2n=2 and k=1k=1 is trivial. Assume a victory is impossible for mm boxes and 2m1+12^{m-1}+1 marbles. For the sake of contradiction, suppose that victory is possible for m+1m+1 boxes and 2m+12^{m}+1 marbles. In a winning sequence of moves, consider the last time a marble 2m1+12^{m-1}+1 leaves the starting box, call this move XX. After XX, there cannot be a time when marbles 1,,2m1+11, \ldots, 2^{m-1}+1 are all in the same box. Otherwise, by reversing these moves after XX and deleting marbles greater than 2m1+12^{m-1}+1, it gives us a winning sequence of moves for 2m1+12^{m-1}+1 marbles and mm boxes (as the original starting box is not used here), contradicting the inductive hypothesis. Hence starting from XX, marbles 11 will never be in the same box as any marbles greater than or equal to 2m1+12^{m-1}+1.

Now delete marbles 2,,2m12, \ldots, 2^{m-1} and consider the winning moves starting from XX. Marble 11 would only move from one empty box to another, while blocking other marbles from entering its box. Thus we effectively have a sequence of moves for 2m1+12^{m-1}+1 marbles, while only able to use mm boxes. This again contradicts the inductive hypothesis. Therefore, a victory is not possible if n=2k1+1n=2^{k-1}+1 or greater.

Want a route through all this instead of an archive? The track puts 2,000 problems in a working order, from AMC 10 level to the IMO shortlist.

Source: MathNet, licensed CC-BY-4.0. Statement reproduced verbatim; metadata (topic, difficulty) added by this project.