Skip to main content
OlympiadHQ

Browse · MathNet

Print

48th Austrian Mathematical Olympiad National Competition (Final Round, part 1)

Austria counting and probability

Problem

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 marbles on the table, then the player whose turn it is removes marbles, where either is an even number with or an odd number with . A player wins the game if she removes the last marble from the table.

Determine the smallest number such that Berta can enforce a victory if there are exactly marbles on the table in the beginning.
Solution
We claim that the losing situations are those with exactly marbles left on the table for all integers . All other situations are winning situations.

Proof: By induction for . For the player wins by taking the single remaining marble. For the only possible move is to take marbles, and then the opponent wins in the next move.

Induction step from to for :

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

2. If is even but not of the form , then lies between two other numbers of that form, so there exists a unique with . Because of it holds that . Therefore all three numbers in this chain of inequalities are even, and therefore we can conclude that . From the induction hypothesis we know that is a losing situation, and by taking marbles we leave it to the opponent.

3. If is even and of the form , then the player cannot leave a losing situation with marbles to the opponent (where holds because at least one marble must be removed, and holds because after a legal move starting from an even , at least one marble remains). In order to do so, the player would have to remove marbles. But because of we know that is even and strictly greater than because of ; impossible.

Solution: Berta can enforce a victory if and only if is of the form . The smallest number of this form is .
Final answer
131070

Techniques

Games / greedy algorithmsInduction / smoothing