Use duality theory to check if the solution implied by the dictionary is correct. Maximize x 1 + 3 x 2 + 6 x 3 subject to 1 x 1 + 1 x 2 - 1 x 3 ≤ 5 1 x.

Slides:



Advertisements
Similar presentations
1. Set up the phase 1 dictionary for this problem and make the first pivot: Maximize X 1 + X X 3 + X 4 subject to -X 1 + X X 4 ≤ -3 -X 1 +
Advertisements

Chapter 5: Linear Programming: The Simplex Method
Summary of complementary slackness: 1. If x i ≠ 0, i= 1, 2, …, n the ith dual equation is tight. 2. If equation i of the primal is not tight, y i =0. 1.
Geometry and Theory of LP Standard (Inequality) Primal Problem: Dual Problem:
In a previous lecture, this dictionary resulted after the first phase 1 pivot: X0 = X1 - 1 X2 + 1 X3 X4 = X1 + 3 X2 + 1 X
IEOR 4004 Midterm review (Part II) March 12, 2014.
What happens to Klee-Minty examples if maximum increase rule is used?
Operation Research Chapter 3 Simplex Method.
Nonstandard Problmes Produced by E. Gretchen Gascon.
Chapter 6 Linear Programming: The Simplex Method
Copyright (c) 2003 Brooks/Cole, a division of Thomson Learning, Inc
Chapter 6 Linear Programming: The Simplex Method Section 3 The Dual Problem: Minimization with Problem Constraints of the Form ≥
Linear Inequalities and Linear Programming Chapter 5
Linear programming Thomas S. Ferguson University of California at Los Angeles Compressive Sensing Tutorial PART 3 Svetlana Avramov-Zamurovic January 29,
The Simplex Method: Standard Maximization Problems
The Simplex Algorithm An Algorithm for solving Linear Programming Problems.
ISM 206 Lecture 4 Duality and Sensitivity Analysis.
Duality Dual problem Duality Theorem Complementary Slackness
Finite Mathematics & Its Applications, 10/e by Goldstein/Schneider/SiegelCopyright © 2010 Pearson Education, Inc. 1 of 99 Chapter 4 The Simplex Method.
7(3) Shadow Prices   Economic interpretation?
ISM 206 Lecture 4 Duality and Sensitivity Analysis.
Chapter 4 The Simplex Method
Use complementary slackness to check the solution: ( 20/3, 0, 16/3, 0) Maximize 9 x 1 -3 x x 3 -7 x 4 subject to 2 x x x x 4 ≤
Chapter 6 Linear Programming: The Simplex Method
Simplex method (algebraic interpretation)
Duality Theory LI Xiaolei.
Chapter 3. Pitfalls Initialization Ambiguity in an iteration
Topic III The Simplex Method Setting up the Method Tabular Form Chapter(s): 4.
Barnett/Ziegler/Byleen Finite Mathematics 11e1 Learning Objectives for Section 6.4 The student will be able to set up and solve linear programming problems.
Kerimcan OzcanMNGT 379 Operations Research1 Linear Programming: The Simplex Method Chapter 5.
Duality Theory  Every LP problem (called the ‘Primal’) has associated with another problem called the ‘Dual’.  The ‘Dual’ problem is an LP defined directly.
1. 2 Computing the Adjoint matrix: 3 Assignment #3 is available. Due: Monday Nov. 5, beginning of class.
Linear Programming Revised Simplex Method, Duality of LP problems and Sensitivity analysis D Nagesh Kumar, IISc Optimization Methods: M3L5.
Chapter 6 Linear Programming: The Simplex Method Section 3 The Dual Problem: Minimization with Problem Constraints of the Form ≥
Chapter 4 Linear Programming: The Simplex Method
1 Bob and Sue solved this by hand: Maximize x x 2 subject to 1 x x 2 ≤ x x 2 ≤ 4 x 1, x 2 ≥ 0 and their last dictionary was: X1.
Chapter 6 Linear Programming: The Simplex Method Section 4 Maximization and Minimization with Problem Constraints.
EE/Econ 458 Duality J. McCalley.
Barnett/Ziegler/Byleen Finite Mathematics 11e1 Learning Objectives for Section 6.3 The student will be able to formulate the dual problem. The student.
Hon Wai Leong, NUS (CS6234, Spring 2009) Page 1 Copyright © 2009 by Leong Hon Wai CS6234: Lecture 4  Linear Programming  LP and Simplex Algorithm [PS82]-Ch2.
OR Chapter 8. General LP Problems Converting other forms to general LP problem : min c’x  - max (-c)’x   = by adding a nonnegative slack variable.
OR Chapter 7. The Revised Simplex Method  Recall Theorem 3.1, same basis  same dictionary Entire dictionary can be constructed as long as we.
CSC 445/545 is done at 4:30 so I did NOT fill in the box for 4:30 for our class. Please put your name here. Please put your as well. 1.
OR Relation between (P) & (D). OR optimal solution InfeasibleUnbounded Optimal solution OXX Infeasible X( O )O Unbounded XOX (D) (P)
Copyright © 2006 Brooks/Cole, a division of Thomson Learning, Inc. Linear Programming: An Algebraic Approach 4 The Simplex Method with Standard Maximization.
The minimum cost flow problem. Solving the minimum cost flow problem.
Simplex Method Review. Canonical Form A is m x n Theorem 7.5: If an LP has an optimal solution, then at least one such solution exists at a basic feasible.
5.5 Dual problem: minimization with problem constraints of the form Associated with each minimization problem with constraints is a maximization problem.
The Duality Theorem Primal P: Maximize
Linear Programming Revised Simplex Method, Duality of LP problems and Sensitivity analysis D Nagesh Kumar, IISc Optimization Methods: M3L5.
Chap 10. Sensitivity Analysis
The minimum cost flow problem
EMGT 6412/MATH 6665 Mathematical Programming Spring 2016
Perturbation method, lexicographic method
Chapter 4 Linear Programming: The Simplex Method
Chap 9. General LP problems: Duality and Infeasibility
The Simplex Method: Standard Minimization Problems
The Simplex Method: Nonstandard Problems
The Simplex Method The geometric method of solving linear programming problems presented before. The graphical method is useful only for problems involving.
Chapter 8. General LP Problems
Chapter 5. The Duality Theorem
Flow Feasibility Problems
Chapter 8. General LP Problems
Simplex method (algebraic interpretation)
DUALITY THEORY Reference: Chapter 6 in Bazaraa, Jarvis and Sherali.
Chapter 8. General LP Problems
Practical Issues Finding an initial feasible solution Cycling
Chapter 3. Pitfalls Initialization Ambiguity in an iteration
Presentation transcript:

