Learn
Lesson · Duality and Sensitivity Analysis · What the tableau knows

The Dual Simplex Method

A tableau can be optimal in its objective row and infeasible in its right-hand column, which is exactly the state a new constraint or an out-of-range change leaves. The dual simplex method restores feasibility while preserving optimality: the leaving row is a negative right-hand side, and the entering column comes from a ratio test along that row against the objective row. It is the primal simplex run on the dual, seen in the primal tableau, and it is why re-optimisation and branch-and-bound are affordable at all.

start objective row already optimal, right-hand column has a negative entry leave the row with the most negative right-hand side enter min over j of |zⱼ| ÷ |a_rj|, over the NEGATIVE entries of that row z falls monotonically for a maximisation — the opposite way from the primal workshop + (x1 + x2 ≤ 5): new row 0 0 0 −1/6 −1/3 1 | −3 row 4 at −3 → s3 enters (3 beats 9), 36 → 27 row 1 at −1 → s2 enters (2), 27 → 25 at (0, 5)
The two rules, and the workshop cut walked back

Core ideas

What this lesson establishes

One hard idea: the old tableau describes the old basis, and that basis is still a basis of the new problem. Everything else is the two rules swapping places.

1

Optimal and infeasible is a real state, and a useful one

The objective row and the right-hand column can be checked independently. The primal simplex keeps the right-hand column non-negative and hunts for a non-negative objective row; the dual simplex keeps the objective row non-negative and hunts for a non-negative right-hand column. Both are walking from a basis to a neighbouring basis; they differ in which property they refuse to give up.

2

The two rules swap places

In the primal method the entering column is chosen first, by the objective row, and a ratio test down that column picks the leaving row. Here the leaving row is chosen first, by the right-hand column, and a ratio test along that row picks the entering column. The ratio is |zⱼ| ÷ |a_rj| over the negative entries only, because only a negative entry can lift a negative right-hand side.

3

The value comes down to meet the answer

For a maximisation the reported value on an infeasible tableau is an overstatement — it is what the basis would earn if the plan were legal — so each pivot lowers it, monotonically, until feasibility is restored and the number is real. On the workshop cut it goes 36, 27, 25. That direction is a check: if the value rises, the ratio test was misapplied.

The material

Keeping optimality and hunting feasibility

The starting state, the two rules, what each pivot does to the value, and the two ways the method can stop.

A new constraint has just been added and the plan breaks it. The temptation is to start again, on the reasoning that the old tableau described the old problem. It described the old basis, and that basis is still a basis of the new problem — just not a feasible one. Restoring feasibility is cheaper than rebuilding, and this is the method that does it.

Definition · The dual simplex method

Given a tableau whose objective row is non-negative (optimal) but whose right-hand column has a negative entry (infeasible), one dual pivot is: choose as the leaving row r the one with the most negative right-hand entry; choose as the entering column the j minimising |zⱼ| ÷ |a_rj| over the columns with a_rj < 0; and pivot on (r, j).

The dual simplex method repeats that until no right-hand entry is negative, at which point the tableau is both feasible and optimal, or until some leaving row has no negative entry at all, at which point the problem is infeasible.

The ratio is worth reading rather than memorising. The entering column has to have a negative entry in row r, because raising that variable must raise a negative right-hand side towards zero. Among those candidates, |zⱼ| ÷ |a_rj| is the amount of objective given up per unit of infeasibility removed, so choosing the smallest is choosing the cheapest way to become legal. That is why the objective-row entries appear in the numerator: this is a cost-per-unit comparison, not an amount.

And why it is the primal simplex on the dual. A negative right-hand entry in the primal tableau is a violated dual constraint; the row with the most negative entry is the dual's entering variable under the steepest rule; and the ratio test along that row is the dual's own leaving-variable ratio test. Everything happens in the primal tableau, so no second tableau has to be built, which is the practical point.

