Linear programs Optimization Geoff Gordon Ryan Tibshirani

Similar documents
Lecture 14: October 11

Simplex Algorithm Using Canonical Tableaus

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

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

Review Solutions, Exam 2, Operations Research

AM 121: Intro to Optimization

IE 400: Principles of Engineering Management. Simplex Method Continued

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

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

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

February 17, Simplex Method Continued

Part 1. The Review of Linear Programming

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

Systems Analysis in Construction

Math 273a: Optimization The Simplex method

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

Lecture 5 Simplex Method. September 2, 2009

Simplex method(s) for solving LPs in standard form

9.1 Linear Programs in canonical form

CO350 Linear Programming Chapter 8: Degeneracy and Finite Termination

TIM 206 Lecture 3: The Simplex Method

AM 121: Intro to Optimization Models and Methods Fall 2018

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

Lesson 27 Linear Programming; The Simplex Method

Special cases of linear programming

Math Models of OR: Sensitivity Analysis

Sensitivity Analysis

Math Models of OR: Some Definitions

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

Farkas Lemma, Dual Simplex and Sensitivity Analysis

Math Models of OR: Handling Upper Bounds in Simplex

Motivating examples Introduction to algorithms Simplex algorithm. On a particular example General algorithm. Duality An application to game theory

Lecture 2: The Simplex method

F 1 F 2 Daily Requirement Cost N N N

IE 5531: Engineering Optimization I

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

Part 1. The Review of Linear Programming

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

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

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

Optimisation and Operations Research

1 Review Session. 1.1 Lecture 2

Metode Kuantitatif Bisnis. Week 4 Linear Programming Simplex Method - Minimize

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

MATH 445/545 Test 1 Spring 2016

Chap6 Duality Theory and Sensitivity Analysis

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

Lecture slides by Kevin Wayne

AM 121: Intro to Optimization Models and Methods

Understanding the Simplex algorithm. Standard Optimization Problems.

Linear Programming: Simplex

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

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

3. Duality: What is duality? Why does it matter? Sensitivity through duality.

A Review of Linear Programming

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

OPRE 6201 : 3. Special Cases

Notes on Simplex Algorithm

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

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

ECE 307 Techniques for Engineering Decisions

The dual simplex method with bounds

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

Part III: A Simplex pivot

CO350 Linear Programming Chapter 6: The Simplex Method

3 The Simplex Method. 3.1 Basic Solutions

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

Linear Programming and the Simplex method

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

Chapter 1: Linear Programming

Slide 1 Math 1520, Lecture 10

THE UNIVERSITY OF HONG KONG DEPARTMENT OF MATHEMATICS. Operations Research I

IE 5531: Engineering Optimization I

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

CPS 616 ITERATIVE IMPROVEMENTS 10-1

OPTIMISATION 3: NOTES ON THE SIMPLEX ALGORITHM

Note 3: LP Duality. If the primal problem (P) in the canonical form is min Z = n (1) then the dual problem (D) in the canonical form is max W = m (2)

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

SOLVING INTEGER LINEAR PROGRAMS. 1. Solving the LP relaxation. 2. How to deal with fractional solutions?

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

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

Linear Programming Redux

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

Operations Research Lecture 2: Linear Programming Simplex Method

Summary of the simplex method

15-780: LinearProgramming

MATH2070 Optimisation

4. Duality and Sensitivity

Linear & Integer programming

2018 년전기입시기출문제 2017/8/21~22

Chapter 4 The Simplex Algorithm Part II

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.

A Parametric Simplex Algorithm for Linear Vector Optimization Problems

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

OPERATIONS RESEARCH. Linear Programming Problem

CO350 Linear Programming Chapter 5: Basic Solutions

1 Implementation (continued)

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

4. The Dual Simplex Method

Revised Simplex Method

Transcription:

Linear programs 10-725 Optimization Geoff Gordon Ryan Tibshirani

Review: LPs LPs: m constraints, n vars A: R m n b: R m c: R n x: R n ineq form [min or max] c T x s.t. Ax b m n std form [min or max] c T x s.t. Ax = b x 0 m n max 2x+3y s.t. x + y 4 2x + 5y 12 x + 2y 5 x, y 0 2

Review: LPs Polyhedral feasible set infeasible (unhappy ball) unbounded (where s my ball?) Optimum at a vertex (= a 0-face) Transforming LPs changing to to = getting rid of free vars or bounded vars 3

Review: LPs Tableau: x y u v w z RHS 1 1 1 0 0 0 4 2 5 0 1 0 0 12 1 2 0 0 1 0 5-2 -3 0 0 0 1 0 Row operations to get equivalent tableaux Basis (more or less corresponds to a corner) use row ops to make m m block of tableau = identity matrix set nonbasic vars = 0: enough constraints to fully specify all other variables (so, a 0-face, if it s feasible) 4

