Professional Documents
Culture Documents
ALGORITHM
0 S1 8 2 3 0 1 0 0
0 S2 10 0 2 5 0 1 0
0 S3 15 3 2 4 0 0 1
Zj – Cj -3 -5 -4 0 0 0
0
II Simplex Table
Cj 3 5 4 0 0 0
5 x2 8/ 3 2/3 1 0 1/3 0 0
0 S2 14 / 3 -4/3 0 5 - 2/ 3 1 0
0 S3 29 / 3 5/3 0 4 - 2/ 3 0 1
Zj – Cj
40 / 3 1/3 0 -4 5/3 0 0
III Simplex Table
Cj 3 5 4 0 0 0
5 x2 8/ 3 2/3 1 0 1/3 0 0
4 x3 14 / 15 - 4 / 15 0 1 - 2/ 15 1/5 0
0 S3 89 / 15 41 / 15 0 0 - 2/ 15 - 4/5 1
Zj – Cj
256 / 15 - 11 / 15 0 0 17/15 4/5 0
IV Simplex Table
Cj 3 5 4 0 0 0
4 x3 62 / 41 0 0 1 - 6/ 41 5/41 4/41
3 x1 89 / 41 1 0 0 - 2/ 41 -12/41 15/41
Zj – Cj
765 / 41 0 0 0 45/41 24/41 11/41
Now since all Z j – C j are non negative, therefore an
optimum basic solution is
CB Basic Solution x1 x2 S1 S2 S3
Variable Values xB
(B)
0 S1 4 -1 2 1 0 0
0 S2 14 3 2 0 1 0
0 S3 3 -1 0 0 1
1
Zj – Cj -3 -2 0 0 0
0
II Simplex Table
Cj 3 2 0 0 0
0 S1 7 0 1 1 0 1
0 S2 5 0 5 0 1 -3
3 X1 3 1 -1 0 0 1
Zj – Cj 0 -5 0 0 3
9
III Simplex Table
Cj 3 2 0 0 0
0 S1 6 0 0 1 - 1/5 8/5
2 X2 1 0 1 0 1/5 - 3/5
3 X1 4 1 0 0 1/5 2/5
Zj – Cj
14 0 0 0 1 0
Since all the values of zj- cj are positive, this is the
optimal solution.
x1 = 4, x2 = 1
z = 3 * 4 + 2 * 1 = 14.
0 x4 10 2 1 1 0 0 100
0 x5 7 3 2 0 1 0 77
0 x6 2 4 1 0 0 1 80
zj-cj -12 -3 -1 0 0 0
Key column = x1 column, Minimum (100/10, 77/7, 80/2) = 10, Key row = x4 row,
Pivot element = 10
Table 2
cj 12 3 1 0 0 0
cB Basic x1 x2 x3 x4 x5 x6 Solution values
variables b (= XB)
B
13/1
0 x5 0 8/5 -7/10 1 0 7
0
Example :
Maximize z = 2x1 + 3x2
subject to,
-x1 + 2x2 ≤ 4
x1 + x2 ≤ 6
x1 + 3x2 ≤ 9
x1, x2 are unrestricted in sign
Solution:
Since x1 and x2 are unrestricted in sign, we can replace them by non-
negative variables x1' , x1'', x2' , x2'' .
Put x1 = x1' - x1'‘ and x2 = x2' - x2''
The given problem can be written as
Max. z = 2(x1' - x1'') + 3(x2' - x2'')
subject to: -(x1' - x1'') + 2(x2' - x2'') ≤ 4
(x1' - x1'') + (x2' - x2'') ≤ 6
(x1' - x1'') + 3(x2' - x2'') ≤ 9
Introducing slack variables
Max. z = 2x1' - 2x1'' + 3x2' - 3x2''
subject to:
-x1' + x1'' + 2x2' - 2x2'' + x3 = 4
x1' - x1'' + x2' - x2'' + x4 = 6
x1' - x1'' + 3x2' - 3x2'' + x5 = 9
Where x3, x4 and x5 are slack variables.
Table 1
cj 2 -2 3 -3 0 0 0
0 x3 -1 1 2 -2 1 0 0 4
0 x4 1 -1 1 -1 0 1 0 6
0 x5 1 -1 3 -3 0 0 1 9
zj-cj -2 2 -3 3 0 0 0
Key column = x2' column, Minimum (4/2, 6/1, 9/3) = 2, Key row = x3 row.
Pivot element = 2
Table 2
cj 2 -2 3 -3 0 0 0
Example :
Maximize 5x1 + 4x2
subject to : x1 ≤ 7
x1 - x2 ≤ 8
x1, x2 ≥ 0.
Solution.
Converting inequalities to equalities
x1 + x3 = 7
x1 - x2 + x4 = 8
x1, x2, x3, x4 ≥ 0.
Where x3 and x4 are slack variables.
Table 1
cj 5 4 0 0
0 x3 1 0 1 0 7
0 x4 1 -1 0 1 8
zj-cj -5 -4 0 0
Table 2
cj 5 4 0 0
cB Basic variables x1 x2 x3 x4 Solution values
B b (=XB)
5 x1 1 0 1 0 7
0 x4 0 -1 -1 1 1
zj-cj 0 -4 5 0
0 x4 1 3 1 1 0 0 0 5
-1 A1 2 -1 1 0 -1 1 0 2
-1 A2 4 3 -2 0 0 0 1 5
Zj- cj -6 -2 1 0 1 0 0
-1 A2 0 5 -4 0 2 1 1
zj-cj 0 -5 4 0 -2 0
A2 departs and x2 enters. Here, Phase 1 terminates because both the artificial
variables have been removed from the basis.
PHASE 2
TABLE 3
cj 3 -1 2 0 0
0 x5 0 5/2 -2 0 1 1/2
cj 0 0 0 0 0 -1 -1
0 x4 8 16 12 1 0 0 0 250
-1 A1 4 8 10 0 -1 1 0 80
-1 A2 7 9 8 0 0 0 1 105
Here, Phase 1 terminates because both the artificial variables have been
removed from the basis.
PHASE 2
TABLE 3
cj 12 15 9 0 0
0 x4 0 0 -8 1 2 90
15 x2 0 1 19/10 0 -7/20 7
12 x1 1 0 -13/10 0 9/20 6