Professional Documents
Culture Documents
Ahmed Zarar - Linear Programming and App HW #04
Ahmed Zarar - Linear Programming and App HW #04
Homework # 04
Problem # 01
(a) Since x2 is the second variable in the basis so the values of c, d and e are,
c=0
d=1
e=0
Similarly, x6 is in basis so we have,
g=0
The variables x2, x4 and x6 are in basis so from objective function, we have,
h = -6
b = c6(2) + c2(3) + c4(0)
b = -4
Since the value of objective function is -12 so we have,
a=6
Since x5 is not in basis, we have x5 = 0 and therefore,
f = 14/3
(b) From the given simplex tableau, we can have B-1 that is,
[ ]
−14
2 1
3
5
B-1 = 3 2
2
14
0 2
3
Matrix B will be simply the inverse of above matrix that is,
[ ]
21
−23 /80 1
40
−3
B = −9/40 3 /20
40
−7
21/40 2 7/ 40
20
(c)
Problem # 02
Solution:
The above LP can be rewritten in standard form as:
Max 10x1 + 15x2 + 5x3
St: 2x1 + x2 + x4 = 6000
3x1 + 3x2 + x3 + x5 = 9000
x1 + 2x2 + 2x3 + x6 = 4000
x1, x2, x3, x4, x5, x6 ≥ 0
(a) If x1, x2, x4 are basic variables then we need to write them in terms of non-basic variables. The
constraints can be written as:
2x1 + x2 + x4 = 6000
3x1 + 3x2 = 9000 - x3 - x5
x1 + 2x2 = 4000 - 2x3 - x6
By doing elementary row operations, we get,
x1 = 2000 – 4/3(x3) – 2/3(x5) + x6
x2 = 1000 – 5/3(x3) + 1/3(x5) – x6
x4 = 1000 – x3 + x5 – x6
Substituting the values of these variables in objective function gives,
Max 35000 – 20/3(x3) – 5/3(x5) -5x6
(b) To find current objective function value and solution, we need to solve the LP by simplex method.
The simplex tableau is given below:
z x1 x2 x3 x4 x5 x6 RHS
1 -10 -15 -5 0 0 0 0
0 2 1 0 1 0 0 6000
0 3 3 1 0 1 0 9000
0 1 2 2 0 0 1 4000
From above table, we see that x2 is the entering variable and x6 is leaving variable. Making this column
identity results in the following table:
z x1 x2 x3 x4 x5 x6 RHS
1 -5/2 0 10 0 0 15/2 30000
0 3/2 0 -1 1 0 -1/2 4000
0 3/2 0 -2 0 1 3/2 3000
0 1/2 1 1 0 0 1/2 2000
From above table, we see that x1 is the entering variable and x5 is leaving variable. Making this column
identity results in the following table:
z x1 x2 x3 x4 x5 x6 RHS
1 0 0 20/3 0 5/3 5 35000
0 0 0 1 1 -1 1 1000
0 1 0 -4/3 0 2/3 -1 2000
0 0 1 5/3 0 -1/3 1 1000
Since all the reduced costs of non-basic variables have positive coefficient so none of the elements will
help in getting a better value of objective function than the one we got in above table so,
Objective function value = 35000
x1 = 2000
x2 = 1000
x4 = 1000
(c) Yes, the above basis is optimal. This is because when we solved the LP in part b, we got the optimal
value of objective function only when x1, x2 and x4 are in basis. From this, we can conclude that above
basis is optimal.
Problem # 03
Max: -4x1 – 6x2 – 5x3
st: 2x1 + 3x3 ≥ 3
3x2 + 2x3 ≥ 6
x1, x2, x3 ≥ 0
(a) No, it is not easy to get initial basic feasible solution. Because the special variable that we will
introduce in this formulation will have non-positive value which means that they are not in required form
to get initial feasible solution and hence for solving the problem by simplex method.
(b) To solve the problem by two phase method, we need to introduce artificial variables and so the LP
formulation in standard from becomes,
2x1 + 3x3 – x4 + x6 = 3
3x2 + 2x3 – x5 + x7 = 6
x1, x2, x3, x4, x5, x6, x7 ≥ 0
In the first phase, the objective function will be simply the artificial variables. i.e. z = x 6 + x7
The tableau is as follows:
Cj 0 0 0 0 0 -1 -1
CB XB b x1 x2 x3 x4 x5 x6 x7
-1 x6 3 2 0 3 -1 0 1 0
-1 x7 6 0 3 2 0 -1 0 1
Zj - Cj -2 -3 -5 1 1 -1 -1
From above table, we see that x3 is the entering variable and x6 is leaving variable. Making this column
identity results in the following table:
Cj 0 0 0 0 0 -1
CB XB b x1 x2 x3 x4 x5 x6
0 x3 1 2/3 0 1 -1/3 0 1/3
-1 x7 4 -4/3 3 0 2/3 -1 -2/3
Zj - Cj 4/3 -3 0 -2/3 1 -5/3
From above table, we see that x2 is the entering variable and x6 is leaving variable. Making this column
identity results in the following table:
Cj 0 0 0 0 0
CB XB b x1 x2 x3 x4 x5
0 x3 1 2/3 0 1 -1/3 0
0 x2 4/3 -4/9 1 0 2/9 -1/3
Zj - Cj 0 0 0 0 0
Cj -4 -6 -5 0 0
CB XB b x1 x2 x3 x4 x5
0 x3 1 2/3 0 1 -1/3 0
0 x2 4/3 -4/9 1 0 2/9 -1/3
Zj - Cj 10/3 0 0 1 2
Since all Zj – Cj are positive, therefore the solution in above table is the optimal.
Objective function value = -13
x1 = 0
x2 = 4/3
x3 = 1
(c) To solve the problem by Big M method, we will introduce again the artificial variables and add the
same variables in existing objective function with coefficient M that is actually a very large number. The
formulation becomes,
Cj -4 -6 -5 0 0 -M -M
CB XB b x1 x2 x3 x4 x5 x6 x7
-M x6 3 2 0 3 -1 0 1 0
-M x7 6 0 3 2 0 -1 0 1
Zj - Cj -2M + 4 -3M + 6 -5M + 5 M M 0 0
From above table, we see that x3 is the entering variable and x6 is leaving variable. Making this column
identity results in the following table:
Cj 0 0 0 0 0 -M
CB XB b x1 x2 x3 x4 x5 x6
-5 x3 1 2/3 0 1 -1/3 0 1/3
-M x7 4 -4/3 3 0 2/3 -1 -2/3
(2+4M)/ (5+2M)/
Zj - Cj -3M + 6 0 M 0
3 3
From above table, we see that x3 is the entering variable and x6 is leaving variable. Making this column
identity results in the following table:
Cj -4 -6 -5 0 0
CB XB b x1 x2 x3 x4 x5
-5 x3 1 2/3 0 1 -1/3 0
-6 x2 4/3 -4/9 1 0 2/9 -1/3
Zj - Cj 10/3 0 0 1 2
Since there is no entering or leaving variable after the above table so we can conclude that this is optimal.
Objective function value = -13
x1 = 0
x2 = 4/3
x3 = 1
Problem # 04
z 0 0 0 0
x5 1 0 0 7
x6 0 1 0 3
x7 0 0 1 8
[ ][ ] [ ]
1 0 0 8 8
y1 = B-1*a1 = 0 1 0 2 = 2
0 0 1 1 1
Insert the vector to the right of the tableau
z 0 0 0 0 -3
x5 1 0 0 7 8
x6 0 1 0 3 2
x7 0 0 1 8 1
Z 3/8 0 0 21/8
x1 1/8 0 0 7/8
x6 -1/4 1 0 5/4
x7 -1/8 0 1 57/8
[ ][ ] [ ]
1/8 0 0 3 3/8
y2 = B-1*a2 = −1/4 1 0 1 = 1 /4
−1/8 0 1 4 29/8