You are on page 1of 35

LINEAR PROGRAMMING

By
Kasifa Namyalo

December 2020
0.1 Simplex Method Chapter 3
The notion of an extreme point is a geometric notion, and an algebraic char-
acterization of extreme points is needed before they can be utilized from
a computational point of view. In this section we introduce basic feasible
solutions and show that they correspond to extreme points. This character-
ization will enable us to algebraically describe the simplex method.

0.1.1 Definitions
Consider the system Ax = b and x ≥ 0,where A is an m × n matrix and b
is an m vector.
Suppose that rank (A, b) = rank (A) = m. After possibly rearranging the
columns of A, let A = (B,N) where B is an m × m invertible matrix and N
is an m × (n − m) matrix. The solution x = (xB , xN ) to the equation Ax=b,
where
XB = B −1 b
and
XN = 0
is called a basic solution of the system. If XB ≥ 0, then x is called a basic
feasible solution of the system. Here B is called the basic matrix (or simply
the basis) and N is called the nonbasic matrix. The components of XB are
called basic variables (or dependent variables) and the components of XN
are called nonbasic variables (or independent variables). If XB > 0, then X
is called a degenerate basic feasible solution.

0.1.2 Example (Basic Feasible Solutions)


1
Consider the polyhedral set defined by the following inequalities:
x1 + x2 ≤ 6
x2 ≤ 3
x1 , x2 ≥ 0
By introducing the slack variables x3 and x4 , the problem is put in the
following standard format:
x1 + x2 + x3 = 6
1
Kasifa Namyalo

1
x2 + +x4 = 3
x1 , x2 , x3 , x4 ≥ 0
 
1 1 1 0
Note that the constraint matrix A = (a1 , a2 , a3 , a4 ) = . From
0 1 0 1
the foregoing definition, basic feasible solutions correspond to finding a 2 ×
2 basis B with nonnegative B −1 b. The following are the possible ways of
extracting B out of A.

1.  
1 1
B = (a1 , a2 ) =
0 1
 
x1
XB = = B −1 b
x2
    
1 −1 6 3
= =
0 1 3 3
   
x3 0
XN = =
x4 0

2.  
1 0
B = (a1 , a4 ) =
0 1
 
x1
XB = = B −1 b
x4
    
1 0 6 6
= =
0 1 3 3
   
x2 0
XN = =
x3 0

3.  
1 1
B = (a2 , a3 ) =
1 0
 
x2
XB = = B −1 b
x3
    
0 1 6 3
= =
1 −1 3 3
   
x1 0
XN = =
x4 0

2
4.  
1 0
B = (a2 , a4 ) =
1 1
 
x2
XB = = B −1 b
x4
    
1 0 6 6
= =
−1 1 3 −3
   
x1 0
XN = =
x3 0

5.  
1 0
B = (a3 , a4 ) =
0 1
 
x3
XB = = B −1 b
x4
    
1 0 6 6
= =
0 1 3 3
   
x1 0
XN = =
x2 0

Note that the points corresponding to 1,2,3 and 5 are basic feasible solu-
tions. The point obtained in 4 is a basic solution, but is not feasible because
it violates the nonnegativity restrictions. In other words, we have four basic
feasible solutions namely

x1 = (3, 3, 0, 0), x2 = (6, 0, 0, 3), x3 = (0, 3, 3, 0), x4 = (0, 0, 6, 3),


2

These points belong to E 4 since after introducing the slack variables we


have four variables. These basic feasible solutions, projected in E 2 , that is,
in the (x1 , x2 ) space give rise to the four points:

x1 = (3, 3), x2 = (6, 0), x3 = (0, 3), x4 = (0, 0)

These four points are illustrated in Figure 3.1. Note that these points are
precisely the extreme points of the feasible region.
..................................................................................................................................................
..................................................................................................................................................
2
Kasifa Namyalo

3
..................................................................................................................................................
.................................................................................................................................................
..................................................................................................................................................
..................................................................................................................................................
..................................................................................................................................................
..................................................................................................................................................
...................................................................................................................................................

0.1.3 Example (Degenerate Basic Feasible Solutions)


3
Consider the following systems of inequalities.

x1 + x2 ≤ 6

x2 ≤ 3
x1 +2 ≤ 9
x1 , x2 ≥ 0
When these inequalities are represented on a graph, we obtain Figure 3.2.
Note that the restraint is redundant. After adding a slack variables x3 , X4 andx5
we get
+x2 + x3 = 6
+x2 + x4 = 3
+2x2 + x5 = 9
+x2 , x3 , x4 , x5 ≥ 0
 
1 1 1 0 0
A = (a1 , a2 , a3 , a4 , a5 ) = 0 1 0 1 0
1 2 0 0 1
Consider the basic feasible solution with B = (a1 , a2 , a3 )
 
1 1 1
B = (a1 , a2 , a3 ) = 0 1 0
1 2 0
 
x1
XB = x2  = B −1 b

x3
3
Kasifa Namyalo

4
    
0 −2 1 6 3
= 0 1
 0   3 = 3
 
1 1 −1 9 0
   
x4 0
XN = =
x5 0
This basic feasible solution is is degenerate since the variable x3 = 0. Now
basic feasible solution with B = (a1 , a2 , a4 )
 
1 1 0
B = (a1 , a2 , a4 ) = 0 1 1
1 2 0
 
x1
XB = x2  = B −1 b

x4
    
1 −1 0 6 3
=  0 1 0   3  = 3

−1 −1 1 9 0
   
x3 0
XN = =
x5 0
This basic feasible solution gives rise to the same basic feasible solution ob-
tained in a1 , a2 , a3 The basic feasible solution for B = a1 , a2 , a5 is given as,
 
1 1 0
B = (a1 , a2 , a5 ) = 0 1 0
1 2 1
 
x1
XB = x2  = B −1 b

x5
    
2 0 −1 6 3
= −1 0 1
   3 = 3
 
1 1 −1 9 0
   
x3 0
XN = =
x4 0
Note that all three of the bases considered represent the single extreme point
or basic feasible solution (x1 , x2 , x3 , x4 , x5 ) = (3, 3, 0, 0, 0). This basic feasible
solution is degenerate since each associated basis involves a basic variable at
level zero.

5
0.1.4 Key to the Simplex Method
4
The key to the simplex method lies in recognizing the optimality of a
given extreme point solution based on local considerations without having to
(globally) enumerate all extreme points or basic feasible solutions. Consider
the following linear programming problem, Minimize cx Subject to Ax = b
and x ≥ 0 where A is an m × n matrix with rank m. Suppose that we have
a basic feasible solution (B 1 b, 0) whose objective value z0 is given by:
 −1 
