You are on page 1of 38

Duality

• For every linear program we solve, there is another associated


linear program that we happen to be simultaneously solving.
This new linear program satisfies some very important
properties. It may be used to obtain the solution to the
original program, and its variables provide extremely useful
information about the set of optimal solutions to the original
linear program.

• The original LP is called the primal (P) and the associated LP is its
dual (D) problem.
Canonical Form of Duality

• There is exactly one dual


variable for each primal
constraint.

• There is exactly one dual


constraint for each primal
variable.
Duality

Example
Duality

General relationships between the primal and dual problems:

1. The parameters for a (functional) constraint in either problem are


the coefficients of a variable in the other problem.

2. The coefficients in the objective function of either problem are the


right-hand sides for the other problem.
Standard Form of Duality
Duality

Example
Mixed Forms of Duality

• We can always convert the LP to standard form and then obtain its
dual using the dual in standard form

Example
Relationships Between Primal and Dual Problems

• Without converting to standard form, this table can be used to obtain the
dual for every given primal LP
Duality

Example
Some Economic Interpretation of Duality

A country uses 5 oil refineries A, B, C, D, E owned by company X. Their daily


fuel production and the cost of productions are described in table below.
(production is in million liter and the cost in terms of 1000 $). The numbers in
the table represents the amount of production per hour. For example, the
number 10 in the first row and first column means if the oil refinery A works
for 1 hour, it will produces 10 million liter.

A B C D E Demand
Gasoline 10 8 7 6 5 70
Diesel 8 6 5 4 2 30
Kerosene 4 3 2 2 2 20
Cost per hour of activity 12 10 9 8 7
Duality

Suppose that xj = # of working hours of oil refinery j,


j= A, B, C, D, E

 Formulate an LP that minimizes the total cost of production activity


across the oil refineries.

 Now write the dual problem

 Lets say a company Y from a secondary country offers the owner


company X of the 5 oil refineries to shut down their business and Y
will provide their fuel requirement with prices w1, w2, w3. Then, the
dual constraints actually ensures the company X that this wont cost
them more than their corresponding cost of production. The problem
D is the LP from the perspective of this secondary company Y.
Duality

Primal

Dual
PRIMAL-DUAL RELATIONSHIPS

Weak Duality Theorem


The objective function value for any feasible solution to the minimization
problem is always greater than or equal to the objective function value for any
feasible solution to the maximization problem.

In particular, the objective value of any feasible solution of the minimization


problem gives an upper bound on the optimal objective of the maximization
problem. Similarly, the objective value of any feasible solution of the
maximization problem gives a lower bound on the optimal objective of the
minimization problem.
PRIMAL-DUAL RELATIONSHIPS

• Weak Duality can be used to terminate the solution of a linear programming


problem with a near optimal solution.

Example: Find a range for the optimal value of the minimization problem below
which provides a good approximation for it.
Weak Duality results

Corollary 1

If x0 and w0 are feasible solutions to the primal and dual problems,


respectively, such that cx0 = w0b, then x0 and w0 are optimal solutions to
their respective problems.

Corollary 2

If either problem has an unbounded objective value, then the other


problem is infeasible.

Corollary 3

If both primal and dual are feasible, they both have (bounded) optimal solutions.
Duality

By Corollary 2, unboundedness in one problem results in infeasibility of


the other problem. Is this symmetric? Does infeasibility in one
problem imply unboundedness in the other?

Example
Strong Duality Theorem

Strong Duality Theorem: If one problem has an optimal solution,


then the other problem also has an optimal solution and the two optimal
objective values are equal.
Duality

Fundamental Theorem of Duality:


With regard to the primal and dual linear programming problems, exactly one of the
following statements is true:

1. Both have optimal solutions x* and w* with cx* = w*b.

2. One problem has an unbounded optimal objective value, in which


case the other problem must be infeasible.

3. Both problems are infeasible.


Duality

Complementary Slackness Theorem:

Let x* and w* be any feasible solutions to the primal and dual problems in the
canonical form. Then they are respectively optimal if and only if
Duality

• Hence, at optimality, if a variable in one problem is positive, then the


corresponding constraint in the other problem must be tight
(active=equality). If a constraint in one problem is not tight (is strict
inequality), then the corresponding variable in the other problem must be
zero.

• This relates variables in one problem to slack variables in the other problem.
Using the Dual to Solve the Primal Problem

Example. Find the optimal solution for this LP using graphical approach.
Using the Dual to Solve the Primal Problem
Using the Dual to Solve the Primal Problem
Karush-Kuhn-Tucker (KKT) Optimality Conditions for LP

Primal feasibility

Dual feasibility

Complementary slackness
Karush-Kuhn-Tucker (KKT) Optimality conditions for LP

Note:
KKT Applications

• Linear Complementarity Problem (LCP) is to find vectors x and z in R n such that:

Many problems from finance, engineering, and transportation can be


formulated as an LCP which can be efficiently solved by interior point methods.
LCP can be representing the KKT conditions of some LP.

Check how KKT of some LP can be represented as an LCP!


KKT Applications

• KKT can be used to reduce a bilevel optimization problem with the lower
level being an LP to a one level optimization problem.

Do a little bit of research for this!


Why do we need sensitivity analysis

• In practical applications, data for problem-solving are often approximate


estimates rather than precise figures.
• Given this reality, it's vital to assess how changes in certain data points might
influence the optimal solutions, without the necessity of re-solving the entire
problem for each variation.
• Moreover, constraints in many scenarios are flexible rather than fixed. For
instance, a constraint may represent resource availability, which can be increased
through additional purchases or extended production efforts. It is advantageous
to investigate the effects of loosening such constraints on the optimal objective
value, without re-solving the problem.
• The primary purpose of a model goes beyond simply identifying an optimal policy
for a set situation; it should serve as a tool for deriving quantitative insights into
the system through various 'what-if' scenarios. Questions might include the
consequences of changes in parameters.
• Analyzing these and other similar considerations is the essence of sensitivity or
'what-if' analysis.
Sensitivity Analysis

Remember Wyndor Glass CO Mix product LP problem:


Sensitivity Analysis

Wyndor Glass CO solution


Sensitivity Analysis

Wyndor Glass CO Simplex Tableau


Spreadsheet Sensitivity Analysis

Wyndor Glass CO spreadsheet sensitivity report


Sensitivity Analysis

• Now we try to understand the logics behind the sensitivity report for
Wyndor Glass CO

Optimal basis for Wyndor Glass Co and its inverse:


Change in the cost (profit) coefficient of a basic variable
Shadow prices

• Recall that LP problems often can be interpreted as allocating


resources to activities. In particular, when the functional constraints
are in less than or equality form, we interpreted the bi as the
amount of the respective resource available.

• bi values may be just tentative initial decision on how much of the


organization’s resources will be provided to the activities considered.

• Information on the economic contribution of the resources to the


measure of performance (Z) for the current study is extremely useful.

• Revision to available resources is possible if management can be


convinced that this is beneficial.

• The simplex method provides this information in the form of shadow


prices for the respective resources.
Shadow prices

• The shadow price for resource i (denoted by wi* ) measures the


marginal value of this resource, i.e., the rate at which Z could be
increased by (slightly) increasing the amount of this resource
(bi ) being made available.

• The simplex method identifies this shadow price by wi*


coefficient of the i-th slack variable in row 0 of the final simplex
tableau.
Shadow prices

Shadow prices for Wyndor Glass Co:


Sensitivity Analysis

Since this LP has only 2 variables, the increase in Z resulted from one unit increase in b2 can be
graphically verified as well:

You might also like