Skip to main content
OlympiadHQ

Browse · MathNet

Print

Cesko-Slovacko-Poljsko 2006

2006 counting and probability

Problem

There are children around the round-table. Erika is the oldest among them and she has candies. No other child has any candy. Erika decided to distribute the candies and determined following rules. In every round all the children with at least two candies show. Erika chooses one of them and he/she sends one by one candy to both children sitting next to him/her. (So in the first round only Erika shows and sends one by one candy to her two neighbours.) For which is it possible to end the distribution after a finite number of rounds with every child having exactly one candy?
Solution
First we show for even the distribution never ends with every child having one candy. In every round only two candies change position and they move in two opposite directions. This leads us to studying the entire sum of distances of candies from one child, say Erika. We label the seats in clockwise direction by numbers (as the distance from Erika in this direction). After every round we sum up the distances of all candies. Let the sum be (i.e. with every candy we add to the number of the seat where the candy actually is). If in the given round Erika chooses child on the seat labeled by , whereby , the value of does not change - we sum up instead of . If she chooses child on the seat labeled by , we sum up instead of , hence decreases by . Finally, if she chooses herself, we sum up instead of , hence increases by . At the beginning we have and its value can change only by , hence remains divisible by after every round. Thus is permanently integer. But in the case when every child has exactly one candy we have which is not integer for even. Hence such situation never happens.

For odd we show there is a distribution ending with every child having one candy. Let . We find proper distribution by induction. More precisely we prove that for every we can get position with candies by Erika, one candy by first children sitting to the left side of her, and one candy by first children to the right. The value represents the beginning of distribution, the value the status after the first round (and thus the first step of induction), and the value the status we would like to reach. Suppose we managed to get the specified position for some value with (and we passed through all positions for ). From this status we proceed as follows. First Erika gives one candy to her neighbours (as , she has at least three candies thus she can do it). The following rounds are illustrated in the scheme. (The numbers are for amounts of candies by Erika and children on the right side of her. On the left side we proceed simultaneously in the same way.) We get the status, when Erika has candies, first children on both sides have one candy, the -th children have no candy, and the -st children have one candy. To reach the position for , it is sufficient to deliver candies to the children on the -th seats. But here we can use induction hypothesis. That is if we look apart from candies on the -st seats, we obtain exactly the position for (Erika has two candies less, but she still has at least three and thus we can do the same steps). From this position we know how to proceed to the position for . Restoring back prescinded candies we get the position for .

Thus, finally we also reach the position for .
Final answer
All odd n ≥ 3

Techniques

Invariants / monovariantsInduction / smoothing