Read the problem carefully a few times. For example, "To win a video game, John has to catch at least 12 ducks and 18 birds on two farms in the fewest number of turns. On each turn, he can only visit one farm. On Farm A, he can catch 2 ducks and 2 birds on each turn. On Farm B, he can catch 1 duck and 3 birds on each turn. How should John play the game?"
Determine the objective, for example to minimize the number of turns. Assign variables and define the objective function. For example, set "A" as equal to the number of turns at Farm A, with "B" equal to the number of turns at Farm B and "Z" equivalent to the total number of turns.
Min Z = A + B
Create equations for the constraints. For example, on each turn, John can catch 2 ducks on Farm A and 1 duck on Farm B. He can catch 2 birds on Farm A and 3 birds on Farm B.
2*A + B >= 12
2*A + 3*B >= 18
where A, B >= 0
Determine A as a function of B from the first equation. For example:
A = (12 - B) / 2
Substitute A's formula into the second equation. For example:
2 (12 + B) / 2 + 3B = 18
Simplify the equation. For example:
(24 + 2B) / (2 + 3B) = 18
4B = 12
B = 3
Substitute B = 3 into the equation that expresses A as a function of B.
A = (12 - 3) / 2
A = 4.5
Round A to the next greatest integer, since you can't take half a turn. State the answer to the problem. For example:
John needs to take 5 turns on Farm A and 3 turns on Farm B to catch at least 12 ducks and 18 birds in the fewest number of turns.