ORF 522. Linear Programming and Convex Analysis

Similar documents
AM 121: Intro to Optimization

ORF 522. Linear Programming and Convex Analysis

Example. 1 Rows 1,..., m of the simplex tableau remain lexicographically positive

CO350 Linear Programming Chapter 8: Degeneracy and Finite Termination

Linear Programming. Linear Programming I. Lecture 1. Linear Programming. Linear Programming

IE 400: Principles of Engineering Management. Simplex Method Continued

Optimization (168) Lecture 7-8-9

February 17, Simplex Method Continued

LP. Lecture 3. Chapter 3: degeneracy. degeneracy example cycling the lexicographic method other pivot rules the fundamental theorem of LP

LINEAR PROGRAMMING I. a refreshing example standard form fundamental questions geometry linear algebra simplex algorithm

Lecture 2: The Simplex method

Lecture slides by Kevin Wayne

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

Simplex method(s) for solving LPs in standard form

3 The Simplex Method. 3.1 Basic Solutions

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

1 Review Session. 1.1 Lecture 2

Special cases of linear programming

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

15-780: LinearProgramming

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

The simplex algorithm

Linear Programming, Lecture 4

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

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

CO350 Linear Programming Chapter 8: Degeneracy and Finite Termination

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

IE 5531: Engineering Optimization I

Developing an Algorithm for LP Preamble to Section 3 (Simplex Method)

AM 121: Intro to Optimization Models and Methods Fall 2018

Part 1. The Review of Linear Programming

MATH 445/545 Test 1 Spring 2016

Week 2. The Simplex method was developed by Dantzig in the late 40-ties.

Linear Programming Redux

Introduce the idea of a nondegenerate tableau and its analogy with nondenegerate vertices.

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

3. THE SIMPLEX ALGORITHM

Review Solutions, Exam 2, Operations Research

4.5 Simplex method. LP in standard form: min z = c T x s.t. Ax = b

Summary of the simplex method

ECE 307 Techniques for Engineering Decisions

Supplementary lecture notes on linear programming. We will present an algorithm to solve linear programs of the form. maximize.

Summary of the simplex method

1 Overview. 2 Extreme Points. AM 221: Advanced Optimization Spring 2016

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

Simplex Method for LP (II)

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

The Simplex Algorithm: Technicalities 1

OPERATIONS RESEARCH. Linear Programming Problem

Contents. 4.5 The(Primal)SimplexMethod NumericalExamplesoftheSimplexMethod

Operations Research Lecture 2: Linear Programming Simplex Method

4.5 Simplex method. min z = c T x s.v. Ax = b. LP in standard form

Understanding the Simplex algorithm. Standard Optimization Problems.

Chapter 5 Linear Programming (LP)

Math 273a: Optimization The Simplex method

OPRE 6201 : 3. Special Cases

Discrete Optimization. Guyslain Naves

February 22, Introduction to the Simplex Algorithm

Chapter 4 The Simplex Algorithm Part II

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

Termination, Cycling, and Degeneracy

Simplex Algorithm Using Canonical Tableaus

9.1 Linear Programs in canonical form

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

Notes on Simplex Algorithm

TIM 206 Lecture 3: The Simplex Method

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

Notes taken by Graham Taylor. January 22, 2005

The dual simplex method with bounds

Lecture: Algorithms for LP, SOCP and SDP

Introduction to Operations Research

Systems Analysis in Construction

IE 400 Principles of Engineering Management. The Simplex Algorithm-I: Set 3

ORF 307: Lecture 2. Linear Programming: Chapter 2 Simplex Methods

The augmented form of this LP is the following linear system of equations:

ORF 307: Lecture 4. Linear Programming: Chapter 3 Degeneracy

Lesson 27 Linear Programming; The Simplex Method

Linear Programming and the Simplex method

New Artificial-Free Phase 1 Simplex Method

Example Bases and Basic Feasible Solutions 63 Let q = >: ; > and M = >: ;2 > and consider the LCP (q M). The class of ; ;2 complementary cones

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

TRANSPORTATION PROBLEMS

