Learning Outcomes
Record a linear program and its slack form in a simplex tableau
Read the basic feasible solution, objective value, and reduced costs directly from a tableau
Carry out one simplex pivot as a sequence of elementary row operations
Recognize the optimality condition in tableau form and read off the optimal solution
Try it out visually!
Simplex Pivoter in Tableau Form: the same pivoting mechanics as this chapter, with every row operation shown.
Free Tableau Pivoter: a Gauss–Jordan sandbox; pivot on any entry and see what happens.
The dictionary method of Chapter 7 and the matrix calculations of Chapter 8 both carry out the same arithmetic; they differ only in how much of it we write down. The simplex tableau is the most compact bookkeeping of all: a single table of numbers that stores the slack form of the linear program and updates it in place at each pivot. Everything the simplex method needs (which variable to bring in, which to send out, and whether we are finished) can be read straight off the table.
We use the same linear program solved by dictionaries earlier,
so that you can compare the two presentations line for line.
First put the program in standard form by adding a nonnegative slack variable to each constraint:
We also record the objective as an equation. Moving the cost terms to the left,
so that the objective sits in the table on the same footing as the constraints. This equation is the objective row (or -row); we place it on top.
Each row of the tableau lists the coefficients of one equation, and the final column holds its right-hand side. The leftmost column names the basic variable of that row: the variable that appears with coefficient in that row and in every other row. Reading the starting tableau,
| Basis |
|
|
|
|
| RHS |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
the basis is . Setting the nonbasic variables gives the basic feasible solution read directly from the RHS column, with objective value (the RHS of the -row). The entries of the -row, and , record the reduced costs of and with the sign flipped: increasing or from zero would change at the rates and , the negatives of the stored entries.
❒ Sign convention. In the dictionary form we wrote and increased the variable with the largest positive coefficient. The tableau instead stores the row , so the very same coefficients appear negated. The two rules therefore read as mirror images and give identical decisions: in tableau form we bring in the variable with the most negative -row entry, and we stop when every -row entry is nonnegative.
A pivot has three moves, and we color them consistently throughout the book: green chooses the entering variable, orange runs the ratio test to find the leaving variable, and blue marks the pivot element where the two meet.
| Basis |
| 18!// |
|
|
| RHS | ratio |
|
|
|
|
|
|
| ||
|
|
|
|
|
|
| ||
|
|
|
|
|
|
| 15!// | |
|
| 30!// |
|
|
|
| ✏ | |
☞ Entering: (-row entry , the most negative). ✏ Leaving: (smallest ratio ). ❒ Pivot on the blue element.
The pivot itself is just Gaussian elimination on the pivot column, driving it to a unit column with the in the pivot row.
☞ Entering. The -row entries are (for ) and (for ). The most negative is , so enters: increasing improves fastest.
✏ Ratio test. Divide each constraint’s RHS by its positive entry in the column:
The smallest ratio, , occurs in the row, so leaves. The pivot element is the entry where the entering column meets the leaving row, namely .
❒ Pivot. Scale the pivot row so the pivot element becomes , then clear the column everywhere else:
The result is the second tableau, with basis :
| Basis |
|
|
|
|
| RHS | ratio |
|
|
|
|
|
|
| ||
|
|
|
|
|
|
| ✏ | |
|
|
|
|
|
|
| ||
|
|
|
|
|
|
| ||
☞ Entering: (only negative -row entry, ). ✏ Leaving: (smallest ratio ). ❒ Pivot on .
Notice the objective value has already climbed from to . One more pivot on the blue element (scale the -row by , then clear the column) produces the third tableau, with basis :
| Basis |
|
|
|
|
| RHS |
12!//
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Every entry of the -row is now nonnegative, so no variable can enter and improve the objective: the tableau is optimal. We read the solution straight from the RHS column, taking each basic variable equal to its right-hand side and each nonbasic variable equal to zero:
The result matches the dictionary solution exactly, as it must. The nonzero slack says the second constraint is slack (indeed ), while says the first and third constraints are tight at the optimum.
Algorithm: Simplex Method (Tableau Form)
☞ Choose the entering variable Scan the objective row. Pick a nonbasic variable with a negative entry; a common choice is the most negative. If no entry is negative, stop: the current tableau is optimal.
✏ Ratio test for the leaving variable For each row with a positive entry in the entering column, form the ratio . The row with the smallest ratio leaves. (If no entry is positive, the problem is unbounded.)
❒ Pivot Scale the pivot row so the pivot element becomes , then add multiples of it to every other row, including the objective row, so the rest of the entering column becomes .
✔ Repeat until optimal Repeat until every objective-row entry is nonnegative. Then read the optimal solution and objective value from the RHS column.
The tableau, the dictionary, and the matrix form are three windows onto one algorithm: the tableau is fastest to compute by hand, the dictionary makes the underlying equations explicit, and the matrix form (Chapter 8) shows why each update is a change of basis.
Every tableau so far began from the slack basis, where the slack variables supplied a ready-made identity block and a feasible starting point. A “” constraint spoils that: its surplus variable enters with a coefficient of , so it cannot serve as a basic variable, and the origin is infeasible. The tableau form handles this exactly as the dictionary form does (Chapter 7), by adding an artificial variable to each such constraint and penalizing it by a large constant in the objective (the Big-M method). The one new wrinkle is bookkeeping: because each artificial variable starts in the basis, we must first clear its column from the objective row before the simplex rules apply.
Return to the linear program
The first constraint needs a surplus variable and an artificial variable ; the other two take ordinary slacks:
Step 1 — Price the artificial variable out of the objective row. Writing the objective as would leave a nonzero entry under the basic variable . Subtracting times the -row restores a proper tableau, at the cost of introducing into the other entries:
| Basis | RHS | ratio | ||||||
| ✏ | ||||||||
☞ Entering: (its -row entry is the most negative for large ). ✏ Leaving: (smallest ratio ). ❒ Pivot on .
The very first pivot drives the artificial variable out of the basis. After pivoting on the blue element we obtain
| Basis | RHS | ||||||
The artificial variable is now nonbasic, and its objective-row entry is positive, so it will never re-enter: we may delete the column and forget it ever existed. What remains is an ordinary feasible tableau, which we drive to optimality with the plain simplex rules of the previous sections. A few pivots later every objective-row entry is nonnegative:
| Basis | RHS | |||||
Reading the optimal tableau gives , , and , with surplus on the first constraint and both later constraints tight ().
The Big-M method also announces when a problem has no feasible solution: an artificial variable that refuses to leave the basis. Consider
whose first two constraints demand that be simultaneously at least and at most . Setting it up exactly as before and pricing out the artificial variable gives the starting tableau
| Basis | RHS | ||||||
Running the simplex method to optimality of the penalized problem (two pivots suffice) leads to
| Basis | RHS | ||||||
Every objective-row entry is nonnegative, so this tableau is optimal for the Big-M problem, yet the artificial variable is still basic, at the positive value . Because a genuine solution of the original problem would let us set every artificial variable to zero, a positive artificial variable in the optimal Big-M tableau is the signal that the original linear program is infeasible. The tell-tale in the objective value says the same thing: no finite objective can escape the penalty.
Artificial variable leaves the basis | Artificial variable stays basic () |
A feasible basis for the original problem was found; delete the artificial columns and continue. | The original problem is infeasible; no feasible basis exists. |
Exercise 9.1: Reading a mid-solve tableau
The tableau below is the second tableau of this chapter’s running example, reached after one pivot:
| Basis |
|
|
|
|
| RHS |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
[§9.1, first worked tableau; §9.2]
Exercise 9.2: Reading a tableau
The following tableau arose while solving a maximization problem, with the objective row on top:
| Basis |
|
|
|
| RHS |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Identify the basic and nonbasic variables, state the corresponding basic feasible solution and its objective value, and explain how you can tell from the objective row that this tableau is optimal.
Exercise 9.3: Entering variable, ratio test, and pivot element
Consider the tableau
| Basis |
|
|
|
|
| RHS |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Determine the entering variable, carry out the ratio test showing every ratio, name the leaving variable, and circle the pivot element.
[§9.2]
Exercise 9.4: Perform one pivot
Starting from the tableau in Exercise 9.3, perform the pivot you identified and write the resulting tableau. Verify that the entering column has become a unit column and that the objective value in the -row has increased.
[§9.2]
Exercise 9.5: Solve a linear program in tableau form
Use the simplex method in tableau form to solve
Show every tableau, coloring or labelling the entering column, leaving row, and pivot element at each step. State the optimal solution and objective value. (You should reach the optimum in two pivots.)
Exercise 9.6: A full two-pivot solve
Solve the following linear program in tableau form, using the most-negative-entry rule to choose the entering variable:
Show the starting tableau and each tableau after a pivot, and state the optimal solution, the optimal objective value, and the values of the slack variables at the optimum.
Exercise 9.7: Setting up a Big-M tableau
Consider the linear program
Introduce a surplus variable and an artificial variable for the first constraint and a slack for the second, and write the objective as . Build the initial tableau with the objective row on top, and then price out the artificial variable so that its objective-row entry becomes zero. Which variable enters first, and does the artificial variable leave on the first pivot?
[§9.4]
Exercise 9.8: The -row sign convention
The dictionary form of Chapter 7 selects an entering variable with a positive objective coefficient, while the tableau selects one with a negative -row entry.
[§9.1, sign-convention panel]
Exercise 9.9: From tableau to dictionary
Write the dictionary that corresponds to the tableau in Exercise 9.2, expressing and each basic variable in terms of the nonbasic variables and . Confirm that setting the nonbasic variables to zero reproduces the same basic feasible solution.
Exercise 9.10: Recognizing an unbounded problem
While solving a maximization problem you obtain
| Basis |
|
|
|
| RHS |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Which variable should enter? Attempt the ratio test and explain why it fails. What does this tell you about the linear program?
[§9.3, ratio test step of the algorithm card]
Exercise 9.11: Reading off infeasibility
Suppose the Big-M method applied to some maximization problem terminates (every objective-row entry nonnegative) with the tableau
| Basis | RHS | |||||
Is the tableau optimal for the penalized problem? What is the value of the artificial variable , and what does it tell you about the original linear program? Explain the role of the term in the objective value.
[§9.4]
Exercise 9.12: Certifying unboundedness from a tableau
Applying the simplex method to
produces, after one pivot, the tableau
| Basis |
|
|
|
| RHS |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Solution
(Exercise 9.2) The basic variables are the row labels and ; the nonbasic variables are and . Setting the nonbasic variables to zero and reading the RHS column gives the basic feasible solution
The objective-row entries of the nonbasic variables are and , both nonnegative. In this convention a positive entry means that increasing the corresponding nonbasic variable would decrease , so no pivot can improve the objective and the tableau is optimal.
Solution
(Exercise 9.3) The most negative objective-row entry is , so enters. The ratio test divides each RHS by the positive entries of the column:
The minimum ratio occurs in the row, so leaves and the pivot element is the in the row of the column.
Solution
(Exercise 9.5) Adding slacks , the initial tableau has objective row .
First pivot: enters ( is most negative). Ratios: and , so leaves; the pivot element is the in the row. Dividing the pivot row by and clearing the column gives
| Basis |
|
|
|
| RHS |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Second pivot: enters (). Ratios: and , so leaves; the pivot element is the in the row. The resulting tableau is
| Basis |
|
|
|
| RHS |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Every objective-row entry is nonnegative, so the tableau is optimal: with .
Solution
(Exercise 9.6) Adding slacks , the starting tableau is
| Basis |
|
|
|
| RHS |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
First pivot: enters ( is most negative). Ratios: and , so leaves; the pivot element is the in the row. Scaling the pivot row by and clearing the column gives
| Basis |
|
|
|
| RHS |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Second pivot: enters (). Ratios: and , so leaves; the pivot element is the in the row. The resulting tableau is
| Basis |
|
|
|
| RHS |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Every -row entry is nonnegative, so the tableau is optimal: with and (both constraints are tight at the optimum).