Let us see what this theorem tells us. From AG inequality, we know that if every number is equal, a=√n and every ai=1√n. Then by a choice of the best Boolean approximation ∑ni=1ϵiai, one can get a number very close to the 0 with an error 1√n --- that is the error of one term.
This makes us think of the concentration inequality in the probability --- like Markov inequality, Hoeffding inequality etc. That is the case when I did Alibaba competition, but I have to say this is a very dangerous trap in this question. In fact, even after the competition, I continue trying this idea many times, but it seems no easy way to figure it out. In fact, let us recall what concentration inequality teaches us: yes, if we put ϵi centered variable, the measure should be concentrated and P[|n∑i=1ϵiai|≥1a]≤2exp(−2/a2).
Good, you will see an explosion and this does not give useful information. Indeed, the concentration inequality always told us the measure should be in the σ region, but it tells nothing how good the measure is concentrated in the σ region. In this question, a random choice is clearly not good because the σ for ∑ni=1ϵiai is 1.
One has to keep in mind that the probabilistic method is good and cool, but not the only way and sometimes not the best way.
A simple solution is just by induction and one step exploration, or someone calls it the greedy method. This problem is equivalent to prove (min We do at first the optimization for n variable and then choose the sign for the last one. We can also manipulate the choice of the last variable. For example, one can let a_{n+1} always be the smallest one, thus its influence is always smaller than \frac{1}{a}. Once we get the correct direction, the theorem is not difficult.