Gauss-Jordan Elimination for Solving Linear Equations Example: 1. Solve the following equations: (3)

Part 1. The Review of Linear Programming

Optimisation and Operations Research

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

IE 5531: Engineering Optimization I

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

Linear Programming and its Extensions Prof. Prabha Shrama Department of Mathematics and Statistics Indian Institute of Technology, Kanpur

IE 5531: Engineering Optimization I

Answer the following questions: Q1: Choose the correct answer ( 20 Points ):

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

2.098/6.255/ Optimization Methods Practice True/False Questions

In Chapters 3 and 4 we introduced linear programming

Optimization 4. GAME THEORY

Introduction to Linear and Combinatorial Optimization (ADM I)

3 Does the Simplex Algorithm Work?

Distributed Real-Time Control Systems. Lecture Distributed Control Linear Programming

F 1 F 2 Daily Requirement Cost N N N

Today s class. Constrained optimization Linear programming. Prof. Jinbo Bi CSE, UConn. Numerical Methods, Fall 2011 Lecture 12

Transcription:

ORF 5 Linear Programming and Convex Analysis Initial solution and particular cases Marco Cuturi Princeton ORF-5

Reminder: Tableaux At each iteration, a tableau for an LP in standard form keeps track of.................... B I M.. B I. B I b...................... c z T... x 0 The pivot rule j e............ i a ij a ie............ r a rj a re............ j e............ i a ij a rja ie a re 0............ r a rj /a re............ Princeton ORF-5

Today Some recipes Finding an initial BFS M-method Two phase algorithm Simplex Troubleshooting no feasible solution, unbounded feasible set and unbounded objective, infinite number of solutions degeneracy, cycling, and how to avoid it Perturbation Bland s pivot Rule Princeton ORF-5

Finding an initial BFS Princeton ORF-5

Finding an initial BFS So far most examples had an initial feasible solution. For most programs given in mixed forms for instance, this is not the case. Again, imagine someone solves the problem (c, A,b) before us and finds x as the optimal solution. Gives back the problem adding the constraint c T x c T x. Finding an initial feasible solution is equivalent to finding the optimal solution itself! The following two methods modify the LP or use an auxiliary LP to look for an initial BFS. No major theoretical/methodological change, just a trick. Princeton ORF-5 5

