0% found this document useful (0 votes)
4 views

week 3 duality

Uploaded by

batihanb1
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)
4 views

week 3 duality

Uploaded by

batihanb1
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/ 27

Introduction to Modeling and

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.

The original problem in relation to its dual is termed the primal.

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 ‘Dual’ problem is an LP defined directly and systematically from the


original (or Primal) LP model.

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

If the Primal is to maximize, the dual is to minimize.


If the Primal is to minimize, the dual is to maximize.
For every constraint in the primal, there is a dual variable.
For every variable in the primal, there is a constraint in the dual.
16 Example
There is a small company in Melbourne which has recently become
engaged in the production of office furniture. The company manufactures
tables, desks and chairs :

 The production of a table requires 8 kg of wood and 5 kg of metal and is


sold for $80; a desk uses 6 kg of wood and 4 kg of metal and is sold for
$60; and a chair requires 4 kg of both metal and wood and is sold for $50.
 We would like to determine the revenue maximizing strategy for this
company, given that their resources are limited to 100 kg of wood and 60
kg of metal.
17 Example-Lp model
Let’s make an LP model quickly:

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

 Check the number of variables and constraints

Check the structure of objective functions and constraints


20 Primal and Dual conversion

Dual model can be found by using the following converting table:

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.

We define one dual variable for each primal constraint.

The Primal has: 2 variables and 3 constraints.

So the Dual has: 3 variables and 2 constraints


22 Advantage of dual problems

Consider the following Primal model:

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.

How can we find the optimal solution using Graphical Method?


Is Dual model the fastest way to find the optimal solution?
23 Advantage of dual problems

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).

Therefore, the optimal solution is located on this point:

(y*1, y*2)=(1, 0) and W*=8=Z*


24 Relations between Primal and Dual

The dual of the dual problem is again the primal problem.

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)

Strong Duality Theorem: When there is an optimal solution, the optimal


objective value of the primal is the same as the optimal objective value of the
dual.
c x* = y* b
26 Four Possible Primal Dual Problems

1)Finite optimum vs. Finite optimum


2)Unbounded vs. Infeasible
3)Infeasible vs. Infeasible
4)Infeasible vs. Unbounded

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.

(x*1, x*2)=(8, 0) and Z*=16 (y*1, y*2)=(2, 0) and W*=16


28 Examples

Unbounded VS. Infeasible

Primal: Max Z = 2 x1 + 3 x2 Dual: Min 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.

x*1 and/or x*2 → +∞ then Z* → +∞ Infeasible


29 Examples
Infeasible VS. Unbounded
Primal: Max Z = 2 x1 + 3 x2 Dual: Min 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≤ 0, y2 ≥ 0.

Infeasible y*1 → -∞ then W* → -∞


30 Dual Simplex Method
Suppose a “Basic Solution” satisfies the optimality condition but not feasible,

then we apply dual Simplex method.

Minimize Z = 3x1 + 2x2


subject to
3x1 + x2 ≥ 3
4x1 + 3x2 ≥ 6
x1 + x2 ≤ 3
x1, x2 ≥ 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.

The algorithm ends once we obtain feasibility.

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

Step 1: The first two inequalities are multiplied by –1 to convert them to ≤


constraints and convert the objective function into maximization function (standard
form).
Maximize ZꞋ = - 3x1 - 2x2 where ZꞋ = - Z
33 Dual Simplex Method
Maximize ZꞋ = - 3x1 - 2x2
subject to
-3x1 - x2 ≤ -3
-4x1 - 3x2 ≤ -6
x1 + x2 ≤ 3
x1, x2 ≥ 0

Let s1, s2 and s3 be three slack variables


Model can rewritten as:

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.

Let’s start the 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

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

Therefore, s1 is the leaving variable and x1 is the entering variable.

 Minimum ratio test:

x1 s2
1/5 2
37 Dual Simplex Method
Basic ZꞋ x1 x2 s1 s2 s3 RHS

ZꞋ 1 0 0 1/5 3/5 0 21/5

x1 0 1 0 -3/5 1/5 0 3/5

x2 0 0 1 4/5 -3/5 0 6/5

s3 0 0 0 -1/5 2/5 1 6/5

Optimal Solution is : x1*= 3/5, x2*= 6/5, Z* = 21/5

 Here, we do not need to convert ZꞋ to Z!


Lecture Resources
• Lecture Notes, Erfan Babaee Tirkolaee, Istinye
University

You might also like