workshop optimum, then the rule x1 + x2 ≤ 5 added as row 4 append the row and clear the basic variables out of it: R4 → R4 − R1 removes x1 R4 → R4 − R3 removes x2 x1 x2 s1 s2 s3 s4 | rhs ------------------------------------------------ 1 0 0 −1/3 1/3 0 | 2 x1 0 0 1 1/3 −1/3 0 | 2 s1 0 1 0 1/2 0 0 | 6 x2 0 0 0 −1/6 −1/3 1 | −3 s4 ------------------------------------------------ z 0 0 0 3/2 1 0 | 36 optimal z-row, and −3 in the right-hand column: exactly the state PIVOT 1 leave row 4, whose rhs −3 is the most negative ratios along row 4, over its negative entries only: s2: |3/2| ÷ |−1/6| = 9 s3: |1| ÷ |−1/3| = 3 smallest, so s3 enters z: 36 → 27 PIVOT 2 row 1 now has rhs −1, the most negative ratios along row 1: s2: |1| ÷ |−1/2| = 2 eligible, and smallest s4: entry is +1, not negative — raising s4 cannot help z: 27 → 25 STOP every right-hand entry ≥ 0. z* = 25 at (0, 5) a fresh solve of the four-row problem gives 25 as well
Example · A rule the plan already obeys

Add x1 + x2 ≤ 10 instead. After the same two row operations the new row's right-hand entry is +1 rather than −3, so there is no negative entry anywhere and the method performs zero pivots. The tableau was already feasible and already optimal.

That is the cheapest possible outcome and it is the common one. The previous lesson's substitution test predicts it without doing even this much work: the plan reads 8 against a limit of 10.

Example · A cut on the three-activity programme

The plan (2, 6, 0) earns 46 and uses 8 units in total. Add x1 + x2 + x3 ≤ 6, which it breaks by 2. After the row operations the new row reads 0, 0, −1, 0, −1, 0, 1 | −2, and the ratio test over its two negative entries gives |4| ÷ |−1| = 4 for x3 and |2| ÷ |−1| = 2 for s2.

So s2 enters, one pivot is enough, and the answer is 42 at (4, 2, 0). One pivot to re-optimise a programme that a fresh solve would have restarted from an initial basis.

The two ways it stops

It stops successfully when no right-hand entry is negative: the tableau is feasible, the objective row was never allowed to go negative, so the basis is optimal and the number is real. It stops unsuccessfully when the chosen leaving row has no negative entry at all. That row then asserts that a non-negative combination of non-negative variables equals a negative number, which nothing satisfies, and the new problem is infeasible. Adding x1 + x2 ≥ 9 to the workshop does exactly that: the region's largest total is 8, and the lab reports the rule as unsatisfiable rather than pivoting for ever.

One habit is worth building here and the lab's hint asks for it directly: before moving the slider, try to say which plan the method will land on. You will usually be wrong, and being wrong on purpose is how the ratio test along the objective row stops being a rule to apply and starts being a reason. On the workshop cut, most readers predict (2, 3) or (4, 1) — plans that obey the new rule and look like small adjustments — and the answer is (0, 5), which abandons the first product altogether.

This method is also the reason a search tree is affordable. Integer Programming re-solves every branch-and-bound child exactly this way, starting from its parent's final tableau with one bound added, which is one cut and a handful of dual pivots rather than a fresh solve per node. A tree with hundreds of nodes costs what a few dozen solves would, and this lesson is where that becomes believable rather than asserted.

Interactive

Optimal in one column, infeasible in the other

the dual ratio test tabulated at every pivot, and the objective moving the other way

Restoring feasibility without losing optimalitythe leaving row is a negative right-hand side; the entering column comes from a ratio test along it
the row that is negativethe column the ratio test pickswhere the objective has got to

Method

Running a dual simplex pivot

Append, clear, then alternate between the right-hand column and one row. Both rules are simpler than their primal counterparts.

1

Append the new row and clear the basic variables out of it

The new row arrives in terms of the original variables, and the basic variables have to be eliminated from it before it is a tableau row. One row operation per basic variable that appears in it; the lab prints each one with the variable it removed.

2

Choose the leaving row from the right-hand column

The most negative entry. Note that this is a choice about infeasibility and involves the objective not at all — which is the mirror of the primal method, where the entering column is chosen from the objective row and involves feasibility not at all.

3

Take the ratio test along that row, over its negative entries only

|zⱼ| ÷ |a_rj| for each nonbasic column with a negative entry in the row. A positive or zero entry is ineligible, because raising that variable cannot lift a negative right-hand side. The smallest ratio enters; a tie is a choice, as it is in the primal method.

4

Pivot, and check that the value moved the right way

For a maximisation it must fall. If it rises, the ratio test was taken over the wrong entries or the wrong row was chosen. Repeat until no right-hand entry is negative — or until a leaving row has no negative entry, which means the new problem is infeasible.

The two rules, and the direction of travel

