Professional Documents
Culture Documents
Dual Simpl
Dual Simpl
Tedjo UMSIDA
Finding the dual of an LP
When taking the dual of a given LP, we refer
to the given LP as the primal. If the primal is
a max problem, the dual will be a min
problem, and vice versa.
For convenience, we define the variables for
the max problem to be z, x1,x2,…,xn and the
variables for the min problem to be w,y1,y2,
…,ym.
Finding the dual of an LP
A normal max problem may be written as
max z c1 x1 c2 x2 cn xn
s.t. a11 x1 a12 x2 a1n xn b1
a21 x1 a22 x2 a2 n xn b2
(16)
am1 x1 am 2 x2 amn xn bm
x j 0(i 1,2 , ,n)
Finding the dual of an LP
The dual of a normal max problem is defined
to be,
min w b1 y1 b2 y2 bm ym
s.t. a11 y1 a21 y2 am1 ym c1
a12 y1 a22 y2 am 2 ym c2
(17) a1n y1 a2 n y2 amn ym cn
yi 0(i 1,2 , ,m)
Finding the dual of an LP
A min problem like (17) that has all ≥constraints
and all variables nonnegative is called a normal
min problem.
If the primal is a normal min problem like (17), we
define the dual of (17) to be (16).
A tabular approach makes it easy to find the dual
of an LP. A normal min problem is found by
reading down; the dual is found by reading across
in the table.
Finding the dual of an LP
max z
min w x1 0 x2 0 xn 0
x1 x2 xn
y1 0 y1 a11 a12 a1n b1
y2 0 y2 a21 a22 a2 n b2
ym 0 ym am1 am 2 amn bm
c1 c2 cn
Finding the dual of an LP
Illustrate by the Dakota problem,
max z 60 x1 30 x2 20 x3
s.t. 8 x1 6 x2 x3 48
4 x1 2 x2 1.5 x3 20
2 x1 1.5 x2 0.5 x3 8
x j 0(i 1,2 ,3 )
Finding the dual of an LP
max z
min w x1 0 x2 0 x3 0
x1 x2 x3
y1 0 y1 8 6 1 48
y2 0 y2 4 2 1.5 20
y3 0 y3 2 1.5 0.5 8
60 30 20
Finding the dual of an LP
Then, reading down, we find the Dakota dual to
be
min w 48 y1 20 y2 8 y3
s.t. 8 y1 4 y2 2 y3 60
6 y1 2 y2 1.5 y3 30
y1 1.5 y2 0.5 y3 20
x j 0(i 1,2 ,3 )
Finding the dual of a nonnormal LP
Many LPs are not normal max or min problem.
For example,
(18) max z 2 x1 x2 (19) min w 2 y1 4 y2 6 y3
s.t. x1 x2 2 s.t. y1 2 y2 y3 2
2 x1 x2 3 y1 y3 1
x1 x2 1 y 2 y3 1
2 y1 y2 3
x1 0, x2 urs
y1 urs, y 2 , y3 0
Finding the dual of a nonnormal LP
An LP can be transformed into normal form.
To place a max problem into normal form, we
proceed as follows:
Step 1 multiply each ≥ constraint by -1, converting it into
a ≤ constraint.
Step 2 replace each equality constraint by two
inequality constraints (a ≤ constraint and a ≥ constraint).
Then convert the ≥ constraint to a ≤ constraint.
Step 3 replace each urs variable x by x =x ’-x ’’, where
i i i i
xi’ ≥0 and xi’’ ≥0 .
Finding the dual of a nonnormal LP
(18) has been transformed onto the following
LP:
max z 2 x1 x2 x2
s.t. x1 x2 x 2
- x1 x2 x 2
- 2 x1 x2 x 3
x1 x2 x 1
x1 , x2 , x2 0
Finding the dual of a nonnormal LP
Transform a nonnormal min problem into a normal
min problem:
Step 1 multiply each ≤ constraint by -1, converting it into
a ≥ constraint.
Step 2 replace each equality constraint by two
inequality constraints (a ≤ constraint and a ≥ constraint).
Then convert the ≥ constraint to a ≤ constraint.
Step 3 replace each urs variable yi by yi=yi’-yi’’, where
yi’ ≥0 and yi’’ ≥0 .
Finding the dual of a nonnormal max
problem
Find the dual of a nonnormal max LP without
going through the transformations,
Step 1 fill in table so that the primal can be read across.
Step 2 making the following changes, (a) if the ith primal
constraint is a ≥ constraint, the corresponding dual
variable yi must satisfy yi≤0. (b) if the ith primal
constraint is an equality constraint, the dual variable yi is
now unrestricted in sign. (c) if the ith primal variable is
urs, the ith dual constraint will be an equality constraint.
Then the dual can be read down in the usual fashing.
Finding the dual of a nonnormal max
problem
For example,
max z
max z 2 x1 x2
min w ( x1 0) ( x2 urs)*
s.t. x1 x2 2 x1 x2
2 x1 x2 3 y1 1 1 2*
y2 2 1 3*
x1 x2 1
( y 3 0) y3 1 1 1
x1 0, x2 urs 2 1
Finding the dual of a nonnormal max
problem
max z
min w ( x1 0) ( x2 urs )
x1 x2
( y1 urs ) y1 1 1 2
( y 2 0) y2 2 1 3
( y3 0) y3 1 1 1
2 1
Finding the dual of a nonnormal min
LP
Step 1 write out the primal table.
Step 2 making the following changes, (a) if the ith primal
constraint is a ≤ constraint, the corresponding dual
variable xi must satisfy xi ≤0. (b) if the ith primal
constraint is an equality constraint, the dual variable xi is
now unrestricted in sign. (c) if the ith primal variable is
urs, the ith dual constraint will be an equality constraint.
Then the dual can be read down in the usual fashing.
Economic interpretation of the dual
problem
The dual of the Dakota problem is,
min w 48 y1 20 y2 8 y3
s.t. 8 y1 4 y2 2 y3 60 (desk constraint )
6 y1 2 y2 1.5 y3 30 ( table constraint )
y1 1.5 y2 0.5 y3 20 (chair constraint )
y1 , y2 , y3 0
Economic interpretation of the dual
problem
Suppose an entrepreneur wants to purchase
all of Dakota’s resources. Then the
entrepreneur must determine the price he or
she is willing to pay for a unit of each of
Dakota’s resources, then
y1=price paid for 1 board ft of lumber
y2=price paid for 1 finishing hour
y3=price paid for 1 carpentry hour
Economic interpretation of the dual
problem
The total price that should be paid for these
resources is w. the cost of purchasing the
resources is to be minimized.
In setting resource prices, what constraints does
the entrepreneur face?
For example, the entrepreneur must offer Dakota at least
$60 for a combination of resources that includes 8 board
feet of lumber, 4 finishing hours, and 2 carpentry hours,
because Dakota could use these resources to produce
a desk that can be sold for $60. the same reason shows
the other two constraints.
The dual theorem and its
consequences
The dual theorem states that the primal and
dual have equal optimal objective function
values.
The dual theorem and its
consequences
Primal problem
max z c1 x1 c2 x2 cn xn
s.t. a11 x1 a12 x2 a1n xn b1
a21 x1 a22 x2 a2 n xn b2
(22)
am1 x1 am 2 x2 amn xn bm
x j 0(i 1,2 , ,n)
The dual theorem and its
consequences
Dual problem
min w b1 y1 b2 y2 bm ym
s.t. a11 y1 a21 y2 am1 ym c1
a12 y1 a22 y2 am 2 ym c2
(23)
a1n y1 a2 n y2 amn ym cn
yi 0(i 1,2 , ,m)
The dual theorem and its
consequences
Weak duality
If we choose any feasible solution to the
primal and any feasible solution to the dual,
the w-value for the feasible dual solution will
be at least as large as the z-value for the
feasible primal solution.
The dual theorem and its
consequences
Lemma 1
x1
Let x
x 2
xn
Be any feasible solution to the primal and y=[y1 y2
… ym] be any feasible solution to the dual, then (z-
value for x)≤(w-value for y).
The dual theorem and its
consequences
If a feasible solution to either the primal or
the dual is readily available, weak duality
can be used to obtain a bound on the
optimal objective function value for the other
problem.
The dual theorem and its
consequences
Lemma 2
Let x1
x
x 2
xn
Be a feasible solution to the primal and y=[y1 y2 … ym] be a
feasible solution to the dual. If cx=yb, then x is optimal for
the primal and y is optimal for the dual.
The dual theorem and its
consequences
Lemma 3
If the primal is unbounded, the dual problem
is infeasible.
Lemma 4
z x1 x2 x3 s1 e2 a2 a3 rhs BV
1 0 0 0 51
23
58
23 M 5823 M 239 565
23 z 565
23
0 0 0 1 4
23
5
23
235 232 15
23
x3 15
23
0 0 1 0 2
23 9
23
9
23 231 65
23 x2 65
23
0 1 0 0 9
23
17
23 17
23
7
23
120
23 x1 120
23
Example 10
Solution
To find the dual from the tableau,
max z
min w ( x1 0) ( x2 0) ( x3 0)
x1 x2 x3
( y1 0) y1 1 3 2 15
( y2 0) y2 0 2 1 5*
( y3 urs ) y3 2 1 5 10 *
3 2 5
Example 10
From the optimal primal tableau, we can find the
optimal solution to dual as follows:
Since the first primal constraint is a ≤ constraint,
y1=coefficient of s1 in optimal row 0=51/23.
Since the second primal constraint is a ≥ constraint, y2=-
(coefficient of e2 in optimal row 0)=-58/23.
Since the third constraint is an equality constraint,
y3=(coefficient of a3 in optimal row 0)-M=9/23.
Example 10
By the dual theorem, the optimal dual
objective function value w must equal
565/23.
In summary, the optimal dual solution is
w 565
23 , y1 51
23 , y 2 58
23 , y 3 9
23
The dual theorem
How to read the optimal dual solution from row 0
of the optimal tableau if the primal is a min
problem
Now x3 must leave the basis, and row 2 will be the pivot.
Since x2 is the only variable in row 2 with a negative
coefficient, x2 now enters the basis.
Finding the new optimal solution
after a constraint is added to an LP
BV
z 10 x3 60 s3 60e4 240 z 240
x3 s1 4 s3 16 s1 16
x2 x3 2 s3 4e4 32 x2 32
x1 x3 2s3 3e4 20 x1 20
0.5 x3 s2 4 s3 4e4 36 s2 36