0% found this document useful (0 votes)
16 views

Dl 4duality RO

Uploaded by

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

Dl 4duality RO

Uploaded by

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

Operational

Research.
Chapter 2.Part III
Duality in
Linear
Programming
3rd year computer sciences engineering
[email protected]
What is duality
DUALITY IN LPP
Associated with every Linear Programming Problem there
always exist another Linear Programming Problem which is
based upon same data and having the same solution. This
property of Linear Programming Problem is termed as Duality
in Linear Programming Problem.
The original problem is called as Primal Problem and
associated problem is called as Dual problem.
Any of these Linear Programming Problem can be taken as
primal and other as dual therefore these problems are
simultaneously called as Primal-Dual Pair.
What is Duality in Linear
Programming?
• Duality is a fundamental concept in linear programming (LP) where
every optimization problem (called the 'primal') is associated with
another problem (called the 'dual').

• Key Points:
1. If one problem is a minimization, the other is a maximization.
2. The optimal solutions of both are connected, and solving one gives
insights into the other.
3. Duality provides sensitivity analysis, showing how changes in
constraints affect the objective.
WHY
Why Apply Duality in LP?

1. Sensitivity Analysis: Understand how changes in constraints affect


optimal solutions.
2. Faster Computation: Solving the dual problem can be more efficient.
3. Economic Interpretation: Shadow prices of resources are derived
from dual solutions.
4. Error Checking: Helps verify the correctness of solutions.
5. Real-World Flexibility: Duality reflects trade-offs and alternate
strategies.
Example: Optimal Crop Allocation

• A farmer has limited land and labor resources. They want to maximize profit by
deciding how much of two crops—wheat and corn—to plant.

• Primal Problem (Maximize Profit):


Maximize Z = 30W + 40C
Subject to:
4W + 3C ≤ 240 (Labor constraint)
2W + C ≤ 100 (Land constraint)
W, C ≥ 0

• Dual Problem (Minimize Resource Cost):


Minimize V = 240y₁ + 100y₂
Subject to:
4y₁ + 2y₂ ≥ 30 (Wheat profit coefficient constraint)
3y₁ + y₂ ≥ 40 (Corn profit coefficient constraint)
y₁, y₂ ≥ 0
Modeling and Insights from Duality

1. Primal Solution: Provides optimal amounts of wheat and corn to


plant.
2. Dual Solution: Gives the value of additional resources (shadow
prices).
3. Sensitivity Analysis: What if more labor or land is available?
4. Real-World Insight: Resource scarcity translates to opportunity cost.
• Duality in linear programming allows better insights into resource
allocation, provides shadow prices, and helps in sensitivity analysis.

• In real-world applications like agriculture, duality helps not just to


maximize profit but also to understand how resource limitations
influence the outcome and strategy.
HOW
FORMULATION OF DUAL PROBLEM
For the formulation of dual problem from the primal problem following steps are
used:
1. Convert the constraints of given LPP in the standard form using slack and
surplus variables only.
2. Identify the decision variables for the dual problem (Dual variables). The no.
of dual variables will be equal to the no. of constraints in primal problem.
3. Write the objective function for the dual problem by taking the constants on
the right hand side of primal constraints as the cost coefficients for the dual
problem. If primal problem is maximization type then dual will be
minimization type and vice-versa.
4. Define the constraints for the dual problem. The column constraint coefficients
of primal problem will become the row constraint coefficients of dual problem.
The cost coefficient of primal problem will be taken as the constants on the
right hand side of dual constrains. If primal is of maximization type and dual
constrains must be of ‘≥’ type and If primal is of minimization type and dual
constrains must be of ‘≤’type.
5. Dual variables will be unrestricted.
FORMULATION OF DUAL PROBLEM
Let’s consider the Linear Programming Problem as a maximization problem as
follows:
Max. Z = c1x1 + c2x2 + … + cnxn;
Subject to,
a11x1 + a12x2 + … + a1nxn ≤ b1
a21x1 + a22x2 + … + a2nxn ≤ b2
.
.
.
am1x1 + am2x2 + … + amnxn ≤ bm
x1, x2, …, xn ≥ 0
Then its dual will be,
Min. Z1 = b1w1 + b2w2 + … + bmwm;
Subject to,
a11w1 + a21w2 + … + am1wm ≥ c1
a12w1 + a22w2 + … + am2wm ≥ c2
.
.
.
a1nw1 + a2nw2 + … + amnwm ≥ cn
w1, w2, …,wm
Let’s consider the Linear Programming Problem as a maximization problem as
follows:
Min. Z = c1x1 + c2x2 + … + cnxn;
Subject to,
a11x1 + a12x2 + … + a1nxn ≥ b1
a21x1 + a22x2 + … + a2nxn ≥ b2
.
.
.
am1x1 + am2x2 + … + amnxn ≥ bm
x1, x2, …, xn ≥ 0
Then its dual will be,
Max. Z1 = b1w1 + b2w2 + … + bmwm;
Subject to,
a11w1 + a21w2 + … + am1wm ≤ c1
a12w1 + a22w2 + … + am2wm ≤ c2
.
.
.
a1nw1 + a2nw2 + … + amnwm ≤ cn
w1, w2, …,wm
Rules for Dual Variables

