Olympiad Maths Prep

Track / Stage 9 / 28 of 80 #1908 of 2000

Problem 1908

IMO P2/P5; hard shortlist
Combinatorics Difficulty 9.2 Prove it IMO2024 Shortlisted Problems · IMO

Let nn and TT be positive integers. James has 4n4 n marbles with weights 1,2,,4n1,2, \ldots, 4 n. He places them on a balance scale, so that both sides have equal weight. Andrew may move a marble from one side of the scale to the other, so that the absolute difference in weights of the two sides remains at most TT.
Find, in terms of nn, the minimum positive integer TT such that Andrew may make a sequence of moves such that each marble ends up on the opposite side of the scale, regardless of how James initially placed the marbles.

This one wants a proof. Work it on paper, read the official solution, then mark yourself honestly — the ladder only means something if the record is true.

Official solution

Consider partitioning the weights into pairs (t,4n+1t)(t, 4 n+1-t). Suppose that each side of the balance contains nn of those pairs. If one side of the balance contains the pair (t,4n+1t)(t, 4 n+1-t) for 1t<2n1 \leqslant t < 2 n and the other side contains (2n,2n+1)(2 n, 2 n+1), then the following sequence of moves swaps those pairs between the sides without ever increasing the absolute value of the difference above 4n4 n.

t,4n+1t2n,2n+1t,2n,4n+1t2n+1t,2n2n+1,4n+1tt,2n,2n+14n+1t2n,2n+1t,4n+1t \begin{align*} t, 4 n+1-t & \mid 2 n, 2 n+1 \tag{1}\\ t, 2 n, 4 n+1-t & \mid 2 n+1 \tag{2}\\ t, 2 n & \mid 2 n+1, 4 n+1-t \tag{3}\\ t, 2 n, 2 n+1 & \mid 4 n+1-t \tag{4}\\ 2 n, 2 n+1 & \mid t, 4 n+1-t \tag{5} \end{align*}

Applying this sequence twice swaps any two pairs (t,4n+1t)(t, 4 n+1-t) and (t,4n+1t)(t', 4 n+1-t') between the sides. So we can achieve an arbitrary exchange of pairs between the sides, and CC can be any configuration where each side of the balance contains nn of those pairs.

We now show that any initial configuration can reach one where each side has nn of those pairs. Consider a configuration where one side has total weight AsA-s and the other has total weight A+sA+s, for some 0s2n0 \leqslant s \leqslant 2 n, and where some pair is split between the two sides. (If no pair is split between the two sides, they must have equal weights and we are done.) Valid moves include moving any weight ww with 1w2n+s1 \leqslant w \leqslant 2 n+s from the A+sA+s side to the AsA-s side, and moving any weight ww with 1w2ns1 \leqslant w \leqslant 2 n-s from the AsA-s side to the A+sA+s side. Suppose the pair (t,4n+1t)(t, 4 n+1-t), with t2nt \leqslant 2 n, is split between the sides. If tt is on the A+sA+s side, or on the AsA-s side and t2nst \leqslant 2 n-s, it can be moved to the other side. Otherwise, tt is on the AsA-s side and t2ns+1t \geqslant 2 n-s+1, so 4n+1t2n+s4 n+1-t \leqslant 2 n+s is on the A+sA+s side and can be moved to the other side. So we can unite the two weights from that pair without splitting any other pair, and repeating this we reach a configuration where no pair is split between the sides.

We treat the n=1n=1 case separately. The initial configuration has marbles 1,41,4 on one side and 2,32,3 on the other. So moving marbles 2,4,3,12, 4, 3, 1 in that order is legal and every marble ends on the opposite side. Now assume n2n \geqslant 2.

Marbles of weight at most 2n2 n are called small. We will make use of the following lemmas:

Lemma 1. If a pair of legal configurations differ only in the locations of small marbles then there is a sequence of legal moves to get from one to the other.

Proof. At first we only move marbles in the wrong position if they are not on the lighter side. (In the case of a tie, neither side is lighter.) Such a move is always legal. Since this reduces the number of marbles in the wrong position, eventually it will no longer be possible to perform such a move.

Then the only marbles in the wrong position are on the lighter side. So moving one marble in the wrong position at a time will always increase δ|\delta|, and δ4n|\delta| \leqslant 4 n at the end. Hence every move is legal.

Lemma 2. Let kNk \in \mathbb{N}. A positive integer can be expressed as a sum of distinct positive integers up to kk if and only if it is at most k(k+1)/2k(k+1) / 2.

Proof. The maximum possible sum of distinct positive integers up to kk is k(k+1)/2k(k+1) / 2. For the other direction we use induction on kk. The case k=1k=1 is trivial. Assume the statement is true for k1k-1. For positive integers up to kk we only need a single term. For larger integers, including kk in the expression means we are done by the inductive hypothesis.

Also note that n(2n+1)4nn(2 n+1) \geqslant 4 n for n2n \geqslant 2.

Let 2n<m4n2 n < m \leqslant 4 n. Marbles of weight greater than mm are called big and marbles from 2n+12 n+1 to mm are called medium.

Suppose all big marbles are on the correct side (that is, opposite where they started), mm is on the incorrect side and the configuration is legal. Then the following steps give a sequence of legal moves after which mm is on the correct side and the big marbles were never moved.

Assume mm is on the left. In Step 2, we rearrange the small marbles so we can move mm. But this is only possible if the weight of big and medium marbles on the right is not too large. So we may need to move some medium marbles from the right first, which we do in Step 1.

Step 1 Skip to Step 2 if the total weight of medium and big marbles on the right side is at most n(4n+1)+2nmn(4 n+1)+2 n-m. Since the big marbles are in the correct position and mm is in the incorrect position, the big marbles on the right can weigh at most n(4n+1)mn(4 n+1)-m. So there must be a medium marble m<mm' < m on the right.

From the first assumption, it is legal to move all small marbles to the left. Then by Lemma 2 we can move some of the small marbles to the right so the right side has weight exactly n(4n+1)+2nn(4 n+1)+2 n. Then moving mm' is legal. Repeat this step. Since the total weight of medium marbles on the right decreases, this step will occur a bounded number of times.

Step 2 Let the total weight of the right side be n(4n+1)+2nm+xn(4 n+1)+2 n-m+x and the weight of small marbles on the right side be yy. Note that yxy \geqslant x. If x0x \leqslant 0 then moving mm is legal.

Otherwise, by Lemma 2 there is a set of small marbles of weight yxy-x. By Lemma 1, there is a sequence of legal moves of small marbles such that the right side has weight exactly n(4n+1)+2nmn(4 n+1)+2 n-m. Now moving mm is legal.

Applying the process above for m=4n,4n1,,2n+1m=4 n, 4 n-1, \ldots, 2 n+1 will move all nonsmall marbles to the opposite side. Then Lemma 1 completes the proof.

Source: MathNet, licensed CC-BY-4.0. Statement and solution reproduced as published; topic, difficulty and ordering added by this site.