Lesson 27 Linear Programming; The Simplex Method

Similar documents
Math Models of OR: Some Definitions

CPS 616 ITERATIVE IMPROVEMENTS 10-1

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

IE 5531: Engineering Optimization I

Lecture 2: The Simplex method

Slide 1 Math 1520, Lecture 10

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

ECE 307 Techniques for Engineering Decisions

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

Systems Analysis in Construction

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

Week_4: simplex method II

Simplex Algorithm Using Canonical Tableaus

Linear Programming, Lecture 4

Simplex tableau CE 377K. April 2, 2015

The Simplex Algorithm

6.2: The Simplex Method: Maximization (with problem constraints of the form )

TIM 206 Lecture 3: The Simplex Method

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

Chapter 4 The Simplex Algorithm Part I

AM 121: Intro to Optimization Models and Methods Fall 2018

Non-Standard Constraints. Setting up Phase 1 Phase 2

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

Part 1. The Review of Linear Programming

Week 3: Simplex Method I

Part 1. The Review of Linear Programming

CSC Design and Analysis of Algorithms. LP Shader Electronics Example

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

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

9.1 Linear Programs in canonical form

Contents. 4.5 The(Primal)SimplexMethod NumericalExamplesoftheSimplexMethod

4.3 Minimizing & Mixed Constraints

4.4 The Simplex Method and the Standard Minimization Problem

Review Solutions, Exam 2, Operations Research

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

9.5 THE SIMPLEX METHOD: MIXED CONSTRAINTS

Professor Alan H. Stein October 31, 2007

IE 400: Principles of Engineering Management. Simplex Method Continued

Chapter 5 Linear Programming (LP)

Optimization (168) Lecture 7-8-9

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

A Review of Linear Programming

Farkas Lemma, Dual Simplex and Sensitivity Analysis

OPERATIONS RESEARCH. Linear Programming Problem

MATH 4211/6211 Optimization Linear Programming

The Simplex Method: An Example

Part III: A Simplex pivot

CO350 Linear Programming Chapter 6: 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

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

OPRE 6201 : 3. Special Cases

Special cases of linear programming

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

Algebraic Simplex Active Learning Module 4

The Simplex Method. Formulate Constrained Maximization or Minimization Problem. Convert to Standard Form. Convert to Canonical Form

Linear Programming: Simplex Method CHAPTER The Simplex Tableau; Pivoting

CS Algorithms and Complexity

Math Models of OR: Sensitivity Analysis

Linear programs Optimization Geoff Gordon Ryan Tibshirani

3 The Simplex Method. 3.1 Basic Solutions

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

1. Introduce slack variables for each inequaility to make them equations and rewrite the objective function in the form ax by cz... + P = 0.

Understanding the Simplex algorithm. Standard Optimization Problems.

"SYMMETRIC" PRIMAL-DUAL PAIR

December 2014 MATH 340 Name Page 2 of 10 pages

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

A = Chapter 6. Linear Programming: The Simplex Method. + 21x 3 x x 2. C = 16x 1. + x x x 1. + x 3. 16,x 2.

Linear Programming and the Simplex method

Section 4.1 Solving Systems of Linear Inequalities

AM 121: Intro to Optimization

Fundamental Theorems of Optimization

MATH 445/545 Test 1 Spring 2016

Operations Research Lecture 2: Linear Programming Simplex Method

Simplex Method for LP (II)

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

Math 210 Finite Mathematics Chapter 4.2 Linear Programming Problems Minimization - The Dual Problem

Math Models of OR: Handling Upper Bounds in Simplex

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

The Simplex Method of Linear Programming

The Simplex Algorithm and Goal Programming

IP Cut Homework from J and B Chapter 9: 14, 15, 16, 23, 24, You wish to solve the IP below with a cutting plane technique.

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

The simplex algorithm

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

Chapter 3, Operations Research (OR)

x 4 = 40 +2x 5 +6x x 6 x 1 = 10 2x x 6 x 3 = 20 +x 5 x x 6 z = 540 3x 5 x 2 3x 6 x 4 x 5 x 6 x x

Relation of Pure Minimum Cost Flow Model to Linear Programming

Math Homework 3: solutions. 1. Consider the region defined by the following constraints: x 1 + x 2 2 x 1 + 2x 2 6

MAT016: Optimization

Math 273a: Optimization The Simplex method

Dr. S. Bourazza Math-473 Jazan University Department of Mathematics

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

Lecture 5 Simplex Method. September 2, 2009

CO350 Linear Programming Chapter 6: The Simplex Method

CO350 Linear Programming Chapter 8: Degeneracy and Finite Termination

March 13, Duality 3

Math 354 Summer 2004 Solutions to review problems for Midterm #1

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

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

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

Transcription:

Lesson Linear Programming; The Simplex Method Math 0 April 9, 006 Setup A standard linear programming problem is to maximize the quantity c x + c x +... c n x n = c T x subject to constraints a x + a x +...+ a n x n b a x + a x +...+ a n x n b... a m x +a m x +...+a mn x n b m or Ax b. We usually include the nonnegativity constraint x 0. Today we will also assume b 0. Any vector x which satifies all the inequalities is called a feasible solution to the given problem, and a feasible solution maximizing the objection function is called an optimal solution. Illustrative Problem We will use the baker of before. He is trying to maximize z = 8x + 0y subject to the constraints x+ y 50 x+ y 0 x 0 y 0.

