Sei sulla pagina 1di 56

DUALITY AND

SENSITIVITY ANALYSIS
Chapter 4: Group 3
Sumili, Ruther Itable, Joseph Talag, Arwil
De Guzman, Alino Martinez, Aldrine
Gualberto, Nigie Bhoy Rivera, Andrei Nicole
• Primal Problem - is the original formulation of linear
programming problem.

• Dual Problem - is a counterpart Linear Programming problem


associated with the primal formulation.
A. RELATIONSHIP BETWEEN PRIMAL AND
DUAL MODELS
1. The dual variables correspond to the model constraints in the
primal. For every constraint in the primal there will be a variable in
the dual.
2. The quantity values on the right-hand-side of the primal inequality
constraints are the objective function coefficients in the dual.
3. The model constraints coefficients in the primal are the decision
variable coefficients in the dual.
4. The objective function coefficients in the primal represent the
model constraint requirements (quantity values on the right-hand-
side of the constraint) in the dual.
5. The maximization primal model has ≤ constraints; the
minimization dual model has ≥ constraints.
PRIMAL CONVERSION DUAL

Maximization Problem Minimization Problem


Minimization
Minimization Problem
Problem Maximization
Maximization Problem
Problem
Objective
Objective Coefficients
Coefficients RHS
RHS Values
Values
RHS
RHS Values
Values Objective
Objective Coefficients
Coefficients
No. of Variables No. of Constraints
No. of Variables No. of Constraints
No. of Constraints No. of Variables
No. of Constraints No. of Variables
Variables are in terms of Variables are in terms of
B. CREATING THE DUAL PROBLEM

1. Convert the primal LP model in a coefficient matrix.

2. Apply matrix transposition of the matrix.

3. Construct a set of inequalities using the coefficients of the


matrix transposition. These form the dual problem.
C. ESTABLISHING DUAL SOLUTION OF AN LP
MODEL

1. Write the dual problem.

2. Use the simplex method to determine the dual solution.

3. Read the answers to the primal problem from the last row
of the final tableau,
Duality on Standard Linear
Programming Maximization Model

Example: A local boutique produced two designs of gowns A and B has


the following materials available: 18 square meters of cotton, 20 square
meters of silk, and 5 meters of wool. Design A requires the following: 3
square meters of cotton, 2 square meters of silk and 1 square meter of
wool. Design B requires the following: 2 square meters of cotton , 4
square meters of silk. If Design A sells for ₱1,200 and Design B for
₱1,600, how many of each garment should the boutique produce to
obtain the maximum amount of money?
Duality on Standard Linear
Programming Maximization Model

Example:

A local boutique produced two designs of gowns A and B has the


following materials available: 18 square meters of cotton, 20 square
meters of silk, and 5 meters of wool. Design A requires the
following: 3 square meters of cotton, 2 square meters of silk and 1
square meter of wool. Design B requires the following: 2 square
meters of cotton , 4 square meters of silk. If Design A sells for
₱1,200 and Design B for ₱1,600, how many of each garment should
the boutique produce to obtain the maximum amount of money?
 Solution:

Step 1: Represent the unknown in the problem.


Let be the number of a Design A, and
be the number of Design B gowns.
Step 2: Tabulate the data about the facts (if necessary).

Materials Design A Design B Available

Cotton 3 2 18

Silk 2 4 20

Wool 1 0 5

Profit ₱1,200 ₱1,600


 Step 3: Formulate the objective function and constraints by
restating the information in mathematical form.
The objective function is:
Maximize:

The constraint are:


18

Primal Problem
Step 4: Convert the given primal linear programming problem in matrix
form.
RHS
3 2 18
Matrix(M)=
2 4 20 Constraint
1 0 5 coefficients
1,200 1,600

 Then, determine the transpose of the matrix. We shall use to denote


that we are dealing with the dual problem.

 Matrix RHS
Transpose()=
3 2 1 1,200
Constraint
2 4 0 1,600 coefficients

18 20 5
Objective Function
coefficients
 Step 5: Now construct a minimization problem which is the
