0% found this document useful (0 votes)
77 views11 pages

L7 Duality I

This document discusses the concept of duality in linear programming problems. It defines that for every linear programming problem (called the primal problem), there exists an associated linear programming problem (called the dual problem) such that solving one problem solves the other as well. The document provides examples to illustrate primal and dual problems, and discusses the relationships between the coefficients and variables in a primal problem and the constraints and variables in its dual problem. It also presents the general rules for obtaining the dual problem from the primal problem.

Uploaded by

Laura
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)
77 views11 pages

L7 Duality I

This document discusses the concept of duality in linear programming problems. It defines that for every linear programming problem (called the primal problem), there exists an associated linear programming problem (called the dual problem) such that solving one problem solves the other as well. The document provides examples to illustrate primal and dual problems, and discusses the relationships between the coefficients and variables in a primal problem and the constraints and variables in its dual problem. It also presents the general rules for obtaining the dual problem from the primal problem.

Uploaded by

Laura
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/ 11

MMAT5230 Mathematics for Logistics Spring 2023

Lecture 7: Duality I
Lecturer: Lily PAN

7.1 The Dual Problems

Every linear programming problem has associated with it another linear programming prob-
lem and that the two problems have such a close relationship that whenever one problem
is solved, the other is solved as well. The original LPP is called the primal problem and the
associated LPP is called the dual problem. Together they are called a ”dual pair” (primal +
dual) in the sense that the dual of the dual will again be the primal.

Example 7.1.1. (The Diet Problem) How can a dietician design the most economical diet
that satisfies the basic daily nutritional requirements for a good health? For simplicity, we
assume that there are only two foods F1 and F2 and the daily nutrition required are N1 ,
N2 and N3 . The unit cost of the foods and their nutrition values together with the daily
requirement of each nutrition are given in the following table.

F1 F2 Daily Requirement
Cost 120 180 −
N1 1 1 10
N2 2 4 24
N3 3 6 32

Let xj , j = 1, 2 be the number of units of Fj that one should eat in order to minimize
the cost and yet fulfill the daily nutrition requirement. Thus the problem is to select the xj
such that

Min x0 = 120x1 + 180x2

subject to the nutritional constraints:


 x1 + x2 ≥ 10
2x1 + 4x2 ≥ 24
3x1 + 6x2 ≥ 32

7-1
Lecture 7: Duality I 7-2

and the non-negativity constraints: xj ≥ 0, j = 1, 2. In matrix form, we have

Min x0 = cT x
Subject to Ax ≥ b
x≥0

where  
    10
120 x1
c= , x= , b = 24

180 x2
32

and  
1 1
A = 2 4 .
3 6

Now let us look at the same problem from a pharmaceutical company’s point of view.
How can a pharmaceutical company determine the price for each unit of nutrient pill so as
to maximize revenue, if a synthetic diet made up of nutrient pills of various pure nutrients
is adopted? Thus we have three types of nutrient pills P1 , P2 and P3 . We assume that each
unit of Pi contains one unit of the Ni . Let ui be the unit price of Pi , the problem is to
maximize the total revenue u0 from selling such a synthetic diet, i.e.

max u0 = 10u1 + 24u2 + 32u3

subject to the constraints that the cost of a unit of synthetic food j made up of Pi is no
greater than the unit market price of Fj :

u1 + 2u2 + 3u3 ≤ 120


u1 + 4u2 + 6u3 ≤ 180
u1 , u2 , u3 ≥ 0

In matrix form, the problem is:

Max u0 = bT u
Subject to AT u ≤ c
u≥0

We said the two problems form a dual pair of linear programming problem, and we
will see that the solution to one should lead to the solution of the other.

Definition 7.1.1. Let x and c be column n-vectors, b and u be column m-vectors and A be
an m-by-n matrix. The primal and the dual problems can be defined as follows:
Lecture 7: Duality I 7-3

Primal Dual
Max cT x Min bT u
Subject to Ax ≤ b Subject to AT u ≥ c
x≥0 u≥0

Example 7.1.2. Let the original (primal) problem be given by

