Maths Olympiad Prep

Library / /256 of 520

Algebra Difficulty 5.2 AIME, harder Find the answer

5. Let nn be a given positive integer, and the sum
S=1i<jnxixj(0<xi<1,i=1,2,,n) S=\sum_{1 \leqslant i<j \leqslant n}\left|x_{i}-x_{j}\right|\left(0<x_{i}<1, i=1,2, \cdots, n\right) \text {. }

Find the maximum possible value of the sum.

A number or a short expression. Spacing and $ signs are ignored.

Solution

Notice that,
S=k=1n((k1)xk(nk)xk)=k=1n(xk(2kn1))kn+12(xk(2kn1)). \begin{array}{l} S=\sum_{k=1}^{n}\left((k-1) x_{k}-(n-k) x_{k}\right) \\ =\sum_{k=1}^{n}\left(x_{k}(2 k-n-1)\right) \\ \leqslant \sum_{k \geq \frac{n+1}{2}}\left(x_{k}(2 k-n-1)\right) . \end{array}

When nn is odd,
Sk=n+12n(xk(2kn1))k=n+12n(2kn1)=n214, \begin{aligned} S & \leqslant \sum_{k=\frac{n+1}{2}}^{n}\left(x_{k}(2 k-n-1)\right) \\ & \leqslant \sum_{k=\frac{n+1}{2}}^{n}(2 k-n-1) \\ & =\frac{n^{2}-1}{4}, \end{aligned}

When x1=x2==xn12=0,xn+12=xn+32==xn=1x_{1}=x_{2}=\cdots=x_{\frac{n-1}{2}}=0, x_{\frac{n+1}{2}}=x_{\frac{n+3}{2}}=\cdots=x_{n}=1, the equality can be achieved;
When nn is even,
Sk=n+22n(xk(2kn1))k=n+22n(2kn1)=n24, \begin{array}{l} S \leqslant \sum_{k=\frac{n+2}{2}}^{n}\left(x_{k}(2 k-n-1)\right) \\ \leqslant \sum_{k=\frac{n+2}{2}}^{n}(2 k-n-1)=\frac{n^{2}}{4}, \end{array}

When x1=x2==xn2=0,xn2+1=xn2+2==xn=1x_{1}=x_{2}=\cdots=x_{\frac{n}{2}}=0, x_{\frac{n}{2}+1}=x_{\frac{n}{2}+2}=\cdots=x_{n}=1, the equality can be achieved.

Thus, the maximum possible value is [n24]\left[\frac{n^{2}}{4}\right], where [x][x] denotes the greatest integer not exceeding the real number xx.

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: NuminaMath-1.5, licensed Apache-2.0. Statement and solution reproduced as published; topic and difficulty added by this site.