0% found this document useful (0 votes)
21 views8 pages

Assignment 3.solveddocx

The document presents solutions to four linear programming (LP) problems using the Simplex method. Each problem includes the objective function, constraints, conversion to standard form, and step-by-step calculations to find the optimal solution or determine infeasibility. The final results for the optimal values and variable assignments are provided for each problem.

Uploaded by

fbander919
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
21 views8 pages

Assignment 3.solveddocx

The document presents solutions to four linear programming (LP) problems using the Simplex method. Each problem includes the objective function, constraints, conversion to standard form, and step-by-step calculations to find the optimal solution or determine infeasibility. The final results for the optimal values and variable assignments are provided for each problem.

Uploaded by

fbander919
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 8

IE311: Operations Research I

IE311: Operations Research I


Assignment 3: Simplex Method
Fahad al-oufi 2338850
Problem 1
Use the Simplex method to solve the following LP problem:

Maximize Z = 2X1 + X2 - 3X3


subject to
X1 + 2X2 + 2X3 ≤ 40
2X1 – X2 + X3 ≤ 8
4X1 – 2X2 + X3 ≤ 10
And
X1 ≥ 0, X2 ≥ 0, X3 ≥ 0

Solution P1:

First we have to convert to standard form:


Max z = 2x1 + x2 -3x3 + 0s1 + 0s2 + 0s3
Z – 2x1 -x2 +3x3 - 0s1 - 0s2 - 0s3 = 0
Subject to
X1 + 2x2 + 2x3 + s1 = 40
2x1 – x2 + x3 + s2 = 8
4x1 – 2x2 + x3 + s3 = 10
And
X1,x2,x3,s1,s2,s3 ≥ 0
Basic Z X1 X2 X3 S1 S2 S3 RHS
Z 1 -2 -1 3 0 0 0 0
S1 0 1 2 2 1 0 0 40
S2 0 2 -1 1 0 1 0 8
S3 0 4 -2 1 0 0 1 10
Initial solution:
X1 = 0, x2 = 0, x3 = 0, s1 = 40, s2 = 8, s3 = 10, Z = 0
Now, since there are negative values in Z-row this is not the optimal solution.

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.

To identify the pivot row, we will do the ratio test


40/1 = 40
IE311: Operations Research I

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:

Minimize Z = 5X1 + 2X2


subject to
3X1 + 2X2 ≥ 60
X1 – X2 ≥ -20 (Hint: RHS must be positive!)
3X1 + X2 = 45
And
X1 ≥ 0, X2 ≥ 0

Converting to standard form:

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

The most negative coefficient in z-row is -5-3M so x1 enters the basis

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

The most negative coefficient in z-row is (-1-3M)/3 so x2 enters the basis

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

S1 enters the basis since it is the only negative value

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

Converting to standard form:


X1 – x2 + x3 + s1 = 5
-2x1 + x2 + s2 = 3
X2 – 2x3 + s3 = 5
Objective function:
Z – 2x2 – 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

X3 enters the basic

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

Converting to standard form:

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

The most negative actual coefficient in the z row is x = -1


So x is entering the basic
Ratio test:
8/1 = 8
12/3 = 4 (smallest)
13/1 = 13
So, s2 leaves the basic

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

The most negative actual coefficient in the z row is y = -1/3


So y enters the basic

Ratio test:
4 / 4/3 = 3 (smallest)
4 / 2/3 = 6
9 / 7/3 = 3.86
IE311: Operations Research I

So s1 leaves the basic

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

You might also like