Skip to content

The objective function and the best plan

The objective function and the best plan

The objective function: the profit

The workshop makes a profit of 400 ₪ on every table and 150 ₪ on every chair.
The profit from the plan (x,y)\displaystyle (x,y) is

P=400x+150yP=400x+150y

This function is called the objective function: it gives each plan the number you want to make greater – here the profit. In a problem of cost you want to make it smaller.

P=ax+by\displaystyle P=ax+by
The profit at the corner points

The workshop’s feasible region is a quadrilateral with four corner points. We work out the profit at each of them:

Corner pointThe planThe profit P=400x+150y\displaystyle {P}={400x+150y}
(0,0)\displaystyle (0,0)nothing0 ₪
(0,40)\displaystyle (0,40)40 chairs150⋅40=6,000\displaystyle {150\cdot40}={6{,}000} ₪
(10,30)\displaystyle (10,30)10 tables and 30 chairs400⋅10+150⋅30=8,500\displaystyle {400\cdot10+150\cdot30}={8{,}500} ₪
(20,0)\displaystyle (20,0)20 tables400⋅20=8,000\displaystyle {400\cdot20}={8{,}000} ₪

The best plan: 10 tables and 30 chairs a week, at a profit of 8,500 ₪.

Lines of equal profit

All the plans that give the same profit lie on one line. On the graph board, the feasible region and two dashed lines:

  • 400x+150y=6,000\displaystyle {400x+150y}={6{,}000}, that is y=40−83x\displaystyle {y}={40-\frac{8}{3}x} – the plans with a profit of 6,000 ₪;
  • 400x+150y=8,500\displaystyle {400x+150y}={8{,}500}, that is y=170−8x3\displaystyle {y}={\frac{170-8x}{3}} – the plans with a profit of 8,500 ₪.
x≥0\displaystyle x\ge 0
y≥0\displaystyle y\ge 0
3x+y≤60\displaystyle 3x+y\le 60
x+y≤40\displaystyle x+y\le 40
y=40−83x\displaystyle y=40-\frac{8}{3}x
y=170−8x3\displaystyle y=\frac{170-8x}{3}
B=(10,30)\displaystyle B=(10,30)
  • All the lines of equal profit are parallel: they all have the same slope, −83\displaystyle -\frac{8}{3}. Only the number on the right changes.
  • A greater profit – the line moves up, parallel to itself.
  • The greatest profit is that of the last line that still touches the feasible region. It touches it at a corner: at the corner point B=(10,30)\displaystyle {B}={(10,30)}.

So in linear programming the greatest value of the objective function, and the least one too, is always at one of the corner points, and it is enough to work it out there.

The way to the solution

A linear programming problem is solved in five steps:

  1. Choose variables: x\displaystyle x and y\displaystyle y – the quantities to be decided.
  2. Write the constraints, and x≥0\displaystyle x\ge0, y≥0\displaystyle y\ge0 too.
  3. Draw the feasible region.
  4. Find the corner points – on the graph or by a system of equations of two boundary lines.
  5. Work out the objective function at each corner point, and choose the greatest value (a profit) or the least (a cost).
Exercise 1

The corner points of the feasible region of the bakery from the last lesson: (0,0)\displaystyle (0,0), (0,16)\displaystyle (0,16), (8,8)\displaystyle (8,8) and (12,0)\displaystyle (12,0).
x\displaystyle x is the number of cakes a week, and y\displaystyle y the number of pies.
The bakery makes a profit of 30 ₪ on a cake and 20 ₪ on a pie.

a

