Assignment 3.solveddocx
Assignment 3.solveddocx
Solution P1:
Now, we have to determine the entering basic variables. Since x1 has the least
value in the Z-row it will be the entering basic variable and thus, x1-column is the
pivot column.
8/2 = 4
10/4 = 2.5 (smallest)
Thus, the row corresponding to S3 is the pivot row. So, the pivot element is 4
Hence, x1 is entering and s3 is leaving.
Now we make every value x1-column zero
Basic Z X1 X2 X3 S1 S2 S3 RHS
Z 1 0 -2 3.5 0 0 0.5 5
S1 0 0 2.5 1.75 1 0 -0.25 37.5
S2 0 0 0 0.5 0 1 -0.5 3
X1 0 1 -0.5 0.25 0 0 0.25 2.5
There are still negative values in Z-row so we did not get to optimality yet.
Since x2 is the least negative value in Z-row so it is entering
Ratio test:
37.5/2.5 = 15
3/0 = undefined (ignore)
2.5/-0.5 = -5 (ignore)
Thus, s1 is leaving
Basic Z X1 X2 X3 S1 S2 S3 RHS
Z 1 0 0 4.9 0.8 0 0.3 35
X2 0 0 1 0.7 0.4 0 -0.1 15
S2 0 0 0 0.5 0 1 -0.5 3
X1 0 1 0 0.6 0.2 0 0.2 10
Since there is no negative values in the Z-row this is the optimal solution:
X1 = 10
X2 = 15
X3 = 0
Slack:
S1 = 0
S2 = 3
S3 = 0
Optimal value:
Z = 35
IE311: Operations Research I
Problem 2
Use the Simplex method to solve the following LP problem:
3x1 + 2x2 – s1 + a1 = 60
-x1 + x2 + s2 = 20
3x1 + x2 + a2 = 45
And non negativity for all variables
Min z – 5x1 – 2x2 – 0s1 - 0s2 + Ma1 + Ma2 = 0
basic X1 X2 S1 S2 A1 A1 RHS
A1 3 2 -1 0 1 0 60
S2 -1 1 0 1 0 0 20
A2 3 1 0 0 0 1 45
z-row -5 – -2 -2M 0 0 -M -M -60M -45M
3M
Ratio test:
60/3 = 20
20/-1 = -20 (ignore)
45/3 = 15 (smallest)
So a2 leaves the basis
basic X1 X2 S1 S2 A1 A1 RHS
A1 0 1 -1 0 1 -1 15
S2 0 4/3 0 1 0 1/3 35
X1 1 1/3 0 0 0 1/3 15
z-row 0 (-1- 0 0 -M -5/3 -105M +
IE311: Operations Research I
3M)/3 75
Ratio test:
15/1 = 15
35 / 4/3 = 26.25
15 / 1/3 = 45
So a1 leaves the basis
basic X1 X2 S1 S2 A1 A1 RHS
X2 0 1 -1 0 1 -1 15
S2 0 0 4/3 1 -4/3 5/9 15
X1 1 0 1/3 0 -1/3 4/9 10
z-row 0 0 -2/3 0 -M/3 -2 -90M + 80
Ratio test:
15/-1 = (ignore)
15/ 4/3 = 11.25
10 / 1/3 = 30
So s2 leaves the basis
basic X1 X2 S1 S2 A1 A1 RHS
X2 0 1 0 3/4 2 -7/12 26.25
S1 0 0 1 3/4 -1 5/12 11.25
X1 1 0 0 =1/4 0 11/3 6.25
6
z-row 0 0 0 1/2 -M/3 + 2/3 - -90M +
62/3 87.5
6
The z-row has no more negative values so we have reached the optimal solution
X1 = 6.25
X2 = 26.25
S1 = 11.25
Z = 87.5
IE311: Operations Research I
Problem 3
Solve the following LP problem using the Simplex method:
Maximize Z = 2X2 + X3
subject to X1 – X2 + X3 ≤ 5
-2X1 + X2 ≤3
X2 – 2X3 ≤ 5
X1, X2, X3 ≥ 0
Basic X1 X2 X3 S1 S2 S3 RHS
S1 1 -1 1 1 0 0 5
S2 -2 1 0 0 1 0 3
S3 0 1 -2 0 0 1 5
Z 0 -2 -1 0 0 0 0
X2 entering the basic
Ratio test:
5/-1 = (ignore)
3/1 = 3
5/1 = 5
S2 leaves the basic
Basic X1 X2 X3 S1 S2 S3 RHS
S1 1 0 1 1 1 0 8
X2 -2 1 0 0 1 0 3
S3 2 0 -2 0 -1 1 2
IE311: Operations Research I
Z 4 0 -1 0 2 0 6
Ratio test:
8/1 = 8
3/0 = (ignore)
2/-2 = (ignore)
S1 leaves the basic
Basic X1 X2 X3 S1 S2 S3 RHS
X3 1 0 1 1 1 0 8
X2 -2 1 0 0 1 0 3
S3 4 0 0 2 1 1 18
Z 5 0 0 1 3 0 14
Since all variables in z-row are non-negative, this is the optimal solution
X3 = 8
X2 = 3
S3 = 18
Z = 14
Problem 4
Solve the following LP problem using the Simplex method:
Maximize Z = X + Y
subject to X + 2Y ≤ 8
3X + 2Y ≤ 12
X + 3Y ≥ 13
X, Y ≥ 0
X + 2y + s1 = 8
IE311: Operations Research I
3x + 2y + s2 = 12
X + 3y – s3 + a3 = 13
Objective function:
Z – x – y – Ma3 = 0
Basic X Y S1 S2 S3 A3 RHS
S1 1 2 1 0 0 0 8
S2 3 2 0 1 0 0 12
A3 1 3 0 0 -1 1 13
Z -1 -1 0 0 0 -M 0
Basic X Y S1 S2 S3 A3 RHS
S1 0 4/3 1 -1/3 0 0 4
X 1 2/3 0 1/3 0 0 4
A3 0 7/3 0 -1/3 -1 1 9
Z 0 -1/3 0 1/3 0 -M 4
Ratio test:
4 / 4/3 = 3 (smallest)
4 / 2/3 = 6
9 / 7/3 = 3.86
IE311: Operations Research I
Basic X Y S1 S2 S3 A3 RHS
Y 0 1 3/4 -1/4 0 0 3
X 1 0 -1/2 ½ 0 0 2
A3 0 0 =7/4 ¼ -1 1 -2
Z 0 0 1/4 ¼ 0 -M 5
Since there is a negative value in the RHS column. Then the problem has no
feasible solution