ax+by+cz<=d, find the maximum value of ax+by+cz.

812 Views Asked by At

I am recently calculating that kind of questions as shown in title.

And of course, I use a lot of time to find the answer. Therefore I would

like to know how I can calculate faster.

Q.: ax + by + cz <= d, find the maximum value of ax + by + cz.

(a, b, c, d, x, y and z are non-negative integers.)

E.g.1: 1529 x + 1911 y + 2294 z <= 5733 ; A.: 5733 (x=0, y=3, z=0).

E.g.2: 1529 x + 1911 y + 2294 z <= 5734 ; A.: 5734 (x=1, y=1, z=1).

Method used to find the answers: substitution.

Please help me, 'cos I am stuck and there are

more and more unknowns later on. Thank you!