CO350 Linear Programming Chapter 6: The Simplex Method

Similar documents
CO350 Linear Programming Chapter 5: Basic Solutions

CO350 Linear Programming Chapter 8: Degeneracy and Finite Termination

CO350 Linear Programming Chapter 6: The Simplex Method

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

Sensitivity Analysis

CO350 Linear Programming Chapter 5: Basic Solutions

Simplex Algorithm Using Canonical Tableaus

Math Models of OR: Some Definitions

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

Math Models of OR: Extreme Points and Basic Feasible Solutions

Chap6 Duality Theory and Sensitivity Analysis

Yinyu Ye, MS&E, Stanford MS&E310 Lecture Note #06. 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

Notes on Simplex Algorithm

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

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

Part 1. The Review of Linear Programming

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

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

IE 400: Principles of Engineering Management. Simplex Method Continued

Linear Programming: Simplex Method CHAPTER The Simplex Tableau; Pivoting

Lesson 27 Linear Programming; The Simplex Method

CO350 Linear Programming Chapter 8: Degeneracy and Finite Termination

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

9.1 Linear Programs in canonical form

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

Chapter 1 Linear Programming. Paragraph 5 Duality

Linear Programming Redux

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

MATH2070 Optimisation

TIM 206 Lecture 3: The Simplex Method

Math Models of OR: Handling Upper Bounds in Simplex

Understanding the Simplex algorithm. Standard Optimization Problems.

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

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

Math Models of OR: The Revised Simplex Method

Optimisation and Operations Research

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

Algebraic Simplex Active Learning Module 4

A Review of Linear Programming

Lecture 2: The Simplex method

Foundations of Operations Research

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

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

AM 121: Intro to Optimization

1 Implementation (continued)

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

IE 5531: Engineering Optimization I

MAT016: Optimization

F 1 F 2 Daily Requirement Cost N N N

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

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

Review Solutions, Exam 2, Operations Research

Part 1. The Review of Linear Programming

Linear programs Optimization Geoff Gordon Ryan Tibshirani

4.7 Sensitivity analysis in Linear Programming

Farkas Lemma, Dual Simplex and Sensitivity Analysis

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

Foundations of Operations Research

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

Operations Research Lecture 6: Integer Programming

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

Worked Examples for Chapter 5

Chapter 5 Linear Programming (LP)

MATH 445/545 Test 1 Spring 2016

4.6 Linear Programming duality

OPERATIONS RESEARCH. Linear Programming Problem

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

Simplex Method for LP (II)

The dual simplex method with bounds

CHAPTER 2. The Simplex Method

Generating Gomory's Cuts for linear integer programming problems: the HOW and WHY

TRANSPORTATION PROBLEMS

Lecture 5 Simplex Method. September 2, 2009

3. THE SIMPLEX ALGORITHM

OPTIMISATION 3: NOTES ON THE SIMPLEX ALGORITHM

Introduction to the Simplex Algorithm Active Learning Module 3

Chapter 4 The Simplex Algorithm Part I

3 The Simplex Method. 3.1 Basic Solutions

MATH 4211/6211 Optimization Linear Programming

Math Models of OR: Sensitivity Analysis

Week_4: simplex method II

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

Linear programming: algebra

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

13. Systems of Linear Equations 1

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

7.5 Operations with Matrices. Copyright Cengage Learning. All rights reserved.

Sensitivity Analysis and Duality

Variants of Simplex Method

The Strong Duality Theorem 1

Notes taken by Graham Taylor. January 22, 2005

4. Duality and Sensitivity

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

Sensitivity Analysis and Duality in LP

Simplex Method in different guises

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

Contents. 4.5 The(Primal)SimplexMethod NumericalExamplesoftheSimplexMethod

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

Transcription:

CO50 Linear Programming Chapter 6: The Simplex Method rd June 2005

Chapter 6: The Simplex Method 1 Recap Suppose A is an m-by-n matrix with rank m. max. c T x (P ) s.t. Ax = b x 0 On Wednesday, we learned if (P ) has an optimal solution, then it has an optimal solution that is basic. the motivation for simplex method: we search for an optimal solution one bfs at a time. how to obtain the basic solution determined by a given basis, while preserving the data of the LP.

Chapter 6: The Simplex Method 2 Bases and Tableaux Suppose A is m-by-n with rank m. max. (z =) c T x (P ) s.t. Ax = b x 0 (Defn) Tableau A tableau for (P ) corresponding to a basis B is the system of equations of the form z-row z c j x j j N = v x i -row x i + X j N ā ij x j = b i (i B) derived by applying elementary row operations to z c T x = 0 Ax = b Example (B = {1, 2, }) z + 8/ x 4 1/ x 5 = 2 x 5/ x 4 + 4/ x 5 = 4 x 1 + 1/ x 4 + 1/ x 5 = 4 x 2 + 1/ x 4 2/ x 5 = 1 (z-row) (x -row) (x 1 -row) (x 2 -row) c 4 = 8/ c 5 = 1/ v = 2 ā 4 = 5/ ā 25 = 2/ b2 = 1