Work out the profit at the point (0,16)\displaystyle (0,16).

    / – fraction bar · Tab or the arrows – between numerator and denominator, then a note above or below · Enter – check and a new line · * – times · ^ – power, ↓ – end of the power

    / – fraction bar · Tab or the arrows – between numerator and denominator, then a note above or below · Enter – a new line · * – times · ^ – power, ↓ – end of the power

    b

    Work out the profit at the point (8,8)\displaystyle (8,8).

      / – fraction bar · Tab or the arrows – between numerator and denominator, then a note above or below · Enter – check and a new line · * – times · ^ – power, ↓ – end of the power

      / – fraction bar · Tab or the arrows – between numerator and denominator, then a note above or below · Enter – a new line · * – times · ^ – power, ↓ – end of the power

      c

      Work out the profit at the point (12,0)\displaystyle (12,0).

        / – fraction bar · Tab or the arrows – between numerator and denominator, then a note above or below · Enter – check and a new line · * – times · ^ – power, ↓ – end of the power

        / – fraction bar · Tab or the arrows – between numerator and denominator, then a note above or below · Enter – a new line · * – times · ^ – power, ↓ – end of the power

        d

        How many cakes and how many pies should the bakery bake a week? What is the profit?

        Cakes

          / – fraction bar · Tab or the arrows – between numerator and denominator, then a note above or below · Enter – check and a new line · * – times · ^ – power, ↓ – end of the power

          / – fraction bar · Tab or the arrows – between numerator and denominator, then a note above or below · Enter – a new line · * – times · ^ – power, ↓ – end of the power

          Pies

            / – fraction bar · Tab or the arrows – between numerator and denominator, then a note above or below · Enter – check and a new line · * – times · ^ – power, ↓ – end of the power

            / – fraction bar · Tab or the arrows – between numerator and denominator, then a note above or below · Enter – a new line · * – times · ^ – power, ↓ – end of the power

            Profit (₪)

              / – fraction bar · Tab or the arrows – between numerator and denominator, then a note above or below · Enter – check and a new line · * – times · ^ – power, ↓ – end of the power

              / – fraction bar · Tab or the arrows – between numerator and denominator, then a note above or below · Enter – a new line · * – times · ^ – power, ↓ – end of the power

              Exercise 2

              The prices have changed, and now the bakery makes a profit of 50 ₪ on a cake and only 10 ₪ on a pie.
              The constraints have not changed, and so neither have the corner points.
              Work out the profit at each corner point.
              What is the best plan now?

              Cakes

                / – fraction bar · Tab or the arrows – between numerator and denominator, then a note above or below · Enter – check and a new line · * – times · ^ – power, ↓ – end of the power

                / – fraction bar · Tab or the arrows – between numerator and denominator, then a note above or below · Enter – a new line · * – times · ^ – power, ↓ – end of the power

                Pies

                  / – fraction bar · Tab or the arrows – between numerator and denominator, then a note above or below · Enter – check and a new line · * – times · ^ – power, ↓ – end of the power

                  / – fraction bar · Tab or the arrows – between numerator and denominator, then a note above or below · Enter – a new line · * – times · ^ – power, ↓ – end of the power

                  Exercise 3

                  A school is organising a trip for at least 240 pupils.
                  A coach has 60 seats, and a minibus 20.
                  The transport company has only 8 drivers free, one driver to each vehicle.
                  A coach costs 2,000 ₪, and a minibus 600 ₪.
                  x\displaystyle x is the number of coaches, and y\displaystyle y the number of minibuses.

                  a

                  Write the constraint of the seats and the constraint of the drivers on the graph board.

                  b

                  On the graph board, the boundary lines: y=12−3x\displaystyle {y}={12-3x} – the seats, and y=8−x\displaystyle {y}={8-x} – the drivers (the dashed one).
                  The feasible region is a triangle. Mark its three corner points.

                  y=12−3x\displaystyle y=12-3x
                  y=8−x\displaystyle y=8-x

                  c

                  Write the objective function – the cost of the transport – and work it out at each corner point.
                  How many coaches and how many minibuses should the school order? What will the transport cost?

                  Coaches

                    / – fraction bar · Tab or the arrows – between numerator and denominator, then a note above or below · Enter – check and a new line · * – times · ^ – power, ↓ – end of the power

                    / – fraction bar · Tab or the arrows – between numerator and denominator, then a note above or below · Enter – a new line · * – times · ^ – power, ↓ – end of the power

                    Minibuses

                      / – fraction bar · Tab or the arrows – between numerator and denominator, then a note above or below · Enter – check and a new line · * – times · ^ – power, ↓ – end of the power

                      / – fraction bar · Tab or the arrows – between numerator and denominator, then a note above or below · Enter – a new line · * – times · ^ – power, ↓ – end of the power

                      Cost (₪)

                        / – fraction bar · Tab or the arrows – between numerator and denominator, then a note above or below · Enter – check and a new line · * – times · ^ – power, ↓ – end of the power

                        / – fraction bar · Tab or the arrows – between numerator and denominator, then a note above or below · Enter – a new line · * – times · ^ – power, ↓ – end of the power