Max x1 +4x2 +3x3


Subject to 2x1 +2x2 +x3 ≤ 4
x1 +2x2 +2x3 ≤ 6
x1 , x2 , x3 ≥ 0

The dual problem is


Min 4u1 +6u2
Subject to 2u1 +u2 ≥ 1
2u1 +2u2 ≥ 4
u1 +2u2 ≥ 3
u1 ≥ 0
u2 ≥ 0

Calling one primal and the other one dual is completely arbitrary for we have the
following theorem.

Theorem 1. The dual of the dual is the primal.

Proof. Transforming the dual into canonical form, we have

Max u00 = −bT u


Subject to −AT u ≤ −c
u ≥ 0

Taking the dual of this problem, we have

Min x00 = −cT x


Subject to −Ax ≥ −b
x ≥ 0

which is the same as the primal problem.

To obtain the dual of an LP problem in standard form:


Lecture 7: Duality I 7-4

Max x0 = cT x
Subject to Ax = b
x ≥ 0

we can first change it into canonical form:

Max x0 = cT x
Subject to Ax ≤ b
−Ax ≤ −b
x ≥ 0

Then its dual is given by

Min u0 = bT u1 − bT u2
Subject to AT u1 − AT u2 ≥ c
u1 , u2 ≥ 0

Letting u = u1 − u2 , we finally have

Min u0 = bT u
Subject to AT u ≥ c
u free

The following is a general rule of the relationship between a dual pair.

n
X m
X
Max cj xj Min ui bi
j=1 i=1
Xn
Subject to aij xj ≤ bi (i = 1, 2, · · · , k) Subject to ui ≥ 0 (i = 1, 2, · · · , k)
j=1
Xn
aij xj = bi (i = k + 1, · · · , m) ui free (i = k + 1 · · · , m)
j=1
m
X
xj ≥ 0 (j = 1, 2, · · · , l) ui aij ≥ cj (j = 1, 2, · · · , l)
i=1
m
X
xj free (j = l + 1, · · · , n) ui aij = cj (j = l + 1, · · · , n)
i=1

We observe from the above the following correspondence:


Lecture 7: Duality I 7-5

Maximization problem Minimization problem


Constraint Variable
≤ ↔ ≥0
≥ ↔ ≤0
= ↔ unrestricted
Variable Constraint
≥0 ↔ ≥
≤0 ↔ ≤
unrestricted ↔ =

Example 7.1.3. Let us consider a primal given by

Min 5x1 +6x2


Subject to x1 +2x2 = 5
−x1 +5x2 ≥ 3
4x1 +7x2 ≤ 8
x1 free, x2 ≥0

The dual problem is

Max 5u1 +3u2 −8u3


Subject to u1 −u2 −4u3 = 5
2u1 +5u2 −7u3 ≤ 6
u1 free
u2 , u3 ≥ 0

Example 7.1.4. (Transportation Problem) Suppose that there are m sources that can pro-
vide materials to n destinations that require the materials. The following is called the costs
and requirements table for the transportation problem.

Destination Supply
c11 c12 ··· c1n s1
Origin c21 c22 ··· c2n s2
.. .. .. .. ..
. . . . .
cm1 cm2 ··· cmn sm
Demand d1 d2 ··· dn

where cij is the unit transportation cost from origin i to destination j, si is the supply
available from origin i and dj is the demand required for destination j. We assume that
total supply equals to total demand, i.e.
Lecture 7: Duality I 7-6

m
X n
X
si = dj .
i=1 j=1

The problem is to decide the amount xij to be shipped from i to j so as to minimize


the total transportation cost while meeting all demands. That is

m X
X n
Min cij xij
i=1 j=1
Xn
Subject to xij = si (i = 1, 2, · · · , m)
j=1
Xm
xij = dj (j = 1, 2, · · · , n)
i=1
xij ≥ 0 (i = 1, 2, · · · , m; j = 1, 2, · · · , m)

The dual is then given by

m
X n
X
Max si ui + dj vj
i=1 j=1
Subject to ui + vj ≤ cij (i = 1, 2, · · · , m; j = 1, 2, · · · , m)
ui , vj free

