Proof that minimum of sum of absolute differences is greater or equal of max value minus min value

1.5k Views Asked by At

Let's have an vector of natural numbers $[v_1, ..., v_N]$ my goal is to show that $$\sum_{i=1}^{N-1}|v_i - v_{i+1}| \ge v_{max} - v_{min}$$ where $v_{max} = \max_{i\in1...N}(v_i)$ and $v_{min} = \min_{i\in1...N}(v_i)$. I can intuitively convenience myself that this is true. I rationalize that those difference are like difference of heights of subsequence peaks and to climb from the lowest to the highest my altitude has to change at least by $v_{max} - v_{min}$ but I am not able to create formal proof of this statement.

1

There are 1 best solutions below

5
On BEST ANSWER

Let $m$ and $n$ be indices in $\{1,2\ldots, N\}$ such that $v_m = v_{\max}$ and $v_n = v_\min$. If $m = n$, then $v_m - v_n = 0$ and the result is clear. Assume, without loss of generality, that $m > n$. By the triangle inequality,

\begin{align}v_m - v_n &= |(v_m - v_{m-1}) + (v_{m-1} - v_{m-2}) + \cdots + (v_{n-1} - v_n)|\\ & \le \sum_{i = n}^{m-1} |v_i - v_{i+1}|\\ & \le \sum_{i = 1}^{N-1}|v_i - v_{i+1}|. \end{align}

Note: You could technically avoid using the triangle inequality by removing the absolute value bars in the first equation and using the inequality $x \le |x|$ for all real numbers $x$.