Hey that sounds sort of like a Lagrange multiplier problem in 4 (discrete) variables \(x, y, z, w\) where \(x\) is one of the kg weighs of food, \(y\) one of the kilograms of water, etc.

The constraint in the problem would be

\(x + y + z + w \le 25\)

subject to which you want to maximize the survival function

\(S = f(x) + g( y) + h(z) + j(w)\)

where \(f(x), g( y), \dots\) are the survival points associate to \(x, y, \dots\). For example, \(f(5)=10, f(8)=20, g(3)=10, h(8)=15, \dots\) etc.

Edited October 8th, 2017
by The Fly