7.2 Duality Theorem

We first give the relationship between the objective values of the primal and of the dual.
Theorem 2 (Weak Duality Theorem). Consider the following primal-dual pair.

(P) Max cT x
Subject to Ax ≤ b
x ≥ 0

(D) Min bT u
Subject to AT u ≥ c
u ≥ 0

If x is a feasible solution (not necessarily basic) to the primal and u is a feasible solution
(not necessarily basic) to the dual, then
cT x ≤ bT u.
Lecture 7: Duality I 7-7

Proof. Since x is a feasible solution to the primal (P ), we have Ax ≤ b. As u ≥ 0, we have

uT Ax ≤ uT b = bT u. (7.1)

Similarly, since AT u ≥ c and x ≥ 0, we have

xT AT u ≥ xT c.

Taking the transpose and combining with (7.1), we get cT x ≤ bT u.

As an immediate corollary, we have


Corollary 3. If the primal objective is unbounded, then the dual problem is infeasible.
Corollary 4. If the dual objective is unbounded, then the primal problem is infeasible.

But, the converse of each corollary may not be true. Because, if one problem is infea-
sible, it is also possible for the other to be infeasible. This is illustrated via the following
example.
Example 7.2.1. Consider the following canonical primal-dual pair:

Max x1 + x2
Subject to −x1 + 2x2 ≤ −2
x1 − 2x2 ≤ −2
x1 , x2 ≥ 0

Min −2u1 − 2u2


Subject to −u1 + u2 ≥ 1
2u1 − 2u2 ≥ 2
u1 , u2 ≥ 0

Please sketch the feasible region of the primal-dual pair and show that neither the
primal nor the dual possesses a feasible solution.
Corollary 5. If the primal is infeasible, then the dual is either infeasible or has an un-
bounded objective.
Corollary 6. If the dual is infeasible, then the primal is either infeasible or has an un-
bounded objective.
Corollary 7. If x0 and u0 are feasible solutions to the primal and the dual respectively and
if
c T x 0 = bT u0 ,
then x0 and u0 are optimal solutions to the primal and the dual respectively.
Lecture 7: Duality I 7-8

Proof. For all feasible solutions x to the primal, by Theorem 2, we have

cT x ≤ bT u0 = cT x0 .

Thus x0 is an optimal solution to primal. Similarly, if u is any feasible solution to the


dual, then
bT u ≥ cT x0 = bT u0 .

Thus u0 is an optimal solution to the dual.

We summarize the results in the following table.

Primal Primal
is feasible not feasible
Dual is both optimal Dual has
feasible solutions exist unbounded solutions
Dual is Primal has possible
not feasible unbounded solutions

We now consider further relationships between the canonical primal and dual, as well
as an actual method for computing the dual solution.

Theorem 8 (The Strong Duality Theorem). A feasible solution x0 to the primal is optimal if
and only if there exists a feasible solution u0 to the dual such that

cT x0 = bT u0 (7.2)

In particular, u0 is an optimal solution to the dual.

Proof. The “if” part is Corollay 7. Let us now prove the “only if” part. Let the primal be

Max z = cT x
Subject to Ax ≤ b
x ≥ 0

Standardizing it, we have

Max z = cT x + cTs xs
Subject to Ax + xs = b
x, xs ≥ 0,

where xs are all slack variables and cs = 0. Suppose that x∗ is an optimal solution
to the primal problem with basis matrix B. The proof will be complete if we can produce
Lecture 7: Duality I 7-9

a feasible solution to (D), which has the same objective value. Consider u0 ≡ (B−1 )T cB .
Clearly, cT x∗ = bT u0 = cTB B−1 b. Thus, it only remains to be shown that u0 is a feasible
solution to (D).

Consider the initial simplex tableau corresponding to the primal problem.

x xs RHS
xB A I b
z −cT 0T 0

Now, because B is an optimal basis matrix, the optimal tableau will be as in the follow-
ing table.

x xs RHS
xB B−1 A B−1 I B−1 b
z cTB B−1 A − cT cTB B−1 I − 0T cTB B−1 b

