Beruflich Dokumente
Kultur Dokumente
Max Z = cx
subject to Ax ≤ b
x ≥ 0
A I x = b
xs
xs = slack variables
Basis matrix: columns relating to basic variables.
B11 . . . . . . . . . . B1m
.. . . . ..
B = .. . . . ..
. . . . .
Bm1 . . . . . . . . . . Bmm
(Initially B = I )
B xB = b
Therefore xB = B-1b B-1→ inverse matrix.
- compute Y = cBB-1
- compute zj – cj = Y Pj - cj for all non-basic
variables.
Choose largest negative value (maximisation).
If none, stop.
αj = B-1Pj
Xr is associated with
Go to step 1.
Example:
X1 + S1 = 4
2X2 + S2 = 12
3X1 + 2X2 + S3 = 18
X1 , X2 , S1 , S2 , S3 ≥ 0
xB = B-1b = 1 0 0 4 4
0 1 0 12 = 12
0 0 1 18 18
cB = 0 0 0
Z = 0 0 0 4 = 0
12
18
First iteration
Step 1
- compute Y = cBB-1
- compute zj – cj = Y Pj - cj for all non-basic
variables.
Y = 0 0 0 1 0 0 = 0 0 0
0 1 0
0 0 1
z1 – c 1 = 0 0 0 1 - 3 = -3
0
3
αj = B-1Pj
Xr is associated with
xB = 4 α2 = 1 0 0 0 0
12 0 1 0 2 = 2
18 0 0 1 2 2
B = 1 0 0 B-1 = 1 0 0
0 2 0 0 ½ 0
0 2 1 0 -1 1
xB = B-1b
= 1 0 0 4 4
0 ½ 0 12 = 6
0 -1 1 18 6
Go to step 1
Compute Y = cBB-1
Y = 0 5 0 1 0 0 = 0 5/2 0
0 ½ 0
0 -1 1
- compute zj – cj = Y Pj - cj for all non-basic
variables (X1 and S2):-
X1: z1 – c1 = 0 5/2 0 1 - 3 = -3
0
3
Step 2
xB = 4 α1 = 1 0 0 1 1
6 0 ½ 0 0 = 0
6 0 -1 1 3 3
xB = B-1b
= 1 1/3 -1/3 4 2
0 1/2 0 12 = 6
0 -1/3 1/3 18 2
Go to step 1
Step 1
- compute Y = cBB-1
Y = 0 5 3 B-1 = 0 3/2 1
S3: z5 – c5 = 0 3/2 1 0 - 0 = 1
0
1
Optimal solution:
S1* = 2
X2* = 6
X1* = 2
Z* = cB xB = 0 5 3 2 = 36
6
2