dual problem with non-negative variables whose matrices
transpose and all whose constraints are the “less than or
equal to” variety.

Minimize:
Subject to:
Dual Problem

 Step 6: Convert the dual problem in to its Standard Form and


solve.

1,600
Step 7: Set up the initial tableau.
Step 8: Select the pivot column , identify the pivot row of
Tableau 1

Tableau 1.

BV P RHS Test Ratio

3 2 1 -1 0 0 1,200 1,200 2 = 600


R
 

2 4 0 0 -1 0 1,600 1,600 4 = 400  R

P 18 20 5 0 0 1 0  R

Step 9: Compute for replacing row and the remaining rows of Tableau 1.
Return to Step 8, Since the last row still contains a positive entries.
Step 8: Select the pivot column, Identify the pivot row and
the pivot of Tableau 2.
Tableau 2
BV P RHS Computation
2
2 0
0 11 -1
-1 ½
½ 0
0 400
400 R= R - 2R

½ 1 0 0 -¼ 0 400 R= R P
½ 1 0 0 -¼ 0 400
P 8 0 5 0 5 1 -8,000 R= R - 20R
P 8 0 5 0 5 1 -8,000

Tableau 2

BV P RHS Test Ratio

2 0 1 -1 ½ 0 400 400 2 = 200

½
½ 11 0
0 0
0 -- ¼
¼ 0
0 400
400 400 = 800

P 8 0 5 0 5 1 -8,000
P 8 0 5 0 5 1 -8,000
Step 9: Compute for replacing row and the remaining
rows of Tableau 3.

Since the last row does not contain positive entries, thus,
the tableau is already optimal.

Tableau 3
BV P RHS Computation

1 0 ½ -½ ¼ 0 200 R= R - P

0 1 -¼ ¼ -3/8 0 300 R= R - R

P
P 0
0 0
0 11 4
4 33 11 -9,600
-9,600 R= R - 8R
 Step 10: Make a decision.

Decisions for the Dual Solution:

P = C = 9,600
Step 11: Equate the solution in their respective slack
variables and basic variables of the primal problem if the
primal has an objective function in a maximization
problem.

Tableau 3
BV P RHS
1 0 - 0 200

0 1 - - 0 300

P 0 0 1 4 3 1 -9,600

Primal Solution

 Primal Solution: =4 =3 P=9,600 =0 =0


BV P RHS
1 0 - 0 0 4

0 1 - 0 0 3

0 0 - 1 0 1

P 0 0 200 300 0 1 9,600

Dual Solution
DUALITY ON STANDARD LINEAR
PROGRAMMING MODEL
Example: A Drug Company produces a drug from two ingredients. Each
ingredient contains the same three antibiotics in different proportions. Each
ingredient A produced results ₱8O in cost; each ingredient B results ₱5o in
cost. The production of the antibiotics is dependent on the availability of
limited resources. The resource requirements for the production are as
follows.
Resources Requirement Minimum
Antibiotic Requirement
Ingredient A Ingredient B

Antibiotic 1 3 units 1 unit 6


Antibiotic 2 1 units 1 unit 4
Antibiotic 3 2 units 6 units 12

The company wants to determine the quantity of each ingredient A and B


that must go in to drug in order to meet the antibiotics minimum
requirements at the minimum cost.
STEP 1: Represent the unknown in the problem.
Let x1 be the quantity of ingredient A, and
Let x2 be the quantity of ingredient B.

STEP 2: Tabulate the data about the facts (if necessary).


Materials Ingredient A Ingredient B Requirement
(x1) (x2)
Antibiotic 1 3 1 6
Antibiotic 2 1 1 4
Antibiotic 3 2 6 12
Cost ₱80 ₱50
Step 3: Formulate the objective function and constraints
by restating the information in mathematical form.

 The objective function is:


Minimize: C = 80x1 +50x2
The constraints are:

