How would I prove $|a_n−a_1|+\sum_{i=1}^{n−1} |a_i−a_{i+1}|= \sum k_ia_i$ for every $k_i \in \{-2, 0, 2\}$ and $\sum k_i = 0$?
I have a feeling we have to use telescoping method which then gets me $|a_n-a_1|+|a_1-a_n|$. Is this correct and where would I go from here?
I assume that $a_i\ne a_{i+1}$ for all $i$ (cyclically). Then
In words: $k_i=-2$ iff $a_i$ is a local minimum, $k_i=2$ iff $a_i$ is a local maximum, and $k_i=0$ otherwise. There have to be an equal nuber of local maxima and minima. Therefore $\sum_{cycl}k_i=0$.