Area 7 of the course is Computational Methods or Mechanics: each school teaches one. This unit and Unit 15 are Computational Methods; Units 17–18 are Mechanics.
Grade 10 Optional Math found a bakery’s best plan by drawing: 16 kg of flour and 10 oven hours, cakes at Rs 600 a batch and bread at Rs 400, and the best plan, 6 batches of cakes and 4 of bread, sat at a corner of the shaded region. A drawing works for two products. A feed mill blending thirty ingredients, or the cheapest diet from 77 foods (the story in 16.2), has a “region” in thirty or 77 dimensions, and nobody can draw that. In 1947 George Dantzig found a way that needs no picture: start at one corner, move along an edge to a better one, and stop when no edge leads uphill. This unit is his simplex method. Here is its question: solve the bakery without a graph, and find what one more kilogram of flour would be worth to the baker. The answer is at the end of 16.2. (The bakery’s numbers are made up, as in Grade 10.)
What you need
From Grade 10 Optional Math, Unit 3: the quantity to be made largest, such as Z = 600x + 400y, is the objective function; the limits, such as 2x + y ≤ 16, are the constraints; the points that keep every constraint make the feasible region; and the best value is at a vertex (corner) of it. The bakery’s region has corners O(0, 0), A(8, 0), B(6, 4) and C(0, 10):
Grade 10 worked out Z at every corner: 0, 4,800, 5,200 and 4,000. With two variables and four corners that is quick. With 30 variables and 30 constraints a region can have millions of corners, so trying them all is out. The simplex method visits only a few, each better than the last. All it uses is the row operations of Unit 15.
16.1 Slack variables and corners
The simplex method works with equations, not inequalities. So give each constraint a slack variable, the amount left unused:
s₁ is the flour left over (kg), s₂ the oven hours left. A plan is feasible exactly when all four variables are ≥ 0. This works for a standard maximum problem: maximize Z, every constraint ≤ with a right side ≥ 0, and x, y ≥ 0.
Two equations, four unknowns: set any two of them to 0 and solve for the other two. Each such solution is a basic solution; the two set to 0 are non-basic, the other two basic. Here is what each choice gives:
| Set to 0 | Then | Point | Feasible? |
|---|---|---|---|
| x, y | s₁ = 16, s₂ = 10 | O(0, 0) | yes |
| y, s₁ | x = 8, s₂ = 2 | A(8, 0) | yes |
| s₁, s₂ | x = 6, y = 4 | B(6, 4) | yes |
| x, s₂ | y = 10, s₁ = 6 | C(0, 10) | yes |
| y, s₂ | x = 10, s₁ = −4 | (10, 0) | no: 4 kg of flour short |
| x, s₁ | y = 16, s₂ = −6 | (0, 16) | no: 6 oven hours short |
The basic feasible solutions (no variable negative) are exactly the corners of the feasible region: a corner is where two of the boundary lines meet, and being on a line means its slack (or x, or y) is 0. The two crossings with a negative slack are the points Grade 10 warned are not vertices. So “move from corner to corner” means: swap one basic variable for a non-basic one, keeping every variable ≥ 0.
At the bakery’s corner A(8, 0), the slack variables are:
Pick an answer to see why.
16.2 The simplex method
Write the objective as an equation too, Z − 600x − 400y = 0, and put all three equations in a tableau, the objective row at the bottom. A tableau always shows one corner: the basic variables are named on the left, and their values are in the last column, the non-basic ones being 0. The first tableau is the corner O, where x = y = 0.
The method, with the reason for each step:
- Start at O: the slacks are basic, s₁ = 16, s₂ = 10, Z = 0. This is feasible because every right side is ≥ 0.
- Pivot column: the most negative entry of the bottom row. The bottom row says Z = 600x + 400y: raising x by 1 raises Z by 600, the most. A negative entry means “raising this variable raises Z”; the most negative raises it fastest.
- Pivot row: the smallest ratio of the right side to the positive entry in the pivot column. As x grows, flour runs out at and oven time at . Stop at the first to run out, 8, or a slack goes negative and the plan leaves the region. (A row with a 0 or negative entry never runs out, so it has no ratio.)
- Pivot. Divide the pivot row by the pivot entry, then subtract multiples of it from every other row, the bottom row too, to make the rest of the pivot column 0: Unit 15’s elimination. The variable of the pivot column comes in; the one of the pivot row goes out. The tableau now shows the next corner, along an edge, with a larger Z.
- Repeat until the bottom row has no negative entry. Then raising any non-basic variable would lower Z or leave it the same, so no edge from this corner leads higher. For a linear objective on a feasible region, which has no dents, a corner with no better neighbor is the best of all: this Z is the maximum.
Back to the bakery
Exercise
Choose the correct option
In the simplex method, the pivot column is the column with:
Pick an answer to see why.
In 3x + 2y + s = 6, made from the constraint 3x + 2y ≤ 6, the slack variable s is:
Pick an answer to see why.
The pivot column has entries 2, −1, 3 in the constraint rows, whose right sides are 10, 4, 9. The pivot row is:
Pick an answer to see why.
The simplex method stops when:
Pick an answer to see why.
The smallest ratio is chosen for the pivot row because:
Pick an answer to see why.
A basic feasible solution of a linear programming problem is, on the graph:
Pick an answer to see why.
A final tableau reads: row x: ; row y: ; bottom row . The maximum is:
Pick an answer to see why.
Using the simplex method to maximize Z = 2x + 3y subject to x + 2y ≤ 8, 3x + y ≤ 9, x, y ≥ 0, the first pivot entry is:
Pick an answer to see why.
Using the simplex method to maximize Z = 5x + 2y subject to x + y ≤ 6, 2x + y ≤ 8, x, y ≥ 0 gives:
Pick an answer to see why.
Maximizing Z = 2x + 2y subject to x + y ≤ 5, x ≤ 3, the final tableau has basic y = 2, x = 3, and the bottom row , with a 0 under the non-basic s₂. This means:
Pick an answer to see why.
The first tableau of a problem has bottom row , and every entry of the x column above it is 0 or negative. Then:
Pick an answer to see why.
Short questions
Using the simplex method, maximize Z = 3x − y subject to 2x + y ≤ 6, x + 3y ≤ 9, x, y ≥ 0. (3 marks)
Hint
Answer
Using the simplex method, maximize Z = 3x + 4y subject to x + 2y ≤ 8, 3x + 2y ≤ 12, x, y ≥ 0. Name the corners the method passes through. (5 marks)
Hint
Answer
Long question
NEB’s grid gives this area no long question; this one is a whole problem, from words to the shadow prices, for practice.
A weavers’ cooperative makes dhaka shawls and lengths of topi cloth. A shawl takes 4 hours on the loom and 1 hour of finishing; a length of topi cloth takes 2 hours on the loom and 2 of finishing. Each week there are 40 loom hours and 16 finishing hours. A shawl earns Rs 800 and a length of cloth Rs 600. (The numbers are made up.)
- a.Write the problem as a linear programming problem. (2 marks)
- b.Solve it by the simplex method. (5 marks)
- c.Which is worth more to the cooperative, one more loom hour or one more finishing hour? (1 mark)
Hint
Answer
Project work
Printable PDFs
- Study notes 2 pages
- Worksheet 3 pages Answer key
- Harder practice questions 1 page Answer key
Practice every question in the book, and keep track of the ones you miss →
Where these facts come from
- George Dantzig devised the simplex method in 1947, from planning work for the US Air Force (Combat Analysis Branch, 1941–46) done with desk calculators; T. J. Koopmans proposed the name “linear programming” in 1948, “programming” being the military word for plans and schedules; the Nobel Prize to Kantorovich and Koopmans, and Dantzig’s omission: MacTutor, “George Dantzig”, read November 2026 (the opening, the story).
- Stigler’s diet problem: 77 foods, 9 nutrients, $39.93 a year at 1939 prices with 15 foods kept, the exact optimum $39.69 found by the simplex method, and the foods of Stigler’s own diet: Wikipedia, “Stigler diet”; Laderman’s 1947 run, “120 man days of nine clerks on desk calculators”: Google OR-Tools, “The Stigler diet problem”, both read November 2026 (the story).
- The tableau convention (objective row Z − ax − by = 0 at the bottom, the most negative entry, the least ratio over positive entries) is the one most textbooks use; the model paper’s question 19 b names none, and by it ends after one pivot.
- The unit’s items and project work: CDC, Secondary Education Curriculum 2078, Mathematics, Grades 11–12, Grade 12, 7.2 and sample project 14; the marks and the model question: CDC, Specification Grid 2078, Mathematics (Mat. 402), Grade 12, and its model paper, question 19 b. The bakery’s numbers (Grade 10 Optional Math’s) and the weaving cooperative’s are made up.
Found a mistake? Please tell us.
