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

Similar documents
Summary of the simplex method

Summary of the simplex method

Linear programs, convex polyhedra, extreme points

Ann-Brith Strömberg. Lecture 4 Linear and Integer Optimization with Applications 1/10

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

Farkas Lemma, Dual Simplex and Sensitivity Analysis

4. Duality and Sensitivity

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

Review Solutions, Exam 2, Operations Research

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

Part 1. The Review of Linear Programming

Introduction to linear programming using LEGO.

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

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

Slack Variable. Max Z= 3x 1 + 4x 2 + 5X 3. Subject to: X 1 + X 2 + X x 1 + 4x 2 + X X 1 + X 2 + 4X 3 10 X 1 0, X 2 0, X 3 0

1 Review Session. 1.1 Lecture 2

Understanding the Simplex algorithm. Standard Optimization Problems.

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

Chap6 Duality Theory and Sensitivity Analysis

Linear Programming Duality

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

Sensitivity Analysis and Duality in LP

MVE165/MMG631 Linear and integer optimization with applications Lecture 8 Discrete optimization: theory and algorithms

IE 5531: Engineering Optimization I

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

Relation of Pure Minimum Cost Flow Model to 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)

The Dual Simplex Algorithm

Linear and Combinatorial Optimization

Worked Examples for Chapter 5

Sensitivity Analysis

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

Brief summary of linear programming and duality: Consider the linear program in standard form. (P ) min z = cx. x 0. (D) max yb. z = c B x B + c N x N

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

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

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

4.6 Linear Programming duality

3 The Simplex Method. 3.1 Basic Solutions

Special cases of linear programming

The Strong Duality Theorem 1

Lecture 2: The Simplex method

OPERATIONS RESEARCH. Michał Kulej. Business Information Systems

F 1 F 2 Daily Requirement Cost N N N

3. THE SIMPLEX ALGORITHM

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

"SYMMETRIC" PRIMAL-DUAL PAIR

A Review of Linear Programming

AM 121 Introduction to Optimization: Models and Methods Example Questions for Midterm 1

Chapter 1 Linear Programming. Paragraph 5 Duality

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

56:171 Operations Research Fall 1998

DEPARTMENT OF STATISTICS AND OPERATIONS RESEARCH OPERATIONS RESEARCH DETERMINISTIC QUALIFYING EXAMINATION. Part I: Short Questions


c) Place the Coefficients from all Equations into a Simplex Tableau, labeled above with variables indicating their respective columns

Lecture 10: Linear programming duality and sensitivity 0-0

Introduction. Very efficient solution procedure: simplex method.

The Simplex Algorithm

Linear Programming: Chapter 5 Duality

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

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

Linear Programming Inverse Projection Theory Chapter 3

March 13, Duality 3

Section Notes 8. Integer Programming II. Applied Math 121. Week of April 5, expand your knowledge of big M s and logical constraints.

Chapter 5 Linear Programming (LP)

Lecture Notes 3: Duality

THE UNIVERSITY OF HONG KONG DEPARTMENT OF MATHEMATICS. Operations Research I

Introduction to Operations Research Prof. G. Srinivasan Department of Management Studies Indian Institute of Technology, Madras

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

AM 121: Intro to Optimization

Duality Theory, Optimality Conditions

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

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

Foundations of Operations Research

CO 602/CM 740: Fundamentals of Optimization Problem Set 4

Sensitivity Analysis and Duality

4. The Dual Simplex Method

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

MVE165/MMG630, Applied Optimization Lecture 6 Integer linear programming: models and applications; complexity. Ann-Brith Strömberg

Dr. S. Bourazza Math-473 Jazan University Department of Mathematics

Chapter 1: Linear Programming

+ 5x 2. = x x. + x 2. Transform the original system into a system x 2 = x x 1. = x 1

Review Questions, Final Exam

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

MAT016: Optimization

Ω R n is called the constraint set or feasible set. x 1

