MathLabs

Problem 4

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 marble 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.
Step 3 of 4: Key separation after move X
n=2k−1+1 ⟹ after the last exit X of 2m−1+1, marble 1 never meets ≥2m−1+1n=2^{k-1}+1\ \Longrightarrow\ \text{after the last exit }X\text{ of }2^{m-1}+1,\text{ marble }1\text{ never meets }\ge 2^{m-1}+1
Detailed analysis

We prove by induction on kk that n=2k−1+1n=2^{k-1}+1 is losing; k=1k=1, n=2n=2 is clear since no move is possible with one box. Assume mm boxes cannot win for 2m−1+12^{m-1}+1 marbles, and suppose m+1m+1 boxes could win for 2m+12^m+1 marbles. Let XX be the last move at which marble 2m−1+12^{m-1}+1 leaves the starting box. After XX, marbles 1,…,2m−1+11,\ldots,2^{m-1}+1 can never all lie in one box: otherwise reversing the moves from that moment back to XX and ignoring marbles >2m−1+1>2^{m-1}+1 would win for 2m−1+12^{m-1}+1 marbles using only the mm non-starting boxes (since the starting box permanently holds marbles >2m−1+1>2^{m-1}+1 after XX), contradicting the induction hypothesis. Because boxes always hold consecutive intervals, this means after XX marble 11 never shares a box with any marble ≥2m−1+1\ge 2^{m-1}+1.