B b
z0 = (cB , cN ) = (cB B−1 b)
0

Now let xB and xN denote the set of basic and nonbasic variables for the
given basic. Then feasibility requires that xB ≥ 0, xN ≥ 0, and that b =
Ax = BxB + N xN . Multiplying the last equation by B −1 and rearranging
the terms, we get

xB = B −1 b − B −1 N xN
X
= B −1 b − B −1 aj xj
j∈R
X
= b− − (yj )x − j,
j∈R
say,
where R is the current set of the indices of the nonbasic variables. Noting
Equations (3.2) and (3.1) and letting z denote the objective function value,
we get
z = cx
= cB x B + cN x N
X X
= cB (B −1 b − B −1 aj xj ) + cj x j
P
j R
X
= z0 − (zj − cj )xj
j∈R

where zj = cB B −1 aj for each nonbasic variable. Using the foregoing


transformations, the linear programming problem LI may be written as: Min-
imize X
z = z0 − (zj − cj )xj
j∈R

4
Kasifa Namyalo

6
subject to X
(yj )xj + xB = b−
j∈R

xj ≥ 0, j ∈ R, and xB ≥ 0
Without loss of generality, let us assume that no row in equation (3.4) has
all zeros in the columns of the nonbasic variables xj , j ∈ R. Otherwise the
basic variable in such a row is known in value, and this row can be deleted
from the problem. Now observe that the variables xB simply play the role
of slack variables in Equation (3.4). Hence we can equivalently write LI in
the nonbasic variable space, that is, in terms of the nonbasic variables as
follows.5 Minimize X
z = z0 − j ∈ R(zj − cj )xj
subject to X
j ∈ R(yj )xj ≤ b−
xj ≥ 0, j ∈ R
Note that the number of nonbasic variables is p = (n − m) and so we have
represented LI in some p-dimensional space. This is to be expected since
there are p indepedent variables or p degrees of freedom in our constraint
system. The value (cj −zj are sometimes refered to as reduced cost coefficients
since they are the coeffecients of the (nonbasic) variables in this reduced
space. The representation (3.4) in which the objective function z and the
basic variables xB have been solved for in terms of the nonbasic variables is
referred to as a representation of the basic solution in canonical form. The
key result now simply says the following: If (zJ − cj ) ≤ 0for all j ∈ R),
then the current basic feasible solution is optimal. x This should be clear by
noting that since zj − cj ≤ 0 for all j ∈ R, we have z ≥ 0z0 for any feasible
solution, and for the current (basic) feasible solution, we know that z = z0
since xj = 0 for all j ∈ R

0.1.5 Algebra of the Simple Method


