Skip to main content

Section 3.3 Simplex Method for Infeasible Tableaus

Consider Problemย 2.1.2, in which coffee is shipped from warehouses to retail outlets. The problem was set up as an LOP in Problemย 2.1.8 and we can use the techniques from the Sectionย 3.2 to write this as a tableau.
First, as discussed in Subsectionย 2.2.2, we need to write this problem in standard form, which means switching two of the inequalities by negating them. Also, the objective needs to be written as a maximum. The LOP in standard maximum form is
\begin{equation} \begin{aligned}\text{Maximize} \amp \amp z = -2.5 x_1 - 3 x_2 - 4 x_3 - 2 x_4, \amp \\ \text{subject to} \amp \amp -x_2 - x_3 \amp \leq -400,\\ \amp \amp -x_1 - x_4 \amp \leq -350, \\ \amp \amp x_1 + x_2 \amp \leq 700, \\ \amp \amp x_3 + x_4 \amp \leq 500, \\ \amp \amp x_1, x_2, x_3, x_4 \amp \geq 0. \end{aligned}\tag{3.3.1} \end{equation}
And the next step is to write the LOP in tableau form,
\begin{equation} \left[\begin{array}{rrrr|rrrrr|r} 0 \amp -1 \amp -1 \amp 0 \amp 1 \amp 0 \amp 0 \amp 0 \amp 0 \amp -400\\ -1 \amp 0 \amp 0 \amp -1 \amp 0 \amp 1 \amp 0 \amp 0 \amp 0 \amp -350\\ 1 \amp 1 \amp 0 \amp 0 \amp 0 \amp 0 \amp 1 \amp 0 \amp 0 \amp 700\\ 0 \amp 0 \amp 1 \amp 1 \amp 0 \amp 0 \amp 0 \amp 1 \amp 0 \amp 500\\ \hline 5/2 \amp 3 \amp 4 \amp 2 \amp 0 \amp 0 \amp 0 \amp 0 \amp 1 \amp 0\\ \end{array} \right]\tag{3.3.2} \end{equation}
Typically, we look at the objective row to determine if a tableau is optimal and the there are no negatives in this row, so it appears it is optimal. The basic solution of (3.3.2) is
\begin{equation*} \boldsymbol{x} = \left[ \begin{array} {rrrr|rrrrr} -400 \amp -350 \amp 700 \amp 500 \amp 0 \amp 0 \amp 0 \amp 0 \end{array} \right]^{\intercal} \end{equation*}
and there are negatives in the solution, which implies that this is an infeasible basic solution. We need to perform some pivots to get a basic solution to be feasible first. This is what is called Phase I of the Simplex Method. We will use a simpler problem to develop this.

Subsection 3.3.1 Infeasible Tableaus

Letโ€™s start with a simpler LOP whoโ€™s initial basic solution is infeasible.

Problem 3.3.1.

