Docsity

Iterative Improvement: The Simplex Method - Lecture Notes | COMP 157, Study notes of Algorithms and Programming

Partial preview of the text

Download Iterative Improvement: The Simplex Method - Lecture Notes | COMP 157 and more Study notes Algorithms and Programming in PDF only on Docsity!

Iterative Improvement:

The^ Simplex

Method

COMP157Nov^ 28,^2007

Iterative

Improvement

Strategy

-^ To^ solve

an^ optimization

problem:

-^ start^ with

some^ feasible

solution

-^ improve

solution

by^ repeated

application

of^ some^

simple^ step

-^ Potential

issues:

-^ cheaply

finding^ a

initial^ solution

-^ determining

what^ changes

should^ be

allowed

-^ local^ maxima/minima

Linear

Programming

-^ Example

continued:

-^ maximize:

0.1s^ +^ 0.07b

+^ 0.03c

-^ subject

to:s^ +^ b^ +^ c^

=^100 s^ ≤ ⅓^ b c^ ≥^ ¼(s^ + b) s^ ≥^ 0,^ b^ ≥

0,^ c^ ≥^0

objective functionconstraints

Geometric

Interpretation^ •^

objective

function: 3x^ +^ 5y • constraints: x^ +^ y^ ≤^4 x^ +^ 3y^ ≤

x^ ≥^ 0,^ y^

≥^0

Geometric

Interpretation^ we

need^ to

find^ values that^ maximize objective

function, while^ intersecting feasible

region

Unsolvable

LP^ Problems

-^ infeasible

:^ feasible

region^ is^ empty

-^ example:

x^ +^ y^ ≥^2

and^ x^ +^ y

≤^1

-^ unbounded

:^ no^ limit

to^ maximization

Brute

Force

LP

-^ Test^ objective

function

at^ every

extreme

point

-^ Problems:^ –^ How

to^ get^ list

of^ extreme

points?

-^ Number

of^ extreme

points^ grows

exponentially

with^ size

of^ problem

Simplex

Method

-^ identify

an^ extreme

point of^ the^ feasible

region

-^ iterate:^ –^ if^ an

adjacent

extreme

point^ gives

an^ improved

value^ for

objective

function:

move^ to

that^ point

-^ else:^ stop,

we’re^ at

an^ optimal

solution

maximize

cx subject to

Ax = b, x

≥^0

Standardwhere

Form:

Matrix

Notation

[^

] cn

ccc ...=^21 x ⎤⎡ 1 ⎥⎢ x 2 ⎥⎢= x ⎥⎢...⎥⎢ x ⎦⎣ n

b ⎤⎡^1 ⎥⎢ b^2 ⎥⎢= b ⎥⎢...^ ⎥⎢ b ⎦⎣^ m

⎤ ⎥ ⎥ ⎥⎦ ⎡ ⎢=⎢ ⎢⎣

mn mm

n a aa

aa a A

... ... ...

...^11221 11

Converting

to^ Standard

Form

-^ If^ we^

have^ a^ minimization

problem,

convert

to^ maximization

problem

by^ replacing

all^ cwithj^

–cj

-^ If^ a^ constraint

is^ an^ inequality,

convert

to

equivalent

equation

using^ a

slack^ variable

-^ example:

x^ +^ y^ ≤^4

Æ^ x^ +^ y^

+^ u^ =^ 4,^ u

≥^0

Standard

Form:

Example

maximize:

3x

+^ 5y constraints:

x^ +

y^ ≤^ 4,^ x

+^ 3y^ ≤^ 6,

x^ ≤^ 0,^ y

≤^0

maximize:

3x

+^ 5y^ +^ 0u

+^ 0v

constraints:

x^ +

y^ +^ u^

=^4

x^ +^ 3y^

+^ v^ =^6 x^ ≥^ 0,^ y^

≥^ 0,^ u^ ≥^

0,^ v^ ≥^0

Standard

Form:

Example

maximize:

3x

+^ 5y^ +^ 0u

+^ 0v

constraints:

x^ +

y^ +^ u^

=^4

x^ +^ 3y^

+^ v^ =^6 x^ ≥^ 0,^ y^

≥^ 0,^ u^ ≥^

0,^ v^ ≥^0

[^

] 005

(^3) = c

x ⎤⎡ ⎥⎢ y ⎥⎢= x ⎥⎢ u^ ⎥⎢ v ⎦⎣

4 ⎤⎡ = (^) b ⎥⎢ 6 ⎦⎣ ⎤ ⎥ ⎦ ⎡ = ⎢ ⎣

(^103) 1

(^011) (^1) A

Basic^

Feasible

Solution

Example

maximize:

3x^ +^ 5y

+^ 0u^ +^ 0v constraints:

x^ +^ y^ +^

u^ =^4 x + 3y +^ v^ =^6 x ≥ 0, y ≥^ 0,^ u^ ≥^ 0,

v^ ≥^0

set^ x^ =^ 0,

y^ =^0 to

get u^ =^4 v^ =^6 which^ is^ an^ extreme

point^

0 ⎤⎡ ⎥⎢ 0 ⎥⎢= x ⎥⎢ 4 ⎥⎢ 6 ⎦⎣

Simplex

Tableau

-^ We’ll^

represent

each^ point

in^ the^ problem

using^ following

form:x y^

u^ v u^1

1

1 0

4

v^1

3

0 1

6 ‐^3 ‐ 5 0 0

0

A

-1 * c

currentpoint value of obj.function at point

basicvariables