6
We will now translate the geometric process described in the foregoing
section into algebra. Towards this end, consider the representation of the
linear program LI in the nonbasic variable space, written inequality form
as in Equation (3.4). If (zj − cj ) ≤ 0 for all j ∈ R, then xj = 0, j ∈ R
and (xB = b− is optimal for LI. Otherwise while holding (p − 1) nonbasic
variables fixed at zero, the simplex method considers increasing the remaining
5
Kasifa Namyalo
6
Kasifa Namyalo

7
variable,say, xk . Naturally we would like zk − ck to be positive and perhaps
the most positive of all zj − cj , j ∈ R. Now fixing xj = 0 for j ∈ R − k, we
obtain from Equation (3.4) that
z = z0 − (zk − c − k)xk
 
xB 1
 xB 2 
 
 ...xBr 
...xBm
=
If yik ≤ 0, then xB increases as x − k increases as xk increases and so
xB , continues to be nonnegative. If yik > 0, then xBi , will decrease as xk
increases. In order to satisfy nonnegativity, xk is increased until the first
point at which a basic variable xB , drops to zero. Examining equation (3.7),
it is then clear that the first basic variable dropping to zero corresponds to
b−
the minimum of yik i
for positive yik . More precisely, we can increase xk until
br br
xk = ≡ minimum{ : yik > 0}
yrk yrk
1≤i≤m
In the absence of degeneracy, b− −
r > 0, and hence xk = br /yrk > 0. From
Equation (3.6) and the fact that zk − ck > 0, it then follows that z < z0 and

the objective function strictly improves. As xk increase from level 0 to ybrk
r
,a
new feasible solution is obtained. Substituting xk = br /yrk in equation (3.7)
gives the following point:
yik −
x B − b−
i −
b i1, 2, ..., m
yrk r
br
xk =
yrk
All the other x0j s are zero. From equation (3.9), xBr = 0 and hence atmost m
variables are positive. The corresponding columns in A are aB1 , aB2 , ..., aBr−1 ,ak , aBr+1 , ..., aBm .
Note that these columns are linearly independent since yrk 6= 0. Therefore
the point given by Equation (3.9) is a basic feasible solution.

0.1.6 Example
7
Minimize
x1 + x 2
7
Kasifa Namyalo

8
x1 + 2x2 ≤ 4
x2 ≤ 1
and
x1 , x2 , ≥ 0
Introduce the slack variables x3 and x4 to put the problem in standard
form.This leads the following constraint matrix A, that is,
 
1 2 1 0
A = (a1 , a2 , a3 , a4 ) =
0 1 0 1

Consider the basic feasible solution corresponding to B = (a1 , a2 ). In


other words, x1 and x2 are the basic variables while x3 and x4 are the nonbasic
variables. The representation of the problem in this nonbasic variable space
as in equation (3.4) with R = (3, 4) may be obtained as follows:
 
1 2
B=
0 1
 
−1 1 −2
B −
0 1
 
−1 1 2
cB B = (11) = (1 − 1)
0 1
    
−1 1 −2 1 1
y 3 = B a3 = =
0 1 0 0
    
1 −2 0 −2
y4 = B −1 a4 = =
0 1 1 1
    
1 −2 0 −2
b− = B −1 b = =
0 1 1 1
 
4
z0 = cB B −1 b = (11 − 1) =3
1
 
−1 1
z3 − c3 = cB B a3 − c3 = (1 − 1) −0=1
0
 
−1 0
z4 − c4 = cB B a4 − c4 = (1 − 1) − 0 = −1
1
Hence the required representation of the problem is Minimize

1 − x4 + x1

9
Subject to
x3 − 2x4 + x1 = 2
x4 + x2 = 1
and
x1 , x2 , x3 , x4 ≥ 0
The feasible region of this problem is shown is figure (3.4) in both the original
(x1 , x2 ) space as well as in the current (x3 , x4 ) space. Since z3 − c3 > 0, then
the objective improves by increasing x3 . The modified solution is given by:

xB = B −1 b − B −1 a3 x3
     
x1 2 1
= − x
x2 1 0 3
The maximum value of x3 is 2 (any larger value of x3 will force x1 to be
negative.) Therefore the new basic feasible solution is

(x1 , x2 , x3 , x4 ) = (0, 1, 2, 0)

Here x3 enters the basis and x1 leaves the basis. Note that the new point
has an objective value equal to 1, which is an improvement over the previous
objective value of 3. The improvement is precisely (z3 − c3 )x3 = 2 Now,
consider the basic feasible solution corresponding to B = (a3 , a2 ). In other
words, x3 and x2 are the basic variables while x1 and x4 are the nonbasic
variables. The representation of the problem in this nonbasic space as in
Equation (3.4) with R = (1, 4) may be obtained as follows:
 
1 2
B=
0 1
 
−1 1 −2
B =
0 1
 
−1 1 −2
cB B = (01) = (01)
0 1
    
−1 1 −2 1 1
y 1 = B a1 = =
0 1 0 0
    
1 −2 0 −2
y4 = B −1 a4 = =
0 1 1 1
    
1 −2 4 2
b− = B −1 b = =
0 1 1 1

10
 
−1 4
z0 = cB B b = (01) =1
1
 
−1 1
z1 − c1 = cB B a1 − c1 = (01) − 1 = −1
0
 
−1 −2
z4 − c4 = cB B a4 − c4 = (01) − 0 = −1
1
The modified solution is given by:

xB = B −1 b − B −1 a3 x3
     
x3 2 −2
= − x4
x2 1 1
and the new basic feasible solution is

(x1 , x2 , x3 , x4 ) = (0, 0, 4, 1)

0.1.7 Leaving the Basis and the Blocking Variable


8
Suppose that we decide to increase a nonbasic variable xk with a positive
zk − ck . From equation (3.6), the larger the value of xk , the smaller is the
objective z. As xk is increased, the basic variables are modified according
to equation (3.7). If the vector yk has any positive component(s), then the
corresponding basic variable(s) is decreased as xk is increased. Therefore
the nonbasic variable xk cannot be indefinitely increased, because otherwise
the nonnegativity of the basic variables will be violated. Recall that first
basic variable xBr that drops to zero is called the blocking variable because
it blocks further increase of xk . This xk enters the basis and xBr leaves the
basis.

0.1.8 Example
9
Maximize
z = 2x1 − x2
subject to
−x1 + x2 ≤ 2
2x1 + x2 ≤ 6
8
Kasifa Namyalo
9
Kasifa Namyalo

11
and
x1 , x2 , ≥ 0
Introduce the slack variables x3 and x4 . This leads to the following con-
straints;
−x1 + x2 + x3 = 2
2x1 + x2 + +x4 = 6
x1 , x2 , x3 , x4 ≥ 0
Note that the constraint matrix is:
 
−1 1 1 0
A = (a1 , a2 , a3 , a4 ) =
2 1 0 1
From the foregoing definition, basic feasible solutions correspond to finding
a 2 × 2 basis B with nonnegative B −1 b. Consider the basic feasible solution
with basis:  
−1 1
= (a1 , a2 ) =
2 1
Then  
−1 −1/3 1/3
B =
2/3 1/3
xB = B −1 b − B −1 NxN
   
xB1 xB1
=
xB2 xB2
      
−1/3 1/3 2 −1/3 1/3 1 0 x3
= −
2/3 1/3 6 2/3 1/3 0 1 x4
     
4/3 −1/3 1/1
= − x3 − x
10/3 2/3 1/3 4
Currently x3 = x4 = 0, x1 = 4/3andx2 = 10/3. Note that


 
−1 −1/3 1/3 0 1
z4 − c4 − cB B a4 − c4 − (2 − 1) −0− >0
2/3 1/3 1 3

Hence the objective improves by holding x3 nonbasic and introducing x4 in


the basis.Then x3 is kept at zero level, x4 can be increased to 4, at which
instant x1 , and so x1 is the blocking variable. With x4 = 4 and x3 = 0,
the modified values of x1 and x2 are 0 and 2 respectively.The new basic
feasible solution is (x1 , x2 , x3 , x4 = (0, 2, 0, 4). Note that a4 replaces a1 ; that

12
is x1 drops from the basis and x4 enters the basis.The new set of basic and
nonbasic variables and their values are given as:
     
xB1 x4 4
xB = = =
xB2 x2 2
   
x3 0
xN = −
x1 0

0.1.9 Optimality and Unboundedness


Termination with an Optimal Solution
10
Consider the following problem, where A is an m × n matrix with rank m.
Minimize
cx
subject to
Ax = b
and
=0
 −1 
0 ∗ B b
Suppose that x is a basic feasible solution with basis B;that is, x =
0
Let z ∗ denote the objective of x∗ , that is, z ∗ = cB B −1 b. Suppose further
that zj − cj ≤ 0 for all nonbasic variables, and hence there are no nonbasic
variables that are eligible to enter the basis. Let x be any feasible solution
with objective value z. Then from equation (3.3) we have
X
z∗ − z = (zj − cj )xj
j∈R

Since zj − cj ≤ 0 and xj ≥ 0 for all variables, then z ∗ ≤ 0z, and so as


in equation (3.6), x∗ is an optimal basic feasible solution. If Zj − cj < 0
for all nonbasic components, then the current optimal solution is unique.
Now consider the case where zj − cj ≤ 0 for all nonbasic components, but
zk − ck = 0 for atleast one nonbasic variable xk . As xk is increased, we get
(in the presence of degeneracy) points that are distinct from x∗ but have the
sane objective value. If xk is increased until it is blocked generates an infinite
number of alternative optimal solutions.
10
Kasifa Namyalo

13
0.1.10 Unboundedness
11

Suppose that we have a basic feasible solution of the system Ax = b, x ≥


0 with objective value z0 . Now let us consider the case when we find a
corresponding nonbasic nonbasic variable xk with zk − ck > 0 and yk ≤ 0.
This variable is eligible to enter to enter the basis since increasing it will
improve the objective function. From equation (3.3) we have

z = z0 − (zk − ck )xk

Since we are minimizing the objective z and since zk − ck > 0 then it is to


our benefit to increase xk indefinitely, which will make z go to −∞. Recall
that from eqn (3.7) we have

xB − B − 1b − yk xk

and so if yk ≤ 0 then xk can be increased indefinitely without any of the


basic variables becoming negative. Therefore the solution x (where xB =
B −1 b − yk xk is arbitrarily large and other nonbasic components are zero) is
feasible and its objective value z = z0 − (zk − ck )xk , which approaches −∞
as xk approaches +∞.

0.1.11 Example (Optimal Solution)


Minimize
z = −3x1 + x2
Subject to
x1 + 2x2 + x3 = 4
−x1 + x2 +, ..., +x4 = 1
and
x1 , x2 , x3 , x4 ≥ 0
 
1 0
Consider the basic feasible solution with basis B(a1 , a4 ) and
  −1 1
1 0
B −1 The corresponding point is given by:
1 1
 
x1
xB = = B −1
x4
11
Kasifa Namyalo

14
    
1 0 4 4
= =
1 1 1 5
   
x2 0
xN = =
x3 0
and the objective value is z = −12. To see if we can improve the solution,
calculate z2 − c2 and z3 − c3 as follows, noting that cB B −1 = (−3, 0) where
cB = (−3, 0).
 
−1 2
z2 − c2 = cB B a2 − c2 = (−3, 0) (1, 7)
1
 
−1 1
z3 − c3 = cB B a3 − c3 = (−3, 0) − 0 = −3
0
.....................................................................................................................................
.....................................................................................................................................
.....................................................................................................................................
.....................................................................................................................................
Figure (3.3) termination criterion: (a) Unique optimal. (b)Alternative op-
tima.12 Since both z2 −c2 < 0 and z3 −c3 < 0, then the basic feasible solution
(x1 , x2 , x3 , x4 = (4, 0, 0, 5) is the unique optimal point. This unique optimal
solution is illustrated in figure 3.9a. Now consider a new problem where
the objective function −2x1 , −4x2 is to be minimized over the same region.
Again, consider the same point (4,0,0,5). The objective value is −8, over the
same region. Again, consider the same point (4, 0, 0, 5). The objective value
is -8, and the new cB = (−2, 0), cB B −1 = (−2, 0). Calculate z2 − c2 and
z3 − c3 as follows:
 
−1 2
z2 − c2 = cB B a2 − c2 = (−2, 0) +4=0
1
 
−1 1
z3 − c3 = cB B a3 − c3 = (−2, 0) − 0 = −2
0
In this case, the given basic feasible solution is optimal, but it is no longer
a unique optimal solution. We see that by increasing x2 , a family of optimal
solutions is obtained. Actually, if we increase x2 , keep x3 = 0, and modify
x1 and x4 , we get the solution13
 
x1
= B −1 b − B −1 a2 x2
x4
12
Kasifa Namyalo
13
Kasifa Namyalo

15
   
4 2
= − x
5 3 2
For any x2 ≤ 5/3, this is an optimal solution with objective 8. In particu-
lar, if x2 ≤ 5/3, we get an alternative basic feasible optimal solution, where
x4 drops from the basis.This is illustrated in figure 3.3b. Note that the new
objective function contours are parallel to the hyperplane x1 + 2x2 = 4 cor-
responding to the first constraint.That is why we obtain alternative optimal
solutions in this example. In general whenever the optimal objective function
contour contains a face of dimension greater than 0, we will have alternative
optimal solutions.

Minimize
z = x1 3x2
subject to
x1 − 2x2 ≤ 4
−x1 + x2 ≤ 3
and
x1 , x2 , ≥ 0
After introducing the slack variables x3 and x4 , we get the constraint
matrix.  
1 −2 1 0
A = (a1 , a2 , a3 , a4 ) =
−1 1 0 1
Consider the basic feasible solution with basis
 
1 0
B = (a3 , a4 )
0 1

Then
 
−1 1 0
B =
0 1
 
x3
xB = = B −1 b
x4
   
x1 0
xN = =
x2 0

The objective value is z = 0. To see if we can improve the solution, calculate

16
z1 − c1 and z2 − c2 as follows, noting that cB B −1 = (0, 0), where cB = (0, 0)
then,14
z1 − c1 = cB B −1 a1 − c1 = 1
z2 − c2 = cB B −1 a2 − c2 = 3
So we increase x2 with the most positive zj − cj . Note that xB = B −1 b −
B −1 a2 x2 , and hence      
x3 4 −2
= − x2
x4 3 1
The maximum value of x2 is 3, at which instant x4 drops to zero. Therefore
the new basic feasible
 solution
 is (x1 , x2
, x3 , x4) = (0, 3, 10, 0). The new basis
1 −2 1 2
B is (a3 , a2 ) = with inverse . Since cB = (0, −3), we get
0 1 0 1
cB B −1 = (0, −3) and we calculate z1 − c1 and z4 − c4 as follows:
 
−1 1
z1 − c1 = cB B a1 = (0 − 3) +1=4
−1
 
−1 0
z4 − c4 = cB B a4 − c4 = (0 − 3) − 0 = −3
1
   
−1 −1 0
Note that z1 −c1 > 0 and y1 −B a1 = < . Therefore the optimal
−1 0
solution value is unbounded. In this case, if x1 is increased and x4 is kept
zero, we get the following solution:

xB = B −1 b − B −1 a1 x1
       
x3 10 −1 10 + x1
= − x =
x2 3 −1 1 3 + x1
Note that this solution is feasible for all x1 ≥ 0. In particular,

x1 2x2 + x3 x1 − 2(3 + x1 ) + (10 + x1 ) = 4

and
−x1 + x2 + x4 = −x1 + (3 + x1 )
Note that this solution is feasible for all x1 ≥ 0. In particular,

x1 2x2 + x3 x1 − 2(3 + x1 ) + (10 + x1 ) = 4


14
Kasifa Namyalo

17
and
−x1 + x2 + x4 = −x1 + (3 + x1 ) + 0 − 3
Furthermore, z = −9 − 4x1 , which approaches ∞ as x1 approaches ∞.
Therefore the optimal solution value is unbounded by moving along the ray
(0, 3, 10, 0) + x1 (1, 1, 1, 0) : x1 ≥ 0 Again note that the necessary and suffi-
cient condition for unboundedness holds, namely
 
1
1
cd = (−1, −3, 0, 0) 
1 = −4 < 0

0.1.12 The Simplex Algorithm


15
In this section we will give the simplex method algorithm based on the
minimization problem. At the end of the steps a note will be given on how
to modify the algorithm for the maximization problem. The initialization
step requires that you choose a starting basic feasible solution with basis
B.The rest of the steps are here explained. 1. Solve the system BxB − b (with
unique solution xB = B −1 b = b). Let xB = b, xN = 0, andz = cB xB 2. Solve
the system wB = cB (with unique solution w = cB B −1 ). (The vector w is
referred to as the vector of simplex multipliers because its components are
multipliers of the rows of A that are added to the objective function in order
to bring it into canonical form.) Calculate zj − cj = waj − cj for all nonbasic
variable. (This is known as the pricing operation.) Let

zx − ck = M aximumzj − cj

for all j ∈ R where R is the current set of indices associated with the
nonbasic variables. If zk − ck ≤ 0, then stop with the current basic feasible
solution as an optimal solution. Otherwise go to step 3 with xk as the
entering variable. (This strategy for selecting an entering variable is known
as Dantzing’s Rule.)
3. Solve the system Byk ak (with unique solution yk B −1 ak ). If yk ≤ 0,
then stop with the conclusion that the optimal solution is unbounded along
the ray     
b −yk
+ xk : xk ≥ 0
0 ek
where ek is an n-m vector of zeros except for a 1 at the kth position. If
yk  0, go to step 4.
15
Kasifa Namyalo

18
4. Let xk enter the basis. The index r of the blocking variable xBr which
leaves the basis is determined by the following minimum ratio test:
br bi
− minimum : yik > 0
yrk yik
1≤i≤m
Update the basis B where ak replaces aBr , update the index set R, and repeat
step 1.
A maximization problem can be transformed into a minimization problem
by multiplying the objective coeffecient by -1. A minimization problem can
also be handled directly as follows. Let zk − ck instead be the minimum
zj − cj for j nonbasic; the stopping criterion is that zk − ck ≥ 0. Otherwise,
the steps are as previously.

0.1.13 Example
16
Minimize
z = −x1 − 3x2
subject to
2x1 + 3x2 ≤ 6
−x1 + x2 ≤ 1
and
x1 , x − 2, ≥ 0
Introduce the slack variables x3 and x4 . This leads to the following con-
straints:
2x1 + 3x2 + x3 = 6
−x1 + x2 + +x4 = 1
x1 , x2 , x3 , x4 ≥ 0

0.1.14 Iteration

  
1 0 2 3
1 Let B = (a3 , a4 ) = andN = (a1 , a2 ) = . Solving the
0 1 −1 1
system BxB = b leads to xB1 = x3 = 6 and xB2 = x4 =1. The nonbasic
6
variables are x1 and x2 and the objective z = cB xB = (00) = 0. In order
1
16
Kasifa Namyalo

19
to determine which variables enters the basis, calculate zj −cj = cB B −1 aj −cj .
First we find w by solving the system wB = cB :
 
1 0
(w1 , w2 ) = (0, 0)
0 1

w1 = w2 − 0
z1 − c1 = wa1 − c1 = 1
z2 − c2 = wa2 − c2 = 3
Therefore x2 is increased. In order to determine x2 we need to calculate
y2 by solving the system By2 = a2 :
    
1 0 y12 3
=
0 1 y22 1

y12 = 3
and
y22 = 1
The variable xBr leaving the basis is determined by the following minimum
ratio test:
b1 b2 6 1
minimum{ , } = minimum{ , } = 1
y12 y22 3 1
Therefore the index r = 2; that is, xB2 = x4 leaves the basis. This is also
obvious by noting that
       
xB1 x3 6 1
= = = x
xB2 x4 1 3 3

and x4 first drops to zero when x2 = 1

0.1.15 Iteration 2
17
The variable x2 enters the basis and x4 leaves the basis:
 
1 3
B = (a3 , a2 ) =
0 1
 
2 0
N = (a1 , a4 ) =
−1 1
17
Kasifa Namyalo

20
Now xB can be determined by solving BxB = b 0r simply by noting that
x2 = 1 in Equation (3.12).
         
xB1 x3 3 x1 0
= = − =
xB2 x2 1 x4 0

The objective value is z = −3. Calculate w by wB = cB


 
1 3
(w1 , w2 ) − (0, −3)
0 1

implies w1 = 0 and w2 = −3

z1 − c1 = wa1 − c1
 
2
= (0, −3) +1=4
−1
The variable x4 left the basis in the previous iteration and cannot enter the
basis in this iteration since z4 − c4 < 0. Therefore x1 is increased. Solve the
system By1 = a1 , that is,
    
1 3 y11 2
=
0 1 y21 −1

which implies that y11 = 5 and y21 = −1. so y21 < 0, then xB1 = x3 leaves
the basis as x1 is increased. This is also clear by noting that
       
xB1 x3 3 5
= = − x
xB2 x2 1 −1 1

and x3 drops to zero when x1 = 3/5

0.1.16 Iteration 3
18
Here x1 enters the basis and x3 leaves the basis. Thus,
 
2 3
B = (a1 , a2 ) =
−1 1
 
1 0
N = (a3 , a4 ) =
0 1
18
Kasifa Namyalo

21
    
xB1 x1 3/5
= =
xB2 x2 8/5
   
x3 0
xN = =
x4 0
The objective value z = −27/5. Calculate w by wB = cB .
 
2 3
(w1 , w2 ) = (−1, −3)
−1 1

This implies that w1 = −4/5 and w2 = −3/5. The variable x3 left the basis
in the last iteration and cannot enter the basis in this iteration (because
z3 − c3 < 0).
z4 − c4 = wa4 − c4
 
0
= (−4/5, −3/5) − 0 = −3/5
1
Therefore zj − cj = 0 for all the nonbasic variables, and the current point is
optimal.The optimal solution is therefore:

(x1 , x2 , x3 , x4 ) − (3/5, 8/5, 0, 0)

0.1.17 The Simplex Method in Tableau Format


At each iteration the following linear systems of equations need be solved:
BxB = b, wB = cB , and Byk = ak . Various procedures for solving and
updating these systems will lead to different algorithms that all lie under
the general framework of the simplex method described previously. In this
section we describe the simplex method in tableau format. Suppose that we
have a starting basic feasible solution x with basis B. The linear programming
problem can be represented as follows. Minimize z subject to

z − cB x B − cN x N = 0

BxB + N xN = b
xB , xN = 0
From BxB + N xN = b, we have

xB + B −1 N xN = B −1 b

Multiplying (3.15) by cB and adding to Equation (3.13), we get

z + 0xB + (cB B −1 N − cN )xN = cB B −1 b

22
Currently xN = 0. From Equation (3.15) and (3.16) we get xB = B −1 b, z =
cB B −1 b, and we can conveniently represent the current basic feasible solution
with basis B in the following tableau. Here we think of z as a (basic) variable
to be minimized. The objective row will be referred to as row 0 and remaining
rows 1 through m. The right-hand-side column (RHS) will denote the values
of the basic variables (including the objective function). The basic variables
are identified on the far left column.19

z xB xN RHS
−1
z 1 0 cB B N − cN cB B −1 b Row G
xB 0 1 B −1 N −1
B b Rows 1 Through m

The tableau in which z and xB have been solved in terms of xN is said


to be in canonical form. Not only does this tableau give us the value of the
objective function cB B −1 and the basic variables B −1 b on the right-hand-
side, but it also gives us all the information we need to proceed with the
simplex method. Actually the cost row gives cB B −1 N − cN , which consists
0f zj − c0j s for the nonbasic variables. So row zero will tell us if we are at
the optimal solution (if each zj − cj ≤ 0), and which nonbasic variable to
increase otherwise. If xk is increased, then the vector yk = B −1 ak , which
is stored in the tableau in rows 1 through m under variable xk , will help
us determine by how much xk can be increased. If yk ≤ 0, then xk can
be increased indefinitely without being blocked, and the optimal objective
is unbounded. On the other hand, if yk  0, that is, if yk has at least one
positive component, then the increase in xk will be blocked by one of the
current basic variables, which drops to zero. The minimum ratio test (which
can be performed since B −1 b = b and yk are both available in the tableau)
determines the blocking variable. The simplex tableau can also have the
following arrangement. The index of the pivot number is denoted by r.
19
Kasifa Namyalo

23
cj c1 c2 . . . cr . . . ck . . . cn
cB xB x1 x2 . . . xr . . . xk . . . xn x̄B
cB1 xB1 y11 y12 . . . 0 . . . y1k . . . y1n x1
cB2 xB2 y21 y22 . . . 0 . . . y2k . . . y2n x2
. . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . .
cBr xBr yr1 yr2 . . . 1 . . . yrk . . . yrn xr
. . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . .
cBm xBm ym1 ym2 . . . 0 . . . ymk . . . ymn xm
zj − cj z1 − c1 z2 − c2 . . . zr − cr . . . zk − ck . . . zn − cn z

0.1.18 Pivoting
20
The pivoting operation is the scheme that is used to accomplish the fol-
lowing tasks simultaneously.

1. Update the basic variables and their values.

2. Update the zj − cj values of the new nonbasic variables..

3. Update the yj columns.

If xk enters the basis and xBr leaves the basis, then pivoting on yrk can be
stated as follows.

1. Divide row r by yrk .

2. For i = 1, 2, ..., m and i 6= r, update the ith row by adding it to −yik


times the new rth row.

3. Update row zero by adding to it ck − zk times the new rth row.

0.1.19 Example
Consider the following maximisation linear programming problem,
Maximize
z = x1 − 2x2 + x3
20
Kasifa Namyalo

24
subject to
x1 + 2x2 + x3 ≤ 5
2x1 − x2 + x3 ≤ 3
x1 + x2 − 2x3 ≤ 2
and
xj ≥ 0
for j = 1, 2, 3, Introducing slack variables,
Maximize
z = x1 − 2x2 + x3 + 0x4 + 0x5 + 0x6
subject to
x1 + 2x2 + x3 + 1x4 + 0x5 + 0x6 = 5

2x1 − x2 + x3 + 0x4 + 1x5 + 0x6 = 3


x1 + x2 − 2x3 + 0x4 + 0x5 + 1x6 = 2
and
x1 , x2 , x3 , x4 , x5 , x6 ≥ 0
In tableau form we have. Tableau 1
cj 1 -2 1 0 0 0
cB xB x1 x2 x3 x4 x5 x6 x̄B
0 x4 1 2 1 1 0 0 5
0 x5 2 -1 1 0 1 1 3
0 x6 1 1 -2 0 0 1 2
zj − cj -1 2 -1 0 0 0 0
We look for the most negative value in the zj − cj row, and this is -1. So x1
column is the pivot column. We then compare the ratios 5/1, 3/2, 2/1for the
minimum, and this is 3/2. So the second row is the pivot row and therefore
the pivot element is 2. So x5 will leave the basis, we obtain the following
tableau,21
cj 1 -2 1 0 0 0
cB xB x 1 x2 x3 x4 x5 x6 x̄B
0 x4 0 5/2 1/2 1 -1/2 0 7/2
1 x1 1 -1/2 1/2 0 1/2 0 3/2
0 x6 0 3/2 -5/2 0 -1/2 1 1/2
zj − cj 0 3/2 -1/2 0 1/2 1 3/2
21
Kasifa Namyalo

25
The most negative value in the zj − cj row is -1/2. So x3 column is the
pivot column. We then compare the ratios 72 and 31 for the minimum, and
this is 31 . So the second row is the pivot and therefore the pivot element is
1/2. So x1 will leave the basis, to be replaced by x3 . Using the above formulas
for changing the basis, we obtain the following tableau, Tableau 111
cj 1 -2 1 0 0 0
cB xB x1 x2 x3 x4 x5 x6 x̄B
0 x4 -1 3 0 1 -1 0 2
0 x5 2 -1 1 0 1 0 3
0 x6 5 -1 0 0 2 1 8
zj − cj 1 1 0 0 1 0 3
Since all zj − cj ≥ 0, we have reached the optimal solution x1 = 0, x2 =
0, x3 = 65 and maximum z = 3.

Example
22

Consider the following maximization linear programming problem,


Maximize
z = 3x1 + x2 + x3
subject to
x1 − x2 + 2x3 ≤ 3
2x1 + 3x2 − x3 ≤ 2
3x1 + x2 − 2x3 ≤ 1
xj≥0
and for j = 1, 2, 3 Introducing slack variables, x3 and x4 gives
Maximize
z = 3x1 + x2 + x3 + 0x4 + 0x5 + 0x6
subject to
x1 − x2 + 2x3 + 1x4 + 0x5 + 0x6 = 3
2x1 + 3x2 − x3 + 0x4 + 1x5 + 0x6 = 2
3x1 + x2 − 2x3 + 0x4 + 0x5 + 1x6 = 1
and
x1 , x2 , x3 , x4 , x5 , x6 ≥ 0
22
Kasifa Namyalo

26
In tableau form we have Tableau 1
cj 3 1 1 0 0 0
cB xB x1 x2 x3 x4 x5 x6 x̄B
0 x4 1 -1 2 1 0 0 3
0 x5 2 3 -1 0 1 0 2
0 x6 3 1 -2 0 0 1 1
zj − cj -3 -1 -1 0 0 0 0
We look for the most negative value in the zj − cj row, and this is −3. So
x1 column is the pivot column. We then compare the ratios 3/1, 2/2, 1/3 for
the minimum, and this is 1/3. So the third row is the pivot and therefore
the pivot element is 3. So x6 will leave the basis, to be replaced by x1 . Using
the above formulas for changing the basis, we obtain the following tableau,
Tableau 11
cj 3 1 1 0 0 0
cB xB x 1 x2 x3 x4 x5 x6 x̄B
0 x4 0 -4/3 8/3 1 0 -1/3 8/3
0 x5 0 7/3 1/3 0 1 -2/3 4/3
3 x1 1 1/3 -2/3 0 0 1/3 1/3
zj − cj 0 0 -3 0 0 1 1
The most negative value in the zj − cj row is −3. So x3 column is the pivot
column. We then compare the ratios 88 and 14 for the minimum, and this is 88 .
So the first row is the pivot and therefore the pivot element is 83 . So x4 will
leave the basis to be replaced by x3 . Using the above formulas for changing
the basis, we obtain the following tableau,23 Tableau 111

cj 3 1 1 0 0 0
cB xB x1 x2 x3 x4 x5 x6 x̄B
1 x3 0 -1/2 1 3/8 0 -1/8 1
0 x5 0 5/2 0 -1/8 1 -5/8 1
3 x1 1 0 0 1/4 0 1/4 1
zj − cj 0 -3/2 0 9/8 0 -3/8 4
The most negative value in the zj − cj row is −3
2
So x2 column is the pivot
column. In this column, it is only5/2that is greater than zero.So the second
row is the pivot row and therefore the pivot element is 5/2. Then, x5 will
leave the basis, to be replaced by x2 . Using the above formulas for changing
the basis we obtain the following tableau, Tableau 1V

23
Kasifa Namyalo

27
cj 3 1 1 0 0 0
cB xB x1 x2 x3 x4 x5 x6 x̄B
1 x3 0 0 1 7/20 1/5 -1/4 6/5
1 x2 0 1 0 -1/20 2/5 -1/4 2/5
3 x1 1 0 0 1/4 0 1/4 1
zj − cj 0 0 0 21/40 3/5 0 23/5
Since all zj −cj ≥ 0, we have reached the optimal solution x1 = 1, x2 = 25 , x3 =
6
5
and z = 23 5
. Note that z6 − c6 = 0 though x6 is non-basic. Therefore the
solution is not unique. The variable x6 could replace x1 without changing
value of z.

Example
24

Consider the following minimization linear programming problem,


Minimize
z = −2x1 + x2 + x3
subject to
x1 + 2x2 − x3 ≤ 3
2x1 − x2 − 3x3 ≥ −2
xj ≥ 0
and for j = 1, 2, 3, First, we change the sense of optimization by multiplying
the objective function by −1. We also change the sense of second inequality
by multiplying it by −1. Then the problem changes to Maximize

z = −2x1 + x2 + x3

subject to
x1 + 2x2 + x3 ≤ 3
−2x1 + x2 + 3x3 ≥ 2
and
x1 , x2 , x3 ≥ 0
Introducing slack variables, x4 and x5 gives in the first and second constraints
respectively, we have Maximize

z = 2x1 − x2 − x3 + 0x4 − 0x5


24
Kasifa Namyalo

28
subject to
x1 + 2x2 − x3 + 1x4 + 0x5 = 3
−2x1 + x2 − 3x3 + 0x4 + 1x5 = 2
and for
j, xj ≥ 0
In tableau form we have; Tableau 1
cj 2 -1 -1 0 0
cB xB x1 x2 x3 x4 x5 x̄B
0 x4 1 2 -1 1 0 3
0 x5 -2 1 3 0 1 2
zj − cj -2 1 1 0 0 0
We look for the most negative value in the zj − cj row, and this is−2. So
x1 column is the pivot column. In this column, it is only the number 1 that
is greater than zero. Thus,the first row is the pivot row and therefore the
pivot element is 1. So x4 will leave the basis, to be replaced by x1 . Using
the above formulas for changing the basis, we obtain the following tableau,
Tableau 11

cj 2 -1 -1 0 0
cB xB x1 x2 x3 x4 x5 x̄B
2 x1 1 2 -1 1 0 3
0 x5 0 5 1 2 1 8
zj − cj 0 5 -1 2 0 6
The most negative value in the zj − cj row is −1. So x3 column is the
pivot column. In this column, it is only the number 1 that is greater than
zero. Thus, the second row is the pivot row and therefore the pivot ele-
ment is 1. So x5 will leave the basis, to be replaced by x3 . Using the above
formulas for changing the basis, we obtain the following tableau, Tableau 111

cj 2 -1 -1 0 0
cB xB x1 x2 x3 x4 x5 x̄B
2 x1 1 7 0 3 1 11
−1 x3 0 5 1 2 1 8
zj − cj 0 10 0 4 1 14
Since all zj − cj ≥ 0, we have reached the optimal solution: x1 = 11, x2 =
0, x3 = 8 and min z = −14.

29
Example
25
Consider the following minimization linear programming problem, Mini-
mize
z = x1 + x2 − 4x3
subject to
x1 + x2 + 2x3 ≤ 9
x1 + x2 − x3 ≤ 2
−x1 + x2 + x3 ≤ 4
and
x1 , x2 , x3 ≥ 0
Introducing slack variables, x4 , x5 , andx6 , gives Minimize

z = x1 + x2 − 4x3 + 0x4 + 0x5 + 0x6

subject to
x1 + x2 + 2x3 + x4 + x4 = 9
x1 + x2 − x3 + x5 + = 2
−x1 + x2 + x3 + x6 = 4
and
x1 , x2 , x3 , x4 , x5 , x6 ≥ 0

In tableau form we have, Tableau 1

cj 1 1 -4 0 0 0
cB xB x1 x2 x3 x4 x5 x6 x̄B
0 x4 1 1 2 1 0 0 9
0 x5 1 1 -1 0 1 0 2
0 x6 -1 1 1 0 0 1 4
zj − cj -1 -1 4 0 0 0 0
Since this is a minimization problem, we look for the most positive value in
the zj − cj row, and this is4. So x3 column is the pivot column. We then
compare the ratios 9/2, 4/1 for the minimum, and this is 4/1. So the third
row is the pivot row and therefore the pivot element is 1. So x6 will leave the
basis, to be replaced by x3 . Using the above formulas for changing the basis,
we obtain the following tableau. Tableau 11

25
Kasifa Namyalo

30
cj 1 1 -4 0 0 0
cB xB x1 x2 x3 x4 x5 x6 x̄B
0 x4 3 -1 0 1 0 -2 1
0 x5 0 2 0 0 1 1 6
−4 x3 -1 1 1 0 0 1 4
zj − cj -1 -1 4 0 0 0 -16
The most positive value in the zj − cj row is 3. So x1 column is the pivot
column. Note that we have got only one non negative number in this column
and this is 3. So the first row is the pivot row and therefore the pivot element
is 3. So x4 will leave the basis, to be replaced by x1 . Using the above formulas
for changing the basis, we obtain the following tableau, Tableau 111
cj 1 1 -4 0 0 0
cB xB x1 x2 x3 x4 x5 x6 x̄B
0 x1 1 -1/3 0 1/3 0 -2/3 1/3
0 x5 0 2 0 0 1 1 6
0 x3 0 1 1 0 0 1 13/3
zj − cj 0 -4 0 -1 0 -2 -17
Since zj − cj ≤ 0, we have reached the optimal solution x1 = 1/3x2 = 0, x3 =
13/3 and x4 = −17

0.1.20 Identifying B −1 from the Simplex Tableau


26

The basis inverse matrix can be identified from the simplex tableau as
follows. Assume that the original tableau has an identity matrix. The process
of reducing the basis matrix B of the original tableau to an identity matrix in
the current tableau is equivalent to pre multiplying rows 1 through m of the
original tableau by B −1 to produce the current tableau. This also converts
the identity matrix of the original tableau to B −1 . Therefore B −1 can be
extracted from the current tableau as the submatrix in rows 1 through m
under the original identity columns. From the previous example above, at
iteration 2,  
1 0 −2
B −1 = 0 1 1 
0 0 1
and at iteration 3
 
1/3 0 −2/3
B −1 = 0 1 1 
1/3 0 1/3
26
Kasifa Namyalo

31
0.1.21 The Initial Basic Feasible Solution
27
Recall that the simplex method starts with a basic feasible solution and
moves to an improved basic feasible solution, until the optimal point is
reached or else unboundedness of the objective function is verified. How-
ever, in order to initialize the simplex method, a basis the objective function
is verified. However, in order to initialize the simplex method, a basis B with
b− = B −1 b ≥ 0 must be available. The very simple basis is the identity. In
general any linear programming problem can be transformed into a problem
of the following form. Minimize
cx
Subject to
Ax = b
and
x≥0
where b > 0 (if bi < 0 the ith row can be multiplied by 1). If A contains
an identity matrix, then an immediate basic feasible solution is at hand, by
simply letting B = 1, and since b ≥ 0 then B −1 b = b ≥ 0. Suppose that A
has no identity sub matrix. In this case we shall resort to artificial variables
to get a starting basic feasible solution, and then use the simplex method
and get rid of these artificial variables.

0.1.22 The Big-M Method


This method seeks to eliminate the artificial variables by assigning coefficients
for these variables in the original objective function in such a way to make
their presence in the basis at a positive level very unattractive from the
objective function point of view. To illustrate, suppose we want to solve the
following linear programming problem, where b ≥ 0. Minimize
cx
Subject to
Ax = b
and
x≥0
If no convenient basis is known, we introduce the artificial vector xa , which
leads to the following system:
Ax + xa = b
27
Kasifa Namyalo

32
x, xa ≥ 0
The staring basic feasible solution is given by xa , b and x = 0. In order to
reflect the undesirability of a nonzero artificial vector, the objective function
is modified such that a big penalty is paid for such a solution.

0.1.23 Example
28
Minimize
z = x1 − 2x2
subject to
x1 + x2 ≥ 2
−x1 + x2 ≥ 1
x2 ≤ 3
and
x1 , x2 ≥ 0
Introduce slack and surplus variables x3 , x4 , andx5 and incorporate artificial
variables x6 and x7 in the first two constraints. The modified objective func-
tion is z = x1 − 2x2 + M x7 , where M is a large positive number. This leads
to the following sequence of tableaux. Tableau 1

cj 1 -2 0 0 0 M M
cB xB x1 x2 x3 x4 x5 x6 x7 x̄B
M x6 1 1 -1 0 0 1 0 2
M x7 -1 1 0 -1 0 0 1 1
0 x5 0 1 0 0 1 0 0 3
zj − cj -1 2+2M -M -M 0 0 0 3M
Tableau 11
cj 1 -2 0 0 0 M M
cB xB x1 x2 x3 x4 x5 x6 x7 x̄B
M x6 2 0 -1 1 0 1 -1 1
−2 x2 -1 1 0 -1 0 0 1 1
0 x5 1 0 0 1 1 0 -1 2
zj − cj 1+2M 0 -M 2+M 0 0 -2-M -2+M
Tableau 111
28
Kasifa Namyalo

33
cj 1 -2 0 0 0 M M
cB xB x1 x2 x3 x 4 x5 x6 x7 x̄B
1 x1 1 0 -1/2 1/2 0 1/2 -1/2 1/2
−2 x2 0 1 -1/2 -1/2 0 1/2 1/2 3/2
0 x5 0 0 1/2 1 1 -1/2 3/2 3/2
−1 −3 −5
zj − cj 0 0 1/2 3/2 0 2
−M 2
−M 2

Tableau 1V
cj 1 -2 0 0 0 M M
cB xB x1 x2 x3 x4 x5 x6 x7 x̄B
0 x4 2 0 -1 1 0 1 -1 1
−2 x2 1 1 -1 0 0 1 0 2
0 x5 -1 0 1 0 1 -1 0 1
zj − cj -3 0 2 0 0 -2-M -M -4
Tableau V
cj 1 -2 0 0 0 M M
cB xB x1 x2 x3 x4 x5 x6 x7 x̄B
0 x4 1 0 0 1 1 0 -1 2
−2 x2 0 1 0 0 1 0 0 3
0 x3 -1 0 1 0 1 -1 0 1
zj − cj 1 0 0 0 2 M M 6
Since zj −cj ≤ 0, for each nonbasic variable, the last tableau gives the optimal
solution.29

29
Kasifa Namyalo

34

You might also like