Let be an integer greater than 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 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.
Problem 1367
Official solution
1. Initial Setup and Definitions:
Let be an integer greater than . We have pupils seated around a round table, each with a certain number of candies. Let denote the number of candies that the -th pupil has, where . The sum of all candies, , is a multiple of .
2. Exchange Process:
The exchange process is defined such that if a pupil has more candies than the pupil sitting to their right, gives one candy to . This process continues until no pupil has more candies than the pupil to their right.
3. Semi-Invariant:
Define the semi-invariant as the sum of the squares of the number of candies each pupil has:
We need to show that is a decreasing function during the exchange process.
4. **Effect of Exchange on :**
Consider two adjacent pupils and with and candies respectively, where . After gives one candy to , the new number of candies are and . The change in is:
Since , we have , thus:
Therefore, decreases with each exchange.
5. Convergence to Equilibrium:
Since is a sum of squares of integers, it is a non-negative integer. As decreases with each exchange and is bounded below by zero, the process must eventually reach a point where 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 , and at equilibrium, all pupils have the same number of candies, each pupil must have:
candies, which is an integer.