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

Similar documents
CO350 Linear Programming Chapter 8: Degeneracy and Finite Termination

Operations Research Lecture 2: Linear Programming Simplex Method

AM 121: Intro to Optimization

ORF 522. Linear Programming and Convex Analysis

Simplex method(s) for solving LPs in standard form

Introduction to Linear and Combinatorial Optimization (ADM I)

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

The simplex algorithm

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

IE 400: Principles of Engineering Management. Simplex Method Continued

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

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

Termination, Cycling, and Degeneracy

Lesson 27 Linear Programming; The Simplex Method

Lecture 2: The Simplex method

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

Review Solutions, Exam 2, Operations Research

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

Simplex Algorithm Using Canonical Tableaus

Contents. 4.5 The(Primal)SimplexMethod NumericalExamplesoftheSimplexMethod

Optimization (168) Lecture 7-8-9

Simplex Method for LP (II)

Chapter 4 The Simplex Algorithm Part II

TRANSPORTATION PROBLEMS

MATH 4211/6211 Optimization Linear Programming

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

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

TIM 206 Lecture 3: The Simplex Method

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

1 Review Session. 1.1 Lecture 2

Notes on Simplex Algorithm

Week_4: simplex method II

CPS 616 ITERATIVE IMPROVEMENTS 10-1

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

Sensitivity Analysis

Relation of Pure Minimum Cost Flow Model to Linear Programming

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

Summary of the simplex method

OPRE 6201 : 3. Special Cases

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

Farkas Lemma, Dual Simplex and Sensitivity Analysis

Part 1. The Review of Linear Programming

Systems Analysis in Construction

Special cases of linear programming

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

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

Math Models of OR: Some Definitions

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

OPERATIONS RESEARCH. Linear Programming Problem

9.1 Linear Programs in canonical form

Lecture: Algorithms for LP, SOCP and SDP

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

(includes both Phases I & II)

The dual simplex method with bounds

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

Linear & Integer programming

CSC Design and Analysis of Algorithms. LP Shader Electronics Example

The Simplex Algorithm: Technicalities 1

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

Linear Programming, Lecture 4

Lecture Simplex Issues: Number of Pivots. ORIE 6300 Mathematical Programming I October 9, 2014

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

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

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

MATH 445/545 Test 1 Spring 2016

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

CO350 Linear Programming Chapter 8: Degeneracy and Finite Termination

Lecture slides by Kevin Wayne

3 The Simplex Method. 3.1 Basic Solutions

The Simplex Algorithm

3. THE SIMPLEX ALGORITHM

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

Summary of the simplex method

(includes both Phases I & II)

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

Chap6 Duality Theory and Sensitivity Analysis

Part 1. The Review of Linear Programming

Linear Programming in Matrix Form

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

9.5 THE SIMPLEX METHOD: MIXED CONSTRAINTS

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

Lecture 5 Simplex Method. September 2, 2009

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

56:270 Final Exam - May

"SYMMETRIC" PRIMAL-DUAL PAIR

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

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

F 1 F 2 Daily Requirement Cost N N N

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

Lecture 11 Linear programming : The Revised Simplex Method

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

A Review of Linear Programming

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

Linear Programming Redux

Algebraic Simplex Active Learning Module 4

1 Simplex and Matrices

Math 273a: Optimization The Simplex method

min3x 1 + 4x 2 + 5x 3 2x 1 + 2x 2 + x 3 6 x 1 + 2x 2 + 3x 3 5 x 1, x 2, x 3 0.

Linear programs Optimization Geoff Gordon Ryan Tibshirani

2.1 THE SIMPLEX METHOD FOR PROBLEMS IN STANDARD FORM

Transcription:

