topic badge
iGCSE (2021 Edition)

24.04 Application of linear programming (Extended)

Lesson

So far we've looked at how to construct feasible regions, and objective functions. Typically, the objective function describes some profit (or cost) in terms of the constraint variables, and so it would make sense to maximise (or minimise) the objective function.

The objective function provides a sense of "preference" for the points satisfying the feasible region. We "prefer" the point in the feasible region that maximises (or minimises) the objective function. A problem of this type is called a linear programming problem.

There are two main methods for determining the values in the feasible region that optimise the objective function.

Method 1: Corner point principle

If the boundaries of the feasible region are solid lines, the points in the feasible region that optimise the objective function are always the corner points

Corner point principle

The optimal solution of a linear programming problem will be found at a corner point (vertex)
of the feasible region.

To find the optimal solution we substitute each of the corner points into the objective function. The corner point that optimises the objective function is the optimal solution.

It's worth mentioning that there are sometimes more than one optimal solutions. It's possible that the family of lines in the sliding line method is parallel to one of the edges of the feasible region. If we slide the line up or down so that it lies on top of this edge, then all the points on this edge maximises or minimises the objective function.

A way of identifying this situation is if two adjacent corner points both optimise the objective function. In this case, all the points along the edge joining the two corner points also optimise the objective function.

Worked example

Example 1

A hotel and conference centre at a holiday destination can cater for a maximum of $540$540 tourists and conference attendees per month but does not open for business in any month in which the number of bookings is less than $300$300. The number of tourist bookings is always at least the number of conference attendees but never more than twice as many.

The profit made per tourist per month is $\$16$$16 while the profit made per conference attendee per month is $\$19$$19. What mix of conference attendees and tourists should the centre aim for to maximise the profit? What is the maximum profit?

Think: Let $c$c be the number of conference attendees and $t$t be the number of tourists. We first want to express the objective function and constraints in terms of $c$c and $t$t. Then we want to use either the sliding line method, or the corner point principle to find the optimal solution.

Do: If $P$P is the total profit, then the objective function can be written as $P=19c+16t$P=19c+16t.

The constraints along with their description are given below.

  1. $c+t\le540$c+t540 (maximum number of bookings)
  2. $c+t\ge300$c+t300 (minimum bookings in order to open)
  3. $t\ge c$tc (the number of tourists is at least the number of conference attendees)
  4. $t\le2c$t2c (the number of tourists is never more than double the number of conference attendees)
  5. $t\ge0$t0, $c\ge0$c0 (we can never have negative attendees of either kind)

The graph of these inequalities looks as follows.

Feasible region

The graph of the constraints.

We now want to find corner points of the feasible region. Making use of your CAS calculator speeds up this process.

  1. $t=2c$t=2c and $c+t=540$c+t=540 gives $c=180$c=180 and $t=360$t=360.
  2. $t=2c$t=2c and $c+t=300$c+t=300 gives $c=100$c=100 and $t=200$t=200.
  3. $t=c$t=c and $c+t=540$c+t=540 gives $c=t=270$c=t=270.
  4. $t=c$t=c and $c+t=300$c+t=300 gives $c=t=150$c=t=150.

Now substitute each vertex point into the objective function $P=19c+16t$P=19c+16t and find the maximum value for $P$P.

$19\times180+16\times360$19×180+16×360 $=$= $9180$9180

$19\times100+16\times200$19×100+16×200

$=$= $5100$5100
$19\times270+16\times270$19×270+16×270 $=$= $9450$9450
$19\times150+16\times150$19×150+16×150 $=$= $5250$5250

 

The maximum profit is $\$9450$$9450 when there are $270$270 conference attendees and $270$270 tourists.

 

Method 2: Sliding line

Usually the objective function will be in the form $z=ax+by$z=ax+by. In any case, we can always make $y$y the subject of the equation, which gives us:

$y=-\frac{a}{b}x+\frac{z}{b}$y=abx+zb

If we make $z$z a constant, then the equation above describes a line with gradient $-\frac{a}{b}$ab. For a different value of $z$z, we create a new line, one with the same gradient and a new $y$y-intercept. If we consider all the values of $z$z, then we create a family of lines that are all parallel with the same gradient of $-\frac{a}{b}$ab and each with a different $y$y-intercept depending on the value of $z$z.

