Optimisation and Operations Research

Similar documents
Lecture 5. x 1,x 2,x 3 0 (1)

Introduction to Mathematical Programming IE406. Lecture 10. Dr. Ted Ralphs

Review Solutions, Exam 2, Operations Research

Example Problem. Linear Program (standard form) CSCI5654 (Linear Programming, Fall 2013) Lecture-7. Duality

Linear Programming Duality P&S Chapter 3 Last Revised Nov 1, 2004

IE 5531: Engineering Optimization I

Optimisation and Operations Research

CSCI5654 (Linear Programming, Fall 2013) Lecture-8. Lecture 8 Slide# 1

The Strong Duality Theorem 1

Part 1. The Review of Linear Programming

Note 3: LP Duality. If the primal problem (P) in the canonical form is min Z = n (1) then the dual problem (D) in the canonical form is max W = m (2)

(P ) Minimize 4x 1 + 6x 2 + 5x 3 s.t. 2x 1 3x 3 3 3x 2 2x 3 6

The Primal-Dual Algorithm P&S Chapter 5 Last Revised October 30, 2006

Introduction to Mathematical Programming

Standard Form An LP is in standard form when: All variables are non-negativenegative All constraints are equalities Putting an LP formulation into sta

Sensitivity Analysis and Duality

CO350 Linear Programming Chapter 8: Degeneracy and Finite Termination

The Simplex Algorithm

Lecture 2: The Simplex method

Farkas Lemma, Dual Simplex and Sensitivity Analysis

MATH2070 Optimisation

F 1 F 2 Daily Requirement Cost N N N

Linear and Combinatorial Optimization

Duality Theory, Optimality Conditions

Systems Analysis in Construction

min 4x 1 5x 2 + 3x 3 s.t. x 1 + 2x 2 + x 3 = 10 x 1 x 2 6 x 1 + 3x 2 + x 3 14

Chap6 Duality Theory and Sensitivity Analysis

Chapter 1 Linear Programming. Paragraph 5 Duality

1. Algebraic and geometric treatments Consider an LP problem in the standard form. x 0. Solutions to the system of linear equations

Sensitivity Analysis and Duality in LP

Summary of the simplex method

Lecture 10: Linear programming. duality. and. The dual of the LP in standard form. maximize w = b T y (D) subject to A T y c, minimize z = c T x (P)

Linear Programming Duality

Simplex Algorithm Using Canonical Tableaus

CO350 Linear Programming Chapter 6: The Simplex Method

Lecture 11: Post-Optimal Analysis. September 23, 2009

3. Duality: What is duality? Why does it matter? Sensitivity through duality.

21. Solve the LP given in Exercise 19 using the big-m method discussed in Exercise 20.

4. The Dual Simplex Method

4. Duality and Sensitivity

Sensitivity Analysis

SAMPLE QUESTIONS. b = (30, 20, 40, 10, 50) T, c = (650, 1000, 1350, 1600, 1900) T.

OPTIMISATION 3: NOTES ON THE SIMPLEX ALGORITHM

Linear Programming: Chapter 5 Duality

Part IB Optimisation

4. Duality Duality 4.1 Duality of LPs and the duality theorem. min c T x x R n, c R n. s.t. ai Tx = b i i M a i R n

Understanding the Simplex algorithm. Standard Optimization Problems.

Dual Basic Solutions. Observation 5.7. Consider LP in standard form with A 2 R m n,rank(a) =m, and dual LP:

The use of shadow price is an example of sensitivity analysis. Duality theory can be applied to do other kind of sensitivity analysis:

4.6 Linear Programming duality

Introduction to Mathematical Programming IE406. Lecture 13. Dr. Ted Ralphs

Discrete Optimization

Chapter 1: Linear Programming

Algorithmic Game Theory and Applications. Lecture 7: The LP Duality Theorem

2018 년전기입시기출문제 2017/8/21~22

Linear Programming, Lecture 4

Planning and Optimization

LP Duality: outline. Duality theory for Linear Programming. alternatives. optimization I Idea: polyhedra

CS261: A Second Course in Algorithms Lecture #9: Linear Programming Duality (Part 2)

Lecture 10: Linear programming duality and sensitivity 0-0

1 Review Session. 1.1 Lecture 2

9.1 Linear Programs in canonical form

Chapter 3, Operations Research (OR)

Linear programming. Starch Proteins Vitamins Cost ($/kg) G G Nutrient content and cost per kg of food.

A Review of Linear Programming

Linear & Integer programming

LP. Kap. 17: Interior-point methods