• The restrictions on dual variables correspond directly to the type of


constraints in the primal problem. Here’s how the relationships
work:
• 1. For a ≤ (less than or equal to) constraint in the primal:
• The corresponding dual variable is non-negative (≥ 0).
2. For a ≥ (greater than or equal to) constraint in the primal:
• The corresponding dual variable is non-positive (≤ 0).
• 3. For an = (equality) constraint in the primal:
• The corresponding dual variable is unrestricted in sign (can take any
value: positive, negative, or zero).
FORMULATION OF DUAL PROBLEM
However it is better to use the matrix form of Linear Programming
Problem for the formulation of dual problem. In matrix form the primal-
dual pair can be written as:

Primal Problem Dual Problem

Max Z = C'X Min Z1 = b'W


AX = b A'W ≥ c
X≥0 W unrestricted

Min Z = C'X Max Z1 = b'W


AX = b A'W ≤ c
X≥0 W unrestricted
EXAMPLE
Obtain the dual of the following Linear Programming Problem:
Min. Z = 2x1 + 3x2 + 4x3
Subject to,
2x1 + 3x2 + 5x3 ≥ 2
3x1 + x2 + 7x3 = 3
x1 + 4x2 + 6x3 ≤ 5
x1, x2 ≥ 0, x3 is unrestricted
EXAMPLE
Therefore the dual problem would be:
Max. Z1 = 2w1 +
3w2 + 5w3
Subject to,
2
w
1

3
w
2

+
THEOREM
Statement: Dual of Dual is Primal.
RELATION BETWEEN THE SOLUTION
OF PRIMAL AND DUAL PROBLEMS
Solution of Solution of
Primal Dual
Problem Problem
Optimum Optimum

Infeasible Unbounded

Unbounded Infeasible
Trailers problem: Data
The owner of a shop producing automobile trailers wishes to
determine the best mix for his three products: flat-bed trailers,
economy trailers, and luxury trailers. His shop is limited to working 24
days/month on metalworking and 60 days/month on woodworking for
these products. The following table indicates production data for the
trailers.

Metalworking days
Woodworking days
Contribution ($ × 100)
Trailers problem: Decision var

• Let the decision variables of the problem be:


• x1 = Number of flat-bed trailers produced per month,
• x2 = Number of economy trailers produced per month,
• x3 = Number of luxury trailers produced per month.
Trailers problem: primal model

Assuming that the costs for metalworking and


woodworking capacity are fixed, the problem becomes:
Maximize z = 6x1 + 14x2 + 13x3,

subject to:
1
2 x1 + 2x2 + x 3 ≤ 24,
x1 + 2x2 + 4x3 ≤ 60,
x 1 ≥ 0, x 2 ≥ 0, x3 ≥ 0.
Trailers problem: slack var

Letting x4 and x5 be slack variables corresponding to unused hours of metalworking and woodworking
capacity, the problem above is equivalent to the linear program:

Maximize z = 6x1 + 14x2 + 13x3,


subject to:
1
2 x1 + 2x2 + x3 + x4 = 24,
x1 + 2x2 + 4x3 + x 5 = 60,
Steps to Convert Primal to Dual

1. Identify the primal objective: Maximize or Minimize.


2. Create a dual objective: Swap Max with Min or vice versa.
3. Convert primal constraints:
- Each constraint in primal becomes a variable in dual.
4. Adjust inequality direction:
- Primal ≤ becomes Dual ≥.
5. Coefficients swap between the objective and constraints.
Trailer Problem. Dual

You might also like