Maths Olympiad Prep

Library / /4 of 24

Algebra Difficulty 8.0 Shortlist Prove it Romania

Let nNn \in \mathbb{N}, n2n \ge 2, and let a1,a2,,ana_1, a_2, \dots, a_n be real numbers. Denote
S=1i<jnajaiandd=max{ajai1i,jn}. S = \sum_{1 \le i < j \le n} |a_j - a_i| \quad \text{and} \quad d = \max\{|a_j - a_i| \mid 1 \le i, j \le n\}.

Prove that
(n1)dSn2d4 (n-1)d \le S \le \frac{n^2 d}{4}

Solution

Without loss of generality, we can assume that a1a2ana_1 \le a_2 \le \dots \le a_n, and denote dk=ak+1akd_k = a_{k+1} - a_k, for k=1,2,,n1k = 1, 2, \dots, n-1. Then we have:
* d1+d2++dn1=dd_1 + d_2 + \dots + d_{n-1} = d;
* ajai=di+di+1++dj1|a_j - a_i| = d_i + d_{i+1} + \dots + d_{j-1}, for any i<ji < j with i,j{1,,n}i, j \in \{1, \dots, n\}.
Denote by nkn_k the number of pairs (i,j)(i, j), with 1i<jn1 \le i < j \le n, such that the interval [ak,ak+1][a_k, a_{k+1}] is contained in [ai,aj][a_i, a_j]. Then the conditions imply ik<k+1ji \le k < k+1 \le j, so there are kk possible choices for ii and nkn-k possible choices for jj. Thus, nk=k(nk)n_k = k(n-k). Consequently,
S=k=1n1nkdk=k=1n1k(nk)dk.(1) S = \sum_{k=1}^{n-1} n_k d_k = \sum_{k=1}^{n-1} k(n-k) d_k. \qquad (1)

For any k{1,2,,n1}k \in \{1, 2, \dots, n-1\}, we have k(nk)n1k(n-k) \ge n-1.
Indeed, k(nk)n1    knk2n1    (k1)(nk1)0k(n-k) \ge n-1 \iff kn-k^2 \ge n-1 \iff (k-1)(n-k-1) \ge 0, which holds for all kk in the stated range.
From (1) and this, it follows that
Sk=1n1(n1)dk=(n1)d, S \ge \sum_{k=1}^{n-1} (n-1)d_k = (n-1)d,
which proves the left inequality.
Equality holds for any n2n \ge 2 if and only if a1a2=a3==an1ana_1 \le a_2 = a_3 = \dots = a_{n-1} \le a_n.

Using AM-GM inequality, we obtain k(nk)n24k(n-k) \le \frac{n^2}{4}, for all k{1,2,,n1}k \in \{1, 2, \dots, n-1\}. Therefore,
S=k=1n1k(nk)dkk=1n1n24dk=n24d,(3) S = \sum_{k=1}^{n-1} k(n-k)d_k \le \sum_{k=1}^{n-1} \frac{n^2}{4}d_k = \frac{n^2}{4}d, \qquad (3)
which proves the right inequality.
Since equality in the inequality k(nk)n24k(n-k) \le \frac{n^2}{4} holds when k=nkk = n-k, i.e., when n=2kn = 2k (so nn is even), from (3) we deduce:

* If dk=0d_k = 0 for all k=1,,n1k = 1, \dots, n-1, i.e., a1=a2==ana_1 = a_2 = \dots = a_n, then equality holds for any n2n \ge 2.
* If there exists t{1,,n1}t \in \{1, \dots, n-1\} such that dt0d_t \ne 0, then:
* If nn is odd, the right inequality is strict.
* If nn is even, equality holds only if t=ntt = n-t and dt=dd_t = d, i.e., n=2tn = 2t and a1==atat+1=at+2==a2ta_1 = \dots = a_t \le a_{t+1} = a_{t+2} = \dots = a_{2t}.

