Maths Olympiad Prep

Library / /445 of 520

Combinatorics Difficulty 7.2 National olympiad, round 2 Find the answer

Let n3n \geq 3 be a fixed natural number. There are nn boxes A1,A2,,AnA_{1}, A_{2}, \ldots, A_{n}, each containing a number of stones a1,a2,,ana_{1}, a_{2}, \ldots, a_{n} such that a1+a2++an=3na_{1}+a_{2}+\cdots+a_{n}=3 n. A move consists of the following actions:
choose a box and distribute all the stones in the box over the nn boxes (including the chosen box) such that for any two boxes, the number of added stones differs by at most 1.

For a distribution a1,a2,,ana_{1}, a_{2}, \ldots, a_{n}, we define f(a1,a2,,an)f\left(a_{1}, a_{2}, \ldots, a_{n}\right) as the minimum number of moves required to get all the stones in one box. Let MnM_{n} be the maximum of f(a1,a2,,an)f\left(a_{1}, a_{2}, \ldots, a_{n}\right) for all possible distributions a1,a2,,ana_{1}, a_{2}, \ldots, a_{n} such that a1+a2++an=3na_{1}+a_{2}+\cdots+a_{n}=3 n. Determine MnM_{n} and all distributions a1,a2,,ana_{1}, a_{2}, \ldots, a_{n} for which f(a1,a2,,an)=Mnf\left(a_{1}, a_{2}, \ldots, a_{n}\right)=M_{n}.

Example. If n=4n=4 and the boxes contain 2, 6, 0, 4 stones, then we can distribute the 2 stones from box A1A_{1} as 1,0,1,0. After this move, the number of stones per box is 1, 6, 1, 4.

A number or a short expression. Spacing and $ signs are ignored.

Solution

Answer: M=3n4M=3 n-4 and f(a1,a2,,an)=3n4f\left(a_{1}, a_{2}, \ldots, a_{n}\right)=3 n-4 if and only if a1=a2==an=3a_{1}=a_{2}=\ldots=a_{n}=3.

First, we note that for every distribution, there exists a move such that max(a1,,an)\max \left(a_{1}, \ldots, a_{n}\right) increases by at least one, unless all stones are in one box. Indeed, choose a box where the maximum is achieved, choose another non-empty box, and distribute the stones from that box so that at least one stone goes to the first box. This implies that f(a1,a2,,an)3nmax(a1,,an)f\left(a_{1}, a_{2}, \ldots, a_{n}\right) \leq 3 n-\max \left(a_{1}, \ldots, a_{n}\right). In particular, if max(a1,,an)5\max \left(a_{1}, \ldots, a_{n}\right) \geq 5, then f(a1,a2,,an)3n5f\left(a_{1}, a_{2}, \ldots, a_{n}\right) \leq 3 n-5. The rest of the proof follows from four claims.

Claim 1. If max(a1,,an)=4\max \left(a_{1}, \ldots, a_{n}\right)=4, then f(a1,a2,,an)3n5f\left(a_{1}, a_{2}, \ldots, a_{n}\right) \leq 3 n-5.
Proof. Let A1A_{1} be the box with the most stones, and A2A_{2} the box with the second-highest number of stones. This means that a1=4a_{1}=4 and a23n4n1=31n1a_{2} \geq \frac{3 n-4}{n-1}=3-\frac{1}{n-1}. Since a2a_{2} is an integer and n3n \geq 3, this means that a23a_{2} \geq 3. We distribute every other box with at least 2 stones so that A1A_{1} and A2A_{2} each receive one stone. We repeat this until there are no more boxes with at least 2 stones, except for A1A_{1} and A2A_{2}. For this distribution b1,,bnb_{1}, \ldots, b_{n}, we have b3++bnn2b_{3}+\cdots+b_{n} \leq n-2. This means that b1+b23n(n2)=2n+2b_{1}+b_{2} \geq 3 n-(n-2)=2 n+2 and since b1b2=a1a21b_{1}-b_{2}=a_{1}-a_{2} \leq 1, we find that b2=12(b2+b2)12(b1+b21)12(2n+1)=n+12b_{2}=\frac{1}{2}\left(b_{2}+b_{2}\right) \geq \frac{1}{2}\left(b_{1}+b_{2}-1\right) \geq \frac{1}{2}(2 n+1)=n+\frac{1}{2}. Since b2b_{2} is an integer, we find that b2n+1b_{2} \geq n+1. Now we can make a move where we distribute the stones from A2A_{2}, giving A1A_{1} 2 stones. Then we finish with moves where A1A_{1} receives at least one stone each time. Since A1A_{1} receives at least one stone per move and a move involves at least two stones, the number of moves made is at most 3n53 n-5.