AM 121: Intro to Optimization Models and Methods

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

COT 6936: Topics in Algorithms! Giri Narasimhan. ECS 254A / EC 2443; Phone: x3748

Prelude to the Simplex Algorithm. The Algebraic Approach The search for extreme point solutions.

9.1 Linear Programs in canonical form

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

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

IP Cut Homework from J and B Chapter 9: 14, 15, 16, 23, 24, You wish to solve the IP below with a cutting plane technique.

MATH 445/545 Homework 2: Due March 3rd, 2016

IEOR 4404 Homework #4 Intro OR: Deterministic Models February 28, 2011 Prof. Jay Sethuraman Page 1 of 5. Homework #4

4.4 The Simplex Method and the Standard Minimization Problem

Systems Analysis in Construction

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, Lecture 4

Discrete Optimization

Transcription:

MVE165/MMG631 Linear and integer optimization with applications Lecture 5 Linear programming duality and sensitivity analysis Ann-Brith Strömberg 2017 03 29 Lecture 4 Linear and integer optimization with applications 1/26

An intuitive derivation of duality, I (Ch. 6.1) A linear program with optimal value z z = max z := 20x 1 +18x 2 weights subject to 7x 1 +10x 2 3600 (1) v 1 16x 1 +12x 2 5400 (2) v 2 x 1,x 2 0 [Draw graph] What is the largest possible value of z (i.e., z )? Compute upper estimates of z, e.g.: Multiply (1) by 3: 21x 1 +30x 2 10800 z 10800 Multiply (2) by 1.5: 24x 1 +18x 2 8100 z 8100 Combine: 0.6 (1)+1 (2): 20.2x 1 +18x 2 7560 z 7560 Lecture 4 Linear and integer optimization with applications 2/26

An intuitive derivation of duality, II (Ch. 6.1) A linear program with optimal value z maximize z := 20x 1 +18x 2 weights subject to 7x 1 +10x 2 3600 (1) v 1 16x 1 +12x 2 5400 (2) v 2 x 1,x 2 0 Do better than guess compute optimal weights! Value of estimate: w = 3600v 1 +5400v 2 min Constraints on the weights 7v 1 +16v 2 20 10v 1 +12v 2 18 v 1,v 2 0 [Draw graph] Lecture 4 Linear and integer optimization with applications 3/26

An intuitive derivation of duality, III (Ch. 6.1) The best (lowest) possible upper estimate of z minimize w := 3600v 1 + 5400v 2 subject to 7v 1 + 16v 2 20 10v 1 + 12v 2 18 v 1,v 2 0 A linear program! [Draw graph!!] It is called the linear programming dual of the original linear program Lecture 4 Linear and integer optimization with applications 4/26

The lego model the market problem Consider the lego problem maximize z = 1600x 1 + 1000x 2 subject to 2x 1 + x 2 6 2x 1 + 2x 2 8 x 1, x 2 0 Option: Sell bricks instead of making furniture v 1 (v 2 ) = price of a large (small) brick The market wishes to minimize the payment: min 6v 1 +8v 2 Sell only if prices are high enough 2v 1 +2v 2 1600 v 1 +2v 2 1000 v 1,v 2 0 otherwise better to make tables otherwise better to make chairs don t sell at a negative price Lecture 4 Linear and integer optimization with applications 5/26

A general linear program on standard form A linear program with n non-negative variables, m equality constraints (m < n), and non-negative right-hand-sides n maximize z = c j x j, subject to j=1 n a ij x j = b i, i = 1,...,m, j=1 x j 0, j = 1,...,n, where x j R, j = 1,...,n, a ij R, i = 1,...,m, j = 1,...,n, b i 0, i = 1,...,m, c j R, j = 1,...,n. Or, on matrix form maximize z = c T x, subject to Ax = b, x 0 n, where x R n, A R m n, b R m +, c R n. Lecture 4 Linear and integer optimization with applications 6/26