By the optimality of the primal solution, we have

cTB B−1 A − cT ≥ 0T
and
cTB B−1 I − 0T = cTB B−1 ≥ 0T

But, recall that u0 ≡ (B−1 )T cB . Now, substituting into the above inequalities yields

AT u0 ≥ c
u0 ≥ 0

which are precisely the dual feasibility conditions. Thus u0 is dual feasible and cT x∗ =
bT u0 .

First of all, note that the dual feasibility conditions are precisely the same as primal
optimality conditions. In an analogous manner, it can be shown that primal feasibility
conditions are exactly the same as dual optimality conditions. Also observe that Theorem
8 provides a method for computing the values of the dual variables. That is, whereas the
primal solution can be written as

xN = 0
xB = B−1 b
Lecture 7: Duality I 7-10

the dual solution is given by

u = (B−1 )T cB
us = AT (B−1 )T cB − c

where us is the vector of dual surplus variables. Finally, the objective value of both problem
is
z = cT x = bT u = cTB B−1 b

Thus, given a basis matrix B, the solutions to both problems can be determined directly
from B−1 , b, and c. In the following section, we establish some additional relationships
between the primal and dual variables. These relationships further lead to conditions that
are referred to as complementary slackness conditions. Complementary slackness conditions
have important theoretical implications as well as valuable economic interpretations.

Example 7.2.2. Let the primal problem be

Max x0 = 4x1 + 3x2


Subject to    
1 0 6
0 1     8 
 x1
   
1 1  ≤7
  
 x
3 1  2
  
15
0 −1 1
x1 , x2 ≥ 0.

Standardizing the problem, we have

 
  x1  
1 0 1 0 0 0 0  x2
 
 6
0 1 0 1 0 0 0 x3   8 
   
 
1 1 0 0 1 0 0 x4  =  7 
    
    
3 1 0 0 0 1 0 x5  15
 
0 −1 0 0 0 0 1 x6  1
x7

The optimal tableau is given by


Lecture 7: Duality I 7-11

x1 x2 x3 x4 x5 x6 x7 b
x3 0 0 1 0 1/2 −1/2 0 2
x2 0 1 0 0 3/2 −1/2 0 3
x4 0 0 0 1 3/2 1/2 0 5
x1 1 0 0 0 −1/2 1/2 0 4
x7 0 0 0 0 1/2 1/2 1 4
x0 0 0 0 0 5/2 1/2 0 25

Thus the optimal solution is [x1 , x2 ] = [4, 3] with [x3 , x4 , x5 , x6 , x7 ] = [2, 5, 0, 0, 4]. From
the x0 row, we see that the optimal solution to the dual is given by

 
5 1
[u1 , u2 , u3 , u4 , u5 , u6 , u7 ] = 0, 0, , , 0, 0, 0 .
2 2

Let us verify this by considering the dual. The dual of the primal is given by

Min u0 = 6u1 + 8u2 + 7u3 + 15u4 + u5


Subject to  
u1
u2   

 
1 0 1 3 0   4
u3  ≥
0 1 1 1 −1   3
u4 
u5
ui ≥ 0, i = 1, 2, 3, 4, 5

Changing the minimization problem to a maximization problem and using simplex


method, we obtain the optimal tableau for the dual:

u1 u2 u3 u4 u5 u6 u7 c
1
u4 6 − 21 0 1 1
2 − 12 1
2
1
2

u3 − 12 3
2 1 0 − 32 1
2 − 32 5
2
u0 2 5 0 0 4 4 3 −25

Thus the optimal solution for the dual is [u1 , u2 , u3 , u4 , u5 ] = 0, 0, 25 , 12 , 0 with optimal
 

surplus variables [u6 , u7 ] = [0, 0]. Notice that the optimal solution to the primal is given by
the reduced cost coefficients for u6 and u7 , i.e. [x1 , x2 ] = [4, 3] and the optimal values of the
primal slack variables are given by [x3 , x4 , x5 , x6 , x7 ] = [2, 5, 0, 0, 4].

You might also like