I was solving a problem, but I couldn't do it. So I looked at the editorial, in witch this was given:
(X + Y) / (A + B) <= MAX{X / A, Y / B}
where X, Y, A, B >= 0 and are integers.
So my question is, what is the proof to that? Sorry for the stupid question, but I couldn't find this anywhere.
There is more general fact that . Then .
Proof is simple algebra:
Multiplying side by side you get a(b + d) > b(a + c) removing ab there you get again.
The inequality doesn't hold for x = 2, a = 1, b = 1, y = 8.
Did you mean (x + y) / (a + b) <= max(x / a, y / b)?
ops sorry :/
No problem. The solution is quite simple:
Without loss of generality, assume that x / a >= y / b. Our inequality simplifies to (x + y) / (a + b) <= x / a.
Multiplying out, we get that ax + ay <= ax + bx, and ay <= bx, which holds due to our original assumption that x / a >= y / b.