Use duality theory to check if the solution implied by the dictionary is correct. Maximize x x x 3 subject to 1 x x x 3 ≤ 5 1 x x x 3 ≤ 3 0 x x x 3 ≤ 4 x 1,x 2,x 3 ≥ 0 X2 = 2+ 3 X3 - 1 X4 + 1 X6 X1 = 3- 2 X3 + 0 X4 - 1 X6 X5 = 2- 9 X3 + 1 X4 - 1 X z = X3 - 1 X4 - 1 X6 1

NEW: Important Instructions for Connex submissions to facilitate marking Please number the pivot rules as follows: 1 - smallest subscript. 2 - largest coefficient 3 - maximum increase Do not tar or zip or gzip your files. Upload them one at a time. If I have exactly the files you uploaded for your program, all I should have to do to compile and run is to type what is indicated for your programming language. 2

If you are programming in Java: Do not use packages. Your main should be in Simplex.java (and not any other class and not simplex.java). I will compile your java files with javac *.java Then I will run it like this: java Simplex [pivot_rule] my_out For example, for largest coefficient rule I might type: java Simplex 2 out_test1 3

If you are programming in C/C++: I will compile using gcc *.c or g++ *.cpp I will run it like this: a.out [pivot_rule] my_out For example, for largest coefficient rule I might type: a.out 2 out_test1 4

Student: Solves primal or dual problem whichever is easiest. Primal: 9 variables, and 100 equations. Dual: 100 variables, and 9 equations. Text: claims that in practice, it is usually best to choose the problem with the least rows. Student reads both primal and dual solutions from last dictionary. Certificate: x* and y*, the optimal primal and dual solutions. 5

Supervisor: Has certificate plus primal and dual problems. 1. Check that x* is primal feasible. 2. Check that y* is dual feasible. 3. Check c T x* = b T y*. These checks guarantee optimality. Easier usually than solving LP problem. 6

The problems: The primal problem: Maximize - 3 X X 2 subject to 1 X 1 -1 X 2 ≤ X 1 -1 X 2 ≤ X 1 -2 X 2 ≤ X 1 -4 X 2 ≤ 0 X 1, X 2 ≥ 0 The dual problem in standard form: Maximize 3Y 1 + 5Y 2 + 1Y 3 + 0Y 4 subject to -1Y 1 +2Y 2 +0Y 3 +1Y 4 ≤ 3 1Y 1 +1Y 2 +2Y 3 +4Y 4 ≤ 2 Y 1, Y 2, Y 3, Y 4 ≥ 0 7

The student notices that the primal has no initial feasible basis so cannot be handled by the code written for the project. So the student solves the dual instead: The initial dictionary: Y5= 3 +1 Y1 -2 Y2 + 0 Y3 -1 Y4 Y6= 2 -1 Y1 -1 Y2 - 2 Y3 -4 Y z = 0 +3 Y1 +5 Y2 + 1 Y3 +0 Y4 8

After 2 pivots: Y2= Y Y Y Y6 Y1= Y Y Y Y z = Y Y Y Y6 The student guesses that 0.33 really means 1/3 and 0.67 is 2/3. So the certificate is: Y 1 = 1/3, Y 2 = 5/3, Y 3 = 0, Y 4 = 0 X 1 = -1 (coeff. of Y5)= 2/3 X 2 = -1 (coeff. of Y6)= 3 2/3 = 11/3 9

