Need hint for this olympiad combinatorics problem

combinatoricscontest-mathinvariance

I've been thinking about this combinatorics problem for a few days but couldn't figure it out, a hint would be highly appreciated.

Numbers $1,2,\dots,2019$ are written on a board.

You keep doing the following operation:
Select numbers $a, b, c , a+b+c$ from the board erase them and write $a+b, a+c, b+c$.

Show that you can't keep doing the operation more than $600$ times.

The only things I can notice are pretty basic, the sum of the numbers is constant and so the average keeps on increasing, you need at least a number less than $2019/3$ or 2 less than $2019/2$ for each operation. I couldn't think any further, any hints?

Best Answer

Not only $\sum a_i$ is invariant, but also $\sum a_i^2$: $$(a+b+c)^2+a^2+b^2+c^2=(a+b)^2+(b+c)^2+(a+c)^2.$$ So when starting with the integers $1,2,\ldots, N$, after $m$ of moves, we have $n=N-m$ integers $a_i$ with some average $\overline a=\frac 1n\sum a_i $and for these we find $$\begin{align}0&\le\sum(a_i-\overline{a})^2\\&=\sum a_i^2-2\overline{a}\sum a_i +\sum \overline{a}^2\\&=\sum a_i^2-\frac1n\left(\sum {a_i}\right)^2\end{align} $$ We conclude that $$ n\ge \frac{\left(\sum {a_i}\right)^2}{\sum a_i^2}= \frac{\left(\sum_{k=1}^{N} k\right)^2}{\sum_{k=1}^{N} k^2} =\frac{\left(\frac{N(N+1)}2\right)^2}{\frac{N(N+1)(2N+1)}6} =\frac{3N (N+1)}{2( 2N+1)}>\frac 34 N$$ and so $$m=N-n<\frac N4.$$ With $N=2019$, this gives us $$ m\le 504.$$

Related Question