Linear programming duality To each primal linear program corresponds a dual linear program (Primal) minimize z = c T x subject to Ax = b x 0 n s.t. j=1 n a ij x j = b i, i = 1,...,m j=1 x j 0, j = 1,...,n (Dual) maximize w = b T y subject to A T y c The component forms of the primal and dual programs (Primal) (Dual) n m min z = c j x j max w = b i y i s.t. i=1 m a ij y i c j, i=1 j = 1,...,n Lecture 4 Linear and integer optimization with applications 7/26

An example of linear programming duality A primal linear program minimize z = 2x 1 +3x 2 weights/duals subject to 3x 1 +2x 2 = 14 y 1 2x 1 4x 2 2 y 2 4x 1 +3x 2 19 y 3 x 1,x 2 0 The corresponding dual linear program maximize w = 14y 1 +2y 2 +19y 3 weights/primals subject to 3y 1 +2y 2 +4y 3 2 x 1 2y 1 4y 2 +3y 3 3 x 2 y 1 free y 2 0 y 3 0 Lecture 4 Linear and integer optimization with applications 8/26

Rules for constructing the dual program (Ch. 6.2) maximization minimization dual program primal program primal program dual program constraints variables 0 0 = free variables constraints 0 0 free = The dual of the dual of any linear program equals the primal Lecture 4 Linear and integer optimization with applications 9/26