Slack Variables We can turn the inequalities into equalities by inserting new variables, which are called slack variables. Thus the first equation of constraint becomes and the second x + y + u = 50, x + y + v = 0. But u and v are nonnegative. So the new problem is to maximize 8x + 0y subject to constraints x+ y+u =50 x+y +v =0 x 0, y 0, u 0, v 0. In general, we insert slack variables u, u,..., u m and the equations of constraint become Ax + u = b, along with x 0, u 0. Definition. The vector x in R n+m is called a basic solution if its obtained by setting n of the variables in this equation equal to zero and solving for the remaining n variables. The m variables are we solve for are called the basic variables, and then n variables set equal to zero are called the nonbasic variables. The vector x is called a basic feasible solution if it is a basic solution that also satisfies the inequalities x 0. Why are basic feasible solutions necessary? Theorem. If a LP problem has an optimal solution, then it has a basic optimal solution. So we only need to find the basic feasible solutions! How many basic feasible solutions are there? Out of the m+n variables, we choose n to set equal to zero, and solve for the rest.. This can be done ( ) n + m = m (n + m)! m!n! ways. That s a lot! The simplex method is a way to arrive at an optimal solution by traversing the vertices of the feasible set, in each step increasing the objective function by as much as possible. I believe that a nonsolvability here would come from linearly dependent constraints, some of which could be eliminated

4 The Simplex Method, By Example 4. The Initial Basic Feasible Solution We ll work with the illustrative problem. We can start with the basic feasible solution x = 0, y = 0. This means u = 50 and v = 0. We ll start writing everything in a table (or tableau), so let s also write the objective function with a right-hand side of zero. Thus 8x 0y + z = 0. We put this all together, forming what is called the initial tableau: u 50 v 0 0 0 8 0 0 Looking at the last row, we can see that this is not the optimal solution. Increasing x or y would result in an increase in z to balance out. The idea in general is the: Optimality Criterion. If the objective row of a tableau has no negative entries in the columns labeled with variables, then the indicated solution is optimal and we can stop our computation. The idea is this: We re going to move from one basic solution to another. That is, we need to make one of the nonzero (basic) variables zero and one of the zero (nonbasic) variables nonzero. We want to do this as efficiently as possible. Look at the last row. The 0 in the y column indicates that an increase in y would have to be balanced by a tenfold increase in z. This multiplier is the biggest one. So we choose to make this variable nonzero (basic). Since it s entering the set of basic variables, it s called the entering variable. How much can we increase y? Well, since x is still zero, the equations of constraint can be written u = 50 y v = 0 y. We still need u 0 and v 0, so the most we can increase y is to 5. This is the smallest of the ratios 50 0 = 50 and = 5. So we re going to increase y to 5. This will make v = 0. We call v the departing variable. The new basic solution therefore has y = 5, v = 0, u = 5, and x = 0. The new value of the objective function is z = 0y = 50. 4. Creating a New Tableau We are exchanging the basic variable v for y. This means the objective row has to be replaced with one that has a zero in the y columns. We can do this by adding multiples

of row. Since y is an entering variable, we might as well normalize row to have a one. So we scale the second row to have a one in the y column 50 0 0 5 8 0 0 Now we zero out the rest of this column by adding 0 times row to row, and subtracting row from row. u y 0 0 5 0 0 5 5 50 Now we can repeat the process! The x column in the objective row has a negative entry, so increasing x will increase z. How much can we increase it? The minimum of the two ratios 5 5 / = 0 and / = 0. So x in the entering variable and u is the departing variable. We scale row one by to make it one in the basic column: u 0 y 0 0 5 5 50 And we zero out the rest of the column by subtracting half of row from row, and adding times row to row. u 0 y 0 4 80 Now any increase in the decision variables or slack variables would result in a decrease of z. We are done! 5 Recap of Steps. Set up the initial problem.. Apply the optimality test. If the objective row has no negative entries in the columns labeled with variables, then the indicated solution is optimal; we can stop. 4

. Choose a pivotal column by determining the column with the most negative entry in the objective row. If there are several candidates for a pivotal column, choose any one. 4. Choose a pivotal row. Form the ratios of the entries above the objective row in the rightmost column by the corresponding entries of the pivotal column for those entries in the pivotal column which are positive. For some reason, these ratios are called θ-ratios (theta). The pivotal row is the row for which the smallest of these ratios occurs. If there is a tie, so that the smallest ratio occurs at more than one row, choose any one of the qualifying rows. If none of the entries in the pivotal column above the objective row is positive, the problem has no finite optimum. We stop. 5. Perform pivotal elimination to construct a new tableau and return to Step. 6 Example Let s maximize z = x x + 6x subject to the constraints x +4x + x 4 x +x x 4 x + x x 8 x 0 x 0 x 0. Negating row two puts this problem into standard form. Let s do this with the simplex method. We insert slack variables u, u, and u The equations of constraint become x +4x + x +u 4 x x +x +u 4 x + x x +u 8 with all variables nonnegative. An initial basic feasible solution is x = 0, x = 0, x = 0, u = 4, u = 4, u = 8. The initial tableau is therefore x x x u u u z value u 4 0 4 u 0 4 u 0 8 z 6 0 0 5

The entering variable is the one with the largest negative coefficient in the objective row, that is, x. The departing variable is the row where the last column divided by the third column has its minimum positive value. These θ-ratios are 4 and 4. Apparently, then u is the departing variable. We scale row by, and use row operations to zero out the rest of the column. We get x x x u u u z value 4 u 0 8 x 4 0 8 u 0 z 0 8 Now the entering variable is x. The θ-ratios are 8/ 4/ = 4 8/ / = 8. So the departing variable is u. We scale row by 4 out the rest. We get and use row operations to zero x x x u u u z value 4 0 4 4 4 0 4 5 64 4 4 0 5 9 5 68 z 4 4 4 0 x x 8 u 4 Now there is nothing else to increase; we have reached the optimum value 68 x = 0, x = 4, and x =. at 6