0% found this document useful (0 votes)
12 views23 pages

Opt Slides Duality

The document discusses the concepts of duality in linear programming, detailing the primal and dual problems, their formulations, and the relationships between them. It explains the duality theorems, including weak and strong duality, and provides examples illustrating feasible and infeasible scenarios for both primal and dual problems. The document also covers complementary slackness and existence theorems related to duality.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
12 views23 pages

Opt Slides Duality

The document discusses the concepts of duality in linear programming, detailing the primal and dual problems, their formulations, and the relationships between them. It explains the duality theorems, including weak and strong duality, and provides examples illustrating feasible and infeasible scenarios for both primal and dual problems. The document also covers complementary slackness and existence theorems related to duality.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 23

Optimization

Duality

D UALITY
Max 4x1 + 3x2
s.t.
x1 + x2 ≤8
2x1 + x2 ≤ 10
x1 , x2 ≥ 0.

Each feasible solution gives a lower bound on the optimal


objective function value.
Associated with every LP problem there is another LP problem
called a “Dual problem”
The original problem is called the “Primal Problem” and the other
is called the “Dual Problem”.
Optimal solution as (x1∗ = 2, x2∗ = 6) and its optimal value as 26.

Dr Reshma Khemchandani Optimization


Optimization
Duality

I NITIAL AND F INAL TABLEAU

xB y (1) y (2) y (3) y (4)


x3 = 8 1 1 1 0
x4 = 10 2 1 0 1
0 −4 −3 0 0
and

xB y (1) y (2) y (3) y (4)


x2 = 6 0 1 2 −1
x1 = 2 1 0 −1 1
26 0 0 2 1

Dr Reshma Khemchandani Optimization


Optimization
Duality

D UAL P ROBLEM

Min 8w1 + 10w2


s.t.
w1 + 2w2 ≥ 4
w1 + w2 ≥ 3
w1 , w2 ≥ 0.

‘Min’ replaced by ‘Max’.


The roles of cj (c1 = 4, c2 = 3) and bi (b1 = 8, b2 = 10)
have been interchanged.
constraints ‘≥’ sign has been changed to ‘≤’ type.

Dr Reshma Khemchandani Optimization


Optimization
Duality

G RAPHICAL S OLUTION
w1

w1+ 2 w2 =4
w2
O

w1+ w2 = 3

F IGURE : Optimal solution as (w1∗ = 2, w2∗ = 1) and its optimal value


as 26.

Dr Reshma Khemchandani Optimization


Optimization
Duality

P RIMAL -D UAL PAIR


Let the given LPP (called primal) be

Max c T x
s.t.
Ax ≤b
x ≥ 0,

where x ∈ Rn , c ∈ Rn , b ∈ Rm and A is an (m × n) real matrix.

Min bT w
s.t.
AT w ≥c
w ≥ 0,
where w ∈ Rm .
Dr Reshma Khemchandani Optimization
Optimization
Duality

D EFINITIONS RELATED TO D UALITY

Components of vector x (respectively vector w) are called


the primal variables (respectively dual variables)
the constraints Ax ≤ b (respectively AT w ≥ c) are called
the primal constraints (respectively dual constraints).
the number of dual constraints equals the number of primal
variables and the number of dual variables equals the
number of primal constraints.

Dr Reshma Khemchandani Optimization


Optimization
Duality

O BSERVATIONS RELATED TO D UALITY


The number of variables in the dual problem is equal to the
number of constraints in the original (primal) problem. The
number of constraints in the dual problem is equal to the number
of variables in the original problem.
Coefficient of the objective function in the dual problem come
from the right-hand side of the original problem.
If the original problem is a max model, the dual is a min model;
and vice versa.
The coefficient of the first constraint function for the dual
problem are the coefficients of the first variable in the constraints
for the original problem, and the similarly for other constraints.
The right-hand sides of the dual constraints come from the
objective function coefficients in the original problem.

Dr Reshma Khemchandani Optimization


Optimization
Duality

D UAL OF LPP WITH ≥ CONSTRAINTS TYPE

Max c T x Max cT x
s.t. s.t.

