You are on page 1of 6

Dr.

Maddah ENMG 500 Engineering Management I 11/03/09

Simplex method in matrix form (revised simplex method)

 A LP with n decision variables and m constraints can be


written as

max Z = cx
s.t. Ax = b
x0
x1 a11 a12 K a1n b1
a
x a22 L a2 n b
where c = ( c1 , c2 , c3 ,K, cn ) , x = 2 , A = 21 , b= 2
M K K K K M

xn am1 am 2 K amn bm

 Alternatively, the LP can be written as

max Z = c B x B + c N x N
s.t. Bx B + Nx N = b (1)
x0
where the subscripts B and N denote basic and nonbasic
variables respectively.

 For example,

max Z = 2 x1 + 3 x2 max Z = 2 x1 + 3 x2
x1 + x2 50 s.t. x1 + x2 + S1 = 50
s.t.

2x1 + x2 30 2x1 + x2 + S 2 = 30
x1 , x2 0 x1 , x2 , S1 , S 2 0

1
Then, at O(0,0),
S x 50
x B = 1 , x N = 1 , c N = (2,3), c B = (0, 0), b =
S2 x2 30
1 0 1 1
B= , N =
0 1 2 1

 Solving for xB in (1) gives

Bx B = b Nx N x B = B 1 ( b Nx N ) = B 1b B 1Nx N

 The LP can then be rewritten as

max Z = c B B 1b (c B B 1N c N )x N
s.t. x B + B 1Nx N = B 1b
x0
 Recall that each iteration of the simplex method allows a
nonbasic variable (the entering variable) to increase from zero.
until one of the basic variables (the leaving variable) hits zero.
 Let Nj be the jth column of N, and Vi be the ith component of
vector V. Then, an iteration of the simplex method, with xj
being the basic variable and xi being basic variables, can be
represented by the following equations:

Z = c B B 1b (cB B 1N j c j ) x j Z new = Z 0 c0j x j


xi = (B 1b)i (B 1N j )i x j xinew = bi0 A ij0 x j
where the superscripts 0 and new denote the current
solution and the new solution generated by the next iteration.

2
 For a max problem, we choose the entering variable, xk, s.t.
zk ck = min{z j c j | j is nonbasic and z j c j < 0}, (2)
1
where, z j c B B N j .1

 The leaving variable is xr s.t.


(B 1b)r 1
(B b )i
= min 1 i is basic and B 1N j ( ) > 0 . (3)
( 1
B Nk ) r
(
B N k i ) i

 The above provides the rational for the revised simplex


method which proceeds as follows
Step 0. Determine a starting basic feasible solution with basis .
Step 1. Evaluate B-1.
Step 2. Compute (zj cj) for all nonbasic variables. If (zj cj) 0
for a maximization problem ( 0 for a minimization), then stop.
1
The optimal solution is x B * = B b, Z * = c B x B *. Else, determine
the entering variable, xk, using (2), and go to Step 3.
Step 3. Compute B-1Nk . If all elements of B-1Nk 0, then stop, the
solution is unbounded. Else, compute B-1b and determine the
leaving variable, xr, using (3).
Step 4. determine the new basis, new = {xk} {xr}. Set
= new, and go to Step 1.

1
This rule for choosing the entering variable is just a rule of thumb. In some cases, there might be better ways to
choose the entering variable.

3
Example

max Z = 2 x1 + 3x2 max Z = 2 x1 + 3 x2


s.t. x1 + x2 50 s.t. x1 + x2 + S1 = 50


2x1 + x2 30 2x1 + x2 + S 2 = 30
x1 , x2 0 x1 , x2 , S1 , S2 0

 Iteration 1.
o Step 0. Starting basic feasible solution at O(0,0),
S x
= {S1 , S2 }, x B = 1 , x N = 1 , c N = (2,3), c B = (0, 0),
S2 x2
1 0 1 1 50
B= , N = , b =
0 1 2 1 30
o Step 1.
1 0
B 1 =
0 1
o Step 2.
1 0 1
z x1 cx1 = c B B 1N x1 cx1 = (0, 0) 2 = 2
0 1 2
1 0 1
z x2 cx2 = c B B 1N x2 cx2 = (0, 0) 3 = 3
0 1 1
The entering variable is x2 .
o Step 3.
1 0 1 1 (S1 )
B 1N x2 = =
0 1 1 1 (S2 )
1 0 50 50 (S1 )
B 1b = =
0 1 30 30 (S2 )
(B 1b) S1 50 (B 1b) S2 30
Then, = = 50 , = = 30 .
(B 1
N x2 ) S1
1 (B 1
N x2 ) S2
1

The leaving variable is S2 .


o Step 4. The new basis is = {S1, S2} {x2} {S2} ={S1, x2}.

4
 Iteration 2.
o Step 1.
S x
= {S1 , x2 }, x B = 1 , x N = 1 , c B = (0,3), c N = (2,0),
x2 S2
1 1 1 0
B= , N =
0 1 2 1
1 1 1 1 1 1 1 1 2
B= B = = ,
0 1 1 0 1 0 1
o Step 2.
1 1 1 1
z x1 cx1 = c B B 1N x1 cx1 = (0,3) 2 = (0,3) 2 = 4
0 1 2
2
1 1 0 1
zS2 cS2 = c B B 1N S2 cS2 = (0,3) 0 = (0,3) 0 = 3
0 1 1 1
All zj cj > 0, for all j nb. Stop. The optimal solution is
reached. The optimal solution is

S * 1 1 50 20
x B * = 1 = B 1b = =
x
2 * 0 1 30 30
20
Z * = c B x B * = ( 0 3) = 90
30

Therefore, the optimal solution is x1* = 0, x2* = 30, and Z* = 90.

Remark. The solution to the same problem in tabular form is


presented on the next page. It is instructive to compare the two
solution methods.

a b 1 1 d b
2
The inverse of B= is B = . (This inverse exists only if ad bc 0.)
c d ad bc c a

5
Iteration 1.
Entering variable
zj c j
Basic x1 x2 S1 S2 RHS Ratio (B 1b)i
Z 2 3 0 0 0 - ( B 1N k) i
Leaving S1 1 1 1 0 50 50/1=50
(blocking) S2 2 1 0 1 30 30/1=30
variable
B1

Iteration 2.
cBB1b
zj c j

Basic x1 x2 S 1 S2 RHS B1b


Z 4 0 0 3 90
S1 1 0 1 1 20
x2 2 1 0 1 30
B1

You might also like