3.4 Anticycling Lexicographic order In this section we discuss two pivoting rules that are guaranteed to avoid cycling. These are the lexicographic rule and Bland s rule. Definition A vector u R n is lexicographically positive (negative) if u 0 and the first nonzero entry of u is positive (negative). Symbolically, we write u L > 0 (resp. u L < 0). A vector u R n is lexicographically larger (smaller) than a vector v R n if u v and u v L > 0 (resp. u v L < 0). We write u L > v (resp. u L < v). Example (0, 2, 3, 0) T L > (0, 2, 1, 4) T (0, 4, 5, 0) T L < (1, 2, 1, 2) T Martin Skutella (TU Berlin) Linear and Integer Programming (ADM II) WS 2007/08 35 / 64 Martin Skutella (TU Berlin) Linear and Integer Programming (ADM II) WS 2007/08 36 / 64 The lexicographic pivoting rule We describe the lexicographic pivoting rule in the full tableau implementation. Lexicographic pivoting rule 1 Choose an arbitrary column A j with c j < 0 to enter the basis. Let u := B 1 A j be the jth column of the tableau. 2 For each i with u i > 0, divide the ith row of the tableau by u i and choose the lexicographically smallest row l. Then the lth basic variable x B(l) exits the basis. Remark The lexicographic pivoting rule always leads to a unique choice for the exiting variable. Otherwise two rows of B 1 A would have to be linearly dependent which contradicts our assumption on the matrix A. The lexicographic pivoting rule (cont.) Theorem Suppose that the simplex algorithm starts with lexicographically positive rows 1,..., m in the simplex tableau. Suppose that the lexicographic pivoting rule is followed. Then: 1 Rows 1,..., m of the simplex tableau remain lexicographically positive throughout the algorithm. 2 The zeroth row strictly increases lexicographically at each iteration. 3 The simplex algorithm terminates after a finite number of iterations. Proof. See echalk... Martin Skutella (TU Berlin) Linear and Integer Programming (ADM II) WS 2007/08 37 / 64 Martin Skutella (TU Berlin) Linear and Integer Programming (ADM II) WS 2007/08 38 / 64

Remarks on the lexicographic pivoting rule Bland s rule The lexicographic pivoting rule was derived by considering s small perturbation of the right hand side vector b leading to a nondegenerate problem (see exercises). The lexicographic pivoting rule can also be used in conjunction with the revised simplex method, provided that B 1 is computed explicitly (this is not the case in sophisticated implementations). The assumption in the theorem on the lexicographically positive rows in the tableau can be made without loss of generality: Rearrange the columns of A such that the basic columns (forming the identity matrix in the tableau) come first. Since the zeroth column is nonnegative for a basic feasible solution, all rows are lexicographically positive. Smallest subscript pivoting rule (Bland s rule) 1 Choose the column A j with c j < 0 and j minimal to enter the basis. 2 Among all basic variables x i that could exit the basis, select the one with smallest i. Theorem (without proof) The simplex algorithm with Bland s rule terminates after a finite number of iterations. Remark Bland s rule is compatible with an implementation of the revised simplex method in which the reduced costs of the nonbasic variables are computed one at a time, in the natural order, until a negative one is discovered. Martin Skutella (TU Berlin) Linear and Integer Programming (ADM II) WS 2007/08 39 / 64 Martin Skutella (TU Berlin) Linear and Integer Programming (ADM II) WS 2007/08 40 / 64 3.5 Finding an initial basic feasible solution So far we always assumed that the simplex algorithm starts with a basic feasible solution. In this section we discuss how such a solution can be obtained. Introducing artificial variables The two-phase simplex method The big-m method Introducing artificial variables Example LP min x 1 + x 2 + x 3 s.t. x 1 + 2x 2 + 3x 3 = 3 x 1 + 2x 2 + 6x 3 = 2 4x 2 + 9x 3 = 5 3x 3 + x 4 = 1 x 1,..., x 4 0 Auxiliary problem with artificial variables min x 5 + x 6 + x 7 + x 8 s.t. x 1 +2x 2 +3x 3 x 5 = 3 x 1 +2x 2 +6x 3 + x 6 = 2 4x 2 +9x 3 + x 7 = 5 3x 3 +x 4 + x 8 = 1 x 1,..., x 4, x 5,..., x 8 0 Martin Skutella (TU Berlin) Linear and Integer Programming (ADM II) WS 2007/08 41 / 64 Martin Skutella (TU Berlin) Linear and Integer Programming (ADM II) WS 2007/08 42 / 64