Claim 2. If max(a1,,an)=3\max \left(a_{1}, \ldots, a_{n}\right)=3, then f(a1,a2,,an)3n4f\left(a_{1}, a_{2}, \ldots, a_{n}\right) \leq 3 n-4.

Proof. We make an arbitrary move and apply Claim 1 to the result. Then we are done in at most 1+(3n5)=3n41+(3 n-5)=3 n-4 moves. Alternatively, we can give a concrete series of 3n43 n-4 moves. If max(a1,,an)=3\max \left(a_{1}, \ldots, a_{n}\right)=3, each box has exactly 3 stones. We start with n2n-2 moves where we choose AiA_{i} with i3i \geq 3 and distribute the three stones over A1,A2A_{1}, A_{2}, and AiA_{i}. Then the first two boxes each have n+1n+1 stones, so we can make a move where we distribute the n+1n+1 stones from the second box so that the first box gets 2 stones. Since A1A_{1} receives at least one stone per move and a move involves at least two stones, the number of moves made is at most 3n43 n-4.

Claim 3. There are no moves such that the maximum max(a1,,an)\max \left(a_{1}, \ldots, a_{n}\right) increases by 3 or more.

Proof. To make a move where a box receives more than 3 stones, the chosen box would need to contain at least 3n+13 n+1 stones. This contradicts the fact that there are only 3n3 n stones. To make a move where a box receives 3 stones, the chosen box must contain at least 2n+12 n+1 stones. A box that achieves the new maximum after this move must also contain at least 2n+12 n+1 stones. This is again a contradiction.

Claim 4. If max(a1,,an)=3\max \left(a_{1}, \ldots, a_{n}\right)=3, then f(a1,a2,,an)3n4f\left(a_{1}, a_{2}, \ldots, a_{n}\right) \geq 3 n-4.
Proof. Suppose we can get all the stones into one box in 3n53 n-5 or fewer turns. By Claim 3, there are no moves where the maximum increases by 3 or more. This means that there are at least two moves where the maximum increases by 2. We call such moves large moves. Let the first large move be in turn ii and the last large move be in turn jj. 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, we have i1(n+1)3i-1 \geq(n+1)-3 or in1i \geq n-1.

Let mm be the number of empty boxes at the start of move jj. Since each box has at least 1 stone after move ii, we must have made at least one move per empty box after that. This means that (j1)im(j-1)-i \geq m. Since each box receives at least 1 stone, there are at most mm boxes with 1 stone after move jj; the rest contain at least 2. Since we do not make any large moves after move jj, it takes at least m+2(n1m)=2(n1)mm+2(n-1-m)=2(n-1)-m moves to empty n1n-1 boxes. The total number of moves is thus at least

i+(ji)+2(n1)m(n1)+(m+1)+2(n1)m=3n2, i+(j-i)+2(n-1)-m \geq(n-1)+(m+1)+2(n-1)-m=3 n-2,

which contradicts our assumption that we could do it in 3n53 n-5 moves.

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: NuminaMath-1.5, licensed Apache-2.0. Statement and solution reproduced as published; topic and difficulty added by this site.