
02.2. In two bowls there are in total $N$ balls, numbered from 1 to $N$. One ball is moved from one of the bowls to the other. The average of the numbers in the bowls is increased in both of the bowls by the same amount, $x$. Determine the largest possible value of $x$.


Solution. Consider the situation before the ball is moved from urn one to urn two. Let the number of balls in urn one be $n$, and let the sum of numbers in the balls in that urn be $a$. The number of balls in urn two is $m$ and the sum of numbers $b$. If $q$ is the number written in the ball which was moved, the conditions of the problem imply

$$
\left\{\begin{array}{l}
\frac{a-q}{n-1}=\frac{a}{n}+x \\
\frac{b+q}{m+1}=\frac{b}{m}+x
\end{array}\right.
$$

or

$$
\left\{\begin{array}{l}
a=n q+n(n-1) x \\
b=m q-m(m+1) x
\end{array}\right.
$$

Because $n+m=N$ and $a+b=\frac{1}{2} N(N+1)$, we obtain

$$
\frac{1}{2} N(N+1)=N q+x\left(n^{2}-m^{2}-N\right)=N q+x N(n-m-1)
$$

and $q=\frac{1}{2}(N+1)-x(n-m-1), b=\frac{1}{2} m(N+1)-x m n$. But $b \geq 1+2+\cdots+m=\frac{1}{2} m(m+1)$. So $\frac{1}{2}(N+1)-x n=\frac{1}{2}(m+n+1)-x n \geq \frac{1}{2}(m+1)$ or $\frac{n}{2}-x n \geq 0$. Hence $x \leq \frac{1}{2}$. The inequality is sharp or $x=\frac{1}{2}$, when the nubers in the balls in urn one are $m+1, m+2$, $\ldots, N$, the numbers in urn two are $1,2, \ldots, m$, and $q=m+1$.