The family of lines $y=-\frac{a}{b}x+\frac{z}{b}$y=abx+zb, for different values of $z$z.

We can think of the family of lines as a single line that "slides" up and down. As it slides, the value of $z$z changes.

Now let's consider this family of lines over a feasible region as shown below. We can see that some of these lines pass through the feasible region, while others stay clear of it. If we slide our line up or down so that it increases (or decreases) $z$z, then the point just before it leaves the feasible region will be the point in the feasible region that maximises (or minimises) the objective function.

Feasible region

Family of lines over the feasible region.

If we slide the line up and down, we can see two points where the line still intercepts the feasible region. One point will maximise the objective function, while the other minimises the objective function. This method we described above is called the sliding line method.

Use the following applet to create your own feasible region, and objective function. Notice how the value of the objective function changes according to the position of line.

 

Summary - sliding line method

To find the point that maximises (or minimises) the objective function $z=ax+by$z=ax+by:

  1. Express the objective function with $y$y as the subject.
  2. Fix $z$z, and draw a line that has the same gradient ($-\frac{a}{b}$ab) that passes through the feasible region.
  3. Slide the line in the direction (up or down) so that it either maximises or minimises the value of $z$z.
  4. Determine the point(s) where the line intercepts the feasible region just before it exits the feasible region. (This is typically a corner point)
  5. Also state the maximum (or minimum) value of the objective function by substituting the point(s) found in part 4 into the objective function.

 

 

Worked example

example 2

Consider the recycling company example from the previous lesson.

Imagine a recycling company that has two types of waste bins available for purchase. The Bin-it bin costs $\$100$$100 each and the Fill-it-up bin costs twice as much, and the amount available for purchases has to be no more than $\$1400$$1400. The Bin-it bins take up $6$6 m2 of factory yard space and can hold $8$8 m3 of recyclable waste. The more expensive bins take up $8$8 m2 of space but can hold $12$12 m3 of waste. The yard is fairly small, confined to $72$72 m2 of useable area. How many of each bin type should you buy to maximise the total recycling storage?

Think: As we did in the previous section, let $x$x be the number of Bin-it bins and $y$y be the number of Fill-it-up bins. The constraints are then:

$100x+200y\le1400$100x+200y1400 (1)
$6x+8y\le72$6x+8y72 (2)
$x\ge0$x0 (3)
$y\ge0$y0 (4)

And the objective function $S$S is:

$S=8x+12y$S=8x+12y

The next task is to identify which of the two methods we want to use. Let's use the sliding line method.

Do: To use the sliding line method, we want to draw the feasible region satisfying the constraint inequalities. This means we construct the boundary lines as usual, and indicate the feasible region with a key as shown below.

Feasible region

A graph of the constraint inequalities.

The corner $\left(8,3\right)$(8,3) is found as the point of intersection of the lines $100x+200y=1400$100x+200y=1400 and $6x+8y=72$6x+8y=72. The remaining corner points are the $x$x and $y$y-intercepts of the boundary lines.

To use the sliding line method, we rewrite the objective function so $y$y is the subject. This gives us the equation:

$y=-\frac{2}{3}x+\frac{S}{12}$y=23x+S12

If we fix $S$S, we can see that the gradient of the equation is $-\frac{2}{3}$23. We then draw a line with a gradient of $-\frac{2}{3}$23 that goes through the feasible region. Since $\frac{S}{12}$S12 is the $y$y-intercept, as we slide the line up, this will increase the value of $S$S. We slide the line up until it's just about to exit the feasible region. At this stage, the line intercepts the feasible region at the corner point $\left(8,3\right)$(8,3).

Feasible region

Sliding line method.

So we say that $\left(8,3\right)$(8,3) is the optimal solution. The total recycling storage can be found by evaluating the objective function at this point:

$S$S $=$= $8x+12y$8x+12y

Writing the objective function

  $=$= $8\times8+12\times3$8×8+12×3

Substituting the point $\left(8,3\right)$(8,3)

  $=$= $100$100 m3

Simplifying

 

This means that to maximise the total recycling storage, $8$8 Bin-it bins and $3$3 Fill-it-up bins should be purchased. This will give a maximum recycling storage of $100$100 m3.

