The Simplex algorithm: Introductory example. The Simplex algorithm: Introductory example (2)

Similar documents
Linear Programming and the Simplex Method

Linear Programming! References! Introduction to Algorithms.! Dasgupta, Papadimitriou, Vazirani. Algorithms.! Cormen, Leiserson, Rivest, and Stein.

Definitions and Theorems. where x are the decision variables. c, b, and a are constant coefficients.

Zeros of Polynomials

Optimization Methods MIT 2.098/6.255/ Final exam

Randomized Algorithms I, Spring 2018, Department of Computer Science, University of Helsinki Homework 1: Solutions (Discussed January 25, 2018)

Math 312 Lecture Notes One Dimensional Maps

Review Problems 1. ICME and MS&E Refresher Course September 19, 2011 B = C = AB = A = A 2 = A 3... C 2 = C 3 = =

3.2 Properties of Division 3.3 Zeros of Polynomials 3.4 Complex and Rational Zeros of Polynomials

Ma 530 Introduction to Power Series

Differentiable Convex Functions

NUMERICAL METHODS FOR SOLVING EQUATIONS

The Growth of Functions. Theoretical Supplement

6.3 Testing Series With Positive Terms

Integer Linear Programming

SECTION 1.5 : SUMMATION NOTATION + WORK WITH SEQUENCES

(A sequence also can be thought of as the list of function values attained for a function f :ℵ X, where f (n) = x n for n 1.) x 1 x N +k x N +4 x 3

Properties and Tests of Zeros of Polynomial Functions

Recurrence Relations

b i u x i U a i j u x i u x j

w (1) ˆx w (1) x (1) /ρ and w (2) ˆx w (2) x (2) /ρ.

Topics. Homework Problems. MATH 301 Introduction to Analysis Chapter Four Sequences. 1. Definition of convergence of sequences.

subject to A 1 x + A 2 y b x j 0, j = 1,,n 1 y j = 0 or 1, j = 1,,n 2

IP Reference guide for integer programming formulations.

NICK DUFRESNE. 1 1 p(x). To determine some formulas for the generating function of the Schröder numbers, r(x) = a(x) =

THE SOLUTION OF NONLINEAR EQUATIONS f( x ) = 0.

Assignment 5: Solutions

TEACHER CERTIFICATION STUDY GUIDE

CHAPTER 10 INFINITE SEQUENCES AND SERIES

62. Power series Definition 16. (Power series) Given a sequence {c n }, the series. c n x n = c 0 + c 1 x + c 2 x 2 + c 3 x 3 +

Feedback in Iterative Algorithms

1+x 1 + α+x. x = 2(α x2 ) 1+x

SOLUTIONS TO EXAM 3. Solution: Note that this defines two convergent geometric series with respective radii r 1 = 2/5 < 1 and r 2 = 1/5 < 1.

Sequences and Series of Functions

Chapter 2 The Solution of Numerical Algebraic and Transcendental Equations

1 Generating functions for balls in boxes

Linear Regression Demystified

INEQUALITIES BJORN POONEN

MATH 1910 Workshop Solution

TRANSPORTATION AND ASSIGNMENT PROBLEMS

Markov Decision Processes

Matrices and vectors

Math 61CM - Solutions to homework 3

Lecture 23 Rearrangement Inequality

Chapter 8: Estimating with Confidence

A 2nTH ORDER LINEAR DIFFERENCE EQUATION

Math 203A, Solution Set 8.

Bertrand s Postulate

CHAPTER 1 SEQUENCES AND INFINITE SERIES

Chapter 4. Fourier Series

MA131 - Analysis 1. Workbook 3 Sequences II

Discrete-Time Systems, LTI Systems, and Discrete-Time Convolution

x c the remainder is Pc ().

The picture in figure 1.1 helps us to see that the area represents the distance traveled. Figure 1: Area represents distance travelled

Analysis of Algorithms. Introduction. Contents

Optimally Sparse SVMs

Optimization Methods: Linear Programming Applications Assignment Problem 1. Module 4 Lecture Notes 3. Assignment Problem

Week 5-6: The Binomial Coefficients

LINEAR PROGRAMMING. Introduction. Prototype example. Formulation of the LP problem. Excel Solution. Graphical solution

Seunghee Ye Ma 8: Week 5 Oct 28

A sequence of numbers is a function whose domain is the positive integers. We can see that the sequence

NATIONAL SENIOR CERTIFICATE GRADE 12

Simple Polygons of Maximum Perimeter Contained in a Unit Disk

MATH 112: HOMEWORK 6 SOLUTIONS. Problem 1: Rudin, Chapter 3, Problem s k < s k < 2 + s k+1

Assignment 2 Solutions SOLUTION. ϕ 1 Â = 3 ϕ 1 4i ϕ 2. The other case can be dealt with in a similar way. { ϕ 2 Â} χ = { 4i ϕ 1 3 ϕ 2 } χ.

