Elegant Proof of a simple inequality

enter image description here

Consider the min-max case (blue) compared to the "mixed" case (red). We can match out the red to blue as shown and we are left with the excess shown for the min-max case.


There are a couple of nice non-algebraic approaches; here's an algebraic approach that isn't too bad. Without loss of generality $w_1\ge z_1$; the question is whether we can increase the value of the expression $w_1w_2+z_1z_2$ by interchanging $w_2$ and $z_2$. We have

$$\begin{align*} (w_1z_2+w_2z_1)-(w_1w_2+z_1z_2)&=w_1(z_2-w_2)-z_1(z_2-w_2)\\ &=(w_1-z_1)(z_2-w_2)\;, \end{align*}$$

so switching $w_2$ and $z_2$ increases the value if and only if $w_1>z_1$ and $z_2>w_2$. (Recall the assumption that $w_1\ge z_1$.) And this is exactly what we wanted to show.

(It's essentially a proof that the greedy algorithm works.)


Here's another approach:

You have a bag full of two type of coins; one type has value $z_1$ and the other $w_1$. You are allowed to pick $w_2$ coins of one type, and $z_2$ coins of another. If you want to get the maximum possible amount, how should you go about picking the coins? (Greedy algorithm)