IMO 1989 LL VIE108

For every sequence (x1, x2, . . . , xn) of the numbers {1, 2, . . ., n}

IMO 1989 LL VIE108

Origin: VIE

Problem

For every sequence (x1, x2, . . . , xn) of the numbers {1, 2, . . ., n} arranged in any order, denote by f(s) the sum of absolute values of the differences between two consecutive members of s. Find the maximum value of f(s) (where s runs through the set of all such sequences).