Ineq form is projected std form z x, y, z 0 A[x;y;z] = b 3 1 2 5 2 3 1 5 y x 5

Three bases 1 0 5/7 10/7 0 1-1/7 5/7 x 5 z 2 1 5 0 5 0-7 1-5 5/7 y 1 1/5 1 0 1 7/5 0 1 2 x 5 x 10/7 z y 6

What if we can t pick basis? E.g., suppose A doesn t have full row rank can t pick m linearly independent cols Ex: 3x + 2y + 1z = 3 6x + 4y + 2z = 6 7

What if we can t pick basis? E.g., suppose fewer vars than constraints A taller than it is wide, m n can t pick enough cols of A to make a square matrix Ex: 8

We can assume Nonsingular n m (at least as many vars as constrs) A has full row rank Else, drop rows (maintaining rank) until it s true Called nonsingular standard form LP 9

Naive (sloooow) algorithm Put in nonsingular standard form Iterate through all subsets of n vars if m constraints, how many subsets? Check each for full rank ( basis-ness ) feasibility (RHS 0) If pass both tests, compute objective Maintain running winner, return at end 10

Improving our search Naive: enumerate all possible bases Smarter: maybe neighbors of good bases are also good? Simplex algorithm: repeatedly move to a neighboring basis to improve objective continue to assume nonsingular standard form LP 11

Neighboring bases Two bases are neighbors if they share (m 1) variables Neighboring feasible bases correspond to vertices connected by an edge x y z u v w RHS 1 0 0 1 0 0 1 0 1 0 0 1 0 1 0 0 1 0 0 1 1 def n: pivot, enter, exit 12

Example max z = 2x + 3y s.t. x + y 4 2x + 5y 12 x + 2y 5 x 4 x y s t u v z RHS 1 1 1 0 0 0 0 4 2 5 0 1 0 0 0 12 1 2 0 0 1 0 0 5 1 0 0 0 0 1 0 4-2 -3 0 0 0 0 1 0 13

x y s t u v z RHS 0.4 1 0 0.2 0 0 0 2.4 0.6 0 1-0.2 0 0 0 1.6 0.2 0 0-0.4 1 0 0 0.2 1 0 0 0 0 1 0 4-0.8 0 0 0.6 0 0 1 7.2

x y s t u v z RHS 1 0 0-2 5 0 0 1 0 1 0 1-2 0 0 2 0 0 1 1-3 0 0 1 0 0 0 2-5 1 0 3 0 0 0-1 4 0 1 8

x y s t u v z RHS 1 0 2 0-1 0 0 3 0 1-1 0 1 0 0 1 0 0 1 1-3 0 0 1 0 0-2 0 1 1 0 1 0 0 1 0 1 0 1 9

Initial basis x y u v w RHS 1 1 1 0 0 4 2 5 0 1 0 12 1 2 0 0 1 5 So far, assumed we started w/ feasible basic solution in fact, it was trivial to find one Not always so easy in general 17

Big M 0 x, y, s1..s6 max x - 2y x y slacks z RHS 1 1 1 0 0 0 0 4 3-2 0 1 0 0 0 4 1-1 0 0 1 0 0 1-3 -2 0 0 0 1 0-1 -1 2 0 0 0 0 1 0 Can make it easy: variant of slack trick For each violated constraint, add var w/ coeff 1 Penalize in objective; negate constraint 18

Simplex in one slide (skipping degeneracy handling) Given a nonsingular standard-form max LP Start from a feasible basis and its tableau big-m if needed Pick non-basic variable w/ coeff in objective 0 Pivot it into basis, getting neighboring basis select exiting variable to keep feasibility Repeat until all non-basic variables have objective 0 19

Degeneracy Not every set of m variables yields a corner some have rank < m (not a basis) some are infeasible Can the reverse be true? Can two bases yield the same corner? 20

Degeneracy x y u v w RHS 1 1 1 0 0 4 2 5 0 1 0 12 1 2 0 0 1 16/3 1 0 0-2 5 8/3 0 1 0 1-2 4/3 0 0 1 1-3 0 1 0 2 0-1 8/3 0 1-1 0 1 4/3 0 0 1 1-3 0 21

Degeneracy in 3D 22

Bases & degeneracy How many bases for vertex A? Are they all neighbors of one another? Are they all neighbors of B? A B 23

Dual degeneracy More than m entries in objective row = 0 so, a nonbasic variable has reduced cost = 0 objective orthogonal to a d-face for d 1 24

Handling degeneracy Sometimes have to make pivots that don t improve objective stay at same corner (exiting variable was already 0) move to another corner w/ same objective (coeff of entering variable in objective was 0) Problem of cycling need an anti-cycling rule (there are many ) e.g.: add tiny random numbers to obj, RHS 25