# Maximum/minimum problem of integers

Let $f$ be the function such that $$f(x,y,z,w)=x+w, \quad x,y,z,w\in{\Bbb Z}$$ where $$x+y+z+w=400,$$ and $x<y<z<w$. How can I find the maximum of $f$?

I think the key point is to use $x<y<z<w$. I guess $98<99<101<102$ should be a choice. But I have no idea about how to give a proof.

[EDITED:] According to answers, $\max f=+\infty$. What's the minimum of $f$? I think there should be a bound. Playing around the examples, I think $\min f$ should be given by $(98,99,101,102)$. Any examples "better" than this?

• But $24+25+26+27$ is not $400$. – Joe Johnson 126 Nov 7 '12 at 2:29
• It should be "the function", not "a function"; there's only one such function. – joriki Nov 7 '12 at 2:42
• Why don't you set y and z equal to zero? I think that will give you your maximum. – Ben Nov 7 '12 at 2:46
• @Ben x < y < z < w, so y and z cannot both be 0. – Namaste Nov 7 '12 at 2:49
• @Goku, what about 0 < 1 < 2 < 397? Or -2< -1 < 0 < 403? Experiment a bit, and then you might gain some insight? – Namaste Nov 7 '12 at 2:51

Since the sum of all four variables is constant, maximizing $x+w$ is equivalent to minimizing $y+z$. Since you can make $x,y,z$ as negative as you like and then use $w=400-(x+y+z)$, $f$ is unbounded and has no maximum.
• @Gerry: The answer was accepted, so it seems $\mathbb Z$ was indeed intended. – joriki Nov 7 '12 at 15:13