Score 0 / 0

The workshop, cut at five units in total, walked back in two pivots

The starting tableau is the workshop's own final tableau with one row appended. Nothing is rebuilt, and the ratio test is written out in full at both pivots, including the entries that were not eligible.

in hand plan (2, 6) z* = 36 basis x1, s1, x2 new rule x1 + x2 ≤ 5, which the plan reads as 8: short by 3 append row 4 is x1 + x2 + s4 = 5 clear R4 → R4 − R1 (removes the basic x1) R4 → R4 − R3 (removes the basic x2) x1 x2 s1 s2 s3 s4 | rhs 1 0 0 −1/3 1/3 0 | 2 0 0 1 1/3 −1/3 0 | 2 0 1 0 1/2 0 0 | 6 0 0 0 −1/6 −1/3 1 | −3 z 0 0 0 3/2 1 0 | 36 the z-row is non-negative: still optimal the rhs has a −3: no longer feasible PIVOT 1 leave row 4, rhs = −3, the most negative ratios s2: entry −1/6 |3/2| ÷ |−1/6| = 9 s3: entry −1/3 |1| ÷ |−1/3| = 3 ← smallest enter s3, and s4 leaves the basis value 36 → 27 PIVOT 2 leave row 1, rhs = −1, the most negative ratios s2: entry −1/2 |1| ÷ |−1/2| = 2 ← smallest s4: entry +1 ineligible: a positive entry cannot lift a negative right-hand side enter s2, and x1 leaves the basis value 27 → 25 STOP every right-hand entry is ≥ 0 z* = 25 at x = (0, 5) check solve the four-row problem from scratch: 25. Same. and 25 ≤ 36, because a rule can only ever cost

The two pivots cost what two pivots cost, and the fresh solve they replace would have started from an initial basis and worked up. On a two-variable programme that difference is a curiosity. On a branch-and-bound tree with one added bound per node it is the difference between a tractable search and an impossible one.

The ineligible entry at pivot 2 is worth pausing on. s4 has a +1 in row 1, and raising s4 would make that row's right-hand side more negative rather than less. The ratio test's restriction to negative entries is that observation, and it is the half of the rule most often dropped.

For a faded rehearsal, cut the three-activity programme with x1 + x2 + x3 ≤ 6. The supplied move is that the plan reads 8 there, so the new row's right-hand entry after clearing is −2. Find the ratio test's two candidates, say which enters, predict the plan it lands on, and only then check — the prediction is the exercise.

Common mistakes

1
Starting again because the problem has changedThe old tableau described the old basis, and that basis is still a basis of the new problem — the columns did not move and the objective row is still non-negative. Only feasibility broke, and restoring it is two pivots on the workshop rather than a fresh solve. This is the misconception that makes branch-and-bound look unaffordable, and it is wrong at every node.
2
Taking the ratio test over every entry of the leaving rowOnly the negative entries are eligible, because only they move a negative right-hand side upwards. Including a positive entry produces a ratio that looks like the others and a pivot that makes the tableau worse, and the symptom is a reported value that rises instead of falling.
3
Expecting the new plan to be near the old oneThe workshop's plan (2, 6) becomes (0, 5) under the rule x1 + x2 ≤ 5: the first product is dropped entirely, and plans like (2, 3) that look like small adjustments are not optimal. Predicting the landing point before pivoting is worth doing precisely because the prediction is usually wrong, and the ratio test is the reason it is wrong.

Check your understanding

✓
Finish when you can re-optimise a cut programme from the tableau in hand without reaching for a fresh solve.

You should be able to append a row and clear the basic variables out of it, choose the leaving row from the right-hand column, take the ratio test along that row over the negative entries only, state why the value falls at every pivot, and recognise the row with no negative entry as a proof of infeasibility.

Note: Integer Programming re-solves every branch-and-bound child exactly this way, starting from its parent's final tableau with one bound appended. That is why a tree with hundreds of nodes is affordable, and this is the lesson where that stops being an assertion: two pivots to re-optimise a cut programme, against a fresh solve from an initial basis, at every node of the tree.

Kept in this browser only, for you. Nothing is sent anywhere and nothing checks it. Carry it to another device.

Feedback and recommendations

Something to change about this lesson? Write it down, tick it off when it is handled, and export the list when you want to act on it. Kept in this browser only: nothing is sent anywhere, and nobody is notified.

No recommendations yet for this lesson.