0
$\begingroup$

Consider the set of integers $\{1,2,3,4,\cdots,100\}$. Let $\{x_1,x_2,x_3,x_4, \cdots, x_{100}\}$ be some arbitrary arrangement of the previous set, Where each $x_i$ is different. Find the minimum value of the sum: $$S = |x_2-x_1| + |x_3 - x_2| + |x_4-x_3| + \cdots + |x_{100}-x_{99}| + |x_{100} - x_1| $$

I think the sum will be minimum if the set is sorted. As we don't have any negative number in the sum. But I am worried about $|x_{100} - x_{99}|$. If I assume that the set is sorted then the sum will be $99 + 99 = 198$. I think this is wrong. Or I cant show any proof to this solution. If this is the right answer then how do I prove this?
Source: BdMO 2016 Secondary National

2 Answers 2

2

$S$ does not change with a cyclic permutation of $(x_1,x_2,x_3,x_4, \cdots, x_{100})$, therefore we can assume that $x_1 = 1$. Then $x_m = 100$ for some $m \ge 2$ and the triangle equality gives $$ S = \left(|x_2-x_1| + |x_3-x_2|+\ldots + |x_m-x_{m-1}| \right) + \left(|x_{m+1}-x_m| + \ldots |x_{100} -x_{99}| + |x_1 - x_{100}| \right) \\ \ge |x_1 - x_m| + |x_m - x_1| \\ = 2 (100-1) = 198 $$ so you have indeed found the minimal value.

  • 0
    Why we assume that $x_1 = 1 \& x_m = 100$?2017-01-18
  • 1
    @RezwanArefin: The sum does not change with a *cylic* permutation of the numbers. So you may assume that $x_1=1$. Then $x_m=100$ must hold for *some* $m > 1$.2017-01-18
  • 0
    $x_1 = 1$ why? still didn't get this2017-01-18
  • 1
    @RezwanArefin: $S$ does not change if you replace $(x_1,x_2, \cdots, x_{100})$ by $(x_2, x_3,\cdots, x_{100}, x_1)$ (a "cyclic permutation" or "rotation"). So you can rotate the values until the first one is equal to $1$.2017-01-18
  • 0
    Now got it .. Thanks :)2017-01-18
1

Place the $\{1,2,\cdots 100\}$ in that order evenly spaced on a straight line. Then each term in $S$ may be represented by a line segment connecting two of the integers. Moreover, each integer appears in precisely two such line segments, and there will be no ccyles of length less than $100$ among those segments.

Focus on the term in $S$ containing the number $1$; since there are two such terms, for concreteness, choose the term containing the lower of the other numbers. Then following each line segment we have a path $P$ of length $100$, starting and ending at $1$. Let's examine some properties of $P$:

  • $P$ starts from $1$, reaches (at some step) $100$, and returns to $1$. Thus the length of $P$ must be at least $99+99=198$.

  • The particular path $P$ that moves from $1$ to $2$ to $3\ldots$ and finally returns from $100$ to $1$ is of length $198$

Thus the minimal path is of length $198$ and so is the minimal value of $S$.