ECE-S352 Introduction to Digital Signal Processing Lecture 3A Direct Solution of Difference Equations

-ORDER CONVERGENCE FOR FINDING SIMPLE ROOT OF A POLYNOMIAL EQUATION

PROBLEM SET 5 SOLUTIONS 126 = , 37 = , 15 = , 7 = 7 1.

Solutions for the Exam 9 January 2012

A Study on Some Integer Sequences

MASSACHUSETTS INSTITUTE OF TECHNOLOGY 6.436J/15.085J Fall 2008 Lecture 19 11/17/2008 LAWS OF LARGE NUMBERS II THE STRONG LAW OF LARGE NUMBERS

Sequences A sequence of numbers is a function whose domain is the positive integers. We can see that the sequence

M17 MAT25-21 HOMEWORK 5 SOLUTIONS

The Method of Least Squares. To understand least squares fitting of data.

End-of-Year Contest. ERHS Math Club. May 5, 2009

Section 1 of Unit 03 (Pure Mathematics 3) Algebra

An analog of the arithmetic triangle obtained by replacing the products by the least common multiples

Infinite Sequences and Series

Introduction to Optimization, DIKU Monday 19 November David Pisinger. Duality, motivation

1 Approximating Integrals using Taylor Polynomials

Introduction to Computational Biology Homework 2 Solution

Polynomials with Rational Roots that Differ by a Non-zero Constant. Generalities

MATH301 Real Analysis (2008 Fall) Tutorial Note #7. k=1 f k (x) converges pointwise to S(x) on E if and

Solutions to Tutorial 3 (Week 4)

CS / MCS 401 Homework 3 grader solutions

Massachusetts Institute of Technology

The Random Walk For Dummies

Design and Analysis of Algorithms

Sums, products and sequences

LINEAR PROGRAMMING II

Section 5.1 The Basics of Counting

MA131 - Analysis 1. Workbook 2 Sequences I

Weight Moving Average = n

Best Optimal Stable Matching

15.081J/6.251J Introduction to Mathematical Programming. Lecture 21: Primal Barrier Interior Point Algorithm

Langford s Problem. Moti Ben-Ari. Department of Science Teaching. Weizmann Institute of Science.

We are mainly going to be concerned with power series in x, such as. (x)} converges - that is, lims N n

Exponential and Trigonometric Functions Lesson #1

MAT 271 Project: Partial Fractions for certain rational functions

is also known as the general term of the sequence

Transcription:

Discrete Mathematics for Bioiformatics WS 07/08, G. W. Klau, 23. Oktober 2007, 12:21 1 The Simplex algorithm: Itroductory example The followig itroductio to the Simplex algorithm is from the book Liear Programmig by V. Chvátal. Example: max 5x 1 + 4x 2 + 3x 3 subject to 2x 1 + 3x 2 + x 3 5 4x 1 + x 2 + 2x 3 11 3x 1 + 4x 2 + 2x 3 8 x 1,x 2,x 3 0 The Simplex algorithm: Itroductory example (2) Itroduce slack variables ad obtai stadard form 1 : x 4 = 5 2x 1 3x 2 x 3 x 5 = 11 4x 1 x 2 2x 3 x 6 = 8 3x 1 4x 2 2x 3 z = 5x 1 + 4x 2 + 3x 3 maxz subject to x 1,...,x 6 0 Slack variables: x 4,x 5,x 6 Decisio variables: x 1,x 2,x 3 The Simplex algorithm: Itroductory example (3) Idea of the Simplex algorithm: Start with feasible solutio x 1,...,x 6 ad try to fid aother feasible solutio x 1,..., x 6 with 5 x 1 + 4 x 2 + 3 x 3 > 5x 1 + 4x 2 + 3x 3. Iterate util optimal solutio is foud. Problem 1: Fid first feasible solutio. I our example it is easy: will do ad yields z = 0. x = (0,0,0,5,11,8) The Simplex algorithm: Itroductory example (4) Problem 2: Fidig a better feasible solutio. Lookig at z, we have to icrease x 1, x 2, or x 3. 1 Note: Chvátal calls the form o the previous slide stadard form.

