4

Let $x_1, x_2, . . , x_n$ real numbers from $[0, 1]$. Prove there is $x \in [0, 1]$ so that $|x - x_1| + |x - x_2| + . . . + |x - x_n| =\frac n 2$


My attempt

Let $f:[0,1] \rightarrow R, f(x)=|x - x_1| + |x - x_2| + . . . + |x - x_n|$. Because $f$ continous, the image of $f$ is an interval. To prove $\exists x \in [0,1]$ so that $f(x)=\frac n 2$ it is enough to find two values $a,b \in [0,1]$ so that $f(a) \le \frac n 2 \le f(b)$. I failed to find these values.

Also, a solution without function continuity will be appreciated.

  • WLOG $x_1 \ge x_2 \ge x_3 \ge x_4 \ge \dots x_n$? And the minima must be when $x=x_i$? – S.C.B. May 12 '16 at 11:18
  • @MXYMXY You can assume the inequalities by ordering then reindexing x1, x2 .. xn –  May 12 '16 at 11:21
  • The minimum occurs at the median value: http://math.stackexchange.com/questions/318381/on-a-1-d-line-the-point-that-minimizes-the-sum-of-the-distances-is-the-median. – lhf May 12 '16 at 11:28

1 Answers1

5

I've got the answer. Let $a=\frac 1 2$. Then $|a - x_i| \le \frac 1 2$ therefore $f(a) \le \frac n 2$.

Now, $f(0) = x_1 + x_2 + ... x_n$ and $f(1) = 1 - x_1 + 1 - x_2 + ... 1-x_n=n-f(0)$. It follows that $f(0) + f(1) = n$ and, from there, one of $f(0)$ or $f(1)$ is equal or greater than $\frac n 2$.

To conclude, I can choose $b = 0$ if $f(0) \ge \frac n 2$ or $b = 1$ if $f(1) \ge \frac n 2$