Lecture 2: The Simplex method

Similar documents
9.1 Linear Programs in canonical form

IE 5531: Engineering Optimization I

CO350 Linear Programming Chapter 8: Degeneracy and Finite Termination

Simplex Algorithm Using Canonical Tableaus

1 Review Session. 1.1 Lecture 2

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

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

3 The Simplex Method. 3.1 Basic Solutions

AM 121: Intro to Optimization

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. Algebraic and geometric treatments Consider an LP problem in the standard form. x 0. Solutions to the system of linear equations

Lesson 27 Linear Programming; The Simplex Method

Optimization (168) Lecture 7-8-9

F 1 F 2 Daily Requirement Cost N N N

Summary of the simplex method

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

TIM 206 Lecture 3: The Simplex Method

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

3. Vector spaces 3.1 Linear dependence and independence 3.2 Basis and dimension. 5. Extreme points and basic feasible solutions

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

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

OPERATIONS RESEARCH. Linear Programming Problem

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

AM 121: Intro to Optimization Models and Methods Fall 2018

Chap6 Duality Theory and Sensitivity Analysis

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

MATH 445/545 Test 1 Spring 2016

Linear and Combinatorial Optimization

ORF 522. Linear Programming and Convex Analysis

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

Special cases of linear programming

Summary of the simplex method

IE 400: Principles of Engineering Management. Simplex Method Continued

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

Lecture 2: The Simplex method. 1. Repetition of the geometrical simplex method. 2. Linear programming problems on standard form.

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

Math Models of OR: Some Definitions

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

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

The Simplex Algorithm

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

Linear Programming, Lecture 4

Operations Research Lecture 2: Linear Programming Simplex Method

Part 1. The Review of Linear Programming

CPS 616 ITERATIVE IMPROVEMENTS 10-1

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

Math Models of OR: Extreme Points and Basic Feasible Solutions

IE 5531: Engineering Optimization I

Optimisation and Operations Research

Math 273a: Optimization The Simplex method

Chapter 4 The Simplex Algorithm Part II

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

A Review of Linear Programming

Systems Analysis in Construction

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

Notes on Simplex Algorithm

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

Linear programs Optimization Geoff Gordon Ryan Tibshirani

The simplex algorithm

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

Review Solutions, Exam 2, Operations Research

Linear Programming and the Simplex method

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

3. THE SIMPLEX ALGORITHM

ECE 307 Techniques for Engineering Decisions

Lecture 6 Simplex method for linear programming

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

Lecture 11 Linear programming : The Revised Simplex Method

4. Duality and Sensitivity

Simplex Method for LP (II)

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

Chapter 5 Linear Programming (LP)

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

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

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

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

OPTIMISATION 3: NOTES ON THE SIMPLEX ALGORITHM

Linear & Integer programming

ORF 522. Linear Programming and Convex Analysis

Math Models of OR: The Revised Simplex Method

MAT016: Optimization

Michælmas 2012 Operations Research III/IV 1

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

MATH 4211/6211 Optimization Linear Programming

Simplex method(s) for solving LPs in standard form

In Chapters 3 and 4 we introduced linear programming

Math Models of OR: Handling Upper Bounds in Simplex

MATH2070 Optimisation

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

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

Linear Programming. Jie Wang. University of Massachusetts Lowell Department of Computer Science. J. Wang (UMass Lowell) Linear Programming 1 / 47

Optimization - Examples Sheet 1

CSC Design and Analysis of Algorithms. LP Shader Electronics Example

Contents. 4.5 The(Primal)SimplexMethod NumericalExamplesoftheSimplexMethod

February 17, Simplex Method Continued

3 Development of the Simplex Method Constructing Basic Solution Optimality Conditions The Simplex Method...

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

Foundations of Operations Research

Linear Programming: Simplex

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

Transcription:

Lecture 2 1 Linear and Combinatorial Optimization Lecture 2: The Simplex method Basic solution. The Simplex method (standardform, b>0). 1. Repetition of basic solution. 2. One step in the Simplex algorithm. 3. Unbounded problems. 4. Tableau form. 5. Optimality Criterion. Degeneracy and cycling. Artificial variables.

