What value of x yields the minimum value of the sum $| x- 2^0| + | x - 2^1 | + ... | x - 2^{10}|$ ?
First, I tried 186, adding up the two's as if they were geometric series while completely forgetting about the absolute value part of the equation. Then, I figured out that 1 yields a smaller sum than 186, and I was wondering if there was an efficient way to solve, rather than plotting the critical points since 1,024 would be too big to plot. Am I wrong in doing that, or is graphing it the most efficient way of solving it? I have not graphed it yet.
The min of $$f(x)=\sum_{k=0}^{n} |x-x_k| =n(M.D)$$ (M.D means the mean deviation of $x_k$ w.r.t. $x$) is attained at the median $M$ of the sequence $x_k, k \in [0,k]$. The median of the sequence $2^0,2,^1,2^3,....2^{10}$ is $M=2^5=32$. Hence the answer is $x=32$.
Note: The mean deviation is the least when measured about the median.