Liear Programmig, Alexader Bockmayr, 23. Oktober 2007, 12:21 2 Blackboard calculatios tell us: x 1 5 2,x 1 11 4,x 1 8 3, so x = ( 5 2,0,0,0,1, 1 25 ) yieldig z =. 2 2 Fidig a eve better solutio? Not so easy. We rewrite our system of equatios such that, agai, ozero variables appear at the left-had side ad zero variables o the right-had side (thus, x 1 ad x 4 swap their positios): x 1 = 5 2 1 2 x 4 3 2 x 2 1 2 x 3 The Simplex algorithm: Itroductory example (5) New system: x 1 = 5 2 1 2 x 4 3 2 x 2 1 2 x 3 x 5 = 1 + 5x 2 + 2x 4 x 6 = 1 2 + 1 2 x 2 1 2 x 3 + 3 2 x 4 z = 25 2 7 2 x 2 + 1 2 x 3 5 2 x 4 Next step: icrease x 3. Blackboard calculatios: x 3 = 1, yieldig (2,0,1,0,1,0) ad z = 13. The Simplex algorithm: Itroductory example (6) New system: x 3 = 1 + x 2 + 3x 4 2x 6 x 1 = 2 2x 2 2x 4 + x 6 x 5 = 1 + 5x 2 + 2x 4 z = 13 3x 2 x 4 x 6 We are doe! Why? We have foud a solutio with z = 13 ad every feasible solutio must satisfy z = 13 3x 2 x 4 x 6 ad x 2,x 4,x 6 0. The Simplex algorithm Give a problem max subject to c j x j x j 0 a ij x j b i i = 1,2,...,m j = 1,2,...,

Liear Programmig, Alexader Bockmayr, 23. Oktober 2007, 12:21 3 we itroduce slack variables ad arrive at our first dictioary x +i = b i z = c j x j, a ij x j i = 1,2,...,m which characterizes each feasible solutio as + m o-egative umbers x 1,...,x,x +1,...,x +m, where x +1,...,x +m deped o x 1,...,x. The Simplex algorithm (2) A iteratio of the Simplex algorithm cosists of replacig a feasible solutio with x 1,...,x +m by x 1,..., x +m, c j x j > c j x j. 2 We do so by choosig a (o-basic) variable x N from the right-had side with positive objective fuctio coefficiet ad icreasig its value maximally, thereby settig a left-had side (basic) variable x B to zero. We compute a ew dictioary where x N is left (basic) ad x B is right (o-basic). The Simplex algorithm (3) Defiitio: (dictioary) The equatios i a dictioary express m of the variables x 1,...,x m+ ad the objective fuctio z i terms of the remaiig variables. Every solutio of a dictioary must be also a solutio of the first dictioary. A dictioary is feasible if settig the o-basic variables to zero ad evaluatig the basic variables yields a feasible solutio. The Simplex algorithm moves from feasible dictioary to feasible dictioary. The Simplex algorithm (4) Are we doe? No! How do we fid the first feasible dictioary? (Iitializatio) Ca we always fid a eterig ad leavig variable to costruct the ext dictioary? (Iteratio) Does the process termiate? (Termiatio) 2 As we will later see, the iequality is ot always strict. The Simplex algorithm (5)

Liear Programmig, Alexader Bockmayr, 23. Oktober 2007, 12:21 4 We start with the secod issue (Iteratio): Cosider the last row of a dictioary z = z + c j x j, j N where N cotais the idices of o-basic variables. If c j 0 for all j N, we are doe. Otherwise, choose ay variable with positive coefficiet for eterig the basis, e. g., the oe with the largest coefficiet c j. Now the leavig variable is that basic variable whose o-egativity imposes the most striget upper boud o the icrease of the eterig variable. Problems: 1. o cadidate 2. multiple cadidates The Simplex algorithm (6) Problem 1 (o cadidate). Cosider x 2 = 5 + 2x 3 x 4 3x 1 x 5 = 7 3x 4 4x 1 z = 5 + x 3 x 4 x 1 No restrictios o x 3. Settig x 3 = t yields x = (0,5 + 2t,t,0,7) with z = 5 + t, that is, the problem is ubouded. Of course, this holds i geeral. Problem 2 (multiple cadidates). I this case, we may choose ay cadidate. This leads, however, to degeerate solutios. The Simplex algorithm (7) A basic solutio is degeerate if oe or more basic variables are at zero. This might have a aoyig side effect: o-icreasig iteratios. Example: x 4 = 1 2x 3 x 5 = 3 2x 1 + 4x 2 6x 3 x 6 = 2 + x 1 3x 2 4x 3 z = 2x 1 x 2 + 8x 3 If, as i this example, oly a few iteratios are degeerate, this is ot a big problem. Otherwise, we may cycle, which is a serious problem! The Simplex algorithm (8)

Liear Programmig, Alexader Bockmayr, 23. Oktober 2007, 12:21 5 Cyclig. Ca the Simplex go through a edless sequece of iteratios without ever fidig a optimal solutio? Yes: x 5 = 1 2 x 1 + 11 2 x 2 + 5 2 x 3 9x 4 x 6 = 1 2 x 1 + 3 2 x 2 + 1 2 x 3 x 4 x 7 = 1 x 1 z = 10x 1 57x 2 9x 3 24x 4 Now, choosig the eterig variable accordig to the largest coefficiet rule ad the leavig variable accordig to the lexicographic rule, we will see the same dictioary agai after six iteratios!