Ax ≥b (−A)x ≤ (−b)
x ≥ 0. x ≥ 0.

Min bT w Min (−b)T u


s.t. s.t.

AT w ≥c (−A)T u ≥ c
w ≤ 0. u ≥ 0.

Dr Reshma Khemchandani Optimization


Optimization
Duality

CONSTRAINTS ARE OF = TYPE

Max cT x
Max c T x
s.t.
s.t.
⇒ (−A)x ≤ (−b)
Ax =b
Ax ≤b
x ≥ 0.
x ≥ 0.

Min bT w Min bT u − bT v
s.t. s.t.

AT w ≥c AT u − AT v ≥c
w unrestricted in sign. u, v ≥ 0.

Dr Reshma Khemchandani Optimization


Optimization
Duality

RULE TABLE FOR THE C ONSTRUCTION OF THE


D UAL

Primal (Max) Dual (Min)


i th constraint is ≤ type wi ≥ 0
i th constraint is ≥ type wi ≤ 0
i th constraint is = type wi unrestricted in sign
xj ≤ 0 j th constraint is ≤ type
xj ≥ 0 j th constraint is ≥ type
xj unrestricted in sign j th constraint is = type

Dr Reshma Khemchandani Optimization


Optimization
Duality

D UALITY E XAMPLES
Max −2x1 − x2
s.t.
x1 + x2 ≤ 10
x1 − 2x2 = −8
x1 + 3x2 ≥9
x1 ≥ 0, x2 unrestricted in sign.
Dual Problem:
Min w = 10w1 − 8w2 + 9w3
s.t.
w1 + w2 + w3 ≥ −2
w1 − 2w2 + 3w3 = −1
w1 ≥ 0, w3 ≤ 0,
w2 unrestricted in sign.
Dr Reshma Khemchandani Optimization
Optimization
Duality

Min z = 2x1 − x2 + x3
s.t.
2x1 + x2 − x3 ≤ 8
−x1 + x3 ≥ 1
x1 + 2x2 + 3x3 = 9
x1 ≥ 0, x2 ≥ 0, x3 unrestricted in sign.
Dual Problem
Max w = 8w1 + w2 + 9w3
s.t.
2w1 − w2 + w3 ≤ 2
w1 + 2w3 ≤ −1
−w1 + w2 + 3w3 = 1
w1 ≤ 0, w2 ≥ 0, w3 unrestricted in sign.

Dr Reshma Khemchandani Optimization


Optimization
Duality

D UALITY T HEOREMS AND C OROLLARIES

Weak Duality Theorem: Let x be feasible for the primal


and w be feasible for the dual. Then c T x ≤ bT w.
Let x be feasible for the primal and w be feasible for the
dual. Also let c T x = bT w. Then x is optimal to the primal
and w is optimal to the dual.
Thus it seems logical that an algorithm for LPP should not
only maximize the value of the primal but simultaneously
minimize the value of the dual as well and stop when both
of these values become equal.

Dr Reshma Khemchandani Optimization


Optimization
Duality

S TRONG D UALITY T HEOREM

( I ) Let x be an optimal solution of the primal. Then there


exists a w which is optimal to the dual. Also c T x = bT w.
( II ) Let w ∗ be an optimal solution of the dual. Then there
exists a x ∗ which is optimal to the primal. Also
bT w ∗ = c T x ∗ .

Dr Reshma Khemchandani Optimization


Optimization
Duality

E XAMPLE USING S TRONG D UALITY T HEOREM

Max z = 4x1 + 3x2


s.t. x1 + x2 ≤ 8
2x1 + x2 ≤ 10
x1 , x2 ≥ 0.
Use above theorems to find the solution of the dual by solving
the primal.
Dual of the problem:
Min w = 8w1 + 10w2
s.t. w1 + 2w2 ≥ 4
w1 + w2 ≥ 3
w1 , w2 ≥ 0.
Dr Reshma Khemchandani Optimization
Optimization
Duality

Initial Tableau

xB y (1) y (2) y (3) y (4)


x3 = 8 1 1 1 0
x4 = 10 2 1 0 1
0 −4 −3 0 0

