Beruflich Dokumente
Kultur Dokumente
Technique
Group 1
Group members:
Ken John Barcelona
Jessica Ebio
Prof. Edgardo S. Dajao
Jasper Lloyd R. Salvador
Francis Joseph J. Custodio
Kristian Lazona
Solving Maximization Problem using the Simplex Method or
Gauss-Jordan Method:
A. CASE 2. WHEN THE MAXIMIZATION LP MODEL HAS ONE “ ≥ ” INEQUALITY
SIGN IN THE CONSTRAINT EQUATIONS AND THE REST ARE “ ≤ “
B. CASE 3. WHEN THE MAXIMIZATION LP MODEL HAS ONE “ = ” EQUALITY
SIGN IN THE CONSTRAINT EQUATIONS AND THE REST ARE “ < “
C. CASE 4: WHEN THE MAXIMIZATION LP MODEL HAS UNRESTRICTED
(E.G. NO CONDITION) INEQUALITY/EQUALITY SIGNS IN THE CONSTRAINT EQU
ATIONS.
D. HOW TO SOLVE MINIMIZATION LP MODEL
CASE 2. WHEN THE MAXIMIZATION LP MODEL
HAS ONE “ ≥ ” INEQUALITY SIGN IN THE
CONSTRAINT EQUATIONS AND THE REST ARE “ ≤
“
Given:
Max Z = 3X1 + 5X2
X1 ≤ 4
2X2 ≥ 12
3X1 +2X2 ≤ 18
where X1 ≥ 0, X2 ≥ 0
Solution: For equation with “≥” inequality sign in the constraint, subtract a nonnegative slack variable.
For the rest of constraint equations, add a nonnegative slack variable in each equation.
Augmented Form:
Z -3X1 - 5X2 = 0
X1 + X3 = 4
2X2 - X4 = 12
3X1 +2X2 + X5 = 18
Creating the Matrix Table
BV Z X1 X2 X3 X4 X5 RHS
Z 1 -3 -5 0 0 0 0
X3 0 1 0 1 0 0 4
X4 0 0 2 0 -1 0 12
X5 0 3 2 0 0 1 18
BV Z X1 X2 X3 X4 X5 X6 RHS
Z 1 -3 -2M-5 0 M 0 0 -12M
X3 0 1 0 1 0 0 0 4
X6 0 0 2 0 -1 0 1 12
X5 0 3 2 0 0 1 0 18
Select the least value among the calculated values , 2nd row, 6
Creating the NEW Matrix Table
BV Z X1 X2 X3 X4 X5 X6 RHS
Z 1 -3 -2M-5 0 M 0 0 -12M
X3 0 1 0 1 0 0 0 4
X6 0 0 2 0 -1 0 1 12
X5 0 3 2 0 0 1 0 18
The pivot point should be equal to 1. Therefore divide the entire pivot row by 2.
BV Z X1 X2 X3 X4 X5 X6 RHS
X6 0 0 2 0 -1 0 1 12
X6 is leaving and will be replaced by X2
X2 0 0 1 0 -1/2 0 1/2 6
For X3 row, Column X2 is already equal to 0, proceed to other rows.
BV Z X1 X2 X3 X4 X5 X6 RHS
X3 0 1 0 1 0 0 0 4
Next step, convert all other rows in order for the pivotal column (X2) to be equal to 0.
For the 1st row (Z row), Multiply 2M+5 to X2 Row: Z row + 2M+5 X2 Row
BV Z X1 X2 X3 X4 X5 X6 RHS
Z 1 -3 -2M-5 0 M 0 0 -12M
X2 0 0 1 0 -1/2 0 1/2 6
New Z Row
BV Z X1 X2 X3 X4 X5 X6 RHS
Z 1 -3 0 0 -5/2 0 5/2 + M 30
For the 4th row (X5 row), Multiply -2 to X2 Row: X5 row + -2X2 Row
BV Z X1 X2 X3 X4 X5 X6 RHS
X5 0 3 2 0 0 1 0 18
X2 0 0 1 0 -1/2 0 1/2 6
New Z Row
BV Z X1 X2 X3 X4 X5 X6 RHS
X5 0 3 0 0 1 1 -1 6
Update Matrix
BV Z X1 X2 X3 X4 X5 X6 RHS
Z 1 -3 0 0 -5/2 0 5/2+M 30
X3 0 1 0 1 0 0 0 4
X2 0 0 1 0 -1/2 0 1/2 6
X5 0 3 0 0 1 1 -1 6
Then, determine the pivot row Select the least value among
2nd row RHS/ X1 = 4/1= 4 the calculated values , 4th row,
3rd row RHS/ X1 = 6/0 = ∞
2
4th row RHS/ X1 = 6/3 = 2
Determine the Leaving Variable
The pivot point should be equal to 1. Therefore divide the entire pivot row by 3.
X5 0 3 0 0 1 1 -1 6
BV Z X1 X2 X3 X4 X5 X6 RHS
X1 0 1 0 0 1/3 1/3 -1/3 2
Next step, convert all other rows in order for the pivotal column (X1) to be equal to 0.
For the 1st row (Z row), Multiply 3 to X1 Row: Z row + 3X1 Row
BV Z X1 X2 X3 X4 X5 X6 RHS
Z 1 -3 0 0 -5/2 0 5/2+M 30
BV Z X1 X2 X3 X4 X5 X6 RHS
Z 1 0 0 0 -3/2 1 -3/2+M 36
X1 for X2 Column is equal to zero, proceed with other rows.
BV Z X1 X2 X3 X4 X5 X6 RHS
X2 0 0 1 0 -1/2 0 1/2 6
For the 2nd row (X3 row), Subtract X1 Row from X3 row : X3 row - X1 Row
BV Z X1 X2 X3 X4 X5 X6 RHS
X3 0 1 0 1 0 0 0 4
BV Z X1 X2 X3 X4 X5 X6 RHS
X3 0 0 0 1 -1/3 -1/3 1/3 2
New Matrix
BV Z X1 X2 X3 X4 X5 X6 RHS
Z 1 0 0 0 -3/2 1 -3/2+M 36
X1 0 1 0 0 1/3 1/3 -1/3 2
X2 0 0 1 0 -1/2 0 1/2 6
X3 0 0 0 1 -1/3 -1/3 1/3 2
Final Answer:
Z = 36
X1= 2
X2= 6
Subject to constraints
x1 <= 4
2x2 <= 12
3x1 + 2x2 = 18
and
x1 >= 0; x2 >= 0
Augmented form:
(0) Z - 3x1 - 5x2 =0
(1) x1 + x3 =4
(2) 2x2 + x4 = 12
(3) 3x1 + 2x2 = 18
Initial BF Solution
1. Artificial-variable technique (𝑥 5)
(3) 3x1 + 2x2 +𝑥 5 = 18
Pivot Column
X5 0 3 2 0 0 1 18
X1 (0 1 0 1 0 0 4) 3
0 3 2 0 0 1 18
(0 3 0 3 0 0 12) SUBTRACT
0 0 2 -3 0 1 6
B.V. Eq. Z X1 X2 X3 X4 X5 RHS
Pivot Column
Z 0
X1 1
X4 2
X2 3 0 0 1 -3/2 0 1/2 3
Z 1 0 -2M-5 3M+3 0 0 -6M+12
X2 (0 0 1 -3/2 0 1/2 3 ) 2M+5
1 0 0 -9/2 0 M+5/2 27
Z 0 1 0 0 -9/2 0 M+5/2 27
X1 1
X4 2
X2 3 0 0 1 -3/2 0 1/2 3
Pivot Column
Z 0 1 0 0 -9/2 0 M+5/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M+5/2 27
X1 1 0 1 0 1 0 0 4 4
Pivot Row X4 2 0 0 0 3 1 -1 6 2
X2 3 0 0 1 -3/2 0 1/2 3 -2
Pivot Number
Z 0 1 0 0 0 3/2 M+1 36
X1 1 0 1 0 0 -1/3 1/3 2
X3 2 0 0 0 1 1/3 -1/3 2
X2 3
X2 0 0 1 -3/2 0 1/2 3
X3 (0 0 0 1 1/3 -1/3 2 )3/2
X2 0 0 1 -3/2 0 1/2 3
X3 (0 0 0 3/2 1/2 -1/2 3 ) ADD
0 0 1 0 1/2 0 6
Z 0 1 0 0 0 3/2 M+1 36
X1 1 0 1 0 0 -1/3 1/3 2
X3 2 0 0 0 1 1/3 -1/3 2
X2 3 0 0 1 0 1/2 0 6
ANSWER:
Z = 36
X1 = 2
X2 = 6
Case 4: When the maximization LP model has unr
estricted
(e.g. no condition) inequality/equality signs in the
constraint equations.
This is the equation we will need to work on: Equation after adding slack and artificial
Variables (Augmented Form):
Z = 3X1+5X2
Z - 3X1 – 5X2 + MẊ4 + MẊ6 = 0
X1 ≤ 4
X1 + X3 = 4
2X2 ≥12
2X2 – X5 + Ẋ4 = 12
3X1+2X2=18
3X1 + 2X2 + Ẋ6 = 18
X1 ≥ 0, X2 ≥ 0
BV Z X1 X2 X3 Ẋ4 X5 Ẋ6 RHS
Z 1 -3 -5 0 M 0 M 0
X3 0 1 0 1 0 0 0 4
Ẋ4 0 0 2 0 1 -1 0 12
Ẋ6 0 3 2 0 0 0 1 18
X3 0 1 0 1 0 0 0 4
Ẋ4 0 0 2 0 1 -1 0 12
Ẋ6 0 3 2 0 0 0 1 18
Select the most negative value on the Z row, which is -4M-5 to determine the pivot
Column. So X2 will be the Entering variable.
To determine the pivot row, just divided the constants with its corresponding variable based on the pivot column.
Row 3 RHS/Ẋ4 = 12/2 = 6
Row 4 RHS/Ẋ6 = 18/2 = 9
Select the least value among the calculated values to appoint the pivot row. We will
select Row 3. So Ẋ4 will be the Leaving variable.
Set the pivot point into identity value or equal to 1
1/2( 0 0 2 0 1 -1 0 12 )
0 0 1 0 1/2 -1/2 0 6
We proceed solving for the 1st row and 4th row. To solve:
New 4th
row New table
BV Z X1 X2 X3 Ẋ4 X5 Ẋ6 RHS
Z 1 -3M-3 0 0 (4M+5)/2 –M-5/2 0 -6M+30
X3 0 1 0 1 0 0 0 4
Ẋ2 0 0 1 0 1/2 -1/2 0 6
X6 0 3 0 0 -1 1 1 6
BV Z X1 X2 X3 Ẋ4 X5 Ẋ6 RHS
X3 0 1 0 1 0 0 0 4
Ẋ4 0 0 1 0 1/2 -1/2 0 6
X6 0 3 0 0 -1 1 1 6
Select the smallest value on the Z row, which is -3M-3 to determine the pivot
Column. So X1 will be the Entering variable.
To determine the pivot row, just divided the constants with its corresponding variable
based on the pivot column.
Row 2 RHS/Ẋ3 = 4/1 =4
Row 4 RHS/Ẋ6 = 6/3 =2
Select the least value among the calculated values to appoint the pivot row. We will select Row 4. So Ẋ6 will be
the Leaving variable.
Set the pivot point into identity value or equal to 1
1/3( 0 3 0 0 -1 1 1 6)
0 1 0 0 -1/3 1/3 1/3 2
We proceed solving for the 1st & 2nd row. To solve:
BV Z X1 X2 X3 Ẋ4 X5 Ẋ6 RHS
Z 1 0 0 0 M+3/2 -3/2 M+1 36
X3 0 0 0 1 1/3 -1/3 -1/3 2
X2 0 0 1 0 1/2 -1/2 0 6
X1 0 1 0 0 -1/3 1/3 1/3 2
Therefore
Minimize Z = X1 +X2
will be:
Maximize –Z = -X1 - X2
Sample on Minimization
Augmented form:
Minimize Z = 3X1 + 5X2 +MX6
Z - 3X1 - 5X2 -MX6 =0
X1 + X3 =4
2 X2 + X4 =12
3 X1 + 2 X2 -X5 +X6 = 18
BV -Z X1 X2 X3 X4 X5 X6 RHS
-Z 1 3 5 0 0 0 M 0
X3 0 1 0 1 0 0 0 4
X4 0 0 2 0 1 0 0 12
X6 0 3 2 0 0 -1 1 18
Creating a Matrix Table:
BV -Z X1 X2 X3 X4 X5 X6 RHS
-Z 1 3 5 0 0 0 M 0
X3 0 1 0 1 0 0 0 4
X4 0 0 2 0 1 0 0 12
X6 0 3 2 0 0 -1 1 18
To algebraically eliminate X6 from row1 , we need to subtract M time row 4 from Row 1.
3 5 0 M 0
- M( 3 2 -1 1 18 )
3-3M 5-2M M 0 -18M
This will be the new row 1.
BV -Z X1 X2 X3 X4 X5 X6 RHS
-Z 1 3-3M 5-2M 0 0 M 0 -18M
X3 0 1 0 1 0 0 0 4
X4 0 0 2 0 1 0 0 12
X6 0 3 2 0 0 -1 1 18
Matrix Table:
BV -Z X1 X2 X3 X4 X5 X6 RHS
-Z 1 3-3M 5-2M 0 0 M 0 -18M
X3 0 1 0 1 0 0 0 4
X4 0 0 2 0 1 0 0 12
X6 0 3 2 0 0 -1 1 18
BV -Z X1 X2 X3 X4 X5 X6 RHS
-Z 1 0 5-2M -3+3M 0 M 0 12-6M
X1 0 1 0 1 0 0 0 4
X4 0 0 2 0 1 0 0 12
X6 0 0 2 -3 0 -1 1 6
BV -Z X1 X2 X3 X4 X5 X6 RHS
-Z 1 0 0 9/2 0 5/2 M-(5/2) -27
X1 0 1 0 1 0 0 0 4
X4 0 0 0 3 1 1 -1 6
X2 0 0 1 -3/2 0 -1/2 1/2 3
Matrix Table:
BV -Z X1 X2 X3 X4 X5 X6 RHS
-Z 1 0 0 9/2 0 5/2 M-(5/2) -27
X1 0 1 0 1 0 0 0 4
X4 0 0 0 3 1 1 -1 6
X2 0 0 1 -3/2 0 -1/2 1/2 3
Now the –Z is-27 when X1 = 4 and X2 = 3. The question is to minimize, so when to convert back to the original format:
from
Maximize –Z = -3X1 - 5X2 -Z = -27
will be:
Therefore:
Z= 27
X1 = 4
X2 = 3