Lecture 5: Big-M Method and Two-Phase Method: Lecturer: Lily PAN
Lecture 5: Big-M Method and Two-Phase Method: Lecturer: Lily PAN
For a linear programming problem in feasible canonical form, a starting basic solution
can be readily identified by letting B = I. And because b ≥ 0, the resulting solution is
clearly feasible since xB = B−1 b = Ib = b ≥ 0.
However, such a straightforward starting basic feasible solution is not always available.
For example, consider the following problem.
Max z = x1 + x2
subject to 2x1 + x2 ≥ 4
x1 + 2x2 = 6
x1 , x2 ≥ 0
Putting into standard form by adding the surplus variable x3 , the augmented system is:
2x1 + x2 − x3 = 4
x1 + 2x2 = 6
z − x1 − x2
= 0
Tableau 0:
x1 x2 x3 b
2 1 −1 4
1 2 0 6
z −1 −1 0 0
Here we do not have a starting identity matrix. Suppose we let x1 and x2 be our
starting basic variables, then
2 1 −1 1
B= , N= , and cB = .
1 2 0 1
5-1
Lecture 5: Big-M method and Two-phase Method 5-2
In this case
2 −1
B−1 = 1
3 ,
−1 2
2
−1 1 2 −1 −1 −
y3 = B N= 3 = 13 ,
−1 2 0 3
2
2 −1 4
xB = B−1 b = 31 = 38 .
−1 2 6 3
1 2 −1 −1 1
cTB B−1 a3
z3 − c3 = = −1 −1 =
3 −1 2 0 3
1 2 −1 4 10
z = cTB B−1 b = −1 −1
= .
3 −1 2 6 3
Tableau 1:
x1 x2 x3 b
x1 1 0 − 32 2
3
1∗ 8
x2 0 1 3 3
z 0 0 − 31 10
3
Thus x = [2/3, 8/3, 0]T is an initial BFS. We can now apply the simplex method as
discussed in section 1 to find the optimal solution. The next iteration gives:
Tableau 2:
x1 x2 x3 b
x1 1 2 0 6
x3 0 3 1 8
z 0 1 0 6
Lecture 5: Big-M method and Two-phase Method 5-3
We note that if we choose x1 and x3 as our starting basic variables, then we get Tableau
2 immediately and no iteration is required. However, if x2 and x3 are chosen as starting
basic variables, then we have
Tableau 10 :
x1 x2 x3 b
1
x1 2 1 0 3
x3 − 32 0 1 −1
z − 12 0 0 3
Hence the starting basic solution is not feasible and we cannot use the simplex method
to find our optimal solution.
Example 5.0.1 illustrates that the starting basic solution may sometimes be infeasible. The
Big-M method and the Two-phase method discussed in this and the next sections are meth-
ods that can find a starting basic feasible solution whenever it exists. Consider again an LPP
where there is no desirable starting identity matrix.
Max z = cT x
subject to Ax = b,
x ≥ 0.
where b ≥ 0. We may add suitable number of artificial variables xa1 , xa2 , · · · , xam to
it to get a starting identity matrix. The corresponding prices for the artificial variables are
−M for maximization problem, where M is sufficiently large. The effect of the constant M
is to penalize any artificial variables that will occur with positive values in the final optimal
solutions. Using the idea, the LPP becomes
Max z = cT x − M · 1T xa
subject to Ax + Im xa = b,
x ≥ 0.
Lecture 5: Big-M method and Two-phase Method 5-4
where xa = (xa1 , xa2 , · · · , xam )T and 1 is the vector of all ones. We observe that x = 0
and xa = b is a feasible starting BFS. Moreover, any solution to Ax + Im xa = b which is
also a solution to Ax = b must have xa = 0. Thus, we have to drive xa = 0 if possible.
Max z = x1 + x2
subject to 2x1 + x2 ≥ 4
x1 + 2x2 = 6
x1 , x2 ≥ 0
2x1 + x2 −x3 + x4 = 4
x1 + 2x2 + x5 = 6
z − x1 − x2
+ M x4 + M x5 = 0
Now the columns corresponding to x4 and x5 form an identity matrix. In tableau form,
we have
x1 x2 x3 x4 x5 b
x4 2 1 −1 1 0 4
x5 1 2 0 0 1 6
z −1 −1 0 M M 0
Notice that in the x0 row, the reduced cost coefficients that correspond to the basic
variables x4 and x5 are not zero. These nonzero entries are to be eliminated first before we
have our starting tableau. After eliminations of those M , we have the initial tableau:
x1 x2 x3 x4 x5 b
x4 2∗ 1 −1 1 0 4
x5 1 2 0 0 1 6
z −(1 + 3M ) −(1 + 3M ) M 0 0 −10M
We note that once an artificial variable becomes non-basic, it can be dropped from
consideration in subsequent calculations.
Lecture 5: Big-M method and Two-phase Method 5-5
x1 x2 x3 x5 b
1
x1 1 2 − 21 0 2
3∗ 1
x5 0 2 2 1 4
z 0 − 1+3M
2 − 1+M
2 0 2 − 4M
x1 x2 x3 b
x1 1 0 − 32 2
3
1∗ 8
x2 0 1 3 3
z 0 0 − 31 10
3
At this point all artificial variables are dropped from the problem, and x = [2/3, 8/3, 0]T
is an initial BFS. Notice that this is the same as Tableau 1 in Example 5.0.1. After one
iteration, we get the final optimal tableau.
x1 x2 x3 b
x1 1 2 0 6
x3 0 3 1 8
z 0 1 6 6
The M -method is sensitive to round-off error when being implemented on computers. The
two-phase method is used to circumvent this difficulty.
n
X m
X
z= ci xi − M xai ,
i=1 i=1
Lecture 5: Big-M method and Two-phase Method 5-6
m
X
z∗ = xai .
i=1
Since b ≥ 0, the initial BFS satisfies xa ≥ 0. Notice that z ∗ ≥ 0 and the possible
minimum value of z ∗ is zero. Moreover, z ∗ will be zero only if each artificial variable is
zero. If the minimum of z ∗ is zero, we have driven all artificial variables to zero. If the
minimum of z ∗ is not zero, then the artificial variables cannot be driven to zero and the
original problem has no feasible solution.
At the end of Phase I, i.e. when the optimality condition is satisfied or z ∗ = 0, we have
one of the following two possibilities:
1. z ∗ > 0, in this case, no feasible solution exists for our original problem.
2. z ∗ = 0, in this case, all artificial variables equal zero, i.e. we have found a BFS to the
original problem.
When Phase I ends in (2), we go to Phase II to find an optimal solution. In Phase II,
we assign the actual price cj to each structural variable and a price of zero to any artificial
variables which still appear in the basis at zero level. Thus the objective function to be
Xn
optimized in Phase II is the actual objective function z = ci xi .
i=1
Since x1 is free, it can be eliminated by solving for x1 in terms of the other variables
from the first equation and substituting everywhere else. This can be done nicely using our
pivot operation on the following simplex tableau:
Lecture 5: Big-M method and Two-phase Method 5-7
x1 x2 x3 x4 x5 b
−1∗ 1 2 1 2 7
−1 2 3 1 1 6
−1 1 1 2 1 4
2 −4 −7 −1 −5 0
Initial tableau
We select any non-zero element in the first column as our pivot element - this will
eliminate x1 from all other rows:
x1 x2 x3 x4 x5 b
−1∗ 1 2 1 2 7 ← (∗)
0 −1 −1 0 1 1
0 0 1 −1 1 3
0 −2 −3 1 −1 14
Equivalent Problem
Saving the first row (∗) for future reference only, we carry on only the sub-tableau with
the first row and the first column deleted. There is no obvious basic feasible solution, so we
use the two-phase method: After making b ≥ 0, we introduce artificial variables y1 ≥ 0 and
y2 ≥ 0 to give the artificial problem:
x2 x3 x4 x5 y1 y2 b
−1 −1 0 1 1 0 1
1
0 1 −1 1 0 1 3 cB =
1
0 0 0 0 −1 −1 0
Initial Tableau for Phase I
The cost coefficients of the artificial variables are +1 because we are dealing with a
minimization problem. Transforming (by adding the first two rows to the last row) the last
row to give a tableau in canonical form, we get
x2 x3 x4 x5 y1 y2 b
y1 −1 −1 0 1∗ 1 0 1
y2 0 1 −1 1 0 1 3
z −1 0 −1 2 0 0 4
First tableau for Phase I
Lecture 5: Big-M method and Two-phase Method 5-8
which is in canonical form. Recall that this is a minimization problem, entering variable
is chosen with positive entry (rather than negative) in the x0 -row. We carry out the pivot
operations with the indicated pivot elements:
x2 x3 x4 x5 y1 y2 b
x5 −1 −1 0 1 1 0 1
y2 1∗ 2 −1 0 −1 1 2
z 1 2 −1 0 −2 0 2
Second tableau for Phase I
x2 x3 x4 x5 y1 y2 b
x5 0 1 −1 1 0 1 3
x2 1 2 −1 0 −1 1 2
z 0 0 0 0 −1 −1 0
Final tableau for Phase I
At the end of Phase I, we go back to the equivalent reduced problem (i.e. discarding
the artificial variables y1 , y2 ):
x2 x3 x4 x5 b
x5 0 1 −1 1 3
1
x2 1 2 −1 0 2 cB =
2
z −2 −3 1 −1 14
Initial Tableau for Phase II
x2 x3 x4 x5 b
x5 0 1 −1 1 3
1
x2 1 2∗ −1 0 2 cB =
2
z 0 2 −2 0 21
Initial Tableau for Phase II
x2 x3 x4 x5 b
x5 − 12 0 − 12 1 2
1
x3 2 1 − 12 0 1
z −1 0 −1 0 19
Final Tableau for Phase II