15

I am aware of an occasionally handy identity: $$\max(a,b)=\frac{a+b+|a-b|}{2}$$

However, I have found I'm unable to come up with a nice similar form for $\max(a,b,c)$. Of course I could always use the fact that $\max(a,b,c)=\max(\max(a,b),c)$ to write $$\begin{align}\max(a,b,c)&=\frac{\frac{a+b+|a-b|}{2}+c+\left|\frac{a+b+|a-b|}{2}-c\right|}{2} \\&=\frac{a+b+2c+|a-b|+|a+b-2c+|a-b||}{4}\end{align}$$

but this lacks elegance and in particular it is not clear to me just from the formula that if I permute the variables I get the same result.

The following doesn't work, but it would be nice if I could write $\max(a,b,c)$ in some form like $$\frac{a+b+c+|a-b|+|a-c|+|b-c|}{3}$$

Is there a good generalization of this to $n$ variables? That is given $x_1,x_2,\dots,x_n\in\mathbb{R}$, is there a way to write $\max(x_1,x_2,\dots,x_n)$ in a clearly symmetric form using addition, subtraction, division, and the absolute value function?

  • So you want it only to be symmetric or you don't want to have an interlinked absolute value functions ? – Elaqqad Apr 03 '15 at 23:44
  • 1
    For 3 variables, we could apply also to the other two pairs first, add and divide by $3$. We gt a longer expression, but it has obvious symmetry. – André Nicolas Apr 03 '15 at 23:51
  • @Elaqqad The question in this respect is a bit open ended. I would certainly prefer a form that is both symmetric and without interlinked value functions, but I'll take what I can get. – Peter Woolfitt Apr 03 '15 at 23:55
  • 1
    @PeterWoolfitt If you want interlinked absolute value function you can do it by recurrence: $$\max{(S)}=\frac{1}{\binom{|S|}{2}}\sum_{a,b\in S} \max({\max(a,b)} \cup S\backslash{a,b}) $$ this will give you an interliked absolute value but symmetric using addition , subtraction but I don't think it will be clear and I think it will be huge, I can conjecture that there is no a formula without interlinked absulate value – Elaqqad Apr 04 '15 at 00:05
  • Yes, thanks AndréNicolas and Elaqqad for this method - it's a good point (though I am still hoping for something more compact even if it does necessitate interlinked absolute value functions). – Peter Woolfitt Apr 04 '15 at 03:11
  • This doesn't directly answer your question but thought it may be relevant: Assuming $x_k\geqslant0$, then by using the power mean: $$M_p(x_1,\ldots,x_n)=\left(\dfrac1n\sum_{k=1}^n x_k^p\right)^{1/p},$$ we can write $\max(x_1,\ldots,x_n)$ as $$M_{\infty}(x_1,\ldots,x_n)=\lim_{p\to \infty}M_p(x_1,\ldots,x_n)=\lim_{p\to \infty}\left(\dfrac1n\sum_{k=1}^n x_k^p\right)^{1/p}.$$ Similarly, $M_{-\infty}(x_1,\ldots,x_n)=\min(x_1,\ldots,x_n)$. – Workaholic Apr 04 '15 at 16:05
  • We can write $\max(x,y,z)$ in a more symmetric manner as: $$\frac{1}{12}\big(4S+\sum_{\rm cyc}|x-y|+\sum_{\rm cyc}|S+|x-y|-3z|\big),$$ where $S=x+y+z$. – Workaholic Apr 05 '15 at 10:03

1 Answers1

6

Symmetrizing in the obvious way:

$$\frac{a+b+c}3+\frac{|a-b|+|b-c|+|a-c|}{12}+\\\frac{|a+b-2c+|a-b||+|a+c-2b+|a-c||+|b+c-2a+|b-c||}{12}$$

For four variables, I found:

$$\tfrac14\left(a+b+c+d+|a-b|+|c-d|+|a+b-c-d+|a-b|-|c-d||\right)$$

Of course you don't have to use absolute value signs: $$\lim_{m\to\infty}\sqrt[m]{a^m+b^m+c^m}$$

Andrew Woods
  • 3,672