Olympiad Maths Prep

Library / /3 of 3

Combinatorics Difficulty 7.2 National olympiad, round 2 Prove it Austria

Anna and Berta play a game in which they take turns in removing marbles from a table. Anna takes the first turn. When at the beginning of a turn there are n1n \ge 1 marbles on the table, then the player whose turn it is removes kk marbles, where k1k \ge 1 either is an even number with kn2k \le \frac{n}{2} or an odd number with n2kn\frac{n}{2} \le k \le n. A player wins the game if she removes the last marble from the table.

*Determine the smallest number N100000N \ge 100\,000 such that Berta can enforce a victory if there are exactly NN marbles on the table in the beginning.*

Solution

We claim that the losing situations are those with exactly n=2a2n = 2^a - 2 marbles left on the table for all integers a2a \ge 2. All other situations are winning situations.

*Proof:* By induction for n1n \ge 1. For n=1n = 1 the player wins by taking the single remaining marble. For n=2n = 2 the only possible move is to take k=1k = 1 marbles, and then the opponent wins in the next move.

Induction step from n1n-1 to nn for n3n \ge 3:

1. If nn is odd, then the player takes all nn marbles and wins.

2. If nn is even but not of the form 2a22^a - 2, then nn lies between two other numbers of that form, so there exists a unique bb with 2b2<n<2b+122^b - 2 < n < 2^{b+1} - 2. Because of n3n \ge 3 it holds that b2b \ge 2. Therefore all three numbers in this chain of inequalities are even, and therefore we can conclude that 2bn2b+142^b \le n \le 2^{b+1} - 4. From the induction hypothesis we know that 2b22^b - 2 is a losing situation, and by taking
k=n(2b2)=n2b+142nn2=n2 k = n - (2^b - 2) = n - \frac{2^{b+1} - 4}{2} \le n - \frac{n}{2} = \frac{n}{2}
marbles we leave it to the opponent.

3. If nn is even and of the form n=2a2n = 2^a - 2, then the player cannot leave a losing situation with 2b22^b - 2 marbles to the opponent (where b<ab < a holds because at least one marble must be removed, and b2b \ge 2 holds because after a legal move starting from an even nn, at least one marble remains). In order to do so, the player would have to remove k=(2a2)(2b2)=2a2bk = (2^a - 2) - (2^b - 2) = 2^a - 2^b marbles. But because of b2b \ge 2 we know that kk is even and strictly greater than n2\frac{n}{2} because of 2a2b2a2a1=2a1>2a11=2a22=n22^a - 2^b \ge 2^a - 2^{a-1} = 2^{a-1} > 2^{a-1} - 1 = \frac{2^a - 2}{2} = \frac{n}{2}; impossible.

*Solution:* Berta can enforce a victory if and only if NN is of the form 2a22^a - 2. The smallest number N100000N \ge 100\,000 of this form is N=2172=131070N = 2^{17} - 2 = 131\,070.

Looking for a route rather than 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 and solution reproduced as published; topic and difficulty added by this site.