Professional Documents
Culture Documents
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
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
Bx B = b Nx N x B = B 1 ( b Nx N ) = B 1b B 1Nx N
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:
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
(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
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
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
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
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