Maths Olympiad Prep

Library / /186 of 196

Combinatorics Difficulty 6.8 National Olympiad Prove it Soviet Union

Problem:
Given nn real numbers {a1,a2,,an}\{a_1, a_2, \ldots, a_n\}, prove that you can find nn integers {b1,b2,,bn}\{b_1, b_2, \ldots, b_n\}, such that aibi<1|a_i - b_i| < 1 and the sum of any subset of the original numbers differs from the sum of the corresponding {bi}\{b_i\} by at most (n+1)/4(n + 1)/4.

Solution

Solution:
We can take all {ai}\{a_i\} to lie in the range (0,1)(0,1) and all {bi}\{b_i\} to be 00 or 11. The largest positive value of the sum of (aibi)(a_i - b_i) for any subset is achieved by taking the subset of those ii for which bi=0b_i = 0. Similarly, the largest negative value is achieved by taking those ii for which bi=1b_i = 1. So the worst subset will be one of those two.

If ai<aja_i < a_j, then we cannot have bi=1b_i = 1 and bj=0b_j = 0 if the set of bib_i is to minimise the maximum sum, because swapping them would reduce the sum of aa's with b=0b = 0 and the sum of (1a)(1 - a)'s with b=1b = 1. So if we order the aa's so that a1a2ana_1 \leq a_2 \leq \ldots \leq a_n, then a best set of bb's is bi=0b_i = 0 for ii \leq some kk, and bi=1b_i = 1 for i>ki > k. [If some of the aia_i are equal, then we can find equally good sets of bb's that do not have this form, but we cannot get a lower maximum sum by departing from this form.]

Let Li=a1+a2++aiL_i = a_1 + a_2 + \ldots + a_i, and Ri=ai+1+ai+2++anR_i = a_{i + 1} + a_{i + 2} + \ldots + a_n. As we increase ii the sums LiL_i increase and the sums RiR_i decrease, so for some kk we must have Lk<RkL_k < R_k, Lk+1Rk+1L_{k + 1} \geq R_{k + 1}. Either kk or k+1k + 1 must correspond to the optimum choice of bb's to minimise the maximum sum.

Now assume that the aa's form a maximal set, in other words they are chosen so that the minimum is as large as possible. We show first that in this case Lk+1=RkL_{k + 1} = R_k. Suppose Lk+1<RkL_{k + 1} < R_k. Then we could increase each of ak+1,ak+2,,ana_{k + 1}, a_{k + 2}, \ldots, a_n by ε\varepsilon. This would leave LkL_k unaffected, but slightly increase Lk+1L_{k + 1} and slightly reduce RkR_k. For small ε\varepsilon this does not change the value of kk, but increases the smaller of Lk+1L_{k + 1} and RkR_k, thus increasing the minimum and contradicting the maximality of the original aa's. Similarly, if Lk+1>RkL_{k + 1} > R_k, we could decrease each of a1,a2,,ak+1a_1, a_2, \ldots, a_{k + 1} by ε\varepsilon, thus slightly increasing RkR_k and reducing Lk+1L_{k + 1}.

Suppose not all of a1,a2,,ak+1a_1, a_2, \ldots, a_{k + 1} are equal. Take ii so that ai<ai+1a_i < a_{i + 1}. Now increase each of a1,a2,,aia_1, a_2, \ldots, a_i by ε\varepsilon and reduce each of ai+1,ai+2,,ak+1a_{i + 1}, a_{i + 2}, \ldots, a_{k + 1} by ε\varepsilon', with ε\varepsilon and ε\varepsilon' sufficiently small that we do not upset the ordering or change the value of kk, and with their relative sizes chosen so that Lk+1L_{k + 1} is increased. RkR_k is also increased, so we contradict the maximality of the aa's. Hence all a1,a2,,ak+1a_1, a_2, \ldots, a_{k + 1} are equal. Similarly, we show that all of ak+1,,ana_{k + 1}, \ldots, a_n are equal. For if not we can increase slightly ak+1,,aja_{k + 1}, \ldots, a_j and reduce slightly aj+1,,ana_{j + 1}, \ldots, a_n to get a contradiction.

So we have established that all the aa's must be equal. Suppose nn is odd =2m+1= 2m + 1 and that all the aa's equal xx. Then for the optimum kk we have (k+1)x=(2m+1k)(1x)(k + 1)x = (2m + 1 - k)(1 - x), hence k+1=(2m+2)(1x)k + 1 = (2m + 2)(1 - x) and the maximum difference is (k+1)x=(2m+2)(1x)x(k + 1)x = (2m + 2)(1 - x)x. This is maximised by taking x=1/2x = 1/2, k=mk = m, and is (m+1)/2=(n+1)/4(m + 1)/2 = (n + 1)/4.

If nn is even =2m= 2m, then for the optimum kk we have (k+1)x=(2mk)(1x)(k + 1)x = (2m - k)(1 - x), so k+1=(2m+1)(1x)k + 1 = (2m + 1)(1 - x), and the maximum difference is (k+1)x=(2m+1)(1x)x(k + 1)x = (2m + 1)(1 - x)x. However, in this case we cannot take x=1/2x = 1/2, because that would give k=m1/2k = m - 1/2 which is non-integral, so we take k=m1k = m - 1 or mm, both of which give a maximum difference of m(m+1)/(2m+1)=n(n+2)/(4n+4)<(n+1)/4m(m + 1)/(2m + 1) = n(n + 2)/(4n + 4) < (n + 1)/4.

Want a route through all this instead of an archive? The track puts 2,000 problems in a working order, from AMC 10 level to the IMO shortlist.

Source: MathNet, licensed CC-BY-4.0. Statement reproduced verbatim; metadata (topic, difficulty) added by this project.