Maths Olympiad Prep

Library / /50 of 62

Combinatorics Difficulty 6.6 National Olympiad Prove it Ukraine

Numbers 1,2,,n1, 2, \ldots, n are written in line. Numbers 11 and nn are painted blue, and the rest are painted yellow. Two players - Olesya and Andriy - in turns repaint one of the yellow numbers blue by the following rules: with the first move Olesya (she starts) repaints blue any of the yellow numbers (let us denote it by kk). Then Andriy chooses from the intervals of numbers (1,2,,k)(1, 2, \ldots, k) or (k,k+1,,n)(k, k+1, \ldots, n) the one that contains more yellow numbers. If these intervals have equal amount of yellow numbers, then he selects any of the two. If, e.g., the interval (1,2,,k)(1, 2, \ldots, k) is larger, then another interval is not involved in the game anymore. After that Andriy repaints any yellow number from the new interval blue. Now a new interval is also divided into two smaller ones. Then Olesya chooses one of the two new intervals, the one that contains more yellow numbers for her move, and another interval goes out of the game. And so on. The winner is the one who paints blue a number, both (left and right) neighbours of which are blue. Who wins this game, if both players play perfectly?

(Bogdan Rublyov)

Solution

We will solve this problem by finding the winning and losing positions. Recall that the position is called a losing position for a player, if after his move he instantly loses, or puts the game in a winning position for another player. Position is a winning one, if the player makes a move and immediately wins, or can put the game in a losing position for another player.

It is clear that the game is being played in the range l,l+1,,ml, l+1, \ldots, m, where numbers l,ml, m are blue and the rest are yellow. The values of these numbers are not significant, what is important is the amount of numbers in the interval. We will evaluate positions by the amount of yellow numbers. It is clear that the position containing 11 yellow number is a winning one, so the position a1=2a_1 = 2 is a losing one. Then positions 3,4,53, 4, 5 are winning ones, because from each of them a player can put the opponent in a losing position a1=2a_1 = 2. Hence, position a2=6a_2 = 6 is a losing one.

Let us show by Mathematical Induction that all losing positions satisfy the condition: an+1=2an+2a_{n+1} = 2a_n + 2. Base of induction was tested. Let all positions from an1+1a_{n-1} + 1 to an1a_n - 1 be winning, and an1a_{n-1} and ana_n be losing ones. Consider the position bb between an+1a_n + 1 and an+11=2an+1a_{n+1} - 1 = 2a_n + 1. Then the next player repaints blue the number that splits the interval of the length bb into ana_n and ban1b - a_n - 1. We have that
anban1b2an+1, a_n \geq b - a_n - 1 \Leftrightarrow b \leq 2a_n + 1,
hence the opponent turns out to be in a losing position ana_n.

If the player is in position an+1=2an+2a_{n+1} = 2a_n + 2, then after the division this interval into two parts the larger of them will surely be not less than an+1a_n + 1, i.e. is a winning one.

What is left is to find the explicit form of losing positions. Having calculated the first few members, it is not hard to guess and then prove by Mathematical Induction that an=2n+12a_n = 2^{n+1} - 2 (or simply by solving a linear recursive equation).

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.