\begin{equation*} \begin{aligned} \text{Minimize} \amp \amp w = 3y_1 + 2y_2, \amp \\ \text{Subject to}\amp \amp -2y_1 + y_2 \amp \leq 6, \\ \amp \amp 2y_1 + y_2 \amp \geq 12, \\ \amp \amp y_1 + y_2 \amp \geq 8, \\ \text{and} \amp \amp y_1, y_2 \amp \geq 0. \end{aligned} \end{equation*}
To begin with, this is not in standard form, and follow the steps in Subsectionย 2.2.2 get this into standard form:
\begin{equation*} \begin{aligned} \text{Maximize} \amp \amp z = -3y_1 - 2y_2,\amp \\ \text{Subject to}\amp \amp -2y_1 + y_2 \leq 6, \\ \amp \amp - 2y_1 - y_2 \amp \leq -12, \\ \amp \amp -y_1 - y_2 \amp \leq -8, \\ \text{and}\amp \amp y_1, y_2 \amp \geq 0. \end{aligned} \end{equation*}
Since this only has two variables, a plot of this feasible set is helpful.
Figure 3.3.2. A plot of the feasible set from Problemย 3.3.1 . The boundary lines (where the slack variables are each 0) are labelled with the slack variables. Also, all the intersection points between the slack variables are also labelled.
As with phase II, we will perform a pivot to move variables in and out of the basis. Instead of just looking at the standard algorithm, letโ€™s look at the feasible set and make some determinations.
First, the standard first step from phase II is to determine the entering variable, which could be discovered by using the objective function and determining which was the lowest indexed variable that would increase the value of the objective function.
We arenโ€™t concerned yet about the objective function. We just need to find a feasible solution. In this case, finding the leaving variable is generally a better first step. The leaving variable would bring the current vertex to along itโ€™s line. This would mean that we would select between \(y_3\text{,}\) \(y_4\) and \(y_5\) on which variable to leaveโ€”using the feasible set in Figureย 3.3.2, that means selecting one of the variables that form the boundary of the feasible set. \(F\text{.}\)
Before selecting the pivot variables, letโ€™s look at the dictionary for this problem. If we introduce slack variables then in Dictionary form in the same way as that in Sectionย 3.1, then
\begin{equation} \begin{aligned} \text{Maximize} \amp\amp z \amp = -3y_1 -2 y_2, \\ \text{subject to}\amp \amp y_3 \amp = 6 + 2y_1 - y_2, \\ \amp \amp y_4 \amp = -12 + 2y_1 + y_2, \\ \amp \amp y_5 \amp = -8 + y_1 + y_2, \\ \text{and} \amp \amp \amp y_1, y_2, y_3, y_4, y_5 \geq 0. \end{aligned}\tag{3.3.3} \end{equation}
Note that the basic solution for this dictionary is
\begin{equation*} \boldsymbol{x} = \left[\begin{array}{rr|rrr} 0 \amp 0 \amp 6 \amp -12 \amp -8 \end{array}\right]^{\intercal} \end{equation*}
And note that the two variables that do not satisfy the nonnegative condition is \(y_4\) and \(y_5\text{.}\) The goal is to select a basis that is feasible and therefore either \(y_4\) or \(y_5\) will be selected as the leaving variable and this means that upon pivoting will either go to these lines on the feasible set.
Note that a pivot will be to solve for a variable entering the basis in one of the equations. This is then used in the other solutions. The hope would be that the new dictionary or tableau is feasible. Thus, selecting the most negative number, since when a variable is solved for, that value will become positive and perhaps lead to all other basic variable being solved for.
So we identify the most negative basic value to start with. This occurs in the \(y_4\) equation in (3.3.3).
In this case, we can solve for either \(2y_1\) or \(y_2\) and in either case, the result will be a positive value for either of these. These correspond to either \(1 \mapsto 4\) or \(2 \mapsto 4\text{.}\)
Without further analysis, itโ€™s hard to say which to choose. And think if we had 10s or 100s of parameters to choose from. If we did calculations to help determine the โ€œbestโ€, it may be expensive to compute. Because of this, we will choose the entering variable to be the negative parameter with lowest index.
Not only is this simple, but as we will see, this works most of the time.

Subsection 3.3.2 Phase I of the Simplex Method

