week 3 duality
week 3 duality
Optimization
Instructor: Associate Professor Yasin Göçgün
e-mail: [email protected]
Week-3 – Lecture 1: Duality Theory
13 Duality theory
The theory of duality is a very elegant and important concept within the
field of OR.
The notion of duality within LP asserts that every linear program has
associated with it a related linear program called its dual.
It is the relationship between the primal and its dual, both on a
mathematical and economic level, that is truly the essence of duality
theory.
14 Duality theory
The optimal solution of one problem yields the optimal solution to the other.
Duality ease the calculations for the problems, whose number of variables is
large.
15 Rules for converting Primal to Dual
Maximize Z = 80 x1 + 60 x2 + 50 x3
subject to
8 x1 + 6 x2 + 4 x3 ≤ 100
5 x1 + 4 x2 + 4 x3 ≤ 60
x1, x2, x3 ≥ 0.
Now consider that there is a much bigger company in Melbourne which has been
the lone producer of this type of furniture for many years.
They don't appreciate the competition from this new company; so they have
decided to tender an offer to buy all of their competitor's resources and therefore
put them out of business.
18 Example-Lp model
The challenge for this large company then is to develop an LP model which will
determine the appropriate amount of money that should be offered for a unit of
each type of resource,
such that the offer will be acceptable to the smaller company while minimizing
the expenditures of the larger company.
Minimize W = 100 y1+60 y2
subject to
8 y1+ 5 y2 ≥ 80
6 y1+ 4 y2 ≥ 60
4 y1+ 4 y2 ≥ 50
y1, y2 ≥ 0.
19 Primal vs. Dual
Now, let’s compare both Primal and Dual models
For example:
21 Another Example
Consider the following Primal model:
Maximize Z = 3 x1 + 5 x2 Minimize W = 4 y1 + 12 y2 + 18 y3
subject to subject to
x1 ≤4 y1 + 3 y3 ≥ 3
2 x2 ≤ 12 2 y2 + 2 y3 ≥ 5
3 x1+2 x2 ≤ 18 y1, y2, y3 ≥ 0.
x1, x2 ≥ 0.
Minimize Z = 2 x1 + 3 x2 + 4 x3 Maximize W = 8 y1 + 6 y2
subject to subject to
2 x1 + 4 x3 ≥ 8 2 y1 ≥2
3 x2 + 2 x3 ≥ 6 3 y2 ≤ 3
x1 ≤ 0, x2, x3 ≥ 0. 4 y1+2 y2 ≤ 4
y1, y2 ≥ 0.
Maximize W = 8 y1 + 6 y2
subject to
2 y1 ≥2
3 y2 ≤ 3
4 y1+2 y2 ≤ 4
y1, y2 ≥ 0.
The feasible region is just a point in the coordinate system; that is (y1, y2)=(1, 0).
Either of the two problems has an optimal solution if and only if the other
does;
if one problem is feasible but unbounded, then the other is infeasible;
if one is infeasible, then the other is either infeasible or
feasible/unbounded.
25 Weak Duality VS. Strong Duality
Weak Duality Theorem: The objective function value of the primal (dual)
to be maximized evaluated at any primal (dual) feasible solution cannot
exceed the dual (primal) objective function value evaluated at a dual (primal)
feasible solution.
cx ≤ yb (in the standard equality form)
Dual
Finite optimum Unbounded Infeasible
Primal
Finite optimum
Unbounded
Infeasible
27 Examples
Let’s check some examples of different modes
Finite optimum VS. Finite optimum
Primal: Min Z = 2 x1 + 3 x2 Dual: Max W = 8 y1 + 6 y2
subject to subject to
x1 ≥8 y1 + 3 y2 ≤ 2
3 x1 + 2 x2 ≥ 6 2 y2 ≤ 3
x1, x2≥ 0. y1, y2 ≥ 0.
In regular Simplex method, we start with a Basic Feasible Solution (which is not
optimal - usually the origin) and move towards optimality always retaining feasibility.
31 Dual Simplex Method
In the dual Simplex method, the exact opposite occurs.
We start with an “optimal” solution (which is not feasible) and move towards
feasibility always retaining optimality condition.
To start the dual Simplex method, the following two conditions are to be met:
The objective function must satisfy the optimality conditions of the regular
Simplex method.
All the constraints must be of the type ≤.
32 Dual Simplex Method
Now, consider the previous example:
Minimize Z = 3x1 + 2x2
subject to
3x1 + x2 ≥ 3
4x1 + 3x2 ≥ 6
x1 + x2 ≤ 3
x1, x2 ≥ 0
ZꞋ + 3x1+ 2x2 =0
-3x1 - x2 + s1 = -3
-4x1 - 3x2 + s2 = -6
x1 + x2 + s3 = 3
34 Dual Simplex Method
Initial Basic Solution is:
x1= 0, x2= 0, s1 = -3, s2 = -6, s3 = 3 and ZꞋ =0.
ZꞋ 1 3 2 0 0 0 0
s1 0 -3 -1 1 0 0 -3
s2 0 -4 -3 0 1 0 -6
s3 0 1 1 0 0 1 3
Initial Basic Solution is Optimal (as the optimality condition is satisfied) but
infeasible.
35 Dual Simplex Method
Basic ZꞋ x1 x2 s1 s2 s3 RHS
ZꞋ 1 3 2 0 0 0 0
s1 0 -3 -1 1 0 0 -3
s2 0 -4 -3 0 1 0 -6
s3 0 1 1 0 0 1 3
Choose the most negative basic variable. Therefore, s2 is the leaving variable.
Minimum ratio test:
Calculate Ratio = |Z-row / s2-row| (values < 0 in s2-row)
Choose minimum ratio. Therefore, x2 is the entering variable
x1 x2
|3/-4|= 3/4 |2/-3|= 2/3
36 Dual Simplex Method
Basic ZꞋ x1 x2 s1 s2 s3 RHS
ZꞋ 1 1/3 0 0 2/3 0 4
s1 0 -5/3 0 1 -1/3 0 -1
x2 0 4/3 1 0 -1/3 0 2
s3 0 -1/3 0 0 1/3 1 1
x1 s2
1/5 2
37 Dual Simplex Method
Basic ZꞋ x1 x2 s1 s2 s3 RHS