d=ana1=(anak)+(aka1),for any 2kn1. d = a_n - a_1 = (a_n - a_k) + (a_k - a_1), \quad \text{for any } 2 \le k \le n-1.
We obtain:
S=1i<jnajai=(ana1)+k=2n1((anak)+(aka1))++2i<jn1ajai=(n1)d+2i<jn1ajai(n1)d. \begin{aligned} S &= \sum_{1 \le i < j \le n} |a_j - a_i| = (a_n - a_1) + \sum_{k=2}^{n-1} ((a_n - a_k) + (a_k - a_1)) + \\ &\quad + \sum_{2 \le i < j \le n-1} |a_j - a_i| \\ &= (n-1)d + \sum_{2 \le i < j \le n-1} |a_j - a_i| \ge (n-1)d. \end{aligned}
If n=2n=2 or n=3n=3, equality holds for any numbers a1a2a_1 \le a_2, respectively a1a2a3a_1 \le a_2 \le a_3.
If n4n \ge 4, equality holds if and only if a1a2=a3==an1ana_1 \le a_2 = a_3 = \dots = a_{n-1} \le a_n.

Alternative solution for the right inequality.
We prove by induction the statement:
P(n):1i<jnajain24max1i<jnajai, P(n): \quad \sum_{1 \le i < j \le n} |a_j - a_i| \le \frac{n^2}{4} \cdot \max_{1 \le i < j \le n} |a_j - a_i|,
for all n2n \ge 2 and any real numbers a1,a2,,ana_1, a_2, \dots, a_n. Without loss of generality, assume a1a2ana_1 \le a_2 \le \dots \le a_n.
Base cases:
P(2):a2a1224(a2a1)    a2a1a2a1, P(2): \quad a_2 - a_1 \le \frac{2^2}{4} \cdot (a_2 - a_1) \iff a_2 - a_1 \le a_2 - a_1,
P(3):(a2a1)+(a3a2)+(a3a1)324(a3a1)    2(a3a1)94(a3a1). P(3): \quad (a_2 - a_1) + (a_3 - a_2) + (a_3 - a_1) \le \frac{3^2}{4} \cdot (a_3 - a_1) \iff 2(a_3 - a_1) \le \frac{9}{4}(a_3 - a_1).

Assume P(n2)P(n-2) holds for some n4n \ge 4. Using the notation from the statement and the fact that
d=ana1=(anak)+(aka1),for any 2kn1, d = a_n - a_1 = (a_n - a_k) + (a_k - a_1), \quad \text{for any } 2 \le k \le n-1,
we deduce:
S=1i<jnajai=(n1)d+2i<jn1ajai. S = \sum_{1 \le i < j \le n} |a_j - a_i| = (n-1)d + \sum_{2 \le i < j \le n-1} |a_j - a_i|.
Denote
S=2i<jn1ajai,d=an1a2. S' = \sum_{2 \le i < j \le n-1} |a_j - a_i|, \quad d' = a_{n-1} - a_2.
Obviously, ddd' \le d. Since P(n2)P(n-2) holds, we get S(n2)24dS' \le \frac{(n-2)^2}{4} \cdot d'. Therefore,
S=(n1)d+S(n1)d+(n2)24d(n1)d+(n2)24d=n24d, S = (n-1)d + S' \le (n-1)d + \frac{(n-2)^2}{4} \cdot d' \le (n-1)d + \frac{(n-2)^2}{4} \cdot d = \frac{n^2}{4} \cdot d,
which proves P(n)P(n).
To determine when equality holds, observe that in P(2)P(2) equality holds for any a1a2a_1 \le a_2, and in P(3)P(3) equality holds only if a1=a2=a3a_1 = a_2 = a_3 (strict inequality otherwise if a1<a3a_1 < a_3).
It is clear that if a1=a2==ana_1 = a_2 = \dots = a_n, then equality holds in P(n)P(n) for any n2n \ge 2.
Assume now that a1<ana_1 < a_n. From the previous inequality, equality in P(n)P(n) holds if and only if equality holds in P(n2)P(n-2) and d=dd' = d. Consequently:
* if nn is odd, the inequality P(n)P(n) is strict;
* if nn is even, say n=2tn = 2t, equality holds if and only if a1=a2==at<at+1=at+2==a2ta_1 = a_2 = \dots = a_t < a_{t+1} = a_{t+2} = \dots = a_{2t}.

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 and solution reproduced as published; topic and difficulty added by this site.