The auxiliary problem Forming the initial tableau Auxiliary problem with artificial variables min x 5 + x 6 + x 7 + x 8 s.t. x 1 +2x 2 +3x 3 x 5 = 3 x 1 +2x 2 +6x 3 + x 6 = 2 4x 2 +9x 3 + x 7 = 5 3x 3 +x 4 + x 8 = 1 x 1,..., x 8 0 Observation x = (0, 0, 0, 0, 3, 2, 5, 1) is a basic feasible solution for this problem with basic variables (x 5, x 6, x 7, x 8 ). We can form the initial tableau. 0 0 0 0 0 1 1 1 1 3 1 2 3 0 0 1 1 1 5 0 4 9 0 0 0 1 1 10 0 8 18 0 0 0 0 1 11 0 8 21 1 0 0 0 0 x 5 = 3 1 2 3 0 1 0 0 0 x 6 = 2 1 2 6 0 0 1 0 0 x 7 = 5 0 4 9 0 0 0 1 0 x 8 = 1 0 0 3 1 0 0 0 1 Calculate reduced costs by eliminating the nonzero-entries for the basis-variables. Now we can proceed as seen before... Martin Skutella (TU Berlin) Linear and Integer Programming (ADM II) WS 2007/08 43 / 64 Martin Skutella (TU Berlin) Linear and Integer Programming (ADM II) WS 2007/08 44 / 64 Minimizing the auxiliary problem Minimizing the auxiliary problem 11 0 8 21 1 0 0 0 0 x 5 = 3 1 2 3 0 1 0 0 0 x 6 = 2 1 2 6 0 0 1 0 0 x 7 = 5 0 4 9 0 0 0 1 0 x 8 = 1 0 0 3 1 0 0 0 1 Basis change: x 4 enters the basis, x 8 exits. 10 0 8 18 0 0 0 0 1 x 5 = 3 1 2 3 0 1 0 0 0 x 6 = 2 1 2 6 0 0 1 0 0 x 7 = 5 0 4 9 0 0 0 1 0 x 4 = 1 0 0 3 1 0 0 0 1 Basis change: x 3 enters the basis, x 4 exits. Martin Skutella (TU Berlin) Linear and Integer Programming (ADM II) WS 2007/08 45 / 64 Martin Skutella (TU Berlin) Linear and Integer Programming (ADM II) WS 2007/08 46 / 64

Minimizing the auxiliary problem Minimizing the auxiliary problem 4 0 8 0 6 0 0 0 7 x 5 = 2 1 2 0 1 1 0 0 1 x 6 = 0 1 2 0 2 0 1 0 2 x 7 = 2 0 4 0 3 0 0 1 3 x 3 = 1/3 0 0 1 1/3 0 0 0 1/3 Basis change: x 2 enters the basis, x 6 exits. 4 4 0 0 2 0 4 0 1 x 5 = 2 2 0 0 1 1 1 0 1 x 2 = 0 1/2 1 0 1 0 1/2 0 1 x 7 = 2 0 0 1 0 2 1 1 1 x 3 = 1/3 0 0 1 1/3 0 0 0 1/3 Basis change: x 1 enters the basis, x 5 exits. Martin Skutella (TU Berlin) Linear and Integer Programming (ADM II) WS 2007/08 47 / 64 Martin Skutella (TU Berlin) Linear and Integer Programming (ADM II) WS 2007/08 48 / 64 Minimizing the auxiliary problem Getting a basis for the original problem 0 0 0 0 0 2 2 0 1 x 1 = 1 1 0 0 1/2 1/2 1/2 0 1/2 x 2 = 1/2 0 1 0 3/4 1/4 1/4 0 3/4 x 7 = 0 0 0 0 0 1 1 1 0 x 3 = 1/3 0 0 1 1/3 0 0 0 1/3 Basic feasible solution for auxiliary problem with (auxiliary) cost value 0 Also feasible for the original problem - but not (yet) basic. 0 0 0 0 0 2 2 0 1 x 1 = 1 1 0 0 1/2 1/2 1/2 0 1/2 x 2 = 1/2 0 1 0 3/4 1/4 1/4 0 3/4 x 7 = 0 0 0 0 0 1 1 1 0 x 3 = 1/3 0 0 1 1/3 0 0 0 1/3 Observation Restricting the tableau to the original variables, we get a zero-row. Thus the original equations are linearily dependent. We can remove the third row. Martin Skutella (TU Berlin) Linear and Integer Programming (ADM II) WS 2007/08 49 / 64 Martin Skutella (TU Berlin) Linear and Integer Programming (ADM II) WS 2007/08 50 / 64

