Class 12 MathsAll 13 chaptersQuick lessonWorked solutionsPast papersPast papersGet updates
Class 12 Mathematics · Chapter 12

Linear Programming.
The best choice within the rules.

A shop has limited money and limited space. A factory has limited machine hours. A diet must contain enough vitamins at the lowest cost. Linear programming turns each of these into a picture: the rules become lines that fence off a region of possible choices, and the quantity to make as large (or small) as possible becomes a family of parallel lines. The best choice is always found at a corner of the region.

The furniture dealer's choices (x tables, y chairs) are the green region fenced by his money and his space. The dashed profit lines Z = 250x + 75y are parallel; as the profit grows they move outward, and the last point of the region they touch is the corner (10, 50): Rs 6250.
Part 1 · Section 12.1

An optimisation problem with straight-line rules.

A furniture dealer must decide how many tables and chairs to buy. Which mix earns him the most profit?

costprofit
one tableRs 2500Rs 250
one chairRs 500Rs 75
He has Rs 50,000 to invest and room for at most 60 pieces.
All tables
20 tables → Rs 5000

Rs 50,000 buys 20 tables.

All chairs
60 chairs → Rs 4500

He could afford 100 chairs but can store only 60.

A mix
10 + 50 → Rs 6250

10 tables and 50 chairs beat both. But which mix is best?

Optimisation problem
maximise or minimise

Problems that seek to maximise (or minimise) profit, cost or resources are optimisation problems.

Linear programming
LPP

When every relation involved is linear, it is a linear programming problem (LPP). “Programming” means planning.

Part 2 · Section 12.2.1

Formulating: variables, constraints, objective.

Turn the story into maths. Name the unknowns, write each rule as an inequality, and write the profit as a formula.

Decision variables
x tables,  y chairs
x ≥ 0,  y ≥ 0

The numbers to be decided are the decision variables. They cannot be negative: these are the non-negative restrictions.

Constraints
5x + y ≤ 100
x + y ≤ 60

Money: 2500x + 500y ≤ 50000, which is 5x + y ≤ 100 after dividing by 500. Space: at most 60 pieces. These rules are the constraints.

Objective function
Z = 250x + 75y

The profit is the objective function. In general a linear objective function is Z = ax + by, with a and b constants.

The whole problem
Maximise Z = 250x + 75y
subject to
5x + y ≤ 100,  x + y ≤ 60,
x ≥ 0,  y ≥ 0

This is the dealer’s problem, written as an LPP.

Try a purchaseChoose how many tables and chairs to buy. The dot turns green when both the money and the space rules are met, and the profit is shown.
the two rules
Section 12.2

The furniture dealer, formulated and solved.

  1. Maximise Z = 250x + 75y.
10 tables, 50 chairs: Rs 6250.
Part 3 · Section 12.2.2

Each constraint keeps one side of a line.

Shade the allowed side of each rule. The part where all the shadings overlap is the feasible region.

One rule
5x + y ≤ 100

A linear inequality like this is a half-plane: all the points on one side of its boundary line, here 5x + y = 100.

All the rules
feasible region

The region common to all the constraints, including x ≥ 0 and y ≥ 0, is the feasible region.

How to shade one rule

  1. Draw the boundary line 5x + y = 100 through its intercepts (20, 0) and (0, 100).
  2. Test a point not on the line, usually the origin O: 0 ≤ 100 is true.
  3. True, so shade the side containing O. (If the test were false, you would shade the other side.)
Feasible
(10, 50)

Every point in the region, boundary included, is a feasible solution. For the dealer, (10, 50) is one.

Infeasible
(25, 40)

Any point outside the region is infeasible. For the dealer, (25, 40) is: 25 + 40 = 65 pieces is more than 60.

Optimal
the best Z

A feasible point that gives the optimal value of Z is an optimal solution.

Half-plane labBuild ax + by ≤ c or ≥ c. The shaded side is the solution set; move the test point and check the inequality by substitution.
the inequality and the test
Part 4 · Section 12.2.2

The corner point method.

There are infinitely many feasible points, but only the corners need checking. If a best value exists, it sits at a corner.

