Skip to main content
OlympiadHQ

Browse · MathNet

Print

SAUDI ARABIAN IMO Booklet 2023

Saudi Arabia 2023 counting and probability

Problem

Let be an integer. Suppose that children are arranged in a circle, and coins are distributed between them (some children may have no coins). At every step, a child with at least 2 coins may give 1 coin to each of their neighbours on the right and left. Determine all initial distributions of coins from which it is possible that, after a finite number of steps, each child has exactly one coin.
Solution
The answer is: all distributions where , where denotes the number of coins the -th child starts with.

Encode the sequence as polynomial . The cyclic nature of the problem makes it natural to work modulo . Child performing a step is equivalent to adding to the polynomial, and we want to reach the polynomial .

Since we only add multiples of , this is only possible if modulo the ideal generated by and , i.e. This is equivalent to (which simply translates to the condition that there are coins) and , which translates to the invariant. We also could show that this condition is also sufficient.
Final answer
All initial distributions with sum of i times c_i congruent to n(n+1)/2 modulo n (with the total number of coins equal to n).

Techniques

Invariants / monovariantsPolynomial operationsModular Arithmetic