TITLE: Expressing the minimum function in terms of the absolute value in a symmetric manner (generalized to more variables)
QUESTION [9 upvotes]: It is well known that:
$$\max(a,b) = \frac12(a+b)+\frac12|a-b|$$
and similarly:
$$\min(a,b) = \frac12(a+b)-\frac12|a-b|.$$
In fact, they are equivalent since $\max(a,b) = -\min(-a,-b)$. We can try generalizing these representations to more arguments. One obvious approach is to do the following:
$$\max(a,b,c) = \max(a,\frac12|b+c|+\frac12|b-c|)$$
and then again use the previous expression. However, the final expression is quite messy and not obviously symmetric under permuting the $3$ variables. Is there a neater expression?
I expect there should be some form in the general case of $n$ variables as a sum over the permutations in $S_n$ with some sort of sign but it is not entirely clear...
Edit: This question answers the $n=3$ case. I am still interested in the general $n$ case or alternative representations for $n=3$.

REPLY [2 votes]: If we apply the three powers of the permutation $(a \  b \  c)$ to the "obvious" recursive expression and add, we get $$
    \max(a, \max(b, c)) + \max(b, \max(c, a)) + \max(c, \max(a, b))  \text{.}
$$
Clearly all three of these terms have the same value, so one-third of them is the value sought.  Applying the definition in terms of absolute values and simplifying a bit, we get $$
\frac{1}{12} (4 a + 4 b + 4 c + |a - b| + |a - c| + |b - c| + 
   \left| 2 a - b - c - | b - c | \right| + \left| a - 2 b + c + | a - c | \right| + \left|a + b - 2 c + |a - b| \right| ) \text{,}
$$ which demonstrates the symmetry you were wanting.
Note that we input that symmetry by hand.  There might be a way to get there from the $\max(a,\max(b,c))$ form, but I bet it requires a lot of "insight".