Maths Olympiad Prep

Library / /26 of 32

, 2010

Combinatorics Difficulty 6.3 National Olympiad Prove it Estonia

Let n2n \ge 2. Positive integers a1,a2,,ana_1, a_2, \dots, a_n whose sum is even and which satisfy aiia_i \le i for every i=1,2,,ni = 1, 2, \dots, n, are given. Prove that it is possible to choose signs in the expression a1±a2±±ana_1 \pm a_2 \pm \dots \pm a_n in such a way that its value becomes 00. (Seniors.)

Solutions — 3

Solution 1

Prove the claim by induction on nn. If n=2n=2, then the only way to choose integers that satisfy the conditions of the problem is a1=1a_1 = 1 and a2=1a_2 = 1. In this case, a1a2=0a_1 - a_2 = 0.

Assume now that the claim holds whenever 2nk2 \le n \le k and show that it holds also for n=k+1n = k + 1. Consider two cases.

1. If ak+1=aka_{k+1} = a_k, then a1+a2++ak1a_1 + a_2 + \dots + a_{k-1} is even. As this case is possible only for k>2k > 2, the induction hypothesis is applicable for n=k1n = k - 1. Thus it is possible to choose signs in the expression a1±a2±±ak1a_1 \pm a_2 \pm \dots \pm a_{k-1} in such a way that it evaluates to 00. Adding akak+1a_k - a_{k+1} to it, the desired expression for n=k+1n = k + 1 is obtained.

2. If akak+1a_k \neq a_{k+1}, then consider integers a1,,ak1,akak+1a_1, \dots, a_{k-1}, |a_k - a_{k+1}|. As akak+1|a_k - a_{k+1}| and ak+ak+1a_k + a_{k+1} have the same parity, the sum of these kk numbers is even. Also note that 1akak+1k1 \le |a_k - a_{k+1}| \le k. Thus these numbers satisfy the conditions of the problem, so it is possible to choose signs in the expression a1±a2±±ak1±akak+1a_1 \pm a_2 \pm \dots \pm a_{k-1} \pm |a_k - a_{k+1}| in such a way that it evaluates to 00. As either akak+1=akak+1|a_k - a_{k+1}| = a_k - a_{k+1} or akak+1=ak+1ak|a_k - a_{k+1}| = a_{k+1} - a_k, this also leads to a corresponding expression for numbers a1,a2,,ak,ak+1a_1, a_2, \dots, a_k, a_{k+1}.

Solution 2

Prove by induction on ii that, for each ii and ss such that 1in1 \le i \le n and 1sa1++ai1 \le s \le a_1 + \dots + a_i, it is possible to choose some of the numbers a1,,aia_1, \dots, a_i that sum up to ss.

If i=1i = 1, then this claim holds since a1=1a_1 = 1.

Assume that the claim holds for i=k1i = k - 1 and consider the case i=ki = k. Let S=a1++akS = a_1 + \dots + a_k and S=a1++ak1S' = a_1 + \dots + a_{k-1}. If 1sS1 \le s \le S', then the desired statement holds by the induction hypothesis. If S<sSS' < s \le S, then 0sakS0 \le s - a_k \le S' (the first inequality holds because saksS10s - a_k \ge s - S' - 1 \ge 0, implied by akka_k \le k and Sk1S' \ge k - 1; the second inequality follows from S=S+akS = S' + a_k). Therefore, to get the sum ss, we can choose the number aka_k, and if sak>0s - a_k > 0, then add to it those numbers among a1,,ak1a_1, \dots, a_{k-1} whose sum is saks - a_k, using the induction hypothesis.

Let now a1+a2++an=2Ta_1 + a_2 + \dots + a_n = 2T. Choose the numbers among a1,a2,,ana_1, a_2, \dots, a_n that sum up to TT. This divides all the numbers into two groups with equal sum. It remains to write minuses in front of every term of the group that does not contain a1a_1.

Solution 3

Start choosing signs from right to left. Denote S1=anS_1 = a_n and define Sk+1S_{k+1}, k=1,,n1k = 1, \dots, n-1, as follows: if Sk0S_k \ge 0, then Sk+1=SkankS_{k+1} = S_k - a_{n-k}, otherwise Sk+1=Sk+ankS_{k+1} = S_k + a_{n-k}.

We show that then always Sknk+1|S_k| \le n-k+1. This holds if k=1k=1. Assume therefore that it holds for k=mk=m and prove it for k=m+1k=m+1. If Sm0S_m \ge 0, then Sm+1=Smanm(nm+1)1=nmS_{m+1} = S_m - a_{n-m} \le (n-m+1)-1 = n-m and Sm+1=Smanm0(nm)S_{m+1} = S_m - a_{n-m} \ge 0 - (n-m), hence Sm+1nm|S_{m+1}| \le n-m. If Sm<0S_m < 0, then Sm+1=Sm+anm<0+nmS_{m+1} = S_m + a_{n-m} < 0 + n-m and Sm+1=Sm+anm(nm+1)+1=(nm)S_{m+1} = S_m + a_{n-m} \ge -(n-m+1)+1 = -(n-m), hence Sm+1nm|S_{m+1}| \le n-m again.

Now Sn1|S_n| \le 1 since Sknk+1|S_k| \le n-k+1 for every k=1,,nk=1, \dots, n. Thus Sn=0S_n = 0 as the sum of all terms is even. If in this formal sum, the term a1a_1 has minus sign, turn all signs to the opposite one.

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.