Given a list of integers $a_1,a_2,...,a_n$ where $n \geq 1$ is odd (may not be in ascending order), is it possible to express their median in terms of some well-known operations such as maximum or minimum?
For example, if we have three numbers, say $3,6,5$, then their median is always the one which is neither the maximum nor minimum. In the example, their median is $5$.
$F(k)=\sum_{r=1}^n |k-a_r| $, (where k is a variabe , $a_r>a_{r+1}$)
If n is odd ,n=2m+1
$k>a_1\Rightarrow$ all mods open as $k-a_r$ and so derivative is >0(as you increase 'k' the value of function increase).
$a_1>k>a_2$ then one mod only open as $a_r-k$(r=1) , and others as $k-a_r$, hence still derivative >0
$a_m>k>a_{m+1} $ ,here m+1 mods open as $k-a_r$ and m mods open as $a_r-k$ ,so derivative is greater than 0
So obviusly derivative becomes negative if $k<a_{m+1}$ and derivative is greater than 0 if $k>a_{m+1}$ , hence minimum of the function is at $a_{m+1}$.
If n is even ,n=2m
You will find that derivative is >0 if , $k>a_{m}$
Derivative <0 if $k<a_{m+1}$
Derivative =0 if $ a_m>k>a_{m+1}$ , so the function is minimum for all such $k$(including $a_m$ and $a_{m+1}$).
So for even number of terms we define mode as $\frac{a_m+a_{m+1}}{2}.$