# simplifying $\min(\max(A,B),C)$

In a larger problem, I have to make use of the following $$\min(\max(A,\ B),\ C)$$

• I don't think you can simplify this further, unless you know some inequality between $A$, $B$, and $C$. – A.S Jun 6 '13 at 1:07
• I am seconding Andrew's comment. – copper.hat Jun 6 '13 at 1:16
• Is it possible to simplify if we let $B=80$ and say, $C=100$? – Gorg Jun 6 '13 at 1:20
• Maybe you want to expand using the distributive law? – Doug Spoonwood Jun 6 '13 at 1:52
• @DougSpoonwood how's that done? – Gorg Jun 6 '13 at 1:59

If you wanna use the notation in stochastic caculus I saw sometimes, $max(A,B) = B + (A-B)_+$, then $$min(B+(A-B)_+, C) = C - (C - B - (A-B)_+)_+$$

This does not simplify for arbitrary $A,B,C$, but a scenario where this often comes up is when $A<C$ and $B \in \mathbb{R}$, then $\min(\max(A,B),C)$ has the conceptual simplification of reducing to $B$ unless $B$ is too high or low.

E.g. $f(x) := \min(\max(0,x),1) = x$ if $0\leq x \leq 1$, otherwise it takes the extreme value it is closest to.

For $$a, b ∈ \Bbb R:$$

$$\max\left(a,b\right) = \frac{a+b+\left|a-b\right|}{2}$$

$$\min\left(a,b\right) = \frac{a+b-\left|a-b\right|}{2}$$

Therefore, if $$a,b,c ∈ \Bbb R:$$

$$\min\left(\max\left(a,b\right),c\right) = \min\left(\frac{a+b+\left| a-b\right|}{2},c\right) =$$

$$=\frac{\frac{a+b+\left| a-b\right|}{2}+c-\left|\frac{a+b+\left|a-b\right|}{2}-c\right|}{2}= \frac{a+b+\lvert a-b\rvert}{4}+\frac{c}{2}-\left|\frac{a+b+|a-b|}{4}-\frac{c}{2}\right|=$$

$$=\frac{a+b+\left|a-b\right|+2c}{4}-\left|\frac{a+b+|a-b|-2c}{4}\right|=$$ $$=\frac{a+b+\left|a-b\right|+2c-\Big|a+b+\left|a-b\right|-2c\Big|}{4}$$

• This is an insightful answer, although it might not quite seem like a simplification. Please help others to read it by typesetting this in $\LaTeX$! – Isaac Browne Mar 6 at 18:46