. The M-method given A R m n maximize x 0 = c T x subject to { Ax = b x 0 turn it into the following standard form with M 0 and u R m, and b 0 maximize subject to x { 0 = c T x M T u Ax + Im u = b x,u 0 Note that this may require some sign-flipping since we need the b on the right to be nonnegative. Just multiply by - all lines which correspond to negative b i. Princeton ORF-5 6

. The M-method Using the standard form maximize subject to x{ 0 = c T x M T u Ax + Im u = b x,u 0 x = 0 and u = b is now a feasible BFS of the augmented problem. Any solution to Ax + I m u = b such that Ax = b necessarily implies u = 0. Thus u must be zero if possible at the end of the optimization. Conclusion: M helps us find an initial starting point to run the simplex. If the problem was feasible, it will naturally drive u to 0 and give the right solution. u will be quickly driven to 0 if M is big big reduced costs. If at the end the solution u is not zero then unfeasibility. Princeton ORF-5 7

. The M-method Remark: in some cases, canonical vectors already exist in A. Example: starting with the non-feasible canonical form yields the standard form maximize x 0 = x + x x + x subject to x + x x,x 0 maximize x 0 = x + x x + x x = subject to x + x + x = x, x, x,x 0 The column of x is already canonical. We only need to add one artificial variable for the first equation, not two as stated in the general case. Princeton ORF-5 8

. The Two-Phase Method Instead of considering the modified objective x 0 = c T x M T u, of the M-method, we first maximize the auxiliary objective x 0 = T u using the same set of constraints, that is we follow the program maximize subject to x { 0 = T u Ax + Im u = b x,u 0 Princeton ORF-5 9

. The Two-Phase Method Run the simplex with the last (artificial) canonical columns as the basis and the initial solution as b As with the M-method, we may need to flip the sign of some lines in order to have b 0. Three possible scenarios now: The optimum x 0 < 0... unfeasibility. we reach a zero objective x 0 = 0 with a base I which only contains columns of the original A. We keep this base and run the simplex with that initial BFS. we reach a zero objective but the basis has artificial variables in it set to zero... Princeton ORF-5 0

. The Two-Phase Method, driving artificial variables out Phase I gives an intial BFS which contains artificial variables set to zero. degeneracy... We want to use I for the original problem. We have to drive artificial variables out. Suppose the lth index of the base I corresponds to an artificial variable. Consider the row y l,j for j n, that is the lth entry of all B I A columns of the original problem. If all entries in the row are zero, the constraint is redundant, we can ignore this variable. Otherwise there is a possible pivot with a jth element. Remember that B I b is zero at l. The solution won t be changed and will still be feasible. Princeton ORF-5

. The Two-Phase Method, driving artificial variables out Example: our tableau is split between original variables, artificial variables and current solution B I b. In this example we have an artificial variable in the basis and a degenerate solution. 0 0 0 5 6 0 We want to remove the artificial variable and replace it with an original one in order to move to phase. Do something we haven t done often: pivot on - a negative number. That s fine because the B I b will not be modified, no unfeasibility problem. 0 0 0 5 0 Princeton ORF-5

Wrap up. M-method: use a big M to get an initial BFS directly to the modified LP maximize subject to x{ 0 = c T x M T u Ax + Im u = b x,u 0 after convergence either u = 0 and we have the solution, either u 0 and there is unfeasibility.. Two-phase method: bring x 0 to zero in phase : maximize subject to x { 0 = T u Ax + Im u = b x,u 0 Remove artificial variables if necessary. Use the I as an initial BFS for the original problem and run phase. Princeton ORF-5

Simplex Troubleshooting Princeton ORF-5

Unexpected problems when running the simplex we assume we are using the M or -phase methods to look for an initial BFS. non-feasibility. unboundedness. degeneracy and cycling. infinite number of solutions. Princeton ORF-5 5

Non-feasibility With an explicit initial BFS (think feasible canonical form) no need to test for feasibility. The issue only appears in phase I or using the M-method. In both cases there is always an initial BFS to a modified LP. The initial feasibility is checked when we have converged (u = 0) Feasibility is thus either elucidated immediately (there is a feasible obvious point) tested at the end of phase or after the M-method has converged. Princeton ORF-5 6

Unboundedness Remember the theorem Theorem Let x be a basic feasible solution (BFS) to a LP with index set I. If an index e / I such that y e 0 then the feasible region is unbounded. If moreover for e the reduced cost c e z e > 0 then there exists a feasible solution with at most m + nonzero variables and an arbitrary large objective function. Unboundedness of the feasible and of the objective can be easily tested at any time in the algorithm. Princeton ORF-5 7

Degeneracy Degeneracy appears whenever a base solution x I has a zero. That is whenever the column b is l.d. with m columns of B I. Degeneracy thus depends on the specific index I selected on that iteration. In practice this is rare and more of a theoretical curiosity. Intuition: non-degenerate problems are dense in the space of problems. In the same way that... matrices are dense in spaces of square matrices. Degeneracy implies that the objective on the next iteration may stall. No problem if it only happens from time to time. The real issue is when it happens repeatedly: cycling Princeton ORF-5 8

Cycling Cycling occurs whenever the simplex loops through a set of index sets I,I,I,,I,I, Once we return to a previously seen I we can only loop... This is even more rare than degeneracy. Most solvers take this into account (when they do) by adding small perturbations. We will see that later. Cycling examples in books are like freaks in a circus... you wont see them outside. The example with minimal size is with variables and constraints, that is dimension 6. Princeton ORF-5 9

Cycling yet we have to consider cycling because Theorem. Given a pivot rule, if the simplex fails to terminate then it must cycle. Proof. finite number of states, if no termination then one state is visited twice, and since everything is deterministic we just loop. cycling is the most serious issue with the simplex. but it never happens. Princeton ORF-5 0

Cycling We have the following problem in canonical form, which is an instance of the aforementioned pathological family. maximize x 0 = 0x + x 6x + x x 8x x + 9x + x 6 subject to x x + x + x x x, x, x,x 0 We have not mentioned pivot rules. An intuitive pivot rule would be Select index e with highest reduced cost coefficient. If tie choose the lowest. Select index r which ensures minimum ratio. If tie choose the lowest. We use it on this problem. Princeton ORF-5

Cycling: Matlab example T z = 0 T z = 0 T z = 0 T z = 0 T5 z = 0 5 6 8 5 6 8 5 6 8 5 6 8 5 6 8 T6 z = 0 T7 z = 0 T8 z = 0 T9 z = 0 T0 z = 0 5 6 8 5 6 8 5 6 8 5 6 8 5 6 8 T z = 0 T z = 0 T z = 0 T z = 0 T5 z = 0 5 6 8 5 6 8 5 6 8 5 6 8 5 6 8... ok.. let s check with matlab directly. Princeton ORF-5

Remedies to Cycling Princeton ORF-5

Remedies to Cycling: Perturbation The no-brainer approach: perturb the constraints objective b to artificially ensure b s independence from the columns. b b ± ε. Matlab demo... Conclusion: an ugly hack that works. Princeton ORF-5

Remedies to Cycling: Advanced Pivoting A more subtle approach: define alternative rules for pivoting. Cycling occurs when we do not know how to handle effectively ties. Some more clever rules ensure no cycling: Lexicographic rule. Bland s rule. Princeton ORF-5 5

Lexicographic Rule Definition. A vector u R n is said to be lexicographically larger (resp. smaller) than v, written u v if u v and the first nonzero component of u v is positive (resp. negative). [ ] 0 [ 0 ] [ ] 0, [ ] When u 0, u is said to be lexicographically positive. Princeton ORF-5 6

Lexicographic Pivot Rule. Choose any entering index e as long as c e z e > 0. Consider y e = B I a e. { xik }. Select I = argmin k=,..,m y y k,e > 0. k,e If I is a singleton pick that index. Otherwise, for each tied index in I, divide the corresponding ith row of the tableau by y i,e. Pick the index r as the index of the row which is lexicographically smallest. Remark: There is always a unique choice for r. If not that would mean that two rows of B A are proportional, hence rank is smaller than m, hence A also has rank smaller than m. Princeton ORF-5 7

Lexicographic Pivot Rule Example suppose we want to enter the third variable here 0 5 6 0 7 9 There is a tie between the first and third elements, both = 9. We divide the first and third row by y, = and y, = 9 respectively. 0 5 7 0 9 Pick r = this time since the third row is lexicographically smaller. Princeton ORF-5 8

Lexicographic Pivot Works Theorem. Suppose that the simplex algorithm starts with all rows in the upper tableau lexicographically positive. Suppose that the lexicographic pivot rule is observed. Then Every row of the upper simplex tableau remains lexicographically positive throughout the algorithm. The lower tableau, i.e. the reduced cost coefficient and the objective, strictly increase lexicographically at each iteration. The simplex method terminates after a finite number of iterations. In practice: too expensive computationally. Never used. cheaper alternative Princeton ORF-5 9

Bland s Pivot Rule Theorem. Using the following pivot rule:. Set the index e as the smallest index in {i i n, c i z i > 0}. { xik }. Define I = argmin k=,..,m y y k,e > 0 and pick r as the smallest k,e element of I. The simplex method terminates after a finite number of iterations. Also called smallest subscript rule. More efficient and cheaper. Princeton ORF-5 0

Short comment on infinite number of optimal solutions A theorem we proved tells us that (if it exists) the optimum is reached by at least one extreme point. The simplex only checks for extreme points in the argmax, and guarantees to find one. Yet, when the objective is colinear with one of the constraints, the optimal region might be a convex set. Any combination of the different extreme points (possibly found through different pivot rules) is still a solution. Princeton ORF-5

Short comment on infinite number of optimal solutions simple example in -dimensions. Princeton ORF-5

Next Lecture Complexity and Efficiency. Klee-Minty Counterexample. Some words on more clever implementations of the simplex. Princeton ORF-5