Documente Academic
Documente Profesional
Documente Cultură
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
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
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
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
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
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
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
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
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
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
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
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
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
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