3+ 6 Antibiotic 1
+ 4 Antibiotic 2
2 + 6 12 Antibiotic 3
≥ 0, ≥ 0
Step 4: Convert the given linear programming problem in
matrix form. Then determine the transpose of the matrix.
3 1 6
3 1 2 80
1 1 4
M= 2 6 12 and  = 1 1 6 50
6 4 12
80 50

Step 5: Now construct a maximization problem which is the dual


problem with non-negative variables whose matrix transpose and all
whose constraints are of the “less than or equal to” variety.

 Maximize: P = 6 + 4 + 12
Subject to : 3 + + 2 ≤ 80
+ + 6 ≤ 50
,, ≥0
Step 6: Convert the dual problem into its Standard Form and solve using
the simplex method.
3  + + 2 + = 80
+ + 6 + = 50
-6 - 4 - 12 + P = 0
Step 7: Set up the initial Tableau.
Step 8: Select the pivot column, identify the pivot row and the pivot of
Tableau 1.
BV P RHS Test Ratio
33 11 2
2 11 0
0 0
0 80
80 80 ÷
80 ÷22=
= 40
40  R
11 11 6 0 11 0 50 50 ÷ 6 = 8
6 0 0 50  R
P -6 -4 -12 0 0 11 0
P -6 -4 -12 0 0 0  R

 Step 9: Compute for replacing row and the remaining rows of


Tableau 1. Note that P = 6.
Return to Step 8, since the last row still contains a negative
entries.
Step 8: Select the pivot column, identify the pivot row and the pivot of
Tableau 2.

Tableau 2.
BV P RHS Computation
2 2/3
2/3 0
0 11 -- 1/3
1/3 0
0 63 R= R - 2R

1/6
1/6 1/6
1/6 11 0
0 1/6
1/6 0
0 8 R= R P
P -4 -2 0 0 2 1 100 R= R - 12R
P -4 -2 0 0 2 1 100

BV P RHS Test Ratio

2 2/3 0 1 - 1/3 0 63 63 2 = 23

1/6 1 0 0 - 1/6 0 8 8 = 50

P -4 -2 0 0 2 1 100
P -4 -2 0 0 2 1 100
 Step 9: Compute for replacing row and the remaining rows of Tableau
2. Note that P = 2 .
Return to Step 8, since the last row still contains a negative entries.

Tableau 3.
BV P RHS Computation

11 1/4
1/4 0
0 3/8
3/8 -- 1/8
1/8 0
0 23 R= R - P

0
0 1/8
1/8 11 -1/16
-1/16 3/16
3/16 0
0 4 R= R 1/6R

P
P 0
0 -1
-1 0
0 1 1 11 195
195 R= R - 4R

BV P RHS Test Ratio


11 1/4
1/4 0
0 3/8
3/8 -- 1/8
1/8 0
0 23 23 1/4 = 95

0
0 1/8
1/8 11 -1/16
-1/16 3/16
3/16 0
0 4 4 1/8 = 35

P 0 -1 0 1 1 1 195
P 0 -1 0 1 195
 Step 9: Compute for replacing row and the remaining rows of Tableau
3. Note that P = 1/8.
Since the last row does not contain positive entries, thus, the tableau is
already optimal.

Tableau 4
BV P RHS Computation

1 0 -2 1/2 - 1/2 0 15 R= R - 1/4R

0 1 8 -1/2 1 0 35 R= R P

P 0
0 -0
-0 8
8 11 33 11 230
230 R= R - 1R
P

 Step 10: Make a decision.

Decision for Dual Solution:


= 15 marginal value of the first constraint =0
= 35 marginal value of the second constraint =0
=0 marginal value of the third constraint P = ₱230
Step 11: Equate the solution in their respective slack variables and basic variables of the
primal problem.

Tableau 4.
BV P RHS
1 0 1/2 0 15

0 1 8 1 0 35

P 0
0 0
0 8
8 11 33 11 230
230
P
Primal
Primal Solution
Solution

Primal Solution:
X1 = 1 unit of ingredient S1=0
X2 = 3 unit of ingredient S2=0
P = C = ₱230 cost S3=8
DUALITY ON NON-STANDARD
LINEAR PROGRAMMING MODEL

 Example 3: Formulate the dual problem of the