MVE165/MMG631 Linear and integer optimization with applications Lecture 5 Linear programming duality and sensitivity analysis

UNIVERSITY of LIMERICK

BBM402-Lecture 20: LP Duality

maxz = 3x 1 +4x 2 2x 1 +x 2 6 2x 1 +3x 2 9 x 1,x 2

March 13, Duality 3

Week 3 Linear programming duality

Optimization 4. GAME THEORY

Duality. Peter Bro Mitersen (University of Aarhus) Optimization, Lecture 9 February 28, / 49

Lesson 27 Linear Programming; The Simplex Method

The dual simplex method with bounds

"SYMMETRIC" PRIMAL-DUAL PAIR

3 The Simplex Method. 3.1 Basic Solutions

Duality and Projections

The Simplex Method. Lecture 5 Standard and Canonical Forms and Setting up the Tableau. Lecture 5 Slide 1. FOMGT 353 Introduction to Management Science

Convex Optimization and SVM

END3033 Operations Research I Sensitivity Analysis & Duality. to accompany Operations Research: Applications and Algorithms Fatih Cavdur

Linear programming. Saad Mneimneh. maximize x 1 + x 2 subject to 4x 1 x 2 8 2x 1 + x x 1 2x 2 2

Section Notes 9. IP: Cutting Planes. Applied Math 121. Week of April 12, 2010

LINEAR PROGRAMMING. A Concise Introduction Thomas S. Ferguson

CSCI 1951-G Optimization Methods in Finance Part 01: Linear Programming

Foundations of Operations Research

Lecture 7 Duality II

CO350 Linear Programming Chapter 6: The Simplex Method

Linear Programming. Jie Wang. University of Massachusetts Lowell Department of Computer Science. J. Wang (UMass Lowell) Linear Programming 1 / 47

II. Analysis of Linear Programming Solutions

Lecture 4: Algebra, Geometry, and Complexity of the Simplex Method. Reading: Sections 2.6.4, 3.5,

Midterm Review. Yinyu Ye Department of Management Science and Engineering Stanford University Stanford, CA 94305, U.S.A.

CS261: A Second Course in Algorithms Lecture #8: Linear Programming Duality (Part 1)

Yinyu Ye, MS&E, Stanford MS&E310 Lecture Note #06. The Simplex Method

The Simplex Method. Standard form (max) z c T x = 0 such that Ax = b.

LINEAR PROGRAMMING 2. In many business and policy making situations the following type of problem is encountered:

Optimisation and Operations Research

The Dual Simplex Algorithm

Transcription:

Optimisation and Operations Research Lecture 9: Duality and Complementary Slackness Matthew Roughan <matthew.roughan@adelaide.edu.au> http://www.maths.adelaide.edu.au/matthew.roughan/ Lecture_notes/OORII/ School of Mathematical Sciences, University of Adelaide July 12, 2017

Section 1 Duality July 12, 2017 2 / 30

Problem Recap We will start with a problem in standard equality form. We call this the primal LP max z = c T x + z 0 such that Ax = b and x 0 July 12, 2017 3 / 30

Dual Primal (P) max z = c T x + z 0 such that Ax = b and x 0 Consider a new LP called the dual problem (D) min w = b T y + z 0 such that A T y c and y free July 12, 2017 4 / 30

Origin of the dual Suppose there is an optimal solution x, z to the primal LP max z = c T x + z 0 such that Ax = b and x 0 We might have obtained this via Simplex Initial Tableau Final Tableau A b c T z 0 Simplex = Â ˆb ĉ T ẑ 0 July 12, 2017 5 / 30

Origin of the dual The final tableau comes from pivots, so there are some numbers y 1,..., y m such that ĉ j = ẑ 0 = m m y i a ij c j, y i b i + z 0. j = 1,..., n At the end of Simplex ĉ j 0 so m yi a ij c j for j = 1,..., n. So let s consider any variables y 1,..., y m which satisfy m y i a ij c j, for j = 1,..., n. We could look for an optimisation to find the y July 12, 2017 6 / 30

Origin of the dual Let s build a new objective function with m w = y i b i + z 0. From the Primal, b i = n j=1 a ijx j so m n w = y i a ij x j + z 0 = j=1 ( n m ) y i a ij x j + z 0 j=1 n c j x j + z 0 j=1 Hence w z, but also the above is true for any feasible x, so w ẑ 0, the optimal value of the primal. But we defined w so that w(y ) = ẑ 0, so ẑ 0 is the minimum of w. July 12, 2017 7 / 30

