March 13, Duality 3

Similar documents
Review Solutions, Exam 2, Operations Research

Chapter 1 Linear Programming. Paragraph 5 Duality

Chap6 Duality Theory and Sensitivity Analysis

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

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)

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

Farkas Lemma, Dual Simplex and Sensitivity Analysis

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

February 22, Introduction to the Simplex Algorithm

Special cases of linear programming

Understanding the Simplex algorithm. Standard Optimization Problems.

4.6 Linear Programming duality

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

Linear Programming Duality

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

Duality Theory, Optimality Conditions

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

F 1 F 2 Daily Requirement Cost N N N

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

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

The Dual Simplex Algorithm

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

Worked Examples for Chapter 5

A Review of Linear Programming

4. Duality and Sensitivity

Lectures 6, 7 and part of 8

Lecture 10: Linear programming duality and sensitivity 0-0

Systems Analysis in Construction

Sensitivity Analysis and Duality in LP

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

Duality and Projections

Lesson 27 Linear Programming; The Simplex Method

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

Sensitivity Analysis

February 17, Simplex Method Continued

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

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

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

The Simplex Method for Solving a Linear Program Prof. Stephen Graves

Linear and Combinatorial Optimization

56:270 Final Exam - May

Math Models of OR: Some Definitions

1 Review Session. 1.1 Lecture 2

OPERATIONS RESEARCH. Michał Kulej. Business Information Systems

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

"SYMMETRIC" PRIMAL-DUAL PAIR

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

Discrete Optimization

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

CPS 616 ITERATIVE IMPROVEMENTS 10-1

MAT016: Optimization

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

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

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

Chapter 2: Linear Programming Basics. (Bertsimas & Tsitsiklis, Chapter 1)

Simplex Algorithm Using Canonical Tableaus

Introduction to linear programming using LEGO.

Sensitivity Analysis and Duality

Planning and Optimization

II. Analysis of Linear Programming Solutions

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

Linear Programming Inverse Projection Theory Chapter 3

Foundations of Operations Research

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

4.7 Sensitivity analysis in Linear Programming

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

Math Models of OR: Sensitivity Analysis

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

Dr. Maddah ENMG 500 Engineering Management I 10/21/07

The Simplex Algorithm

OPTIMISATION /09 EXAM PREPARATION GUIDELINES

OPTIMISATION 2007/8 EXAM PREPARATION GUIDELINES

Linear Programming, Lecture 4

56:171 Operations Research Fall 1998

M340(921) Solutions Problem Set 6 (c) 2013, Philip D Loewen. g = 35y y y 3.

Linear Programming: Chapter 5 Duality

56:171 Operations Research Midterm Exam - October 26, 1989 Instructor: D.L. Bricker

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

2.098/6.255/ Optimization Methods Practice True/False Questions

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

TIM 206 Lecture 3: The Simplex Method

IE 5531: Engineering Optimization I

2001 Dennis L. Bricker Dept. of Industrial Engineering The University of Iowa. Reducing dimensionality of DP page 1

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 373 Section A1. Final Exam. Dr. J. Bowman 17 December :00 17:00

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

(includes both Phases I & II)

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

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

ECE 307 Techniques for Engineering Decisions

Operations Research Lecture 6: Integer Programming

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

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

CSC373: Algorithm Design, Analysis and Complexity Fall 2017 DENIS PANKRATOV NOVEMBER 1, 2017

Section 4.1 Solving Systems of Linear Inequalities

ECE 307- Techniques for Engineering Decisions

(b) For the change in c 1, use the row corresponding to x 1. The new Row 0 is therefore: 5 + 6

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

Transcription:

15.53 March 13, 27 Duality 3 There are concepts much more difficult to grasp than duality in linear programming. -- Jim Orlin The concept [of nonduality], often described in English as "nondualism," is extremely hard for the mind to grasp or visualize, since the mind engages constantly in the making of distinctions and nondualism represents the rejection or transcendence of all distinctions. from www.nonduality.com 1

Overview Rules for creating a dual linear program Complementary slackness conditions The dual simplex algorithm 2

