Maths Olympiad Prep

Library / /1 of 2

Algebra Difficulty 5.4 AIME, harder Prove it United States

Problem:
Let a1,a2,,a2000a_{1}, a_{2}, \ldots, a_{2000} be real numbers in the interval [0,1][0,1]. Find the maximum possible value of
1i<j2000(ji)ajai \sum_{1 \leq i<j \leq 2000}(j-i)\left|a_{j}-a_{i}\right|

Solution

Solution:
The answer is 1,000,000,0001,000,000,000. First, note that the desired sum SS is convex as a function of each aia_{i}. (Indeed, aia\left|a_{i}-a\right| is convex for any real number aa, and a sum of convex functions is itself convex.) Consequently, it attains a maximum at some point where each variable lies at an endpoint of its interval, i.e. SS has a maximum with each aia_{i} equal to either 00 or 11. So we may restrict our attention to these cases.

Then ajai=0\left|a_{j}-a_{i}\right|=0 if ai=aja_{i}=a_{j} and 11 otherwise, so SS is really the sum of all values of jij-i where aiaja_{i} \neq a_{j}. Equivalently, it equals 1i<j2000(ji)\sum_{1 \leq i<j \leq 2000}(j-i) minus the sum of jij-i over pairs for which ai=aja_{i}=a_{j}. So our goal is equivalent to minimizing the latter sum. Fix a positive integer kk, and suppose there are kk values of ii with ai=0a_{i}=0 (and 2000k2000-k values with ai=1a_{i}=1). If we consider the sum of jij-i over all pairs i<ji<j with ai=aj=0a_{i}=a_{j}=0, this sum is clearly minimized when all the ii's with ai=0a_{i}=0 are consecutive; likewise the sum over all pairs with ai=aj=1a_{i}=a_{j}=1 is minimized when all the 11's are consecutive. So we may restrict our attention to the case where a1=a2==ak=0a_{1}=a_{2}=\cdots=a_{k}=0 and ak+1==a2000=1a_{k+1}=\cdots=a_{2000}=1. (The case where the block of 11's precedes the block of 00's is symmetrically equivalent.)

In this case, the sum SS comes out to be
1i<j2000 aiaj(ji)=i=1kj=k+12000(ji)=j=k+12000(i=1kj)i=1k(j=k+12000i)=j=k+12000kji=1k(2000k)i=(2000k)(2000+[k+1])2(2000k)k(k+1)2=1000k(2000k)=1000(10002[k1000]2) \begin{aligned} & \sum_{\substack{1 \leq i<j \leq 2000 \\\ a_{i} \neq a_{j}}}(j-i)=\sum_{i=1}^{k} \sum_{j=k+1}^{2000}(j-i)=\sum_{j=k+1}^{2000}\left(\sum_{i=1}^{k} j\right)-\sum_{i=1}^{k}\left(\sum_{j=k+1}^{2000} i\right)=\sum_{j=k+1}^{2000} k j-\sum_{i=1}^{k}(2000-k) i \\ = & \frac{(2000-k)(2000+[k+1])}{2}-(2000-k) \frac{k(k+1)}{2}=1000 k(2000-k)=1000\left(1000^{2}-[k-1000]^{2}\right) \end{aligned}
which is at most 100031000^{3}, with equality holding iff k=1000k=1000. So 100031000^{3} is our desired maximum, attained when ai=0a_{i}=0 for i1000i \leq 1000 and ai=1a_{i}=1 for i>1000i>1000.

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.