The Dual of an LP (Summary) In the dual, variables become constraints, and visa versa (P) max z = n j=1 a ijx j = b i, n c j x j + z 0 j=1 i = 1,..., m m (D) min w = y i b i + z 0 y i free, i = 1,..., m x j 0, j = 1,..., n or max z = c T x + z 0, Ax = b, x 0. m y ia ij c j, j = 1,..., n or min w = y T b + z 0, y T A c T, y free. Note how the lines are paired up July 12, 2017 8 / 30

Dual Example Example (Dual) (P) max z = 3x 1 x 2 + x 3 s.t. x 1 + 2x 2 = 5 x 1 x 2 + x 3 = 7 x 2 + 6x 3 = 11 x 1 0, x 2 0, x 3 0. (D) min w = 5y 1 + 7y 2 + 11y 3 s.t. y 1 + y 2 3 2y 1 y 2 + y 3 1 y 2 + 6y 3 1 y 1, y 2 and y 3 are all free variables. July 12, 2017 9 / 30

Why do we call it the dual? Theorem The Dual of the Dual is the Primal. Proof: The dual is min w = b T y + z 0 such that A T y c and y free We convert to standard equality form by multiplying the objective by -1 (to make it a max) multiplying the constraints by -1 adding slack variables replacing free variables y i with non-negative variables y + i 0 and y i 0 such that y i = y + i y i, July 12, 2017 10 / 30

Why do we call it the dual? Proof: (continued) The dual, written in standard equality form is (D ) max w = b T y b T y + z 0 such that A T y A T y + + s = c and y +, y, s 0 Now we can take the dual of (D ) which we denote (DD) by creating a variable x i for each constraint, and a constraint for each variable y j and s j. min u = c T x z 0 such that Ax b T from y and Ax b T from y + and x 0 from s July 12, 2017 11 / 30

Why do we call it the dual? Proof: (continued) We have (DD) Note that min u = c T x z 0 such that Ax b T from y and Ax b T from y + and x 0 from s we can multiply the objective by -1 (to have a max) The constraints Ax b T and Ax b T together imply that Ax = b. So (DD) (P). Q.E.D. July 12, 2017 12 / 30

Weak Duality Primal max z = c T x + z 0 Ax = b x 0 Dual min w = b T y + z 0 A T y c y free Theorem Given primal and dual problems as above have feasible solutions x and y, then z w. July 12, 2017 13 / 30

Weak Duality Proof Proof: We essentially showed this earlier: w = = = = z m y i b i + z 0 m y i n a ij x j + z 0 because (P) requires b i = j=1 j=1 ( n m ) y i a ij x j + z 0 swapping order of summation j=1 n c j x j + z 0 j=1 Hence w z from constraints of (D) n a ij x j July 12, 2017 14 / 30

Weak Duality Consequences Corollary If we have feasible solutions x and y to the primal and dual respectively and w = z, then these are optimal solutions to their respective problems. Proof: w is an upper bound on z (and visa versa), so if z = w for a feasible solution, it has achieved its upper bound, and hence we have an optimal solution. Q.E.D. July 12, 2017 15 / 30

Boundedness v Feasibility Corollary If the primal (dual) problem is unbounded then the dual (primal) problem is infeasible. Proof: If the primal were feasible and unbounded, then that means there can be no upper bound on z, so we cannot have a feasible solution the dual. Similarly if the dual is unbounded. Q.E.D. July 12, 2017 16 / 30

Strong Duality Theorem If the primal (dual) problem has a finite optimal solution, then so does the dual (primal) problem, and these two values are equal. Proof: see later as a result of complementary slackness. July 12, 2017 17 / 30

The Dual of an LP 12 Summary of Results for Primal/Dual pair (P) and (D) 1 For a feasible solution x 1,..., x n of (P), with value z, and a feasible solution y 1,..., y m of (D), with value w, we have w z (Weak Duality) 2 If (P) has an optimal solution then (D) has an optimal solution and max z = min w (Strong Duality) 3 Because the dual of the dual is the primal, if (D) has an optimal solution then (P) has an optimal solution and max z = min w (Strong Duality) 4 If (P) has no optimal solution (z ) then (D) cannot have a feasible solution (as w max z), and if (D) has no optimal solution (w ) then (P) cannot have a feasible solution (as z min w). July 12, 2017 18 / 30

The Dual of an LP 13 Summary of Results for Primal/Dual pair (P) and (D) Dual (D) Primal (P) stop 1 stop 2 stop 3 optimal feasible sol n, no feasible solution no opt. sol n solution stop 1 optimal possible impossible impossible solution stop 2 feas. sol n, impossible impossible possible no opt. sol n stop 3 no feasible impossible possible possible solution (max z = min w) July 12, 2017 19 / 30