Lecture 2 2 Properties of LP Theorem 2.1. A linear programming problem is a convex optimization problem. Proof. Exercise Theorem 2.2. Let S be the set of feasible solutions to a general LP problem. 1. If S is non-empty and bounded, then an optimal solution to the problem exists and occurs at an extreme point. 2. If S is non-empty and not bounded and if an optimal solution the the problem exists, then an optimal solution occurs at an extreme point. 3. If an optimal solution to the problem does not exist, then either S is empty or S is unbounded. Observe that the feasible set S is usually infinite, but the number of extreme points is finite.

Lecture 2 3 A simple algorithm for solving LP Exhaustive search: Identify all extreme points Calculate the objective value for all extreme points Pick the largest value Drawback: Although the number of extreme points is finite, it might be very large.

Lecture 2 4 Extreme points in LP Study a LP-problem in canonical form. maxz = c T x (1) Ax = b (2) x 0 (3) A m s matrix with m s and rank m. Theorem 2.3. Suppose that A = [A 1 A 2 ] and there exists x 2 such that A 2 x 2 = b,x 2 > 0. Then, the columns of A 2 are linearly dependent if and only if x = 0 is not an extreme point in S. x 2

Lecture 2 5 Proof: ( ) If the columns of A 2 are linearly dependent, then there exists a vector c 0 such that A 2 c = 0. Then A 2 (x 2 +ǫc) }{{} v 2 A 2 (x 2 ǫc) }{{} w 2 = b = b Since all elements in x 2 are positive, one can choose ǫ small enough so v 2 > 0 and w 2 > 0. ( ) T Then x = 0 x 2 lies on the line segment ) T ( ) T between v = (0 v 2 and w = 0 w 2 which are both feasible points in S.

Lecture 2 6 ( ) If x is not an extreme point, then there exist v and w with Av = b and Aw = b and a scalar 0 < λ < 1 such that x = λv +(1 λ)w. Then 0 = λ }{{} >0 v }{{} 1 +(1 λ) }{{} 0 >0 w 1 }{{} 0 x 2 = λv 2 +(1 λ)w 2., v 1 = 0, w 1 = 0 Since b = Av = A 2 v 2 = A 2 x 2 so A 2 (x 2 v 2 ) = 0, }{{} 0 hence the columns in A 2 are linearly dependent.

Lecture 2 7 Important consequences Corollary 2.1. x = 0 is an extreme point in x 2 S if and only if the columns of A 2 are linearly independent. Corollary 2.2. Suppose x is an extreme point with r non-zero elements. Then r m and the corresponding columns may be extended to a basis by adding columns in A. Corollary 2.3. At most m elements in x are non-zero for extreme points.

Lecture 2 8 Basic and non-basic variables For an LP-problem in canonical form, choose m basis variables such that corresponding columns in A form a basis. By reordering ( B N Solve for x b. Then x = ) x B = Bx B = b 0 x B 0 is called a basic solution. In addition, if x 0 then x is called a basic feasible solution. Definition 2.1. The variables in x B are called basic variables and the variables in x N are called non-basic variables.

Lecture 2 9 Number of basic feasible solutions Since the number of basic feasible solutions can be at most ( s m) : Corollary 2.4. An LP-problem in canonical form has a finite number of basic feasible solutions. Every extreme point in a standard LP-problem corresponds to an extreme point in the corresponding canonical LP-problem and vice versa. Corollary 2.5. An LP-problem in standard form has a finite number of basic feasible solutions. Algorithm idea: Exhaustive search.

Lecture 2 10 Constructing a basic solution Consider the canonical LP: maxz = c T x Ax = b x 0 (4) Choose m linearly independent columns of A with the corresponding components of x and reorder so that: [ B N ] x B = Bx B = b x B = B 1 b 0 Now x = (x T B 0)T is a basic solution to (4). If x B 0 then x is a basic feasible solution since it fulfils the constraints in (4). A basic feasible solution to (4) is an extremepoint to S = {x Ax = b,x 0}.

Lecture 2 11 Solving standard LP with b > 0 Definition 2.2. Two basic solutions are adjacent if all but one basic variable are in common. Consider the standard form LP: maxz = c T x Ax b x 0 (5) Convert into a canonical LP by introducing slack variables. An initial basic feasible solution can always be found by choosing the m slack variables as basic variables and setting the other variables to zero, i.e. ˆx = (0 b T ) T,  = [A I] ˆx =ˆb

Lecture 2 12 Choosing a new variable to enter the basis Divide x into basic variables, x B, and non-basic variables, x N (= 0) and divide A similarly into B and N, such that Ax = Bx B +Nx N = b x B = B 1 b B 1 Nx N Eliminate x B from the goal function giving z = c T x = c T Bx B +c T Nx N = = c T BB 1 b+(c T N c T BB 1 N)x N = = ẑ +ĉ T Nx N, (6) where ĉ N = c T N c T BB 1 N are called relative costs. Observe that if the relative cost ĉ i is positive for some i, the goal function z can be increased by inserting the corresponding non-basic variable in the new basis.

Lecture 2 13 Choosing which variable to leave the basis Assume that we have selected x k to enter the basis. The system of equations Ax = b can now be written as with the solution x B +B 1 a k x k = B 1 b, x B = B 1 b B 1 a k x k =ˆb â k x k where a k denotes column k in A. Since we would like to obtain a new feasible basis, we need to have x B =ˆb â k x k 0. â ij 0 leads to no decrease â ij > 0 leads to decrease We need to limit the increase in x k such that none of the x B will become negative, i.e. x k ˆb i â ij := θ (a ij > 0)

Lecture 2 14 The Tableau method We start with the following LP in canonical form maxz = c T x Ax = b x 0 Write the goal function as z c T x = 0. Assume that we start with the initial basic solution x D. The tableau is then defined as Basis x B x N z ˆb x D B N 0 b z c T B c T N 1 0 Iterate by changing basis. Select incoming and outgoing variable. Pivot around the corresponding element in the matrix

Lecture 2 15 The Tableau method (ctd.) We first perform row-operations transforming B to I: Basis x B x N z ˆb x B I B 1 N 0 B 1 b z c T B c T N 1 0 Then we eliminate c T B and arrive at the optimum with x B as basis, giving the tableau: Basis x B x N z ˆb x B I B 1 N 0 B 1 b z 0 c T B B 1 N c T N 1 c T B B 1 b Observe that the optimum is x B = B 1 b, x N = 0 and z = c T B B 1 b. Observe also that the negative relative costs c T B B 1 N c T N can be found in the tableau.

Lecture 2 16 The Simplex method for LP-problems in standard form with b > 0 Make tableau for initial basic solution Check optimality criterion: If the objective row has zero entries in the columns labeled by basic variables and no negative entries in the columns labeled by nonbasic variables. If the solution is not optimal, make tableau for an adjacent and improved solution Selecting entering variable Choosing the departing variable Pivotal column, pivotal row. θ-ratios. How to form the new tableau.

Lecture 2 17 Possible outcomes Optimum exists: Objective row has zero entries for basic variables and no negative entries for non-basic variables. No finite optimal solution exists: No positive θ-ratios No solution exists: Impossible to set up initial tableau since we start with a basic feasible solution.

Lecture 2 18 Degeneracy and cycling Definition 2.3. A basic solution in which some basic variables are zero is called degenerate. At a degenerate basic solution, it may happen that the objective function does not increase. There is a risk of getting trapped in a cycle. Bland s rule is a way of choosing pivotal column and pivotal row such that cycling is avoided. Selecting the pivotal column: Choose the column with the smallest subscript among those with negative entries. Selecting the pivotal row: If two rows have equal θ-ratios, choose the row corresponding to the basic variable with lowest subscript. Examples

Lecture 2 19 Artificial variables How to solve an arbitrary LP-problem? Two-phase method Introduce artificial variables, eliminate with simplex. This results in a basic feasible solution. Form the Simplex tableau and use the Simplex method. Introduce artificial variables and weight them with M. The Big M method (Optional). Examples

Lecture 2 20 Repetition - Lecture 2 Equations and the Simplex tableau. The Simplex method. Optimality criterion? How to select a new basic feasible solution? How to detect if the problem is unbounded? How to form the simplex tableau with matrices? Degenerate basic solution, cycling, Bland s rule. Two-phase method.