0
$\begingroup$

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.

$\endgroup$
3
  • $\begingroup$ What have you tried? $\endgroup$ Jan 20 '20 at 2:04
  • $\begingroup$ Welcome to Stackexchange. You'll find that simple "Here's the statement of my question, solve it for me" posts will be poorly received. What is better is for you to add context (with an edit): What you understand about the problem, what you've tried so far, etc.; something both to show you are part of the learning experience and to help us guide you to the appropriate help. You can consult this link for further guidance. $\endgroup$
    – Brian
    Jan 20 '20 at 2:05
  • $\begingroup$ What is $x$? An integer? A real number? Something else? $\endgroup$
    – Brian
    Jan 20 '20 at 2:06
1
$\begingroup$

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.

$\endgroup$
2
  • $\begingroup$ Certainly ,it is, as the mean deviation is the least when measured about median. $\endgroup$
    – Z Ahmed
    Jan 20 '20 at 2:34
  • $\begingroup$ I was wrong earlier. Anyway I just checked the graph. The min of $\sum_{n=0}^{N}\left|x-2^{n}\right|$ When $N=10$ is $(32,1953)$. Generally the $x$ coordinate of the min is $x=\sqrt{2^N}$ when $N$ is even. When $N$ is odd the min $x$ values are the interval $[2^\frac{N-1}{2},2^\frac{N+1}{2}]$ $\endgroup$ Jan 20 '20 at 2:53

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.