Theorem 1
optimum: at a corner

If Z = ax + by has an optimal value on the feasible region R (a convex polygon), it occurs at a corner point (vertex) of R.

Theorem 2
bounded ⇒ max & min

If R is bounded (it fits inside a circle), Z has both a maximum and a minimum on R, each at a corner.

Why corners?
ax + by = k

For different k these lines are all parallel. Slide one across the region: the last point it touches is a corner.

How to use it: the corner point method

  1. Draw the feasible region and find its corners, by reading the axes or by solving two equations.
  2. Evaluate Z at each corner.
  3. For a bounded region, the largest value M is the maximum and the smallest value m is the minimum.
  4. If two corners tie, every point of the edge between them is optimal.
Which corner wins?The dealer's region. Change the profit per chair: the tilt of the profit lines changes, and the winning corner jumps. Slide the level line Z = k to see it leave the region at the winner.
Z at the four corners
Example 1

Maximise 4x + y; x + y ≤ 50, 3x + y ≤ 90.

  1. Corners 0, 120, 110, 50.
120 at (30, 0).
Example 2

Minimise 200x + 500y; x + 2y ≥ 10, 3x + 4y ≤ 24.

  1. Corners 2500, 2300, 3000.
2300 at (4, 3).
Example 3

Min and max 3x + 9y; x + 3y ≤ 60, x + y ≥ 10, x ≤ y.

  1. Two corners tie at 180.
Min 60 at (5, 5); max 180 on the edge (15, 15)–(0, 20).
Part 5 · Section 12.2.2 (remarks)

Unbounded regions, and no region at all.

When the region runs on for ever, a best value may not exist. When the rules contradict each other, there is no region at all.

Unbounded R
max or min may not exist

If R is unbounded, a maximum or minimum may not exist. But if it does, it is at a corner.

Test the maximum
ax + by > M

M is the largest corner value. It is the maximum only if this open half-plane has no point in common with R. Otherwise Z has no maximum.

Test the minimum
ax + by < m

m is the smallest corner value. It is the minimum only if this open half-plane has no point in common with R. Otherwise Z has no minimum.

No region
no region → no solution

If the constraints contradict each other, there is no feasible region, so no solution at all.

Always convex
convex

In every case the feasible region, when it exists, is convex.

Four kinds of outcomePick a case. The pink half-plane is where Z would beat the best corner; if it overlaps the green region, that corner is not optimal.
the outcome
Example 4

Minimise −50x + 20y on an unbounded region.

  1. Smallest corner −300, but −5x + 2y < −30 meets R.
No minimum.
Example 5

x + y ≥ 8 and 3x + 5y ≤ 15.

  1. The half-planes never overlap.
No feasible region.
Self-check

Twelve concept checks.

This chapter has no multiple-choice questions in the textbook, so these twelve test the ideas themselves. Tap an option to check it and see the reasoning.

Score0 / 1212 left to answer
Summary

Remember this.

An LPP finds the optimal (maximum or minimum) value of a linear objective function Z = ax + by, subject to linear constraints and non-negative decision variables.

Each constraint is a half-plane; their common part is the feasible region. Feasible solutions lie in it; the best one is the optimal solution.

Corner point method: find the corners, evaluate Z at each. Bounded region: largest value = maximum, smallest = minimum.

Unbounded region: M is the maximum only if ax + by > M misses the region; m is the minimum only if ax + by < m misses it.

Two corners with the same optimal value: every point of the segment joining them is optimal. Contradictory constraints: no feasible region.

A little history

From wartime planning to the Nobel prize.

1941Kantorovich and Hitchcock

Independently formulated the first linear programming problem: the transportation problem.

1945George Stigler

Described the optimal diet problem.

1947George Dantzig

Invented the simplex method, which solves any linear programme in a finite number of steps.

1975Kantorovich and Koopmans

Awarded the Nobel prize in economics for their work on linear programming.

Finished Chapter 12? Hear when the next one is ready

Leave your email and we will write when a new chapter or a new set of worked solutions is ready. That is all we use it for, and you can ask to be taken off the list at any time.

You are on the list. We will email you when new chapters are added, and for nothing else.