Problem

Source: 2017 Pan-African Shortlist - I4

Tags: combinatorics, Inequality, maximum value, minimum value, permutations



Find the maximum and minimum of the expression \[ \max(a_1, a_2) + \max(a_2, a_3), + \dots + \max(a_{n-1}, a_n) + \max(a_n, a_1), \]where $(a_1, a_2, \dots, a_n)$ runs over the set of permutations of $(1, 2, \dots, n)$.