Maths Olympiad Prep

Library / Estonija /26 of 32

Estonija, 2010

Combinatorics Difficulty 6.3 National Olympiad Prove it Estonia

Let n≥2n \ge 2. Positive integers a1,a2,…,ana_1, a_2, \dots, a_n whose sum is even and which satisfy ai≤ia_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, a1−a2=0a_1 - a_2 = 0.

Assume now that the claim holds whenever 2≤n≤k2 \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+⋯+ak−1a_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=k−1n = k - 1. Thus it is possible to choose signs in the expression a1±a2±⋯±ak−1a_1 \pm a_2 \pm \dots \pm a_{k-1} in such a way that it evaluates to 00. Adding ak−ak+1a_k - a_{k+1} to it, the desired expression for n=k+1n = k + 1 is obtained.

2. If ak≠ak+1a_k \neq a_{k+1}, then consider integers a1,…,ak−1,∣ak−ak+1∣a_1, \dots, a_{k-1}, |a_k - a_{k+1}|. As ∣ak−ak+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 1≤∣ak−ak+1∣≤k1 \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±⋯±ak−1±∣ak−ak+1∣a_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 ∣ak−ak+1∣=ak−ak+1|a_k - a_{k+1}| = a_k - a_{k+1} or ∣ak−ak+1∣=ak+1−ak|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 1≤i≤n1 \le i \le n and 1≤s≤a1+⋯+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=k−1i = k - 1 and consider the case i=ki = k. Let S=a1+⋯+akS = a_1 + \dots + a_k and S′=a1+⋯+ak−1S' = a_1 + \dots + a_{k-1}. If 1≤s≤S′1 \le s \le S', then the desired statement holds by the induction hypothesis. If S′<s≤SS' < s \le S, then 0≤s−ak≤S′0 \le s - a_k \le S' (the first inequality holds because s−ak≥s−S′−1≥0s - a_k \ge s - S' - 1 \ge 0, implied by ak≤ka_k \le k and S′≥k−1S' \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 s−ak>0s - a_k > 0, then add to it those numbers among a1,…,ak−1a_1, \dots, a_{k-1} whose sum is s−aks - 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,…,n−1k = 1, \dots, n-1, as follows: if Sk≥0S_k \ge 0, then Sk+1=Sk−an−kS_{k+1} = S_k - a_{n-k}, otherwise Sk+1=Sk+an−kS_{k+1} = S_k + a_{n-k}.

We show that then always ∣Sk∣≤n−k+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 Sm≥0S_m \ge 0, then Sm+1=Sm−an−m≤(n−m+1)−1=n−mS_{m+1} = S_m - a_{n-m} \le (n-m+1)-1 = n-m and Sm+1=Sm−an−m≥0−(n−m)S_{m+1} = S_m - a_{n-m} \ge 0 - (n-m), hence ∣Sm+1∣≤n−m|S_{m+1}| \le n-m. If Sm<0S_m < 0, then Sm+1=Sm+an−m<0+n−mS_{m+1} = S_m + a_{n-m} < 0 + n-m and Sm+1=Sm+an−m≥−(n−m+1)+1=−(n−m)S_{m+1} = S_m + a_{n-m} \ge -(n-m+1)+1 = -(n-m), hence ∣Sm+1∣≤n−m|S_{m+1}| \le n-m again.

Now ∣Sn∣≤1|S_n| \le 1 since ∣Sk∣≤n−k+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,604 problems in a working order, from Junior Challenge level to the IMO shortlist.

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