Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 9

Linear Programming and App(231-ISE-503-01)

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

Max 10x1 + 15x2 + 5x3


st: 2x1 + x2 ≤ 6000
3x1 + 3x2 + x3 ≤ 9000
x1 + 2x2 + 2x3 ≤ 4000
x1, x2, x3 ≥ 0

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

There are no entering or leaving variables in above table.


Now lets solve phase 2 where objective function is actual that is given in original problem. The tableau
for this objective function is as follws:

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,

Max -4x1 – 6x2 – 5x3 –Mx6 – Mx7


st: 2x1 + 3x3 – x4 + x6 = 3
3x2 + 2x3 – x5 + x7 = 6
x1, x2, x3, x4, x5, x6, x7 ≥ 0

The tableau for above formulation is as follows:

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

Max 3x1 + 2x2 + x3 + x4


st: 8x1 + 3x2 + 4x3 + x4 ≤ 7
2x1 + x2 + x3 + 5x4 ≤ 3
x1 + 4x2 + 5x3 + 2x4 ≤ 8
x1, x2, x3, x4 ≥ 0
Solution:
The given LP in standard form can be rewritten as:
Max 3x1 + 2x2 + x3 + x4
st: 8x1 + 3x2 + 4x3 + x4 + x5 = 7
2x1 + x2 + x3 + 5x4 + x6 = 3
x1 + 4x2 + 5x3 + 2x4 + x7 = 8
x1, x2, x3, x4, x5, x6, x7 ≥ 0
In iteration 1, we need to write the table as inverse of basis and RHS. The basis we take here are the
special variables and their inverse is also the same. The tableau is as follows:

z 0 0 0 0
x5 1 0 0 7
x6 0 1 0 3
x7 0 0 1 8

Here w = (0,0,0). zj –cj = waj – cj, we get,


z1 – c1 = -3, z2 – c2 = -2, z3 – c3 = -1, z4 – c4 = -1
Therefore, k = 1 and x1 enters the basis:

[ ][ ] [ ]
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

By elementary row operation, the tableau becomes,

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

Now in iteration 2, we have, w = (3/8,0,0). So,


z2 – c2 = -7/8, z3 – c4 = 1/2, z4 – c4 = -5/8
Therefore, k = 2 and x2 enters the basis:

[ ][ ] [ ]
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

Insert the vector to the right of the tableau

z 3/8 0 0 21/8 -7/8


x1 1/8 0 0 7/8 3/8
x6 -1/4 1 0 5/4 1/4
x7 -1/8 0 1 57/8 29/8

By elementary row operation, the tableau becomes,

z 10/29 0 7/29 126/29


x1 4/29 0 -3/29 4/29
x6 -7/32 1 -2/29 22/29
x2 -1/29 0 8/29 57/29

Now in iteration 2, we have, w = (10/29,0,7/29). So,


z3 – c3 = 46/29, z4 – c4 = -5/29
Therefore, k = 4 and x4 enters the basis:
[ ][ ] [ ]
4 /29 0 −3 /29 1 −2/29
y4 = B-1*a4 = −7/32 1 −2 /29 5 = 4309/928
−1/29 0 8 /29 2 15/29

Insert the vector to the right of the tableau

z 10/29 0 7/29 126/29 -5/29


x1 4/29 0 -3/29 4/29 -2/29
x6 -7/32 1 -2/29 22/29 4309/928
x2 -1/29 0 8/29 57/29 15/29
By elementary row operation, the tableau becomes,

z 0.3367 0.0371 0.2388 4.373


x1 0.1345 64/4309 -0.1045 0.1492
x4 -203/4309 928/4309 -64/4309 0.1634
x2 -0.0101 -480/4309 0.2835 1.8801

Now in iteration 2, we have, w = (0.3367,0.0371,0.2388). So,


z3 – c3 = 1.5779.
Since zj – cj ≥ 0 for all non-basic variables so we stop here and the optimal solution is,
Objective function value = 4.373
x1 = 0.149
x2 = 1.881
x3 = 0
x4 = 0.1642

You might also like