With the example above, we now present the following algorithm for getting a simplex tableau into a feasible solution.
Letโ€™s now solve Problemย 3.3.1 using Algorithmย 3.3.3. First, start with the tableau of (3.3.3).
\begin{equation*} \left[\begin{array}{rr|rrrr|r} -2 \amp 1 \amp 1 \amp 0 \amp 0 \amp 0 \amp 6\\ -2 \amp -1 \amp 0 \amp 1 \amp 0 \amp 0 \amp -12\\ -1 \amp -1 \amp 0 \amp 0 \amp 1 \amp 0 \amp -8\\ \hline 3 \amp 2 \amp 0 \amp 0 \amp 0 \amp 1 \amp 0\\ \end{array} \right] \end{equation*}
And to start phase I, we note that the largest negative in the \(\boldsymbol{b}\)-column is in the second row. This will be the leaving variable and is \(y_4\text{.}\) To select the entering variable, select the negative parameter with the smallest index in row 2. This occurs in column 1, so \(y_1\) is the entering variable. Now perform a pivot.
\begin{equation*} 1 \mapsto 4 \qquad \left[\begin{array}{rr|rrrr|r} 0 \amp 4 \amp 2 \amp -2 \amp 0 \amp 0 \amp 36\\ 2 \amp 1 \amp 0 \amp -1 \amp 0 \amp 0 \amp 12\\ 0 \amp -1 \amp 0 \amp -1 \amp 2 \amp 0 \amp -4\\ \hline 0 \amp 1 \amp 0 \amp 3 \amp 0 \amp 2 \amp -36\\ \end{array} \right] \end{equation*}
This tableau is still infeasible. Note the basic solution for \(y_5\) is \(-4\) so this is the leaving variable. To determine the entering variable, find the leftmost negative parameter in row 3. This is \(y_2\) and we pivot:
\begin{equation*} 2 \mapsto 5 \qquad \left[\begin{array}{rr|rrrr|r} 0 \amp 0 \amp 1 \amp -3 \amp 4 \amp 0 \amp 10\\ 1 \amp 0 \amp 0 \amp -1 \amp 1 \amp 0 \amp 4\\ 0 \amp 1 \amp 0 \amp 1 \amp -2 \amp 0 \amp 4\\ \hline 0 \amp 0 \amp 0 \amp 1 \amp 1 \amp 1 \amp -20\\ \end{array} \right] \end{equation*}
This tableau is feasible in that all variables are now nonnegative. Notice that in Figureย 3.3.2 this tableau corresponds to the vertex \(E\text{.}\) This completes phase I of the simplex method.
If we now look to phase II, we notice that there are no negatives in the objective row, so in fact, this is the optimal solution.
โ€‰2โ€‰
Although it is rare to finish up phase I with an optimal solution, it can happen and hereโ€™s an example.
The optimal basic solution is
\begin{equation*} \boldsymbol{x} = \left[\begin{array}{rr|rrr} 4\amp 4 \amp 10 \amp 0 \amp 0 \end{array} \right]^{\intercal} \end{equation*}
with \(z = -20\text{.}\) This corresponds to the original problem as \(w = -z = 20\text{,}\) so the function is minimized when \(x_1=4\) and \(x_2 = 4\text{.}\)

Problem 3.3.4.

Apply Phase I of the Simplex Method to the following LOP.
\begin{equation*} \begin{aligned} \text{Maximize}\amp \amp z = 12x_1 + 15x_2, \amp \\ \text{such that}\amp \amp -2x_1 + 3x_2 \amp \leq 30 \\ \amp \amp -x_1 -1x_2 \amp \leq -15 \\ \amp \amp 4x_1 - x_2 \amp \leq 10 \\ \text{and} \amp \amp x_1,\; x_2 \amp \geq 0. \end{aligned} \end{equation*}
Solution.
This problem is in standard form and we can write the tableau as
\begin{equation} \left[\begin{array}{rr|rrrr|r} -2 \amp 3 \amp 1 \amp 0 \amp 0 \amp 0 \amp 30\\ -1 \amp -1 \amp 0 \amp 1 \amp 0 \amp 0 \amp -15\\ 4 \amp -1 \amp 0 \amp 0 \amp 1 \amp 0 \amp 10\\ \hline -12 \amp -15 \amp 0 \amp 0 \amp 0 \amp 1 \amp 0\\ \end{array} \right]\tag{3.3.4} \end{equation}
We use phase I of the Simplex Method because there are negatives in the last column. This occurs in row 2 and the corresponding leaving variable is \(x_4\text{.}\) To determine the entering variable, we select the leftmost (lowest indexed) of the parameters with negative values or \(x_1\text{.}\) Thus pivot:
\begin{equation} 1 \mapsto 4, \qquad \left[\begin{array}{rr|rrrr|r} 0 \amp 5 \amp 1 \amp -2 \amp 0 \amp 0 \amp 60\\ 1 \amp 1 \amp 0 \amp -1 \amp 0 \amp 0 \amp 15\\ 0 \amp -5 \amp 0 \amp 4 \amp 1 \amp 0 \amp -50\\ \hline 0 \amp -3 \amp 0 \amp -12 \amp 0 \amp 1 \amp 180\\ \end{array} \right]\tag{3.3.5} \end{equation}
There are still negatives in the last column. This time it is in row 3 and will select its corresponding variable, \(x_5\) as the leaving variable. The leftmost negative parameter is in column 2, so \(x_2\) will be the entering variable and we perform the pivot:
\begin{equation} 2 \mapsto 5, \qquad \left[\begin{array}{rr|rrrr|r} 0 \amp 0 \amp 5 \amp 10 \amp 5 \amp 0 \amp 50\\ 5 \amp 0 \amp 0 \amp -1 \amp 1 \amp 0 \amp 25\\ 0 \amp 5 \amp 0 \amp -4 \amp -1 \amp 0 \amp 50\\ \hline 0 \amp 0 \amp 0 \amp -72 \amp -3 \amp 5 \amp 1050\\ \end{array} \right]\tag{3.3.6} \end{equation}
Now that there are no negative numbers in the last column, this tableau is now feasible, completing the first phase of the simplex method.
After completing the first phase of the simplex method, we can now use phase II. Weโ€™ll complete the solution to the problem above now

