Chapter 2. Simplex method

23
OR-1 2009 1 Chapter 2. Simplex method Geometric view : 2 1 2 max x x 0 , 10 3 4 2 2 t. s. 2 1 2 1 2 1 x x x x x x (2,0) (2,2/3) (1,2) (0,2) x 2 x 1

description

Chapter 2. Simplex method. Geometric view :. x 2. (0,2). (1,2). (2,2/3). x 1. (2,0). Let a  R n , b R. Geometric intuition for the solution sets of { x : a’x = 0 } { x : a’x  0 } { x : a’x  0 } { x : a’x = b } { x : a’x  b } { x : a’x  b }. - PowerPoint PPT Presentation

Transcript of Chapter 2. Simplex method

Page 1: Chapter 2.  Simplex method

OR-1 2009 1

Chapter 2. Simplex method

Geometric view : 21 2 max xx

0,

1034

2

2 t.s.

21

21

2

1

xx

xx

x

x

(2,0)

(2,2/3)

(1,2)(0,2)

x2

x1

Page 2: Chapter 2.  Simplex method

OR-1 2009 2

Let a Rn, b R.

Geometric intuition for the solution sets of

{ x : a’x = 0 }

{ x : a’x 0 }

{ x : a’x 0 }

{ x : a’x = b }

{ x : a’x b }

{ x : a’x b }

Page 3: Chapter 2.  Simplex method

OR-1 2009 3

{ x : a’x 0 }

{ x : a’x 0 }

Geometry in 2-D

a

{ x : a’x = 0 }

0

Page 4: Chapter 2.  Simplex method

OR-1 2009 4

Let z be a (any) point satisfying a’x = b. Then

{ x : a’x = b } = { x : a’x = a’z } = { x : a’(x – z) = 0 }

Hence x – z = y, where y is any solution to a’y = 0, or x = y + z.

So x can be obtained by adding z to every point y satisfying Ay = 0. Similarly, for { x : a’x b }, { x : a’x b }.

{ x : a’x b }

{ x : a’x b }

a

{ x : a’x = 0 }

0{ x : a’x = b }

z

Page 5: Chapter 2.  Simplex method

OR-1 2009 5

Points satisfying (halfspace) 1034 21 xx

0)',)(3,4(

034

21

21

xx

xx

(4,3)

x2

x1

1034 21 xx

0)',)(3,4(

034

21

21

xx

xx

(2,2/3)

Page 6: Chapter 2.  Simplex method

OR-1 2009 6

Def: The set of points which can be described in the form

is called a polyhedron.

( Intersection of finite number of halfspaces)

Hence, linear programming is the problem of optimizing (maximize, minimize) a linear function over a polyhedron.

Thm: Polyhedron is a convex set.

Pf) HW earlier.

}:{ bAxRx n

}:{ bAxRx n

Page 7: Chapter 2.  Simplex method

OR-1 2009 7

Solving LP graphically

(2,0)

(2,2/3)

(1,2)(0,2)

x2

x1

02 21 xx

22 21 xx

21 2 max xx

0,

1034

2

2 t.s.

21

21

2

1

xx

xx

x

x

42 21 xx

52 21 xx

Page 8: Chapter 2.  Simplex method

OR-1 2009 8

Properties of optimal solutions Thm: If LP has a unique optimal solution, the optimal solution is an

extreme point.

Pf) Suppose x* is unique optimal solution and it is not extreme point of the feasible set. Then there exist feasible points y, z x* such that x* = y +(1- )z for some 0 < < 1.

Then c’x* = c’y + (1- )c’z.

If c’x* c’y, then either c’y > c’x* or c’z > c’x*, hence contradiction to x* being optimal solution.

If c’x* = c’y, y is also optimal solution. Contradiction to x* being unique optimal.

Thm: Suppose polyhedron P has at least one extreme point. If LP over P has an optimal solution, it has an extreme point optimal solution.

