Show, that : $\text{max} \{x_1,x_2,...,x_n\} = x_1+x_2+...+x_n-\text{min}\{x_1,x_2\}-...-\text{min}\{x_{n-1},x_n\}+\text{min}\{x_1,x_2,x_3\}+...\pm \text{min}\{x_1,x_2,...,x_n\}$
In a way I'm supposed to prove, that the inclusion-exclusion principle somehow applies to finding maximum from given numbers.
I tried some basic induction and the base case $n=2$ is indeedy easy. But I'm having trouble generalizing it. I get something like this:
$\text{max} \{x_1,x_2,...,x_n\} = x_1+x_2+...+x_n-\text{min}\{x_1,x_2\}-...-\text{min}\{x_{n-1},x_n\}+\text{min}\{x_1,x_2,x_3\}+...\pm \text{min}\{x_1,x_2,...,x_n\}=x_n+\max\{a_1,...,a_{n-1}\}-\text{min}\{a_1,a_n\}-...-\text{min}\{a_{n-1},a_n\}+...\pm \text{min}\{a_1,a_2,...,a_n\}$
And that's not very helpful...