Section 2 Complementary Slackness July 12, 2017 20 / 30

Complementary slackness Theorem (Complementary slackness) Given primal problem P and dual problem D with feasible solutions x and y, respectively, then x is an optimal solution of (P) and y an optimal solution of (D) if and only if ( m ) x j y i a ij c j = 0, for j = 1,..., n. Implicit in this theorem is the Strong Duality Theorem, which we prove now, and the second part is called the complementary slackness relations. Definition (Complementary Slackness Relations) ( m ) The relations x j y i a ij c j = 0, for each j = 1,..., n are called the Complementary Slackness Relations (CSR). July 12, 2017 21 / 30

Complementary slackness proof Proof: We have already seen the argument: n n m z = c j x j + z 0 y i a ij x j + z 0 (as j=1 j=1 ) m y i a ij c j, x j 0 = m n a ij x j y i + z 0 j=1 m = y i b i + z 0 = w as So z w for all feasible solutions n a ij x j = b i j=1 July 12, 2017 22 / 30

Complementary slackness proof Proof : (cont) From Strong Duality, if we have an optimal solution, then z = w. Reversing the above logic, we get n c j x j + z 0 = j=1 ( n m ) y i a ij x j + z 0 j=1 which, when we group the x i terms together gives ( n m ) y i a ij c j x j = 0 j=1 July 12, 2017 23 / 30

Complementary slackness proof Proof : (cont) If we know that n j 0, and we have n j = 0 j then we must have n j = 0. This applies here because we know from the LP dual and primals that m y i a ij c j 0 and x j 0. Hence ( m ) y i a ij c j x j = 0, for each j = 1,..., n. July 12, 2017 24 / 30

Complementary Slackness: Example Primal Tableax (P) x 1 x 2 x 3 x 4 x 5 b 2 1 1 1 0 1 2 2 1 2 0 3 1 1 1 1 1 2 1 1 1 1 0 0 Simplex Phase I and II 1 0 1 6 0 0 5 6 2 2 0 1 3 1 0 3 1 1 0 0 2 2 1 2 1 1 0 0 6 2 0 6 Resulting solution x = (5/6, 2/3, 0, 0, 1/2), with z = 1/6. July 12, 2017 25 / 30

Complementary Slackness: Example Primal Tableax (P) x 1 x 2 x 3 x 4 x 5 b 2 1 1 1 0 1 2 2 1 2 0 3 1 1 1 1 1 2 1 1 1 1 0 0 Dual Tableax (D) (note that these represent ) y 1 y 2 y 3 c 2 2 1 1 1 2 1 1 1 1 1 1 1 2 1 1 0 0 1 0 1 3 2 0 July 12, 2017 26 / 30

Complementary slackness Write down the dual (D) of (P). (D) min w = y 1 + 3y 2 + 2y 3 2y 1 + 2y 2 + y 3 1 (iv) y 1 + 2y 2 + y 3 1 (v) y 1 + y 2 + y 3 1 (vi) y 1 2y 2 + y 3 1 (vii) y 3 0 (viii) y 1, y 2 and y 3 are all free variables 1. (i)-(iii) Writing down the CSR, we see that From (iv), we get (2y 1 + 2y 2 + y 3 1) x 1 = 0 and since x 1 > 0, we have 2y 1 + 2y 2 + y 3 = 1. From (v), since x 2 > 0, we have y 1 + 2y 2 + y 3 = 1. Similarly, from (viii), since x 5 > 0, we have y 3 = 0. 1 Note the last constraint tightens y 3, but this is OK. July 12, 2017 27 / 30

Complementary slackness Thus from the CSR for (iv),(v) and (viii) we see that 2y1 + 2y2 + y3 = 1 y1 + 2y2 + y3 = 1 y3 = 0 Solving these equalities for y 1, y 2, y 3, we get y 1 = 2 3, y 2 = 1 6, y 3 = 0, which need to be checked for feasibility in the other constraints: That is, (vi) 2 3 1 6 + 0 > 1 (vii) 2 3 + 1 3 + 0 > 1. Also note that z = 5 6 2 3 = 1 6 = w = 2 3 3 1 6 = 2 3 1 2 = 1 6. July 12, 2017 28 / 30

Takeaways Optimisation problems have a Dual this is a very general concept, and holds beyond LPs Complementary slackness relates dual solutions to primal these give us an edge in knowing when we have found optimal solutions we ll use these later! July 12, 2017 29 / 30

Further reading I July 12, 2017 30 / 30