4
$\begingroup$

How can we prove that, given $n$ points in $[-1,1]$, the sum of all their pairwise Euclidean distances (or, equivalently, their average Euclidean distance) is maximized if $\lfloor n/2 \rfloor$ points are placed at $-1$ and the remaining points are placed at $1$?

$\endgroup$
1
  • $\begingroup$ Pairwise Distance to what? $\endgroup$
    – Amadeus
    Nov 9 '20 at 1:21
4
$\begingroup$

WLOG assume $-1 \leqslant x_1 \leqslant x_2 \leqslant \cdots \leqslant x_n \leqslant 1$.

Total distance is $$ \sum_{i<j} (x_j-x_i) = [0-(n-1)]x_1+[1-(n-2)]x_2-\cdots + [(n-1)-0]x_n\\ =-(n-1)x_1-(n-3)x_2 - \cdots +(n-1)x_n\\ \leqslant -(n-1)(-1)-(n-3)(-1) - \cdots + (n-1)\cdot 1. $$

$"=" \iff x_1=x_2=\cdots =x_{\lceil\frac{n-1}{2}\rceil}=-1, x_{\lfloor\frac{n+3}{2}\rfloor}=\cdots=x_n=1.$

If $n$ is odd then $x_{\frac{n+1}{2}}$ can be anywhere between -1 and 1.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.