The good soldier Schweik had been ordered to line up a band of new recruits before their officer gave them a speech. The desired line sought to minimize the average difference in height of adjacent men. Schweik put the tallest recruit first, the shortest one last, and let the remaining men stand between them in random order. Did Schweik execute his order as stated? How would you arrange the recruits?
Hint: One may answer the first question affirmatively. The intended order was, of course, different; it could have been executed in two different ways.
EDIT: The below is the Solution but I couldn't understand the answer and it has some mathematical equation. will somebody explain ?.
! Schweik must have understood his order as one to minimize
Equation 1: $$ {1\choose n} [(h_2-h_1)+(h_3-h_2)+...+(h_n-h_{n-1})] = {1\choose n} (h_n-h_1) $$
where n is the number of recruits and hi, i = 1, 2, . . . , n, is the height of the recruit in the ith position. Since$$(h_n-h_1) /n$$ can be negative, its minimization means making it a negative number of the largest absolute value. This is achieved if h1 and hn are the largest and smallest heights, respectively, with the heights of all the others not contributing to the value of expression (1). The intended order was, of course, to minimize the average magnitude of the difference in height of adjacent men, that is,
Equation 2: $$ {1\choose n} (|h_2-h_1| + |h_3-h_2| + ... +|h_n-h_{n-1}|) $$
Since n is fixed, the multiple 1/n can be ignored. Sum (2) is minimized when the heights are sorted in either ascending or descending order to yield the difference $$ (h_{max}-h_{min})$$ between the maximal and minimal heights. For any other ordering, this sum can be interpreted as the sum of lengths of segments covering the interval with endpoints at hmin and hmax with some overlaps, which makes it larger than $$ (h_{max}-h_{min})$$. A more formal proof by mathematical induction is not difficult.