Rules for creating a dual linear program The Primal LP Dual Maximize z = 1 x 1 + 2 x 2 + 3 x 3 + 4 x 4 Variable subject to 8 x 1 + 9 x 2 + 1 x 3 + 11 x 4? 5 y 1 12 x 1 + 13 x 2 + 14 x 3 + 15 x 4? 6 y 2 16 x 1 + 17 x 2 + 18 x 3 + 19 x 4? 7 y 3 x 1? x 2? x 3? x 4? The Dual LP Minimize v = 5 y 1 + 6 y 2 + 7 y 3 subject to 8 y 1 + 12 y 2 + 16 y 3? 1 9 y 1 + 13 y 2 + 17 y 3? 2 1 y 1 + 14 y 2 + 18 y 3? 3 11 y 1 + 15 y 2 + 19 y 3? 4 y 1? y 2? y 3? 3

The Primal LP The SOB approach sensible, odd, and bizarre Max z = 1 x 1 + 2 x 2 + 3 x 3 + 4 x 4 s.t. 8 x 1 + 9 x 2 + 1 x 3 + 11 x 4 5 12 x 1 + 13 x 2 + 14 x 3 + 15 x 4 = 6 16 x 1 + 17 x 2 + 18 x 3 + 19 x 4 7 x 1, x 2, x 3 uis, x 4? S O B S S O B uis. unconstrained in sign 4

The SOB approach sensible, odd, and bizarre The Dual LP Min v = 5 y 1 + 6 y 2 + 7 y 3 s.t 8 y 1 + 12 y 2 + 16 y 3 1 9 y 1 + 13 y 2 + 17 y 3 2 1 y 1 11 y 1 + 14 y 2 + 15 y 2 + 18 y 3 + 19 y 3 = 3 4 y 1, y 2 uis y 3 S S O B S O B 5

More Rules Primal max Dual min i-th constraint i-th variable S i-th constraint = i-th variable free O i-th constraint i-th variable B i-th variable i-th constraint S i-th variable free i-th constraint = O i-th variable i-th constraint B S: sensible O: odd B: bizarre The SOB technique is due to Art Benjamin 6

The Primal LP Maximize z = 1 x 1 + 2 x 2 + 3 x 3 + 4 x 4 subject to 8 x 1 + 9 x 2 + 1 x 3 + 11 x 4 a 5 12 x 1 + 13 x 2 + 14 x 3 + 15 x 4 = b 6 16 x 1 + 17 x 2 + 18 x 3 + 19 x c 4 7 x 1 d, x 2 e, x 3 free, f x 4 g The Dual LP Minimize v = 5 y 1 + 6 y 2 + 7 y 3 subject to 8 y 1 + 12 y 2 + 16 y 3 d 1 9 y 1 + 13 y 2 + 17 y 3 e 2 1 y 1 11 y 1 + 14 y 2 + 15 y 2 + 18 y 3 + 19 y 3 = f g 3 4 y 1 a, y 2 free, b y 3 c 7

Shadow Price Method The Primal LP Maximize z = 1 x 1 + 2 x 2 + 3 x 3 + 4 x 4 subject to 8 x 1 + 9 x 2 + 1 x 3 + 11 x 4 5 12 x 1 + 13 x 2 + 14 x 3 + 15 x 4 = 6 16 x 1 + 17 x 2 + 18 x 3 + 19 x 4 7 x 1 d, x 2 e, x 3 free, f x 4 g RHS of constraint (1) increases from 5 to 5.1 implies Primal LP is less constrained implies z increases or stays the same implies y 1. RHS of constraint (3) increases from 7 to 7.3 implies Primal LP is implies z implies y 3 8

Another Primal-Dual Pair Jane Jetson is trying to design a diet for George on her home food dispenser so as to satisfy requirements and minimize cost. Space Burgers Saturn Shakes Venus Flies Requirements Carbs 4 2 12 Fat 3 4 8 Protein 4 1 2 2 Cost (in $1s) 5 4 2 9

Jane s Linear Program x 1 = number of Spaceburgers x 2 = number of Saturn Shakes x 3 = number of Venus Flies minimize z = 5 x 1 + 4 x 2 + 2 x 3 subject to 4 x 1 + 2 x 2 + 12 3 x 1 + 4 x 2 + 8 4 x 1 + 1 x 2 + 2 x 3 2 x 1, x 2, x 3 1

Primal Linear Program min z = 5 x 1 + 4 x 2 + 2 x 3 s.t 4 x 1 + 2 x 2 + 12 carbs 3 x 1 + 4 x 2 + 8 fat 4 x 1 + 1 x 2 + 2 x 3 2 protein x 1, x 2, x 3 p 1 p 2 p 3 Dual Linear Program Max v = 12 p 1 + 8 p 2 + 2 p 3 cost of nutrients s.t 4 p 1 + 3 p 2 + 4 p 3 5 burgers 2 p 1 + 4 p 2 + 1 p 3 4 shakes + 2 p 3 2 flies p 1, p 2, p 3 11