model.

Maximize: P = 10 + 5
Subject to : 2 + ≥ 10
=4
+ 4 ≤ 20
≥ 0, ≥ 0
 Step 1: Convert the “≥” and “=” constraint to “≤” if the
objective function is maximization.
Multiply 2 + ≥ 10 by -1 in order to reverse the
inequality sign

(-1) (2 + ≥ 10 ) -2 - ≤ 10
 
Step 2: If the constraint is an equation, it is represented by two equivalent
constraints. Let take the case of = 4, it will be represented by two inequalities
such as

≤4 and ≥4

However, this does not quite complete the conversion, since a “≥” constraint
still exists. This constraint can be converted by multiplying the constraint by
-1.

(-1) ( ≥ 4 ) - ≤ -4

The primal form of the model can be summarized as

Maximize: P = 10 + 5
Subject to: -2 - ≤ 10
≤4
≤ -4
+ ≤ 20
≥ 0, ≥ 0
Step 3: Convert the standard form into matrix and
determine its transposition to generate the dual of the
problem.

RHS
-2 -1 -10 RHS
0 1 4 -2 0 0 1 10
M= 0 -1 -4
 =
-1 1 -1 4 5
1 4 20 -10 4 -4 20
10 5
 Step 4:Formulate the dual form of the model.

Maximize: C = 80 + 50
Subject to: 3 - ≥ 6
-+ - +4 ≥5
,,, ≥0
SENSITIVITY ANALYSIS

An analysis of linear programming solution to possible


changes in the various parameters of the original
problem.

Shadow Prices - Rate of range of the optimal objective function value


per unit increase in the right-hand-side (RHS).

Range of Feasibility - Range over the right-hand-side value of a constraint


can change without changing the optimal solution of a problem

Right-hand-side ranging - Validity ranges by range of feasibility for the


shadow prices and vector change.
RANGE OF OPTIMALITY
Range over which the objective function coefficient of a variable that
is in the solution can change without causing the quantity values of
the optimal solution.

EXAMPLE:

Given the LP model and its final tableau generated in the example
provided in Chapter 3 (see pages 63-68) on the Boutique problem,
determine the range of optimality of the given LP model.
 

Maximize:
Subject to:
FINAL TABLEAU

BV

1 0 - 0 0 4

0 1 - 0 0 3

0 0 - 1 0 1

0 0 200 300 0 1 9,600


  Solution:
Recall that we denote the following terms:
Where =number of Design A gowns and
=number of Design B gowns.

Let us solve for the transformation in a sensitivity analysis, we will start with the
range of optimality on the first coefficient of the objective function.

Note: Delta (∆) denotes the change of value on the objective


coefficient which does not affects the values of the unknown variables,
the value of the ∆ may be zero, positive or negative.
 Step 1:
Change in value from =1200 + ∆.

  Final Simplex Tableau with =1200 + ∆

BV

1 0 - 0 0 4

0 1 - 0 0 3

0 0 - 1 0 1

0 0 200 + 300- 0 1 9,600+4


Step 2:
Solving the delta change (∆) under the last row as long as it will remain
positive. Thus for the solution to remain uniquely optimal,

  ∆>0 and ∆>0


