Sunteți pe pagina 1din 10

Name: Jomara Celia, Rosell Rosales

Email: jomararr@email.arizona.edu
Page 130:
Problem 3:
Convert the following LP to standard form:
min z=3 x 1+ x 2

s.t .
x1 ≥ 3

x 1+ x2 ≤ 4

2 x1 −x2 =3

x1 , x2 ≥ 0

Solution:
Introduce a surplus variable e 1 to the first constraint and a slack variable S2 to the
second constraint, to replace the inequality constraint to equality constraints.
x 1−e 1=3

x 1+ x2 + S2=4

Therefore, the standard form can be written as:


min z=3 x 1+ x 2

s.t .
x 1−e 1=3

x 1+ x2 + S2=4

2 x1 −x2 =3

x1 , x2 , e1 , S2 ≥ 0

Page 149:
Problem 2:
Solution:
Introducing slack variables S1 and S2 becomes
max z=2 x 1+3 x 2 +0 S 1 +0 S 2
s.t .
x 1+ 2 x 2 +1 S1 +0 S2 =6

2 x1 + x 2 +0 S 1+ 1 S2 =8

x 1 , x 2 , S1 , S 2 ≥ 0

The first simplex tableau is shown below


Iteration -1 Cj
B CB XB x1 x2 S1 S2 XB
Min Ratio:
x2

S1 0 6 1 2 1 0 6
=3 →
2

S2 0 8 2 1 0 1 8
=8
1

Z=0 Zj 0 0 0 0
Z j−C j -2 -3↑ 0 0

