Skip to main content
OlympiadHQ

Browse · MathNet

Print

IMO 2019 Shortlisted Problems

2019 counting and probability

Problem

There are 60 empty boxes in a row on a table and an unlimited supply of pebbles. Given a positive integer , Alice and Bob play the following game.

In the first round, Alice takes pebbles and distributes them into the 60 boxes as she wishes. Each subsequent round consists of two steps:

a. Bob chooses an integer with and splits the boxes into the two groups and .

b. Alice picks one of these two groups, adds one pebble to each box in that group, and removes one pebble from each box in the other group.

Bob wins if, at the end of any round, some box contains no pebbles. Find the smallest such that Alice can prevent Bob from winning.
Solution
Solution 1 (Alice).

Alice initially distributes pebbles according to . Suppose the current configuration of pebbles dominates . If Bob makes a -move with then Alice picks the left group, which results in a configuration that dominates . Likewise, if Bob makes a -move with then Alice picks the right group, which results in a configuration that dominates . Since none of contains an empty box, Alice can prevent Bob from ever winning.

Solution 1 (Bob).

The key idea in this solution is the following claim.

Claim. If there exist a positive integer such that there are at least boxes that have at most pebbles each then Bob can force a win.

Proof. We ignore the other boxes. First, Bob makes a -move (splits the boxes into two groups of boxes each). Without loss of generality, Alice picks the left group. Then Bob makes a -move, , a -move. By Observation A, we may suppose Alice always picks the left group. After Bob's -move, the rightmost box becomes empty and Bob wins.

Now, we claim that if then either there already exists an empty box, or there exist a positive integer and boxes with at most pebbles each (and thus Bob can force a win). Otherwise, assume each box contains at least 1 pebble, and for each , at least boxes contain at least pebbles. Summing, there are at least as many pebbles in total as in ; that is, at least pebbles, as desired.

Solution 2 (Alice).

Let . Alice starts with the boxes in the configuration . For each of Bob's possible choices, consider the subset of rounds in which he makes that choice. In that subset of rounds, Alice alternates between picking the left group and picking the right group; the first time Bob makes that choice, Alice picks the group containing the box. Thus, at any time during the game, the number of pebbles in each box depends only on which choices Bob has made an odd number of times. This means that the number of pebbles in a box could decrease by at most the number of choices for which Alice would have started by removing a pebble from the group containing that box. These numbers are, for each box, These are pointwise less than the numbers of pebbles the boxes started with, meaning that no box ever becomes empty with this strategy.

Solution 2 (Bob).

Let . For Bob's strategy, we consider a configuration with at most pebbles, and we make use of Observation A. Consider two configurations with pebbles: and (if is odd, they are the same configuration; if is even, one is the reverse of the other). The configuration has fewer pebbles than in at least one box, and fewer pebbles than in at least one box.

Suppose first that, with respect to one of those configurations (without loss of generality ), has fewer pebbles in one of the boxes in the half where they have pebbles (the right half in if is even; if is odd, we can take it to be the right half, without loss of generality, as the configuration is symmetric). Note that the number cannot be fewer in the box with 1 pebble in , because then it would have 0 pebbles. Bob then does a -move. If Alice picks the right group, the total number of pebbles goes down and we restart Bob's strategy with a smaller number of pebbles. If Alice picks the left group, Bob follows with a -move, a -move, and so on; by Observation A we may assume Alice always picks the left group. But whichever box in the right half had fewer pebbles in than in ends up with 0 pebbles at some point in this sequence of moves.

Otherwise, is even, and for both of those configurations, there are fewer pebbles in only on the side. That is, the numbers of pebbles in are at least with equality occurring at least once on each side. Bob does an -move. Whichever group Alice chooses, the total number of pebbles is unchanged, and the side from which pebbles are removed now has a box with fewer pebbles than in , so the previous case of Bob's strategy can now be applied.

Solution 3 (Bob).

For any configuration , define to be the greatest integer such that, for all , the box contains at least pebbles. Similarly, define to be greatest integer such that, for all , the box contains at least pebbles. (Thus, dominates the 'left half' of and the 'right half' of .) Then dominates a 'Vshaped' configuration if and only if . Note that if dominates a V-shaped configuration, it has at least pebbles.

Now suppose that there are fewer than pebbles, so we have . Then Bob makes an -move (or more generally any move with at least boxes on the left and boxes on the right). Let be the new configuration, and suppose that no box becomes empty (otherwise Bob has won). If Alice picks the left group, we have and . Otherwise, we have and . In either case, we have .

Bob then repeats this strategy, until one of the boxes becomes empty. Since the condition in Observation A holds, we may assume that Alice picks a group on the same side each time. Then one of and is strictly decreasing; without loss of generality assume that strictly decreases. At some point we reach . If is still nonempty, then must contain a single pebble. Bob makes a 1-move, and by Observation A, Alice must (eventually) pick the right group, making this box empty.
Final answer
960

Techniques

Games / greedy algorithmsInvariants / monovariants