Maths Olympiad Prep

Library / /8 of 8

Combinatorics Difficulty 9.2 IMO level Prove it Netherlands

Let n3n \ge 3 be a fixed positive integer. There are nn boxes A1,A2,,AnA_1, A_2, \dots, A_n, each with a number of stones in it (a1,a2,,an)(a_1, a_2, \dots, a_n) such that a1+a2++an=3na_1+a_2+\cdots+a_n = 3n. A move consists of the following operations:
choose a box and distribute all the stones in the box among the nn boxes (including the box that was chosen) such that for every two boxes the numbers of stones added to those boxes differ by at most 1.
For a distribution a1,a2,,ana_1, a_2, \dots, a_n, we define f(a1,a2,,an)f(a_1, a_2, \dots, a_n) as the least number of moves required to get all the stones into a single box. Let MnM_n be the maximum of f(a1,a2,,an)f(a_1, a_2, \dots, a_n) for all possible distributions a1,a2,,ana_1, a_2, \dots, a_n such that a1+a2++an=3na_1 + a_2 + \cdots + a_n = 3n. Determine MnM_n and all distributions a1,a2,,ana_1, a_2, \dots, a_n for which f(a1,a2,,an)=Mnf(a_1, a_2, \dots, a_n) = M_n.

*Example.* If n=4n = 4 and the boxes contain 2, 6, 0, 4 stones in that order, then we can distribute the 2 stones from box A1A_1 by putting in each box in order 1, 0, 1, 0 stones. After this move, the number of stones in each box in order is 1, 6, 1, 4.

Solution

Answer: Mn=3n4M_n = 3n - 4 and f(a1,a2,,an)=3n4f(a_1, a_2, \dots, a_n) = 3n - 4 if and only if a1=a2==an=3a_1 = a_2 = \dots = a_n = 3.

First of all, we note that for every distribution, there exists a move such that max(a1,,an)\max(a_1, \dots, a_n) increases by at least 1, unless all the stones are in a single box. To see this, pick a box containing the highest number of stones, pick a different non-empty box and distribute the stones from that box such that at least one stone goes into the box containing the highest number of stones. It follows that f(a1,a2,,an)3nmax(a1,,an)f(a_1, a_2, \dots, a_n) \le 3n - \max(a_1, \dots, a_n). Specifically, if max(a1,,an)5\max(a_1, \dots, a_n) \ge 5, then f(a1,a2,,an)3n5f(a_1, a_2, \dots, a_n) \le 3n - 5. The rest of the proof will follow from the following four claims.

Claim 1. If max(a1,,an)=4\max(a_1, \dots, a_n) = 4, then f(a1,a2,,an)3n5f(a_1, a_2, \dots, a_n) \le 3n - 5.
*Proof.* Let A1A_1 be the box containing the highest number of stones, and A2A_2 be the box containing the second-highest number of stones. Note that we must have a1=4a_1 = 4 and a23n4n1=31n1a_2 \ge \frac{3n-4}{n-1} = 3 - \frac{1}{n-1}. Since a2a_2 is integer and n3n \ge 3, that means a23a_2 \ge 3. While there exists a box other than A1A_1 or A2A_2 containing 2 or more stones, do the move consisting of distributing the stones in that box in such a way that A1A_1 and A2A_2 each receive a stone. The distribution b1,,bnb_1, \dots, b_n we obtain by performing these moves has the properties that b3++bnn2b_3 + \dots + b_n \le n-2 and that b1b2=a1a21b_1 - b_2 = a_1 - a_2 \le 1. Therefore we have b1+b23n(n2)=2n+2b_1 + b_2 \ge 3n - (n-2) = 2n+2, from which it follows that b2=12(b2+b1)12(b1+b21)12(2n+1)=n+12b_2 = \frac{1}{2}(b_2+b_1) \ge \frac{1}{2}(b_1+b_2-1) \ge \frac{1}{2}(2n+1) = n+\frac{1}{2}. Since b2b_2 is integer, we therefore have b2n+1b_2 \ge n+1. Now we can do a move consisting of distributing A2A_2's stones in such a way that A1A_1 receives 2 stones. After that, while there exists a box other than A1A_1 that contains stones, we do a move consisting of distributing the stones in that box in such a way that A1A_1 receives 1 stone. Since A1A_1 receives at least two stones during one of the moves, and at least one during each of the other moves, the number of moves needed to make all boxes except A1A_1 empty is at most 3n53n-5. \square

Claim 2. If max(a1,,an)=3\max(a_1, \dots, a_n) = 3, then f(a1,a2,,an)3n4f(a_1, a_2, \dots, a_n) \le 3n-4.
*Proof.* We make a random move and apply Claim 1 to the result. Then we are done in at most 1+(3n5)=3n41+(3n-5)=3n-4 moves. \square

Claim 3. There are no moves so that the maximum max(a1,,an)\max(a_1, \dots, a_n) increases by 3 or more.
*Proof.* We proceed by contradiction. To make a move in which a box receives more than 3 stones, the box that was distributed from in that move would have to contain at least 3n+13n+1 stones. This contradicts the fact that there are only 3n3n stones. To make a move in which a box receives exactly 3 stones, the box that was distributed from should contain at least 2n+12n+1 stones. Any box that contains the highest number of stones after this move, must contain at least 2n+42n+4 stones, as the maximum has increased by at least 3. That box therefore must also have contained at least 2n+12n+1 stones before this move. This requires 4n+24n+2 stones and is therefore a contradiction. \square

Claim 4. If max(a1,,an)=3\max(a_1, \dots, a_n) = 3, then f(a1,a2,,an)3n4f(a_1, a_2, \dots, a_n) \ge 3n-4.
*Proof.* Suppose for a contradiction that we can move all the stones into a single box in 3n53n-5 or fewer moves. Because of Claim 3, there are no moves where the maximum increases by 3 or more. That means there are at least two moves where the maximum increases by 2. Such moves we will call *large* moves. Note that each box receives at least 1 stone on a big move. Let move ii be the first large move, and let move jj be the last large move. Since a large move can only be performed with a box containing at least n+1n+1 stones and each box starts with 3 stones i1(n+1)3i-1 \ge (n+1)-3, or equivalently in1i \ge n-1.
Let mm be the number of empty boxes at the beginning of move jj. Since each box contains at least 1 stone after move ii, we must have made at least one move per box that is empty by the beginning of move jj. Therefore (j1)im(j-1)-i \ge m. Since each box receives at least 1 stone again, after move jj there are at most mm boxes containing exactly 1 stone; the other boxes contain at least 2 stones each. Since we don't make any more large moves after move jj, it therefore takes at least m+2(n1m)=2(n1)mm+2(n-1-m) = 2(n-1)-m moves afterwards to empty n1n-1 of the boxes. So the total number of moves is at least
i+(ji)+2(n1)m(n1)+(m+1)+2(n1)m=3n2, i + (j - i) + 2(n - 1) - m \ge (n - 1) + (m + 1) + 2(n - 1) - m = 3n - 2,
which contradicts our assumption that we could put all the stones into a single box in 3n53n-5 or fewer moves. \square

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 and solution reproduced as published; topic and difficulty added by this site.