Problem 3.3.5.

Apply Phase II of the Simplex Method to the last tableau from Problemย 3.3.4
Solution.
For phase II, we first look in the objective row of the tableau and note that because there are negative numbers so the basic solution is not optimal. We start with the leftmost negative in the objective row or the fourth column, so \(x_4\) is the entering variable. Then form the \(\boldsymbol{b}\)-ratios.
\begin{equation*} \begin{bmatrix} 50/(10) \\ 25/(-1) \\ 50/(-4) \end{bmatrix} = \begin{bmatrix} 5 \\ -25 \\ -12.5 \end{bmatrix} \end{equation*}
and noting that the only positive number here is in the first row. The basic variable in the first row is \(x_3\text{,}\) so this is the leaving variable. Perform the pivot
\begin{equation} 4 \mapsto 1 \qquad \left[\begin{array}{rr|rrrr|r} 0 \amp 0 \amp 5 \amp 10 \amp 5 \amp 0 \amp 50\\ 10 \amp 0 \amp 1 \amp 0 \amp 3 \amp 0 \amp 60\\ 0 \amp 10 \amp 4 \amp 0 \amp 2 \amp 0 \amp 140\\ \hline 0 \amp 0 \amp 72 \amp 0 \amp 66 \amp 10 \amp 2820\\ \end{array} \right]\tag{3.3.7} \end{equation}
This tableau is now optimal with basic solution
\begin{equation*} \boldsymbol{x} = \frac{1}{10}\left[\begin{array}{rr|rrr} 60 \amp 140 \amp 0 \amp 50 \amp 0 \end{array}\right]^{\intercal} = \left[\begin{array}{rr|rrr} 6 \amp 14 \amp 0 \amp 5 \amp 0\end{array}\right]^{\intercal} \end{equation*}
and objective \(z = 2920/10 = 292\text{.}\) This corresponds to the point in the original variables of \(x_1 = 6, x_2 = 14\text{.}\)
Letโ€™s take a look a the feasible set for this problem and see how the simplex method walks the vertices. First, hereโ€™s a graph of the feasible set:
Figure 3.3.6. A plot of the feasible set for the LOP in Problemย 3.3.4 . The sides of the lines not in the feasible set are crossed out. The resulting feasible set is the triangle \(CEG\text{.}\)
And recall that the shaded side of the lines are the infeasible sides, meaning that the triangular region \(CEG\) is the feasible set. When the simplex method starts (either under phase I or II), the initial point is always the origin. In this particular case, the only variable that is infeasible is \(x_4\text{,}\) which is what we see in (3.3.4), in that the negative number in the left column corresponds to \(x_4\text{.}\)
The first step moved the basic variable from the origin to the point \(x_1=15, x_2=0\text{,}\) which is point \(A\text{.}\) However, note that this is still infeasible. From the plot you can see that the side to the right of \(x_5=0\) is infeasible. This can also be seen in (3.3.5) in that the negative number in the left column corresponds to the basic variable \(x_5\text{.}\)
Another pivot as seen in (3.3.6) moves the basic solution to the vertex at \(E\text{.}\) This is now a feasible solution, however, it is not optimal.
The last step as in (3.3.7) moves the basic solution to the vertex at \(G\) and it is optimal.

Subsection 3.3.3 Summary of the Simplex Method

This and the previous section lays out the steps to perform the simplex methods. Overall, here are the steps needed to do this.
  1. Write the LOP in standard form as shown in Subsectionย 2.2.2.
  2. Writing down the tableau as shown in Subsectionย 3.2.1.
  3. If the solution is infeasible, use the phase I in Algorithmย 3.3.3.
  4. If the solution is not optimal, use the phase II of the simplex method as shown in Algorithmย 3.2.2.
Even though it appears that we have all of the bases covered, there are a couple of spots in the simplex method that can go wrong. Although these are eluded to while developing this method, the following section will cover these cases.