Minimum: Consider 1 and n on the circle. They divide the circle into two arcs. The sum of the numbers on either of the arc is at least n−1. Suppose for example the numbers 1=b1,b2,…,bk=n appear on one of the arcs between 1 and n, in that order. Then the sum of absolute differences of adjacent numbers on this arc is
∣1−b2∣+∣b2−b3∣+⋯+∣bk−1−n∣≥∣1−n∣=n−1.
Similarly, the least sum of absolute differences on the other arc is also n−1. Hence we see that
j=1∑n∣aj+1−aj∣≥2(n−1).
This is achieved by the permutation (a1,a2,…,an), where aj=j for 1≤j≤n.
Maximum: We have
j=1∑n∣aj+1−aj∣=j=1∑n±(aj+1−aj).
Each of the numbers 1,2,…,n appear in the right side sum twice. Hence to get a maximum sum we should have positive sign to larger numbers in both occurrences and smaller number should go with negative sign. Thus n,(n−1),(n−2),…,[n/2] should get positive signs and 1,2,3,…,[n/2]−1 should get negative signs. This happens when:
for even n, the arrangement is 1,n,2,(n−1),3,(n−2),…,n/2,(n/2)+1;
for odd n, the arrangement is 1,n,2,(n−1),3,(n−2),…,[n/2]+2,[n/2]+1.
The corresponding sums are:
2n2 when n is even, 2n2−1 when n is odd.