Problem

Source: 2023 Swedish Mathematical Competition p3

Tags: algebra, inequalities



Let $n$ be a positive integer and let $a_1$, $a_2$,..., $a_n$ be different real numbers, placed one after the other in any order. We say we have a local minimum in one of the numbers if this is less than both of their neighbors. Which is the average number of local minima over all possible ways of ordering the numbers each other?