Getting a basis for the original problem Omitting artificial variables Auxiliary problem x 1 x 2 x 3 x 4 11/6 0 0 0 1/12 x 1 = 1 1 0 0 1/2 x 2 = 1/2 0 1 0 3/4 x 3 = 1/3 0 0 1 1/3 We finally obtain a basic feasible solution for the original problem. After computing the reduced costs for this basis (as seen in the beginning), the simplex method can start with its typical iterations. min x 5 +x 6 +x 7 +x 8 s.t. x 1 +2x 2 +3x 3 x 5 = 3 x 1 +2x 2 +6x 3 +x 6 = 2 4x 2 +9x 3 +x 7 = 5 3x 3 + x 4 + x 8 = 1 x 1,..., x 8 0 Artificial variable x 8 could have been omitted by setting x 4 to 1 in the initial basis. This is possible as x 4 does only appear in one constraint. Generally, this can be done e.g. with all slack variables that have nonnegative right hand sides. Martin Skutella (TU Berlin) Linear and Integer Programming (ADM II) WS 2007/08 51 / 64 Martin Skutella (TU Berlin) Linear and Integer Programming (ADM II) WS 2007/08 52 / 64 Phase I of the simplex method Given: LP in standard form: min c T x s.t. Ax = b, x 0 1 Transform problem such that b 0 (multiply constraints by 1). 2 Introduce artificial variables y 1,..., y m and solve auxiliary problem min m y i s.t. Ax + I m y = b, x, y 0. i=1 3 If optimal cost is positive, then STOP (original LP is infeasible). 4 If no artificial variable is in final basis, eliminate artificial variables and columns and STOP (feasible basis for original LP has been found). 5 If lth basic variable is artificial, find j {1,..., n} with lth entry in B 1 A j nonzero. Use this entry as pivot element and replace lth basic variable with x j. 6 If no such j {1,..., n} exists, eliminate lth row (constraint). The two-phase simplex method Two-phase simplex method 1 Given an LP in standard from, first run phase I. 2 If phase I yields a basic feasible solution for the original LP, enter phase II (see above). Possible outcomes of the two-phase simplex method 1 Problem is infeasible (detected in phase I). 2 Problem is feasible but rows of A are linearly dependent (detected and corrected at the end of phase I by eliminating redundant constraints.) 3 Optimal cost is (detected in phase II). 4 Problem has optimal basic feasible solution (found in phase II). Remark: (2) is not an outcome but only an intermediate result leading to outcome (3) or (4). Martin Skutella (TU Berlin) Linear and Integer Programming (ADM II) WS 2007/08 53 / 64 Martin Skutella (TU Berlin) Linear and Integer Programming (ADM II) WS 2007/08 54 / 64