Reflect: We could alternatively use the corner principle method instead. It would save us from having to draw the feasible region and the sliding line, but it would mean that we would have to substitute each of the corner points into the objective as shown below.

Corner Point Substitute into Objective Function Total Storage (m3)
$\left(0,7\right)$(0,7) $S=8\left(0\right)+12\left(7\right)$S=8(0)+12(7) $84$84
$\left(8,3\right)$(8,3) $S=8\left(8\right)+12\left(3\right)$S=8(8)+12(3) $100$100
$\left(12,0\right)$(12,0) $S=8\left(12\right)+12\left(0\right)$S=8(12)+12(0) $96$96

We can see that among the corner points, $\left(8,3\right)$(8,3) maximises the total storage.

Practice questions

Question 1

Consider the following inequalities:

$x\ge0$x0, $y\ge0$y0, $x\le4$x4 and $y\le9$y9

  1. Plot the feasible region defined by the inequalities $x\ge0$x0 and $y\ge0$y0 only.

    Loading Graph...

  2. The region satisfying the inequalities $x\ge0$x0 and $y\ge0$y0 is shown below.

    Now plot the feasible region defined by the four inequalities $x\ge0$x0, $y\ge0$y0, $x\le4$x4 and $y\le9$y9.

    Loading Graph...

  3. State the coordinates of the four vertices of the region defined by the four inequalities.

    Give each coordinate in the form $\left(\editable{},\editable{}\right)$(,) and list all four coordinates on the same line, separated by a comma.

Question 2

Consider the following inequalities:

$0\le x\le7$0x7, $0\le y\le19$0y19, $x+\frac{5}{3}y\ge\frac{26}{3}$x+53y263 and $y<2x$y<2x

  1. Which graph shows the feasible region defined by all four inequalities?

    Loading Graph...

    A

    Loading Graph...

    B

    Loading Graph...

    C

    Loading Graph...

    D
  2. State the coordinates of the three vertices of the region defined by the four inequalities.

    Give each coordinate in the form $\left(\editable{},\editable{}\right)$(,) and list all three coordinates on the same line, separated by a comma.

Question 3

The popular shop Bergner's Burgers makes and sells two types of burgers; beef and chicken. Each day, Mr Bergner knows that they need to make at least $190$190 beef burgers and $170$170 chicken burgers. The maximum number of burgers that can be made in one day is $460$460.

Let $x$x represent the number of beef burgers made per day, and let $y$y represent the number of chicken burgers made in a day.

  1. Finish the set of constraint inequalities below:

    1. $x\ge\editable{}$x
    2. $y\ge\editable{}$y
    3. $\editable{}+\editable{}\le\editable{}$+
  2. Graph the region defined by the inequalities:

    Loading Graph...

  3. The region of possible solutions that you graphed in part (b) has been sketched more clearly below:

    Loading Graph...

    List the three vertices of the feasible region:

    $\left(\editable{},\editable{}\right),\left(\editable{},\editable{}\right),\left(\editable{},\editable{}\right)$(,),(,),(,)

  4. If Bergner's Burgers makes a profit of $\$1.70$$1.70 from each beef burger, and a profit of $\$1.00$$1.00 from each chicken burger, write the objective function that models the weekly profit $z$z.

    Assume that every burger made is sold.

  5. Complete the table below to determine the profit corresponding to each vertex of the feasible region:

    Vertex Profit (dollars)
    $\left(190,170\right)$(190,170) $\editable{}$
    $\left(190,270\right)$(190,270) $\editable{}$
    $\left(290,170\right)$(290,170) $\editable{}$
  6. Complete the following sentences:

    The maximum profit each day is $\editable{}$ dollars, and occurs at the point $\left(\editable{},\editable{}\right)$(,).

    That is to say, $\editable{}$ beef burgers and $\editable{}$ chicken burgers should be made each day to achieve the maximum profit.

  7. If the prices of the burgers were switched, such that the profit from beef burgers was $\$1.00$$1.00 and the profit from chicken burgers was $\$1.70$$1.70, complete the following sentence:

    Given the new prices, $\editable{}$ beef burgers and $\editable{}$ chicken burgers should now be made for a total profit of $\editable{}$ dollars.

Outcomes

0580E2.6

Represent inequalities graphically and use this representation to solve simple linear programming problems.

What is Mathspace

About Mathspace