where \(I \subset \{1,2,\ldots,m\}\) are the constraints which are inequalities, \(E = \{1,2,\ldots,m\}-I\) are the constraints which are equalities. \(R \subset \{1,2,\ldots, n\}\) are restricted to be nonnegative which \(F = \{1,2,\ldots, n\} - R\) are those that are free variables.
The algorithm denoted Phase 0 was developed in SectionΒ 7.1 to solve general LOPs. The following is a summary of the steps and how phase I and II need to be adapted to solve these problems.
In building the simplex tableau, for equality statements, do not add a slack variable, but add the equation in the tableau. For free variables, note the column of that variable. This is often done by writing \(F\) above the column in the tableau for the free variables.
If there are equality constraints in the tableau, pivot to bring a standard variable into the basis. Give preference to free variables and otherwise chose the lowest subscript.
Repeat these steps 3 and 4 until all free variables and all equality constraints are in the basis, if possible. If this is not possible, then there is no solution.
Recall that the goal of Phase 1 is to make a set feasible. If a free variable has a negative value for its basic variable, thatβs okay. Phase I should not take a free variable out of the basis variables.
In phase 2, recall that we are trying to pivot to increase the value of \(z\text{.}\) This typically means that if any number is negative in the objective row, that we enter that variable. After phase 0, all free variables should be in the basis and phase 1 should not remove them, so only restricted variables can have a negative number in the objective row.
Next, we typically chose the pivot row based on not making the tableau infeasible. However, recall that since free variables can take on any value, we pivot to increase \(z\) the most and should never remove a free variable from the basis.
Note that there are no nonnegative constraints so both \(x_1\) and \(x_2\) are free. The first inequality is not in standard form, so we multiply through by \(-1\) first. Also, this is a minimum problem, so we write the maximum version as \(w = -2x_1-4x_2\text{.}\) The simplex tableau can be written as
Since both \(x_1\) and \(x_2\) are free, we will pivot to bring them into the basis. Thereβs not a clear choice for what leaves the basis, so we will select \(x_3\) and \(x_4\) to leave.
Note that all of the variables are feasible, so there is no need to perform any Phase I steps. Next we move to Phase II and we perform the matrix pivot on row 3, column 3:
and then typically the smallest nonnegative ratio is selected. This ensures that the solution stays feasible. This is a bit different with free variables, because they can take on negative numbers. However since \(x_3\) is entering the basis and it is restricted to be nonnegative, we still select the 3rd variable above, and \(x_5\) will leave the basis.
and if we do the standard smallest nonnegative ratio, we would choose the 2nd one. However, that would remove \(x_2\) from the basis, so we donβt select that or the first one, which would remove \(x_1\text{.}\) The only result is \(x_3\text{.}\) Therefore, we perform
The next exercise finds the feasible set for this problem as determines the individual basic variables. Again, this gives a feeling for how the simplex method works.
The second step brings \(x_2\) into the basis and \(x_4\) leaves. This goes to the vertex near \((5,5)\text{.}\) After this, both free variables are in the basis.
The last step is again phase II and moves to the vertex at \((12,12)\text{.}\) Since both \(x_1\) and \(x_2\) are free then they can both take on negative values. Also note that since the original problem is a minimum problem and both coefficients of the objective are positive, the vertex in the lower left corner would be a minimum.
At this point the two free variables are in the basis, so we can move to Phase I. However, all of the variables are feasible (and would be anyway since they are free variables), so we do not need to perform any Phase I steps.
If we move to Phase II, it appears that the solution is optimal because there are no negative numbers in the objective row. However, examining the 2nd row, the corresponding equation to this is \(0 = 80\text{,}\) which is not possible. This is because there is no solution to this problem.
The solution needs to be within the gray area (feasible side of the inequality constraint) as well as on all three lines. Since the three lines do not intersect at one point, there is no solution to this.