Pf) not given here.

Page 9: Chapter 2.  Simplex method

OR-1 2009 9

Multiple optimal solutions

21 2 max xx

0,

1034

2

2 t.s.

21

21

2

1

xx

xx

x

x

(2,0)

(2,2/3)

(1,2)(0,2)

x2

x1

52 21 xx

21 34 max xx

1034 21 xx

Page 10: Chapter 2.  Simplex method

OR-1 2009 10

Obtaining extreme point algebraically

21 2 max xx

0,

103

2

21

21

2

1

xx

xx

x

x

4

2 t. s.

(2,0)

(2,2/3)

(1,2)(0,2)

x2

x1

Page 11: Chapter 2.  Simplex method

OR-1 2009 11

Suppose polyhedron is given (A: mxn).

Extreme point of the polyhedron can be obtained by setting n of the inequalities as equations (coefficient vectors must be linearly independent) and obtaining the solution satisfying the equations. If the obtained point satisfies other inequalities, it is in P and it is an extreme point of the polyhedron

Enumeration :

( the number of ways to choose n inequalities (which hold at equalities) out of (m+n) inequalities.)

Algorithm strategy : from an extreme point, move to the neighboring extreme point which gives a better (precisely speaking, not worse) solution

)0,( LP standardfor choices

xbAx

n

nm

}0,:{ xbAxRxP n

Page 12: Chapter 2.  Simplex method

OR-1 2009 12

Remark: There exists a polyhedron which is not full-dimensional.

(extreme point is defined same as before.)

0

0

0

1

3

2

1

321

x

x

x

xxx

x2

x1

x3

1

1

1This polyhedron is 2-dimensional.

Page 13: Chapter 2.  Simplex method

OR-1 2009 13

Geometric Idea of the Simplex Method

Any LP problem must be converted to a problem having only equations except the nonnegativity constraints if simplex method can be applied (details later)

Consider the LP problem max c’x, Ax = b, -x 0

A: m n, full row rank (n m)

P = { x : Ax=b, -x 0 }

To define an extreme point of P, we need n equations. Since we already have m equations in Ax=b, (n - m) equations must come from -x 0, which means (n - m) variables are set to 0. Let A=[B:N], where N is the submatrix corresponding to the variables set to 0. Then we solve the system Bx = b for the remaining m variables.

(Note that the coefficient matrix B must be nonsingluar so that the system of equations has a unique solution.)

Page 14: Chapter 2.  Simplex method

OR-1 2009 14

Ex: extreme point ( 1, 0, 0 ) can be obtained from x1 + x2 + x3 = 1, x2

= 0, x3 = 0. Since ( 1, 0, 0 ) satisfies –x1 0, it is an extreme

point.

0

0

0

1

3

2

1

321

x

x

x

xxx

x2

x1

x3

1

1

1This polyhedron is 2-dimensional.

Page 15: Chapter 2.  Simplex method

OR-1 2009 15

(continued)

Let A = [B : N] , B: m m, nonsingular, N: m (n - m), where N is the submatrix of A having columns associated with variables set to 0.

Then an extreme point can be found by solving Ax = b, xN = 0.

[B : N] (xB: xN)’ = b

BxB + NxN = b, -xN = 0. (or BxB = b - NxN , -xN = 0. )

multiplying B-1 on both sides, we obtain B-1BxB + B-1NxN = B-1b

or IxB + B-1NxN = B-1b, -xN = 0.

Solution is xB = B-1b, xN = 0

This is the basic solution we mentioned earlier. By the choice of the variables we set at 0, we obtain different basic solutions (different extreme points).

xB are called basic variables, and xN are called nonbasic variables.

If the obtained solution satisfies nonnegativity, xB = B-1b 0, we have a

basic and feasible solution (satisfies nonnegativity of variables)

Page 16: Chapter 2.  Simplex method

Coeff. Matrix for Basic solution

OR-1 2009 16

=

b

0

B N xB

xN

-I0

Ax = b

-xN = 0

m n-m

m

n-m

Page 17: Chapter 2.  Simplex method

Simplex method searches only basic feasible solutions, which is tantamount to searching the extreme points of the corresponding polyhedron until it finds an optimal solution.

OR-1 2009 17

Page 18: Chapter 2.  Simplex method

OR-1 2009 18

Simplex method (algebraic interpretation)

Add slack variables( 여유변수 ) to each constraint to convert them to equations.

321 34 xxx 5 maximize

0,,

824

12

5

321

321

321

321

xxx

xxx

xxx

xxx

3

1 4

32 to subject

321 34 xxx 5 maximize

0,,,,

824

12

5

654321

6321

5321

4321

,

3

1 4

32 to subject

xxxxxx

xxxx

xxxx

xxxx

(1)

(2)

Page 19: Chapter 2.  Simplex method

OR-1 2009 19

Hence we have a 1-1 mapping which maps each feasible point in (1) to a feasible point in (2) uniquely (and conversely) and the objective values are the same for the points.

So solve (2) instead of (1).

(Surplus variable ( 잉여변수 ) : a’x b a’x – xs = b, xs 0 )

same the are values objective and

where

(2) to solution (1) to solution

*3

*2

*1

*6

*3

*2

*1

*5

*3

*2

*1

*4

*6

*5

*4

*3

*2

*1

*3

*2

*1

2438

2411

325

),,,,,(),,(

xxxx

xxxx

xxxx

xxxxxxxxx

same the are values objective and

(1) to solution (2) to solution ),,(),,,,,( *3

*2

*1

*6

*5

*4

*3

*2

*1 xxxxxxxxx

Page 20: Chapter 2.  Simplex method

OR-1 2009 20

Remark: If LP includes equations, we need to convert each equation

to two inequalities to express the problem in standard form as we have seen earlier. Then we may add slack or surplus variables to convert them to equations. However, this procedure will increase the number of constraints and variables.

Equations in an LP can be handled directly without changing them to inequalities. Detailed method will be explained in Chap8. General LP Problems.

For the time being, we assume that we follow the standard procedure to convert equations to inequalities.

Page 21: Chapter 2.  Simplex method

OR-1 2009 21

Changes in the solution space when slack is added

0,

1

21

21

xx

xx0,,

1

321

321

xxx

xxx

x2

x1

x1

x3

x21

1

1

1

1

Page 22: Chapter 2.  Simplex method

OR-1 2009 22

Next let

Then find solution to the following system which maximizes z (tableau form)

In the text, dictionary form used, i.e. each dependent variable (including z) (called basic variable) is expressed as linear combinations of indep. var. (called nonbasic variable).

03434 321321 xxxzxxxz 5 or 5

0,,,,

824

12

5

654321

6321

5321

4321

,

3

1 4

32

xxxxxx

xxxx

xxxx

xxxx

034 321 5 xxxz

0,,,,

248

21

5

654321

3216

3215

3214

,

3

41

32

xxxxxx

xxxx

xxxx

xxxx321 340 xxxz 5

(Note that, unlike the text, we place the objective function in the first row. Such presentation style is used more widely and we follow that convention)

Page 23: Chapter 2.  Simplex method

OR-1 2009 23

From previous lectures, we know that if the polyhedron P has at

least one extreme point and the LP over P has a finite optimal solution, the LP has an extreme point optimal solution. Also an extreme point of P for our problem is a basic feasible solution algebraically.

We obtain a basic solution by setting x1 = x2 = x3 = 0 and finding the

values of x4, x5, and x6 , which can be read directly from the

dictionary. (also z values can be read.) If all values of x4, x5, and

x6 are nonnegative, we obtain a basic feasible solution.

The equation for z may be regarded as part of the systems of equations, or we may think of it as a separate equation used to evaluate the objective value for the given solution.