Maths Olympiad Prep

Track / Stage 7 / 242 of 300 #2122 of 2444

Problem 2122

National Olympiad second round; IMO P1/P4
Combinatorics Difficulty 7.7 Prove it Benelux Mathematical Olympiad competition problems · Benelux Mathematical Olympiad

Let k1k \geq 1 be an integer.
We consider 4k4k chips, 2k2k of which are red and 2k2k of which are blue. A sequence of those 4k4k chips can be transformed into another sequence by a so-called move, consisting of interchanging a number (possibly one) of consecutive red chips with an equal number of consecutive blue chips. For example, we can move from rbbbrrbbr \underline{b b b r} \underline{r} \underline{b} b to rrbbbbbbr \underline{r} \underline{b} b \underline{b b b} b where rr denotes a red chip and bb denotes a blue chip.
Determine the smallest number nn (as a function of kk) such that starting from any initial sequence of the 4k4k chips, we need at most nn moves to reach the state in which the first 2k2k chips are red.

This one wants a proof. Work it on paper, then read the official solution and mark yourself. Be honest about it: the record is only any use to you if it is.

Next problem →

Official solution

Solution:
The answer is n=kn = k.

We will first show that nkn \geq k. Let us count the number CC of times a red chip is directly to the right of a blue chip. In the final position this number equals 00. In the position brbrbrbrb r b r b r \cdots b r this number equals 2k2k. We claim that any move reduces this number by at most 22. Denote by RR the group of red chips and by BB the group of blue chips that are interchanged. Any reduction in CC must involve a red chip getting rid of its blue left neighbour or a blue chip getting rid of its red right neighbour. This can only happen with the leftmost chip of RR (if its left neighbour is blue) and the rightmost chip of BB (if its right neighbour is red), but not with the rightmost chip of RR (and its right neighbour) or the leftmost chip of BB (and its left neighbour). Hence CC is reduced by at most 22 in any move. Therefore the number of moves necessary to change brbrbrbrb r b r b r \cdots b r into the final position is at least 2k2=k\frac{2k}{2} = k.

We will now show that nkn \leq k, i.e. that it is always possible to perform at most kk moves in order to reach the state in which the first 2k2k chips are red. Consider the first 2k2k chips. If at most kk of these chips are blue, we can perform one move for each chip, switching it with one of the red chips of the last 2k2k chips. So then we are done in at most kk moves. Now suppose that of the first 2k2k chips, at least k+1k+1 are blue. Then at most k1k-1 chips are red. Hence it is possible to perform at most k1k-1 moves to reach the situation in which the last 2k2k chips are red. We then perform one final move, switching the first 2k2k chips and the last 2k2k chips, ending in the situation in which the first 2k2k chips are red. Thus, it is always possible to reach the situation in which the first 2k2k chips are red in at most kk steps, hence nkn \leq k.

We have now shown that nkn \geq k and nkn \leq k, hence n=kn = k as claimed.

Source: MathNet, licensed CC-BY-4.0. Statement reproduced verbatim; metadata (topic, difficulty, ordering) added by this project.