The primal problem: Maximize - 3 X X 2 subject to 1 X 1 -1 X 2 ≤ X 1 -1 X 2 ≤ X 1 -2 X 2 ≤ X 1 -4 X 2 ≤ 0 X 1, X 2 ≥ 0 X 1 = 2/3 X 2 = 11/3 Check for primal feasibility, the red equations are tight: 1(2/3)-1(11/3)= -9/3 ≤ -3 -2(2/3)-1(11/3)= -15/3 ≤ -5 0(2/3)-2(11/3)= -22/3 ≤ -1 -1(2/3)-4(11/3)= -46/3 ≤ 0 2/3, 11/3 ≥ 0 10

Check Y 1 = 1/3, Y 2 = 5/3, Y 3 = 0, Y 4 = 0 for dual feasibility: -1Y 1 +2Y 2 +0Y 3 +1Y 4 ≤ 3 1Y 1 +1Y 2 +2Y 3 +4Y 4 ≤ 2 Y 1, Y 2, Y 3, Y 4 ≥ 0 -1(1/3) +2(5/3) +0*0 +1*0 = 9/3 ≤ 3 1(1/3) +1(5/3) +2*0 +4*0 = 6/3 ≤ 2 1/3, 5/3, 0, 0 ≥ 0 11

The primal problem: Maximize -3 X X 2 X 1 = 2/3 X 2 = 11/3 -6/3-22/3= -28/3 The dual (not in standard form): Minimize -3Y 1 -5Y 2 -1Y 3 + 0Y 4 Y 1 = 1/3, Y 2 = 5/3, Y 3 = 0, Y 4 = / = -28/3 Check the objective function values: Conclusion: (2/3, 11/3) is an optimal primal solution. (1/3, 5/3, 0, 0) an optimal dual solution. 12

Complementary slackness allows us to find a dual solution from a primal one. What can we conclude by looking at the equations which are not tight? The slacks are then non-zero and hence must be in the basis and so they have a (implicit) zero coefficient in the z row. So the corresponding y variables must be 0. Conclusion: if x n+i ≠ 0 then y i = 0. 13

The red equations are tight: Slack 1(2/3)-1(11/3)= -9/3 ≤ -3 x 3 -2(2/3)-1(11/3)= -15/3 ≤ -5 x 4 0(2/3)-2(11/3)= -22/3 ≤ -1 x 5 -1(2/3)-4(11/3)= -46/3 ≤ 0 x 6 X1 = X X4 X2 = X X4 X5 = X X4 X6 = X X z = X X4 Conclusion: y 3 =y 4 =0. 14

What can we conclude by looking at the x i ’s that are non-zero, i = 1, 2, …, n? x i = -1* (coefficient of the ith slack y m+i for the dual problem’s last dictionary). So if x i is non-zero, y m+i cannot be in the basis in the last dual dictionary since otherwise it has an implicit 0 coefficient. So y m+i = 0 and equation i of the dual hence must be tight. Conclusion: if x i is non-zero, equation i of the dual must be tight. 15

X1 = X X4 X2 = X X4 X5 = X X4 X6 = X X z = X X4 Since x 1 and x 2 are non-zero, both dual equations must be tight: -1Y 1 +2Y 2 +0Y 3 +1Y 4 ≤ 3 1Y 1 +1Y 2 +2Y 3 +4Y 4 ≤ 2 16

Solving this: -1Y 1 +2Y 2 +0Y 3 +1Y 4 ≤ 3 1Y 1 +1Y 2 +2Y 3 +4Y 4 ≤ 2 y 3 =y 4 =0. Add them together: 3 Y 2 = 5 so Y 2 = 5/3 Y 1 + Y 2 = 2 so Y 1 = 1/3 17

The idea for complementary slackness: 1.If x n+i ≠ 0 for some i= 1, 2, …, m, then x n+i is in the basis and hence has an implicit 0 coefficient in the z row of the last dictionary and this implies that y i =0. 2. If x i ≠ 0 for some i= 1, 2, …, n, then the ith dual equation is tight (y m+i =0) because otherwise, if y m+i ≠ 0, it is in the basis of the last dual dictionary and hence would have an implicit 0 coefficient in the z row of the last dual dictionary and this would imply x i =0. 18

In other words: 1.If equation i of the primal is not tight, y i =0. 2. If x i ≠ 0, i= 1, 2, …, n the ith dual equation is tight. 19

Complementary Slackness Theorem (5.2): x' = feasible primal solution y' = feasible dual solution Necessary and sufficient conditions for simultaneous optimality of x' and y' are 1. For all i=1, 2, …, m, either (a i1 * x 1 ' + a i2 *x 2 ' + … + a in *x n ')= b i or y i ' = 0 (or both). 2. For all i=1, 2,..., n, either (a 1j * y 1 ' + a 2j *y 2 ' a mj *y m ') = c i or x i ' = 0 (or both). 20

We have already argued that these conditions are necessary for optimality. Why are they sufficient? 21