Problem

Source: APMO 1997

Tags: algorithm, rotation, geometry, geometric transformation, logarithms, combinatorics



Suppose that $n$ people $A_1$, $A_2$, $\ldots$, $A_n$, ($n \geq 3$) are seated in a circle and that $A_i$ has $a_i$ objects such that \[ a_1 + a_2 + \cdots + a_n = nN \] where $N$ is a positive integer. In order that each person has the same number of objects, each person $A_i$ is to give or to receive a certain number of objects to or from its two neighbours $A_{i-1}$ and $A_{i+1}$. (Here $A_{n+1}$ means $A_1$ and $A_n$ means $A_0$.) How should this redistribution be performed so that the total number of objects transferred is minimum?