Chapter 6: The Simplex Method A tableau has a wealth of information (Pg 71) Tableau corresponding to B = {1, 2, }: z + 8/ x 4 1/ x 5 = 2 x 5/ x 4 + 4/ x 5 = 4 x 1 + 1/ x 4 + 1/ x 5 = 4 x 2 + 1/ x 4 2/ x 5 = 1 1. The basic solution determined by B = {1, 2, } is x = [4, 1, 4, 0, 0] T In general, the basic solution determined by B is x i = b i for i B x j = 0 for j N The solution is a bfs if and only if b i 0 for all i B. In this case, we say that the tableau is feasible, and B is a feasible basis. E.g., B = {1, 2, } is feasible but B = {2,, 5} is not feasible. 2. The objective value of the basic solution determined by B = {1, 2, } is z = v = 2 In general, the objective value is given by v.

Chapter 6: The Simplex Method 4 A tableau has a wealth of information (cont d) Tableau corresponding to B = {1, 2, }: z + 8/ x 4 1/ x 5 = 2 x 5/ x 4 + 4/ x 5 = 4 x 1 + 1/ x 4 + 1/ x 5 = 4 x 2 + 1/ x 4 2/ x 5 = 1. When we increase x 5 from 0 while keeping the other nonbasic variable x 4 at 0, we see that the term 1/ x 5 in the z-row decreases. So z have to increase to counter this. Note: c 5 = 1/ > 0. When we increase x 4 from 0 while keeping the other nonbasic variable x 5 at 0, we see that the term 8/ x 4 in the z-row increase. So z have to decreases to counter this. Note: c 4 = 8/ < 0. c k > 0 = increasing x k increases z. c k < 0 = increasing x k decreases z. c k = 0 = increasing x k does not change z. c k is called the reduced cost of the nonbasic x k.

Chapter 6: The Simplex Method 5 The Idea of the Simplex Method Illustration with an example (This illustrates the idea of the method, and not how the simplex method should be applied.) Recall the example LP. max. z = 5x 1 + x 2 s.t. 2x 1 + x 2 + x = 15 2x 1 + x 2 + x 4 = 9 x 1 x 2 + x 5 = x 1, x 2, x, x 4, x 5 0 The tableau corresponding to the basis B = {, 4, 5} is z 5x 1 x 2 = 0 2x 1 + x 2 + x = 15 2x 1 + x 2 + x 4 = 9 x 1 x 2 + x 5 = and it determines the bfs x = [0, 0, 15, 9, ] T. We saw that for a nonbasic variable x k that has reduced cost c k > 0, increasing x k from 0 while keeping the other nonbasic variables (in this case there is only one other, but in general there could be many more) at 0 will increase the value of z (i.e., the objective value).

Chapter 6: The Simplex Method 6 In the tableau, the nonbasic variable x 1 has reduced cost c 1 = 5 > 0 (we can use x 2 instead since c 2 = > 0). Increasing x 1 to t 0 while keeping x 2 at 0 gives z(t) = 0 + 5t x 1 (t) = t x 2 (t) = 0 x (t) = 15 2t x 4 (t) = 9 2t x 5 (t) = t From the expression for z(t) we know that the larger t is, the better our solution is. BUT we need to make sure our solution is feasible. Maintaining feasibility means 15 2t 0 which implies t 7.5 9 2t 0 which implies t 4.5 t 0 which implies t 9>= >; = t. So we use t =, which gives the new feasible solution x = [, 0, 9,, 0] T with objective value 15. Note that this is again a bfs! This is NOT a coincidence. This bfs is determined by the basis B = {1,, 4}.

Chapter 6: The Simplex Method 7 Here is a diagram of the problem in SIF (treating x, x 4, x 5 as slacks). x 2 2x 1 + x 2 15 2x 1 + x 2 9 (0,5) (,) x1 x 2 Feasible region New x (4,1) x1 (0,0) (,0) x 2 0 Old x x 1 0 The solution x(t) = [x 1 (t), x 2 (t),..., x 5 (t)] T x 1 (t) = t x 2 (t) = 0 x (t) = 15 2t x 4 (t) = 9 2t x 5 (t) = t 9>= >; = x(t) = 2 64 0 0 is given by 15 75 + t 9 i.e., in the space of all 5 variables, we move from [0, 0, 15, 9, ] T in the direction of [1, 0, 2, 2, 1] T. 2 64 1 0 2 2 1 75 In the space of [x 1, x 2 ] T, we move from [0, 0] T in the direction of [1, 0] T.

