Objective Functions

It's all very well to know what the range of possible solutions is, but how do we find which one is the best? That's what Linear Programming is all about. This page requires a Java capable browser.

Consider our farmer and his fertilizer. What does he need to know in order to decide which of the possible combinations of high and low grade fertilizer to use? He needs to know what effect each type of fertilizer will have on the growth of his crop. Let's say he gets 15 tonnes per hectare for each bag of high grade fertilizer he uses, and 8 tonnes per hectare for each bag of low grade. As before, we will use x for the number of bags of high grade fertilizer and y for the number of bags of low grade, this can be expressed with the linear relationship

yield = 15x + 8y

This is called the objective function. It's called the objective function because it expresses what we are trying to achieve -- in this case, maximum yield.

(It should be obvious that real world problems are not as simple as this, but even more complex problems can often be modelled with a simple linear relationship to give answers that are close to the real results.)

The objective function is not the equation of a line since it has three variables. Rather it represents a whole range of possible lines. All these possible lines have the same gradient, but different position. In the applet the red line represents the objective function. You can move the line up and down by dragging the green dot with the mouse. Notice how the gradient remains the same. You can move the red dot along the line. Every point on the line has the same yield. (The figure shown changes a little as you move the red dot because the applet rounds the position of the dot to one decimal place, giving some rounding error.)

To find the optimum combination of high grade and low grade fertilizer, we want to find the largest possible value of the objective function that falls in the feasible region. Start with the objective function above the feasible region, then bring it slowly down until it just touches the feasible region on one point. That point represents the optimum solution: the combination of x and y (in this case high grade and low grade fertilizer) that gives the highest value for the objective (in this case yield).

What is the optimum solution for the fertilizer problem?

Exercise 4.

Use the applet to determine the optimum (i.e. the maximum for the objective) for each of the following. As usual, assume non-negativity constraints for x and y.
Objective functionConstraint
a)maximize 2x+ysubject to 5x+4y≤24
b)maximize x+5ysubject to 3x+5y≤35
c)maximize 13x+7ysubject to 4x+6y≤54

Check your answers