Maths Olympiad Prep

Library / /346 of 520

Algebra Difficulty 7.0 National olympiad, round 2 Find the answer

6・83 Given distinct real numbers a1,a2,,ana_{1}, a_{2}, \cdots, a_{n}, find the minimum value of the function defined by
y=xa1+xa2++xany=\left|x-a_{1}\right|+\left|x-a_{2}\right|+\cdots+\left|x-a_{n}\right|

where xx is a real number.

A number or a short expression. Fractions can be typed as 3/2, and spacing doesn't matter.

Solution

[Solution] First, note that when a<ba<b,
xa+xb={a+b2x, when xa,a+b, when axb,2xab, when xb.|x-a|+|x-b|=\left\{\begin{array}{l} a+b-2 x, \text { when } x \leqslant a, \\ -a+b, \text { when } a \leqslant x \leqslant b, \\ 2 x-a-b, \text { when } x \geqslant b. \end{array}\right.

Therefore, on each point of the interval axba \leqslant x \leqslant b, the sum xa+xb|x-a|+|x-b| reaches its minimum value. We will solve this problem based on this observation.

Without loss of generality, assume the numbers a1,a2,,ana_{1}, a_{2}, \cdots, a_{n} form an increasing sequence, that is,
a1<a2<<ana_{1}<a_{2}<\cdots<a_{n}

When n=2mn=2 m (where mm is a natural number), the expression
y=xa1+xa2++xany=\left|x-a_{1}\right|+\left|x-a_{2}\right|+\cdots+\left|x-a_{n}\right|

on the right can be divided into mm groups, that is,
y=(xa1+x+an)+(xa2+xan1)++(xam+xam+1)\begin{aligned} y= & \left(\left|x-a_{1}\right|+\left|x+a_{n}\right|\right)+\left(\left|x-a_{2}\right|+\left|x-a_{n-1}\right|\right)+ \\ & \cdots+\left(\left|x-a_{m}\right|+\left|x-a_{m+1}\right|\right) \end{aligned}

The sum yi=xai+xan+1i(i=1,2,,m)y_{i}=\left|x-a_{i}\right|+\left|x-a_{n+1-i}\right| \quad(i=1,2, \cdots, m) is constant on the interval aixan+1ia_{i} \leqslant x \leqslant a_{n+1-i}, and this constant is its minimum value. Since each interval aixan+1ia_{i} \leqslant x \leqslant a_{n+1-i} includes the next interval ai+1xan+1(i+1)a_{i+1} \leqslant x \leqslant a_{n+1-(i+1)}, all intervals have a common part, which is the interval amxam+1a_{m} \leqslant x \leqslant a_{m+1}.

On each point of the interval amxam+1a_{m} \leqslant x \leqslant a_{m+1}, all yiy_{i} achieve their minimum values, and thus yy achieves its minimum value on this interval. To calculate this value, we can set x=amx=a_{m} or x=am+1x=a_{m+1} in (2). This value equals
a1a2an+am+1++an-a_{1}-a_{2}-\cdots-a_{n}+a_{m+1}+\cdots+a_{n}

When n=2m+1(mn=2 m+1(m is a natural number or 0)), the right side of (1) can be rewritten as
y=(xa1+xan)+(xa2+xan1)++(xam+xam+2)+xam+1\begin{aligned} y= & \left(\left|x-a_{1}\right|+\left|x-a_{n}\right|\right)+\left(\left|x-a_{2}\right|+\left|x-a_{n-1}\right|\right)+ \\ & \cdots+\left(\left|x-a_{m}\right|+\left|x-a_{m+2}\right|\right)+\left|x-a_{m+1}\right| \end{aligned}

Similar to the case when nn is even, it is not difficult to verify that when x=am+1x=a_{m+1}, each yi=1xy_{i}=1 x ai+xan+1i-a_{i}|+| x-a_{n+1-i} \mid reaches its minimum value. And at this time, xam+1=0\left|x-a_{m+1}\right|=0. Therefore, the last term in (3) also reaches its minimum value. Thus, when x=am+1x=a_{m+1}, yy reaches its minimum value. According to (3), this minimum value equals a1a2am+am+2+-a_{1}-a_{2}-\cdots-a_{m}+a_{m+2}+ am+3++ana_{m+3}+\cdots+a_{n}

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.