Final Tableau

xB y (1) y (2) y (3) y (4)


x2 = 6 0 1 2 −1
x1 = 2 1 0 −1 1
26 0 0 2 1

Optimal Solution x = (x 1 = 2, x 2 = 6, x 3 = 0, x 4 = 0).

Dr Reshma Khemchandani Optimization


Optimization
Duality

From the last tableau of the we get cB = col(c2 , c1 ) = col(3, 4),


(and NOT col(4, 3) because in the tableau
 the basic variables
2 −1
are x 2 = 6 and x 1 = 2), and B −1 = .
−1 1
Hence

w = col(w T −1
1 , w 2 ) = cB B   
2 −1 2
= (3, 4) = ,
−1 1 1

i.e. w 1 = 2 and w 2 = 1 is optimal to the dual. Further by the


duality theorem, optimal value of the dual equals the optimal
value of the primal which is 26.

Dr Reshma Khemchandani Optimization


Optimization
Duality

E XISTENCE T HEOREMS

( I ) If primal and dual both have feasible solutions then both


have optimal solutions.
( II ) If primal (dual) has unbounded solution then the dual
(primal) has no feasible solution.
( III ) If primal (dual) has no feasible solution but the dual
(primal) has feasible solution then the dual (primal) has
unbounded solution.

Dr Reshma Khemchandani Optimization


Optimization
Duality

(Dual)
feasible infeasible

both have Primal has


feasible optimal solution unbounded solution
(Primal)
Dual has This case is
unbounded possible, i.e. primal
infeasible solution and dual both
could be infeasible

Dr Reshma Khemchandani Optimization


Optimization
Duality

E XAMPLE : P RIMAL AND D UAL COULD BE


INFEASIBLE
Max z = 3x1 + 4x2 Min −w1
s.t. s.t.
x1 − x2 ≤ −1 Dual w1 − w2 ≥ 3

−x1 + x2 ≤ 0 −w1 + w2 ≥ 4
x1 , x2 ≥ 0. w1 , w2 ≥ 0.
x2 w2

−w1 + w2 = 4
x1− x2 = −1

w1 − w2 =3
−x1 + x2 = 0

w1
x1

Dr Reshma Khemchandani Optimization


Optimization
Duality

E XAMPLES
1 Primal Feasible Dual Feasible
Max z = 2x1 + x2 Min 4w1 + 2w2
s.t. s.t.
x1 + x2 ≤ 4 w1 + w2 ≥ 2
x1 − x2 ≤ 2 w1 − w2 ≥ 1
x1 , x2 ≥ 0. w1 , w2 ≥ 0.
2 Primal Feasible, unbounded Dual In-Feasible
Max z = 2x1 + x2 Min 4w1 + 2w2
s.t. s.t.
x1 − x2 ≤ 4 w1 + w2 ≥ 2
x1 − x2 ≤ 2 −w1 − w2 ≥ 1
x1 , x2 ≥ 0. w1 , w2 ≥ 0.

Dr Reshma Khemchandani Optimization


Optimization
Duality

3 Primal In-Feasible Dual Feasible, unbounded


Max z = 2x1 + x2 Min −4w1 + 2w2
s.t. s.t.
−x1 − x2 ≤ −4 −w1 + w2 ≥ 2
x1 − x2 ≤ 2 −w1 + w2 ≥ 1
x1 , x2 ≥ 0. w1 , w2 ≥ 0.
2 Primal Feasible, unbounded Dual In-Feasible
Max z = 2x1 + x2 Min −4w1 + 2w2
s.t. s.t.
−x1 − x2 ≤ −4 −w1 + w2 ≥ 2
x1 − x2 ≤ 2 w1 − w2 ≥ 1
x1 , x2 ≥ 0. w1 , w2 ≥ 0.

Dr Reshma Khemchandani Optimization


Optimization
Duality

Complementary Slackness Theorem

Let x and w be feasible solutions to the primal-dual pair. Then


x and w are optimal to the respective problems if and only if

w T (Ax − b) = 0

and

x T (c − AT w) = 0.

Dr Reshma Khemchandani Optimization

You might also like