Olympiad Maths Prep

Track / Stage 6 / 367 of 400 #1367 of 2000

Problem 1367

National olympiad, first round
Combinatorics Difficulty 6.8 Prove it

Let nn be an integer greater than 1.1. nn pupils are seated around a round table, each having a certain number of candies (it is possible that some pupils don't have a candy) such that the sum of all the candies they possess is a multiple of n.n. They exchange their candies as follows: For each student's candies at first, there is at least a student who has more candies than the student sitting to his/her right side, in which case, the student on the right side is given a candy by that student. After a round of exchanging, if there is at least a student who has candies greater than the right side student, then he/she will give a candy to the next student sitting to his/her right side. Prove that after the exchange of candies is completed (ie, when it reaches equilibrium), all students have the same number of candies.

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

1. Initial Setup and Definitions:
Let nn be an integer greater than 11. We have nn pupils seated around a round table, each with a certain number of candies. Let cic_i denote the number of candies that the ii-th pupil has, where i=1,2,,ni = 1, 2, \ldots, n. The sum of all candies, i=1nci\sum_{i=1}^n c_i, is a multiple of nn.

2. Exchange Process:
The exchange process is defined such that if a pupil AA has more candies than the pupil BB sitting to their right, AA gives one candy to BB. This process continues until no pupil has more candies than the pupil to their right.

3. Semi-Invariant:
Define the semi-invariant II as the sum of the squares of the number of candies each pupil has:
I=i=1nci2 I = \sum_{i=1}^n c_i^2
We need to show that II is a decreasing function during the exchange process.

4. **Effect of Exchange on II:**
Consider two adjacent pupils AA and BB with aa and bb candies respectively, where a>ba > b. After AA gives one candy to BB, the new number of candies are a=a1a' = a - 1 and b=b+1b' = b + 1. The change in II is:
I=iA,Bci2+(a1)2+(b+1)2 I' = \sum_{i \neq A, B} c_i^2 + (a-1)^2 + (b+1)^2
I=iA,Bci2+(a22a+1)+(b2+2b+1) I' = \sum_{i \neq A, B} c_i^2 + (a^2 - 2a + 1) + (b^2 + 2b + 1)
I=i=1nci22a+2b+2 I' = \sum_{i=1}^n c_i^2 - 2a + 2b + 2
Since a>ba > b, we have 2a+2b<0-2a + 2b < 0, thus:
I<I I' < I
Therefore, II decreases with each exchange.

5. Convergence to Equilibrium:
Since II is a sum of squares of integers, it is a non-negative integer. As II decreases with each exchange and is bounded below by zero, the process must eventually reach a point where II cannot decrease further. At this point, no pupil has more candies than the pupil to their right, meaning the system is in equilibrium.

6. Equilibrium Condition:
Assume that at equilibrium, not all pupils have the same number of candies. This would imply that there exists at least one pupil with more candies than the pupil to their right, contradicting the equilibrium condition. Therefore, at equilibrium, all pupils must have the same number of candies.

7. Sum of Candies:
Since the total number of candies is a multiple of nn, and at equilibrium, all pupils have the same number of candies, each pupil must have:
i=1ncin \frac{\sum_{i=1}^n c_i}{n}
candies, which is an integer.

Source: NuminaMath-1.5, licensed Apache-2.0. Statement and solution reproduced as published; topic, difficulty and ordering added by this site.