×

# Interesting Modulus problem. Kindly Help!

Let $$t_1 < t_2 < t_3 < \dots < t_{99}$$ be real numbers. Consider a function $$f : \mathbb{R} \rightarrow \mathbb{R}$$ given by $$f(x) = |x-t_1|+|x-t_2|+ \dots +|x-t_{99}|$$. Show that $$f(x)$$ attains minimum value at $$x=t_{50}$$.

Note by Mridul Sachdeva
4 years, 7 months ago

MarkdownAppears as
*italics* or _italics_ italics
**bold** or __bold__ bold
- bulleted- list
• bulleted
• list
1. numbered2. list
1. numbered
2. list
Note: you must add a full line of space before and after lists for them to show up correctly
paragraph 1paragraph 2

paragraph 1

paragraph 2

[example link](https://brilliant.org)example link
> This is a quote
This is a quote
    # I indented these lines
# 4 spaces, and now they show
# up as a code block.

print "hello world"
# I indented these lines
# 4 spaces, and now they show
# up as a code block.

print "hello world"
MathAppears as
Remember to wrap math in $$...$$ or $...$ to ensure proper formatting.
2 \times 3 $$2 \times 3$$
2^{34} $$2^{34}$$
a_{i-1} $$a_{i-1}$$
\frac{2}{3} $$\frac{2}{3}$$
\sqrt{2} $$\sqrt{2}$$
\sum_{i=1}^3 $$\sum_{i=1}^3$$
\sin \theta $$\sin \theta$$
\boxed{123} $$\boxed{123}$$

Sort by:

Let $$x=m \in \mathbb{R}$$ be the value such that $$f(x)$$ is minimized. Obviously, $$t_1<m<t_{99}$$. Then

$\lvert m - t_1 \rvert + \lvert m - t_{99} \rvert = (m-t_1) + (t_{99} - m)=t_{99} - t_1,$

which is independant of $$m$$, so $$t_1$$ and $$t_{99}$$ can be disregarded. This process of omitting the smallest and largest value continues, until only the middle one is left, which is $$t_{50}$$, so $$m=t_{50}$$.

- 4 years, 7 months ago

How is the assumption $$t_1 < m < t_{99}$$ obvious? I mean I know its correct but can we assume that?

- 4 years, 7 months ago

$$f(x)$$ is the sum of distances from $$x$$ to $$t_i$$. If for example $$x>t_{99}$$, then moving $$x$$ to the left decreases all distances.

- 4 years, 7 months ago

This is similar to what Tim V. did, but perhaps a bit more rigorous.

By triangle inequality, $$|x-t_{k}| + |x - t_{100 - k}| \ge t_{100-k} - t_{k}$$ for $$k \in \overline{1,49}$$ with equality iff $$t_k \le x \le t_{100-k}$$.

Trivially, $$|x - t_{50}| \ge 0$$ with equality iff $$x = t_{50}$$.

Adding these up gives $$f(x) = |x - t_{50}| + \displaystyle\sum_{k = 1}^{49} \left(|x-t_{k}| + |x - t_{100 - k}|\right) \ge \displaystyle\sum_{k = 1}^{49} \left( t_{100-k} - t_{k} \right)$$.

Equality occurs iff $$t_k \le x \le t_{100-k}$$ for all $$k \in \overline{1,49}$$ and $$x = t_{50}$$.

Clearly, $$x = t_{50}$$ satisfies those conditions, and is the only real number to do so.

Therefore, $$f(x)$$ attains its minimum value at $$x = t_{50}$$.

- 4 years, 7 months ago

Nice use of the triangle inequality. Thanks!

- 4 years, 7 months ago

Intuitively it seems correct but I have not been able to prove it.

- 4 years, 7 months ago