Spacely Sprockets has decided to make food pellets. Mr. Spacely wants to Jane to buy all foods from him. How should he price them to maximize profit and so that Jane is willing to purchase all foods from him? Dual Linear Program Max z = 12 p 1 + 8 p 2 + 2 p 3 s.t 4 p 1 + 3 p 2 + 4 p 3 5 2 p 1 + 4 p 2 + 1 p 3 4 2 p 3 2 cost of pellets Spaceburgers Saturn shakes Venus flies p 1, p 2, p 3 12

Complementary Slackness Conditions Let x* denote a primal feasible solution. Let p* denote a dual feasible solution. Complementary slackness conditions. 1. For all i, if the i-th constraint is an inequality constraint that is not tight at the optimum solution, then p* i =. 2. If the x* j >, then the j-th constraint of the dual problem is tight, and thus the reduced cost of x* j is. Theorem. If x* and p* are optimal primal and dual solutions, then they satisfy the complementary slackness conditions. 13

Complementary Slackness Conditions min v = 5 x 1 + 4 x 2 + 2 x 3 s.t 4 x 1 + 2 x 2 + 12 3 x 1 + 4 x 2 + 8 4 x 1 + 1 x 2 + 2 x 3 2 x 1, x 2, x 3 carbs fat protein Opt Solution: x 1 = 3, x 2 =, x 3 = 4, z = 23 What does complementary slackness tell us about the optimal dual variables (also known as shadow prices? Discuss it with your neighbor. p 2 = ; the reduced costs of x 1 and x 3 are. p 2 = ; 4 p 1 + 3 p 2 + 4 p 3 = 5; 2 p 3 = 2. 14

More on complementary slackness If there is a unique optimum tableau, then the complementary slackness conditions will give the equations for a unique optimum dual solution. Dual Linear Program Max z = 12 p 1 + 8 p 2 + 2 p 3 s.t 4 p 1 + 3 p 2 + 4 p 3 5 2 p 1 + 4 p 2 + 1 p 3 4 p 1, p 2, p 3 2 p 3 2 p 2 = ; 4 p 1 + 3 p 2 + 4 p 3 = 5; 2 p 3 = 2. p 2 = p 3 = 1 p 1 = 1/4 15

Theorem on Complementary Slackness If x* is feasible for the primal, and if p* is feasible for the dual, and if the pair (x*, p*) satisfy complementary slackness conditions, then 1. x* is optimal for the primal problem and 2. p* is optimal for the dual problem Primal solution: x 1 = 3 x 2 = x 3 = 4 Dual Solution p 1 = ¼ p 2 = p 3 = 1 The complementary slackness conditions are satisfied. Thus they are both optimal. 16

Complementary Slackness: An alternative representation Primal solution: x 1 = 3 x 2 = x 3 = 4 Dual Solution p 1 = ¼ p 2 = p 3 = 1 x 1 (4 p 1 + 3 p 2 + 4 p 3-5) = 3 = x 2 (2 p 1 + 4 p 2 + 1 p 3-4) = -2.5 = x 3 (2 p 3-2) = 4 = 17

Mental Break 18

The Dual Simplex Algorithm z x 1 x 2 x 3 x 4 1-33 -22 = Objective function. -3 3 1 = 6 Constraint 1-4 2 1-4 2 = 2 Constraint 2 If there are m constraints, a basic solution has m basic variables. The basic solution is obtained by setting the nonbasic variables to, and solving the system of equations. 19

Basic Feasible Solutions z 1 x 1 x 2 x 3 x 4-33 -22-3 3 1-4 2 1 = = 6 = 2 A solution is called a basic feasible solution, (bfs) if it is a basic solution and if it satisfies the nonnegativity constraints. z x 1 x 2 x 3 x 4 1-3 -1 3-22 1 = 2 Another bfs -33 3 1-1.5 = 36-4 -2 21.5 1 = 12 2

Basic Dual Feasible Bases z 1 x 1 x 2 x 3 x 4-33 -22-3 3 1-4 2 1 = = 6 = 2 A solution is called a basic dual feasible solution, if it is a basic solution and if it satisfies the optimality conditions with the z-row coefficients (reduced costs are non-negative.) z x 1 x 2 x 3 x 4 1-33 1-22 2/3 = 4-1 -3 31 1/3 1 = 26-2 -4 2-2/3 1 = -22 This tableau gives a basic dual feasible solution. The primal basic solution is x 2 = 2 and x 4 = -2, and so it is not a bfs. 21

How did you know where to pivot to get that dual feasible basis? Where are the dual variables? Why are we learning this? There is no general rule on where to pivot. Just focus on the fact that it shows it is a basic dual solution. The dual variables are hidden. They are the simplex multipliers. We are learning this to learn the dual simplex algorithm. Ollie, the computationally Tim wise owl. 22

Pivoting in the Dual Simplex Algorithm z x 1 x 2 x 3 s 1 s 2 s 3 RHS 1-52 -3-2 = 2 4 5 1 = 1 1 1 1 1 = 3 1 5 2 1 = 24 Zor s initial tableau z x 1 x 2 x 3 s 1 s 2 s 3 RHS Prices 1 48 2 1 = 24-23 -8.5 1-2.5 = -41-4 -1.5 1 -.5 = -72 5 2.5 1.5 = 12 1 A dual feasible tableau 23

A Dual Feasible Pivot z x 1 x 2 x 3 s 1 s 2 s 3 RHS 1 48 2 1 = 24-23 -8.5 1-2.5 = -41-4 -1.5 1 -.5 = -72 5 2.5 1.5 = 12 A dual feasible tableau 1 48 4Δ 2 1.5Δ Δ 1.5Δ = 24 72Δ Step 1. Choose a row that is an infeasible constraint. Step 2. Add Δ times that row to the z-row. Step 3. Choose Δ maximum so that all coefficients are nonnegative. This determines the pivot column. 24

Finding the max value of Δ. z x 1 x 2 x 3 s 1 s 2 s 3 RHS 1 48 2 1 = 24-23 -8.5 1-2.5 = -41-4 -1.5 1 -.5 = -72 5 2.5 1.5 = 12 1 48 4Δ 2 1.5Δ Δ 1.5Δ = 24 72Δ 48/4 2/1.5 1/.5 s = argmin { c j / a 2j : a 2j < }. {48/4, 2/1.5, 1/.5}. s = 1. Pivot on the component in constraint 2, column x 1. If a 2j, the dual is unbounded from below, and the primal is infeasible. 25

The Dual Simplex Pivot z x 1 x 2 x 3 s 1 s 2 s 3 RHS 1 48 2 2 12 1 4 = 24 1176-23 -8.5 1/8 1-23/4-2.5 3/8 = -41 4-4 1-1.5 3/8-1/41 -.5 1/8 = -72 18 5 2.5 5/8 1 5/4-1/8.5 = 12 12 Divide constraint 2 by -4. Subtract 48 times the new constraint 2 from the z-row Add 23 times the new constraint 2 to constraint 1. Subtract 5 times the new constraint 2 from constraint 31. The resulting tableau will be dual feasible. If it is also a bfs, then it is optimal, and we can quit. Otherwise keep pivoting. 26

Another dual simplex pivot z x 1 x 2 x 3 s 1 s 2 s 3 RHS 1 2 3 1 = 5 2 4 5 1 = 1-2 -1 1 1 = -3 1 1 1 1 = -2 1. Does this tableau give an upper bound on the optimal primal objective value? 2. What happens if we choose the second constraint as the pivot row? 3. What happens if we choose the third constraint at the pivot row? 27

Answers Answer 1. The optimal primal value is at most 5 because z + 2x 1 + 3x 2 + x 3 = 5 and x. What happens if we choose the second constraint as the pivot row? The min ratio test gives min {2/2, 3/1} = 1 The column giving the min ratio is the column for x 1. So, we pivot on the -2 What happens if we choose the third constraint as the pivot row? The min ratio test gives nothing. The dual is unbounded. The constraint is x 1 + x 2 + x 3 + s 1 = -2 The primal has no feasible solution. 28

Comments on the Dual Simplex Algorithm Alternative to primal simplex algorithm in which we relax primal feasibility, but require the z-row to satisfy the optimality conditions. Dual simplex pivot rule: determined by a min ratio test. Very efficient in practice for lots of large problems (great alternative to primal simplex) If add an inequality constraint to an LP, the current basis may not be a bfs, but it stays dual feasible. (Very common in integer programming.) The old basis can be used as a starting point for the dual simplex method 29

And now, it s time for.. 3