Chapter 6: The Simplex Method 8 We shall get the tableau corresponding to B = {1,, 4} from z 5x 1 x 2 = 0 2x 1 + x 2 + x = 15 2x 1 + x 2 + x 4 = 9 x 1 x 2 + x 5 = Note that the columns for x and x 4 (previous basic variables that remain basic) already form part of the identity matrix (so does the column for z, but it always does). So we only need to make the column for x 1 (a new member of the basic variables) the remaining column of the identity matrix. In a way, we are transferring the column for x 5 to x 1. Good news: This can be done with at most four elementary row operations at most one on each row. (z-row) + 5 (x 5 -row): z 8x 2 + 5x 5 = 15 (x -row) 2 (x 5 -row): 5x 2 + x 2x 5 = 9 (x 4 -row) 2 (x 5 -row): x 2 + x 4 2x 5 = (x 5 -row): x 1 x 2 + x 5 = By changing only one member of B, we need at most m+1 row operations to get the new tableau.

Chapter 6: The Simplex Method 9 In the new tableau, the nonbasic variable x 2 has reduced cost c 2 = 8 > 0 (we cannot use x 5 since c = 5 0). Increasing x 2 to t 0 while keeping x 5 at 0 gives z(t) = 15 + 8t x 1 (t) = + t x 2 (t) = t x (t) = 9 5t x 4 (t) = t x 5 (t) = 0 Once again the larger t is, the better our solution is. To maintain feasibility, we need + t 0 which implies no upper bound on t 9 5t 0 which implies t 1.8 t 0 which implies t 1 9>= >; = t 1. So we use t = 1, which gives the new feasible solution x = [4, 1, 4, 0, 0] T with objective value 2. Once again, this is a bfs, and it is determined by the basis B = {1, 2, }.

Chapter 6: The Simplex Method 10 The following diagram shows this step. 2x 1 + x 2 15 x 2 2x 1 + x 2 9 (0,5) (,) x1 x 2 Feasible region New x (4,1) Old x x1 (0,0) (,0) x 2 0 x 1 0 The solution x(t) = [x 1 (t), x 2 (t),..., x 5 (t)] T x 1 (t) = + t x 2 (t) = t x (t) = 9 5t x 4 (t) = t x 5 (t) = 0 9>= >; = x(t) = 2 64 0 is given by 9 75 + t i.e., in the space of all 5 variables, we move from [, 0, 9,, 0] T in the direction of [1, 1, 5,, 0] T. 0 2 64 1 1 5 0 75 In the space of [x 1, x 2 ] T, we move from [, 0] T in the direction of [1, 1] T.

Chapter 6: The Simplex Method 11 To get the tableau corresponding to B = {1, 2, } from z 8x 2 + 5x 5 = 15 5x 2 + x 2x 5 = 9 x 2 + x 4 2x 5 = x 1 x 2 + x 5 = we transfer the column for x 4 to x 2. Once again we do this with at most four elementary row operations. (z-row) + 8 (x 4-row): z + 8 x 4 1 x 5 = 2 (x -row) 5 (x 4-row): x 5 x 4 + 4 x 5 = 4 1 (x 4-row): x 2 + 1 x 4 2 x 5 = 1 (x 1 -row) + 1 (x 4-row): x 1 + 1 x 4 + 1 x 5 = 4 We can still increase the objective value since c 5 = 1 > 0. Increasing x 5 to t 0 while keeping x 4 at 0 gives z(t) = 2 + 1 t x 1 (t) = 4 1 t x 2 (t) = 1 + 2 t x (t) = 4 4 t x 4 (t) = 0 x 5 (t) = t

Chapter 6: The Simplex Method 12 To maintain feasibility, we need 4 1 t 0 which implies t 12 1 + 2 t 0 which implies no upper bound on t 4 4 t 0 which implies t 9>= >; = t. So we use t =, which gives the new feasible solution x = [,, 0, 0, ] T with objective value 24. This bfs is determined by the basis B = {1, 2, 5}. To get the tableau corresponding to B = {1, 2, 5} from z + 8 x 4 1 x 5 = 2 x 5 x 4 + 4 x 5 = 4 x 2 + 1 x 4 2 x 5 = 1 x 1 + 1 x 4 + 1 x 5 = 4 we transfer the column for x to x 5, giving z + 1 4 x + 9 4 x 4 = 24 4 x 5 4 x 4 + x 5 = x 2 + 1 2 x 1 2 x 4 = x 1 1 4 x + 4 x 4 =

Chapter 6: The Simplex Method 1 Now we can no longer proceed since both reduced costs c = 1/4 and c 4 = 9/4 are not positive. The diagram below shows that x is optimal. x 2 x (,) Feasible region 5x1 + x 2 = 24 x1 We can actually prove it algebraically. From the z-row: z + 1 4 x + 9 4 x 4 = 24, we get z = 24 1 4 x 9 4 x 4 Since x 4, x 5 0 for any feasible solution, we have z = 24 1 4 x 9 4 x 4 24 for any feasible solution. The solution x = [,, 0, 0, ] T has objective value 24, so it must an optimal solution. We can also prove optimality using the C.S. Theorem. (More on this later.)