Duality properties, I (Ch. 6.3) Primal minimize z = c T x (1a) subject to Ax = b (1b) x 0 n (1c) Dual maximize w = b T y (2a) subject to A T y c (2b) Weak duality [Th. 6.1] Let x be a feasible point in the primal (minimization) and y be a feasible point in the dual (maximization). Then, it holds that Proof: z = }{{} (1a) c T x z = c T x b T y = w }{{} (2b), (1c) y T Ax = }{{} (1b) y T b = }{{} (2a) w. In the course book, the primal is formulated with inequality constraints in (1b): adjust the dual and the proof for that case! Lecture 4 Linear and integer optimization with applications 10/26

Duality properties, II (Ch. 6.3) Primal minimize z = c T x subject to Ax = b x 0 n Dual maximize w = b T y subject to A T y c Strong duality [Th. 6.3] In a pair of primal and dual linear programs, if one of them has an optimal solution, so does the other, and their optimal values are equal. Lecture 4 Linear and integer optimization with applications 11/26

Duality properties, III (Ch. 6.3) Primal minimize z = c T x subject to Ax = b x 0 n Dual maximize w = b T y subject to A T y c Complementary slackness [Th. 6.5; proof in the course book] If x is optimal in the primal and y is optimal in the dual, then it holds that x T (c A T y) = y T (b Ax) = 0. If x is feasible in the primal, y is feasible in the dual, and x T (c A T y) = y T (b Ax) = 0, then x and y are optimal in their respective problems. Lecture 4 Linear and integer optimization with applications 12/26

Duality properties, IV (Ch. 6.3) Primal z := min z =c T B x B +c T N x N Dual w := max w =b T y subject to Bx B +Nx N = b x B 0 m,x N 0 n m subject to B T y c B N T y c N Duality theorem [Th. 6.4] Assume that x B = B 1 b is an optimal basic (feasible) solution to the primal problem. Then y T = c T B B 1 is an optimal solution to the dual problem and z = w. Proof structure [full proof in the course book] 1 y T = c T B B 1 is feasible in the dual problem 2 The optimal objective values z and w are equal 3 Follows from complementarity: (x B,x N ) and y are feasible in the primal and dual respective problem and z = w Lecture 4 Linear and integer optimization with applications 13/26

Relations between primal and dual optimal solutions primal (dual) problem dual (primal) problem unique and unique and non-degenerate solution non-degenerate solution unbounded solution = no feasible solutions no feasible solutions = unbounded solution or no feasible solutions degenerate solution alternative solutions Lecture 4 Linear and integer optimization with applications 14/26

Homework Exercises on linear programming duality Formulate and solve graphically the dual of: minimize z = 6x 1 +3x 2 +x 3 subject to 6x 1 3x 2 +x 3 2 3x 1 +4x 2 +x 3 5 x 1,x 2,x 3 0 Then find the optimal primal solution Verify that the dual of the dual equals the primal Lecture 4 Linear and integer optimization with applications 15/26

Derivation of the simplex method (review) (Ch. 4.8) B = index set of basic var s, N = index set of non-basic var s B = m and N = n m Partition matrix/vectors: A=(B,N), x=(x B,x N ), c=(c B,c N ) The matrix B (N) contains the columns of A corresponding to the index set B (N) Analogously for x and c Original linear program minimize z = c T x subject to Ax = b, x 0 n Substitute: x B = B 1 b B 1 Nx N = Rewritten linear program minimize z = c T B x B +c T N x N subject to Bx B +Nx N = b, x B 0 m, x N 0 n m minimize z = c T B B 1 b+[c T N ct B B 1 N]x N subject to B 1 b B 1 Nx N 0 m, x N 0 n m Lecture 4 Linear and integer optimization with applications 16/26

Optimality and feasibility (review) Optimality condition (for minimization) The basis B is optimal if c T N ct B B 1 N 0 n m (marginal values = reduced costs 0) If not, choose as entering variable j N the one with the lowest (negative) value of the reduced cost c j c T B B 1 A j Feasibility condition For all i B it holds that x i = (B 1 b) i (B 1 A j ) i x j Choose the leaving variable i B according to { (B i 1 } b) i = argmin i B (B 1 A j ) i (B 1 A j ) i > 0 Lecture 4 Linear and integer optimization with applications 17/26

In the simplex tableau, we have basis z x B x N s RHS z 1 0 c T N ct B B 1 N c T B B 1 c T B B 1 b x B 0 I B 1 N B 1 B 1 b s denotes possible slack variables [columns for s are copies of certain columns for (x B,x N )] The computations performed by the simplex algorithm involve matrix inversions (i.e., B 1 ) and updates of these A non-basic (basic) variable enters (leaves) the basis one column, A j, in B is replaced by another, A k Row operations Updates of B 1 (and of B 1 N, B 1 b, and c T B B 1 ) Efficient numerical computations are crucial for the performance of the simplex algorithm Lecture 4 Linear and integer optimization with applications 18/26

Sensitivity analysis changes in the optimal solution as functions of changes in the problem data (Ch. 5) How does the optimum change when the right-hand-sides (resources, e.g.) change? When the objective coefficients (prices, e.g.) change? Assume that the basis B is optimal: minimize z = c T B B 1 b+[c T N ct B B 1 N]x N subject to B 1 b B 1 Nx N 0 m, x N 0 n m, where x B = B 1 b B 1 Nx N Lecture 4 Linear and integer optimization with applications 19/26

Changes in the right-hand-side coefficients Shadow price = dual price [Def. 5.3] The shadow price of a constraint is defined as the change in the optimal value as a function of the (marginal) change in the RHS. It equals the optimal value of the corresponding dual variable. In AMPL: display constraint name.dual Suppose b changes to b+ b New optimal value: z new = c T B B 1 (b+ b) = z +c T B B 1 b The current basis is feasible if B 1 (b+ b) 0 If not: negative values will occur in the RHS of the simplex tableau The reduced costs are unchanged (positive, at optimum) this can be resolved using the dual simplex method Lecture 4 Linear and integer optimization with applications 20/26

Changes in the right-hand-side coefficients A linear program minimize z = x 1 2x 2 subject to 2x 1 +x 2 2 x 1 +2x 2 7 x 1 3 x 1,x 2 0 The optimal solution is given by basis z x 1 x 2 s 1 s 2 s 3 RHS z 1 0 0 0 1 2 13 1 1 x 2 0 0 1 0 2 2 5 x 1 0 1 0 0 0 1 3 s 1 0 0 0 1 1 3 2 2 3 Draw graph Lecture 4 Linear and integer optimization with applications 21/26

Changes in the right-hand-side coefficients Change the right-hand-side according to minimize z = x 1 2x 2 subject to 2x 1 +x 2 2 x 1 +2x 2 7+δ x 1 3 x 1,x 2 0 The change in the RHS is given by B 1 (0,δ,0) T = ( 1 2 δ,0, 1 2 δ)t new optimal tableau: basis z x 1 x 2 s 1 s 2 s 3 RHS z 1 0 0 0 1 2 13 + δ 1 1 x 2 0 0 1 0 2 2 5+ 1 2 δ x 1 0 1 0 0 0 1 3 s 1 0 0 0 1 1 3 2 2 3 1 2 δ The current basis is feasible if 10 δ 6 (i.e., if RHS 0) In AMPL: display constraint name.down,.current,.up Lecture 4 Linear and integer optimization with applications 22/26

Changes in the right-hand-side coefficients Suppose δ = 8. The simplex tableau then appears as basis z x 1 x 2 s 1 s 2 s 3 RHS z 1 0 0 0 1 2 21 1 1 x 2 0 0 1 0 2 2 9 x 1 0 1 0 0 0 1 3 s 1 0 0 0 1 1 3 2 2 1 Dual simplex iteration: s 1 = 1 has to leave the basis Find smallest ratio between reduced cost (non-basic column) and (negative) elements in the s 1 -row (to stay optimal) s 2 will enter the basis new optimal tableau: basis z x 1 x 2 s 1 s 2 s 3 RHS z 1 0 0 2 0 5 19 x 2 0 0 1 1 0 2 8 x 1 0 1 0 0 0 1 3 s 2 0 0 0-2 1-3 2 Lecture 4 Linear and integer optimization with applications 23/26

Changes in the objective coefficients Reduced cost The reduced cost of a non-basic variable defines the change in the objective value when the value of the corresponding variable is (marginally) increased. The basis B is optimal if c T N ct B B 1 N 0 n m (i.e., marginal values = reduced costs 0) In AMPL: display variable name.rc Suppose c changes to c+ c The new optimal value: z new = (c B + c B ) T B 1 b = z + c T B B 1 b The current basis is optimal if (c N + c N ) T (c B + c B ) T B 1 N 0 If not: more simplex iterations to find the optimal solution Lecture 4 Linear and integer optimization with applications 24/26

Changes in the objective coefficients Change the objective according to minimize z = x 1 +( 2+δ)x 2 subject to 2x 1 +x 2 2 x 1 +2x 2 7 x 1 3 x 1,x 2 0 The changes in the reduced costs are given by (δ,0,0)b 1 N = ( 1 2 δ, 1 2δ) new optimal tableau: basis z x 1 x 2 s 1 s 2 s 3 RHS z 1 0 0 0 1 1 2 δ 2 1 2 δ 13 5δ 1 1 x 2 0 0 1 0 2 2 5 x 1 0 1 0 0 0 1 3 s 1 0 0 0 1 1 3 2 2 3 The current basis is optimal if δ 2 (i.e., if reduced costs 0) In AMPL: display variable name.down,.current,.up Lecture 4 Linear and integer optimization with applications 25/26

Changes in the objective coefficients Suppose δ = 4 new tableau: basis z x 1 x 2 s 1 s 2 s 3 RHS z 1 0 0 0 1 0 7 1 1 x 2 0 0 1 0 2 2 5 x 1 0 1 0 0 0 1 3 s 1 0 0 0 1 1 3 2 2 3 Let s 2 enter and x 2 leave the basis. New optimal tableau: basis z x 1 x 2 s 1 s 2 s 3 RHS z 1 0 2 0 0 1 3 s 2 0 0 2 0 1 1 10 x 1 0 1 0 0 0 1 3 s 1 0 0 1 1 0 2 8 Lecture 4 Linear and integer optimization with applications 26/26