Minimum value - Extension of Triangle Inequality?

481 Views Asked by At

What is the minimum value of $|x-1| + |x-2| + |x-3| .... + |x - k + 1| + |x-k|$ equal to?

I suppose it depends on whether or not $k$ is even or odd.

I was able to solve for $k = 3$ (three terms) using the triangle inequality - but couldn't generalize it to the above. Please help.

3

There are 3 best solutions below

0
On BEST ANSWER

Let $k$ be odd, then the minimum is attained when $x=\dfrac{k+1}{2}$ (because the function is strictly decreasing and increasing before and after the point respectively).

Now let $k$ be even, then whole the $\dfrac{k}{2}\le x\le\dfrac{k}{2}+1$ is the minimum of the function

0
On

Hint: what is the minimum value of $|x-1|+|x-k|$, and what values of $x$ attain it? What about $|x-2|+|x-k-1|$, etc?

0
On

Hint.

$$ f(x) = |x-1| + |x-2| + |x-3|+\cdots + |x - k + 1| + |x-k| $$

is an even function with symmetry. If $k$ is odd then the minimum is at $\frac{k+1}{2}$