> -200 ∆ > -300
> (2) (-20 ∆ < (-4) (-300)
> -400 ∆ < 1200
 Step 3:
Remember that =1200 + ∆; therefore, ∆=-1200. Substitute the value
of the delta change (∆) in these inequalities ∆>-400 and ∆<1200, then solve
for the range of .

∆>-400 and ∆<1200


-1200>-400 -1200<1200
>-400+1200 <1200+1200
>800 <2400
 Step 4:
Therefore, the change of values for over which the solution basis will
remain optimal is 800<<2400.

 Now we will determine the range of succeeding objective


coefficient over which the current solution will remain
optimal.
Let us now consider a delta change (∆) for
 Step 1:
Change in value from =1600 to =1600+ ∆.

Final Simplex Method with =1600+∆


BV
1 0 - 0 0 4
0 1 - 0 0 3
0
0 0
0 - 11 0
0 11
0 0 200 - 300+ 0 1 9,600+3
0 0 0 1
Step 2:
Solving the delta change (∆) under the last row as long as it
will remain positive.

  ∆>0 and ∆>0


> -200 ∆ > -300
> (-4) (-200) ∆ > () (-300)
800 ∆ > -800
 Step 3:
Substitute the values of the delta change into = 1600 + ∆, thus, ∆ <
800 and ∆ > -800. Note that=1600+ ∆; therefore, ∆=- 1600. Then substitute
- 1600 for ∆ in the inequalities.

 
∆ < 800 and ∆ > -800
- 1600 < 800 - 1600 > -800
+ 1600 + 1600
2400
 Step 4:
Therefore, the change of values for over which the solution basis will
remain optimal is 800 < < 2400. This demonstrates that a change in one of
the ranges in the coefficients of the objective function cannot change the
optimal solution.

The ranges for both objective functions coefficients are as follows:

and

However, these ranges reflect a possible change in either , not simultaneous


change in both . The change can only be done one at a time.

Let’s take for example the amount of Design B gown will be sold for P2,200
or with additional of P600 from its original amount of P1,600.
In other words ∆=1,600 = 2,2001,600 = P600.
 The new final simplex tableau solution will be


9,600 + (3) (600)
P = 9,600 + 1,800
P = 11,400

200 ∆ = 200 (
300 + ∆ = 300 (
 Observe that we only include those values in the final tableau with ∆ for our
computation, thus, we will arrive at the tableau below. Also, notice that the
optimal solution does not change ( = 3, = 1). The delta change only affects the
marginal values of the and the profit value.

 New Final Simplex Tableau if =2,200


BV
1 0 - 0 0 4

0 1 - 0 0 3

0 0 - 1 0 1

0 0 50 75 0 1 11,400
Range of Feasibility

 Maximize: P = 1200 + 1,600


Subject to: 3x1 + 2x2 ≤ 18
2x1 + 4x2 ≤ 20
x1 ≤ 50
x1 ≥ 0, x2 ≥ 0
Step 1
Establish a quantity change in the first constraint. Determine the Δ changes
in Q1 from the optimal tableau. Solve for the Δ change in the first constraint.

3x1 + 2x2 ≤ 18 + 1Δ

2x1 + 4x2 ≤ 20 + 0Δ
x1 ≤ 5 + 0Δ

Notice in the initial simplex tableau in the example shows the


changes in the right-hand-side (RHS) column are the same
coefficients in the S1 column.
BV X1 X2 S1 S2 S3 P RHS

S1 3 2 1 0 0 0 18 + 1Δ

S2 2 4 0 1 0 0 20 + 0Δ

S3 1 0 0 0 1 0 5 + 0Δ

P -1200 -1600 0 0 0 1 0
Step 2
▪ Duplicate through each subsequent tableau, so the S1
column values will duplicate the Δ changes in the right-
hand-side column in the final tableau.

BV X1 X2 S1 S2 S3 P RHS

X1 1 0 1/2 -1/4 0 0 4 + 1/2Δ

X2 0 1 -1/4 3/8 0 0 20 - 1/4Δ

S3 0 0 -1/2 1/4 1 0 5 - 1/2Δ

P 0 0 200 300 0 1 9600 + 200Δ


Step 3

▪ Solve the Δ inequalities. ( Note that the solution set ranges from
zero to positive number.)
4 + 1/2Δ ≥ 0
3 - 1/4Δ ≥ 0
1 - 1/2Δ ≥ 0

4 + 1/2Δ ≥ 0 3 - 1/4Δ ≥ 0 1 - 1/2Δ ≥ 0


1/2Δ ≥ -4 -1/4Δ ≥ -3 -1/2Δ ≥ -1
Δ ≥ (-4)(2) Δ ≤ (-3)(-4) Δ ≤ (-1)(-2)
Δ ≥ -8 Δ ≤ 12 Δ≤2
Step 4

Potrebbero piacerti anche