The big-m method How to choose M? Alternative idea: Combine the two phases into one by introducing sufficiently large penalty costs for artificial variables. This way, the LP becomes min n i=1 c ix i s.t. Ax = b x 0 min n i=1 c ix i + M m j=1 y j s.t. Ax + y = b x, y 0 If M is sufficiently large and the original program has a feasible solution, all artificial variables will be driven to zero by the simplex method.. Observation Initially, M only occurs in the zeroth row. As the zeroth row never becomes pivot row, this property is maintained while the simplex method is running. All we need to have is an order on all values that can appear as reduced cost coefficients. Order on cost coefficients am + b < cm + d : (a < c) (a = c b < c) In particular, am + b < 0 < am + b for any positive a and arbitrary b, and we can decide whether a cost coefficient is negative or not. There is no need to give M a fixed numerical value. Martin Skutella (TU Berlin) Linear and Integer Programming (ADM II) WS 2007/08 55 / 64 Martin Skutella (TU Berlin) Linear and Integer Programming (ADM II) WS 2007/08 56 / 64 Example Introducing artificial variables and M Example LP min x 1 + x 2 + x 3 s.t. x 1 + 2x 2 + 3x 3 = 3 x 1 + 2x 2 + 6x 3 = 2 4x 2 + 9x 3 = 5 3x 3 + x 4 = 1 x 1,..., x 4 0 Auxiliary problem min x 1 +x 2 +x 3 + Mx 5 + Mx 6 + Mx 7 s.t. x 1 +2x 2 +3x 3 x 5 = 3 x 1 +2x 2 +6x 3 + x 6 = 2 4x 2 +9x 3 + x 7 = 5 3x 3 +x 4 = 1 x 1,..., x 7 0 Note that this time the unnecessary artificial variable x 8 has been omitted. We start off with (x 5, x 6, x 7, x 4 ) = (3, 2, 5, 1). Martin Skutella (TU Berlin) Linear and Integer Programming (ADM II) WS 2007/08 57 / 64 Martin Skutella (TU Berlin) Linear and Integer Programming (ADM II) WS 2007/08 58 / 64

Forming the initial tableau First iteration x 1 x 2 x 3 x 4 x 5 0 1 1 1 0 M M +1 2M +1 3M +1 0 0 M 4M +1 9M +1 0 0 0 M 10M 18M +1 0 0 0 0 10M 1 0 0 0 0 3 1 2 3 0 1 2 1 2 6 0 0 5 0 4 9 0 0 1 0 0 3 1 0 Compute reduced costs by eliminating the nonzero entries for the basic variables. 10M 1 8M +1 18M + 1 0 0 0 0 3 1 2 3 0 1 0 0 2 1 2 6 0 0 1 0 5 0 4 9 0 0 0 1 1 0 0 3 1 0 0 0 Reduced costs for x 2 and x 3 are negative. Basis change: x 3 enters the basis, x 4 leaves. Martin Skutella (TU Berlin) Linear and Integer Programming (ADM II) WS 2007/08 59 / 64 Martin Skutella (TU Berlin) Linear and Integer Programming (ADM II) WS 2007/08 60 / 64 Second iteration Third iteration 4M 1/3 1 8M + 1 0 6M 1/3 0 0 0 2 1 2 0 1 1 0 0 0 1 2 0 2 0 1 0 2 0 4 0 3 0 0 1 1/3 0 0 1 1/3 0 0 0 Basis change: x 2 enters the basis, x 6 leaves. 4M 1/3 4M +3/2 0 0 2M +2/3 0 4M 1/2 0 2 2 0 0 1 1 1 0 0 1/2 1 0 1 0 1/2 0 2 2 0 0 1 0 2 1 1/3 0 0 1 1/3 0 0 0 Basis change: x 1 enters the basis, x 5 leaves. Martin Skutella (TU Berlin) Linear and Integer Programming (ADM II) WS 2007/08 61 / 64 Martin Skutella (TU Berlin) Linear and Integer Programming (ADM II) WS 2007/08 62 / 64

Fourth iteration Fifth iteration 11/6 0 0 0 1/12 2M 3/4 2M +1/4 0 21 1 0 0 1/2 1/2 1/2 0 1/2 0 1 0 3/4 1/4 1/4 0 0 0 0 0 0 1 1 1 1/3 0 0 1 1/3 0 0 0 Note that all artificial variables have already been driven to 0. Basis change: x 4 enters the basis, x 3 leaves. 7/4 0 0 1/4 0 2M 3/4 2M +1/4 0 1/2 1 0 3/2 0 1/2 1/2 0 5/4 0 1 9/4 0 1/4 1/4 0 0 0 0 0 0 1 1 1 1 0 0 3 1 0 0 0 We now have an optimal solution of the auxiliary problem, as all costs are nonnegative (M presumed large enough). By elimiating the third row as in the previous example, we get a basic feasible and also optimal solution to the original problem. Martin Skutella (TU Berlin) Linear and Integer Programming (ADM II) WS 2007/08 63 / 64 Martin Skutella (TU Berlin) Linear and Integer Programming (ADM II) WS 2007/08 64 / 64