The most negative Z j−C j is -3, So, the entering variable is ( x 2 ¿

The minimum value in min ratio is 3, So, the leaving variable is ( S1 ¿


The pivot element is 2
Hence, the Entering = x 2; Leaving = S1; Pivot element: 2
The second iteration of the simplex tableau is shown below
Iteration -2 Cj 2 3 0 0
B CB XB x1 x2 S1 S2 XB
Min Ratio:
x1

x2 3 3 1 1 1 0 6
=6 →
2 2 1

S2 0 5 3 0 −1 1 10
=3.333→
2 2 3

Z=9 Zj 3 3 3 0
2 2

Z j−C j −1 0 3 0

2 2
−1
The most negative Z j−C j is , So, the entering variable is ( x 1 ¿
2
The minimum value in min ratio is 3.333, So, the leaving variable is ( S2 ¿
−3
The pivot element is
2
3
Hence, the Entering = x 1; Leaving = S2; Pivot element:
2

Iteration -3 Cj 2 3 0 0
B CB XB x1 x2 S1 S2 XB
Min Ratio:
x1

x2 3 4 0 1 2 −1
3 3 3

x1 2 10 1 0 −1 2
3 3 3

32 Zj 2 3 4 1
Z=
3 3 3

Z j−C j 0 0 4 1
3 3

It is observed that the all Z j−C j ≥ 0


10 4
The optimal solution is arrived with value of variables as x 1= and x 2=
3 3
32
The maximization Z is: Max (z )=
3

Problem 3:
First, Introduce slack variables as S1 , S 2 , S 3

Such that
3 x 1+ x 2 + x 3+ S 1=60

x 1−x 2+ 2 x 3 +S 2=10

x 1+ x2−x 3 + S3 =20
Therefore, the standard form is:
max z=2 x 1−x 2+ x 3

s.t .
3 x 1+ x 2 + x 3+ S 1=60

x 1−x 2+ 2 x 3 +S 2=10

x 1+ x1−x 3 + S3 =20

x 1 , x 2 , x 3 , S1 , S 2 , S3 ≥ 0

The first simplex tableau is shown below:


z x1 x2 x3 S1 S2 S3 rhs Basic variable

1 -2 1 -1 0 0 0 0 Z=0

0 3 1 1 1 0 0 60 S1=60

0 1 -1 2 0 1 0 10 S2=10

0 1 1 -1 0 0 1 20 S3=20

Hence -2 is the most negative entry in row 0. So, the entering variable to be x 1

z x1 x2 x3 S1 S2 S3 rhs Ratio

1 -2 1 -1 0 0 0 0 Z=0

0 3 1 1 1 0 0 60 60
=20
3
0 1 -1 2 0 1 0 10 10
=10
(enterin 1
g
variable)
0 1 1 -1 0 0 1 20 20
=20
1

Since, the smallest number in the ratio is 10, the leaving basis variables is S2
Therefore, 1 in the row 2 is the pivot element. Apply the following operations in the
given order,
R0 → R 0+ 2 R2

R'1 → R1−3 R 2

R'2 → R2

R'3 → R3 −R2

Thus, the simplex table will be,


z x1 x2 x3 S1 S2 S3 rhs Basic variable

1 0 -1 3 0 2 0 20 Z = 20

0 0 4 -5 1 -3 0 30 S1=30

0 1 -1 2 0 1 0 10 S2=10

0 0 2 -3 0 -1 1 10 S3=10

Here -1 is the most negative entry in row 0. So, the entering variable to be x 2

z x1 x2 x3 S1 S2 S3 rhs Ratio

1 0 -1 3 0 2 0 20 -

0 0 4 -5 1 -3 0 30 30
=7.5
4
0 1 -1 2 0 1 0 10 -

0 0 2 -3 0 -1 1 10 10
=5 →
(enterin 2
g
variable)

Since, the smallest number in the ratio is 5, the leaving basis variables is S3. Therefore,
2 in the row 3 is the pivot element.
Apply the following operation in the given order,
1
R3 ' ' → R'3
2

R'0' → R 0 + R3 ' '

R'1' → R '1−4 R3 ' '


R'2' → R '2+ R 3 ' '

Thus, the simplex table will be,


z x1 x2 x3 S1 S2 S3 rhs Basic variable

1 0 0 3 0 3 1 25 Z = 25
2 2 2
0 0 0 1 1 -1 -2 10 S1=10

0 1 0 1 0 1 1 15 S2=15
2 2 2
0 0 1 −3 0 −1 1 5 S3=5
2 2 2

Since there is no negative number in row 0, the optimal solution has been
obtained. Therefore, maximum value of Z = 25 and the optimal solution
are,
x 1=15 x 2=5

x 3=0

Problem 6:
Use the simple algorithm to the following L.P.P.
max z=x 1 + x 2+ x 3

s.t .
x 1+ 2 x 2 +2 x 3 ≤20

2 x1 + x 2 +2 x 3 ≤20

2 x1 +2 x 2+ x 3 ≤20

x1 , x2 , x3 ≥ 0

The standard form of the L.P.P. is given by


max z=x 1 + x 2+ x 3 +0 S1 +0 S 2 +0 S 3

subject ¿ ,
x 1+ 2 x 2 +2 x 3 + S1=20

2 x1 + x 2 +2 x 3 + S2=20

2 x1 +2 x 2+ x 3 + S3=20
x 1 , x 2 , x 3 , S1 , S 2 , S3 ≥ 0

To solve the problem using simple problem, the first iteration shown below:

Iteration Cj 1 1 1 0 0 0
-1
B CB XB x1 x2 x3 S1 S2 S3 XB
Min Ratio:
x1

S1 0 20 1 2 2 1 0 0 20
=20
1

S2 0 20 (2) 1 2 0 1 0 20
=10 →
2

S3 0 20 2 2 1 0 0 1 20
=10
2

Z=0 Zj 0 0 0 0 0 0
Z j−C j -1↑ -1 -1 0 0 0
Negative minimum Z j−C j is -1 and its column index is 1. So entering variable is x 1.

Minimum ratio is 10 and its row index is 2. So, the leaving basis variable is S2.
Hence, the pivot element is 2.
Entering variable = x 1

Departing variable = S2
Key element = 2
Performing the following row operations:
R2
R2 ←
2
R1 ← R1−R 2

R3 ← R3 −2 R 2

The table for second iteration is shown below:


Iteration Cj 1 1 1 0 0 0
-2
B CB XB x1 x2 x3 S1 S2 S3 XB
Min Ratio:
x2
S1 0 10 0 1.5 1 1 0.5 0 10
=6.6667
1.5

x1 0 10 1 0.5 1 0 0.5 0 10
=20
0.5
S3 0 0 0 (1) -1 0 -1 1 0
=0 →
1

Z=10 Zj 1 0.5 1 0 0.5 0


Z j−C j 0 -0.5↑ 0 0 0.5 0

Negative minimum Z j−C j is -0.5 and its column index is 2. So entering variable is x 2.

Minimum ratio is 0 and its row index is 3. So, the leaving basis variable is S3.
Hence, the pivot element is 1.
Entering variable = x 2

Departing variable = S3
Key element = 1
Performing the following row operations:
R3 ← R3

R1 ← R1−1.5 R3

R2 ← R2 −0.5 R 3

The table for third iteration is shown below:

Iteration Cj 1 1 1 0 0 0
-3
B CB XB x1 x2 x3 S1 S2 S3 XB
Min Ratio:
x3

S1 0 10 0 0 (2.5) 1 1 -1.5 10
=4 →
2.5

x1 1 10 1 0 1.5 0 1 -0.5 10
=6.6667
1.5
x2 1 0 0 1 -1 0 -1 1

Z=10 Zj 1 1 0.5 0 0 0.5


Z j−C j 0 0 -0.5↑ 0 0 0.5
Negative minimum Z j−C j is -0.5 and its column index is 3. So entering variable is x 3.

Minimum ratio is 4 and its row index is 1. So, the leaving basis variable is S1.
Hence, the pivot element is 2.5.
Entering variable = x 3

Departing variable = S1
Key element = 2.5
Performing the following row operations:
R1
R1 ←
2.5
R2 ← R2 −1.5 R1

R3 ← R3 + R1

The table for third iteration is shown below:


Iteration Cj 1 1 1 0 0 0
-4
B CB XB x1 x2 x3 S1 S2 S3 XB
Min Ratio:
x3

x3 1 4 0 0 1 0.4 0.4 -0.6

x1 1 4 1 0 0 -0.6 0.4 0.4

x2 1 4 0 1 0 0.4 -0.6 0.4

Z=12 Zj 1 1 1 0. 0.2 0.2


2
Z j−C j 0 0 0 0.2 0.2 0.2

Since all Z j−C j ≥ 0, so the optimal solution is at the following values of variables:
x 1=4

x 2=4

x 3=4

The Optimal value of the objective function is obtained as:


Max Z = x 1+ x2 + x 3
¿ 4 +4 +4
¿ 12
Therefore, the maximum value of the objective function is 12.

S-ar putea să vă placă și