51
Lectures 18-19 Linear Programming

Lectures 18-19 Linear Programming. Preparation Linear Algebra

Embed Size (px)

Citation preview

Page 1: Lectures 18-19 Linear Programming. Preparation Linear Algebra

Lectures 18-19

Linear Programming

Page 2: Lectures 18-19 Linear Programming. Preparation Linear Algebra

Preparation

Linear Algebra

Page 3: Lectures 18-19 Linear Programming. Preparation Linear Algebra

Linearly Independent

.0 such that

0, toequal allnot ,,...,, scalersexist there

ifdependent linearly are ,...,, Vectors

.0 0

ift independenlinearly are ,...,, Vectors

2211

21

21

212211

21

nn

n

n

nnn

n

aaa

aaa

aaa

aaa

Page 4: Lectures 18-19 Linear Programming. Preparation Linear Algebra

Maximal Independent Subset

.

i.e., set,t independen maximal

ain vectorsofn combinatiolinearly a is or Every vect

y.cardinalit same thehave subsetst independen maximal All

subset.t independenlinearly another of

subset proper anot isit andt independenlinearly isit if

subsett independen maximal a called is },...,,{

subset A }.,...,,{ vectors,ofset aConsider

21

21

21

21

k

k

ikiii

i

iii

n

aaaa

a

aaa

aaa

Page 5: Lectures 18-19 Linear Programming. Preparation Linear Algebra

Rank of Matrix

| vectorsrow ofsubset t independen maximal|

|torscolumn vec ofsubset t independen maximal|)(rank

.matrix aConsider

A

A

Page 6: Lectures 18-19 Linear Programming. Preparation Linear Algebra

Linear Programming

Page 7: Lectures 18-19 Linear Programming. Preparation Linear Algebra
Page 8: Lectures 18-19 Linear Programming. Preparation Linear Algebra
Page 9: Lectures 18-19 Linear Programming. Preparation Linear Algebra
Page 10: Lectures 18-19 Linear Programming. Preparation Linear Algebra
Page 11: Lectures 18-19 Linear Programming. Preparation Linear Algebra
Page 12: Lectures 18-19 Linear Programming. Preparation Linear Algebra
Page 13: Lectures 18-19 Linear Programming. Preparation Linear Algebra

LP examples

• A post office requires different numbers of full-time employees on different days of the week. The number of full-time employees required on each day is given in the table. Union rules state that each full-time employee must work five consecutive days and then receive two days off. The post office wants to meet its daily requirements using only full-time employees. Formulate an LP that the post office can use to minimize the number of full-time employees that must be hired.

Page 14: Lectures 18-19 Linear Programming. Preparation Linear Algebra
Page 15: Lectures 18-19 Linear Programming. Preparation Linear Algebra
Page 16: Lectures 18-19 Linear Programming. Preparation Linear Algebra
Page 17: Lectures 18-19 Linear Programming. Preparation Linear Algebra
Page 18: Lectures 18-19 Linear Programming. Preparation Linear Algebra
Page 19: Lectures 18-19 Linear Programming. Preparation Linear Algebra
Page 20: Lectures 18-19 Linear Programming. Preparation Linear Algebra
Page 21: Lectures 18-19 Linear Programming. Preparation Linear Algebra
Page 22: Lectures 18-19 Linear Programming. Preparation Linear Algebra

6032 yx

yxz 54

Feasible domain

Optimal occurs at a vertex!!!

Page 23: Lectures 18-19 Linear Programming. Preparation Linear Algebra

.0,0,0

6032 s.t.

54 max

wyx

wyx

yxz

Slack Form

.)(rank

.0

s.t.

max

mA

x

bAx

cxz

Page 24: Lectures 18-19 Linear Programming. Preparation Linear Algebra

What’s a vertex?

. ,),(2

1

if

vertexa called is polyhadren ain point A

zyxzyzyx

x

Page 25: Lectures 18-19 Linear Programming. Preparation Linear Algebra

. of sin vertice found becan it then

solution, optimalan has over max If

.}0|{Let

xcx

Ax = b, xx =

Fundamental Theorem

Page 26: Lectures 18-19 Linear Programming. Preparation Linear Algebra

.constraint oneleast at violates' is, that ,in not

'point a havemust line theThus, line.any contain not

does However, solutions. optimal are *)( line

on points feasible all that followsIt solutions. optimal

also are and that means This .

havemust we2,)( and ,

,* Since distinct. are ,*, and 2/)(*

such that ,exist thereis, that not, is * suppose

on,contraditiBy . of vertex a is * that show willWe

solutions. optimal all among components zero of

number maximum with *solution optimalan Consider

x

x

y-xx*+

zy czcx* = cy =

/cy+czcx* = czcx*

cycxzyxzyx

zyx

x

x

Proof.

Page 27: Lectures 18-19 Linear Programming. Preparation Linear Algebra

ion.contradict a

,*than component -zero more one has which ,* and

'between solution optimalan findeasily can weNow,

.0 with somefor 0 constraint a violate

must ' Hence, 0. constraint latecannot vio '

that means This .any for 0 toequal is *)( of

component th theTherefore, .0* havemust

we,0 and 2/)( since ,0for

Moreover, . constraint latecannot vio ' Thus,

.*))(( ,any for that Note

xx

x

*>xjx

xxx

y-xx*+

i==x=yz

,zy+zy*=x* =x

Ax = bx

= by-xx*+A

jj

i

iii

iiiiii

Proof (cont’s).

Page 28: Lectures 18-19 Linear Programming. Preparation Linear Algebra

t.independenlinearly

are 0 with 1for all if

only and if vertex a is point feasible a

Then . ofcolumn th thedenote Let

jj

j

xnja

x

Aja

Characterization of Vertex

Page 29: Lectures 18-19 Linear Programming. Preparation Linear Algebra

Proof

.2

and ,

0, smallly sufficientfor and 0Then

.0 if 0

0 if

settingby )( Define zero. are

allnot and 0such that 0 with for

exists e then thert,independenlinearly not are 0for If

}.0|{set index by determineduniquely are

then t,independenlinearly are 0for If

0

zyxdxzdxy

d

x

xd

dd

axj

xa

xjx

xa

j

jjj

j

x jjjjj

jj

jj

jj

j

Page 30: Lectures 18-19 Linear Programming. Preparation Linear Algebra

Basic Feasible Solution

0. and

|| = m = )(rank ifonly and if basis feasible

a is subset index an Then .)( Denote

0}.|{such that solution

feasible basic a exists thereif feasible is basisA

basis. a called torscolumn vec of

subsett independen maximum a ofset index The

solution. feasible basic a called also isA vertex

1

bA

IA

II, ja=A

xjIx

I

I

jI

j

Page 31: Lectures 18-19 Linear Programming. Preparation Linear Algebra

Optimality Condition

condition.acy nondegenerunder

0

ifonly and if optimal is Moreover,

}.|{ where

0 and with solution feasible

basic a with associated is basis feasibleEach

1

1

IIII

III

AAcc

x

IjjI

xbAxx

I

Page 32: Lectures 18-19 Linear Programming. Preparation Linear Algebra

Degeneracy Condition

.0 , basis feasibleevery For 1 bAI I

Page 33: Lectures 18-19 Linear Programming. Preparation Linear Algebra

Sufficiency

.0at maximum the

reaches ,0 and 0 Since

)(1

11

11

I

IIIII

IIIIIIIIIII

IIIII

IIII

x

cxxAAcc

xAAccbAcxcxccx

xAAbAx

bxAxA

bAx

Page 34: Lectures 18-19 Linear Programming. Preparation Linear Algebra

Necessary

.,...,2,1 allfor 0 1. Case

.' and )( Denote

optimal.not is 0

thatshow We.0' ,* somefor Assume

.' Denote

*

11

1

*

1

mia

bAbAAa

bA

x

xx

cIj

AAccc

ij

IIij

I

I

I

j

IIIII

Page 35: Lectures 18-19 Linear Programming. Preparation Linear Algebra

solution. optimal

an givenot do and 0 So,

. asinfinity togoes aluefunction v

object theHence, solution. feasible a is

1 and if '

* if

* and if 0

0,any for Then

.,...,2,1 allfor 0 1. Case

1

*

)(

*

bAxx

aIjab

jj

jjIj

x

mia

III

ijiji

j

ij

Page 36: Lectures 18-19 Linear Programming. Preparation Linear Algebra

.assumptionacy nondegenerby 0' since

''

aluefunction vobject ofsolution

feasible basic with basis feasible new a is 'Then

*}.{})'{\('Set

.1 with 'Let

. 0 |'

min'

such that * Choose

.,...,2,1 somefor 0 2. Case

*

**

**

1

'*

****

*

*

i

Iji

ijII

ji

ijij

i

ji

i

ij

b

bca

bcbAc

I

jjII

aIj

aa

b

a

b

i

mia

(pivoting)

Page 37: Lectures 18-19 Linear Programming. Preparation Linear Algebra

Simplex Method

method.

simplex called g,propromminlinear thesolve

tomethod a givesy necessarit of proof The

Page 38: Lectures 18-19 Linear Programming. Preparation Linear Algebra

Simplex Table

1 2 1 4 36

1 5 2 2 24

1 3 1 1 30

2 1 3

0,,,,,

3624

24522

303 s.t.

23 max

654321

6321

5321

4321

321

z

xxxxxx

xxxx

xxxx

xxxx

xxxz

Page 39: Lectures 18-19 Linear Programming. Preparation Linear Algebra

1 2 1 4 36

1 5 2 2 24

1 3 1 1 30

2 1 3

}6,5,4{ 0

z

I

Page 40: Lectures 18-19 Linear Programming. Preparation Linear Algebra

1/4 1/2 1/4 1 9

1 5 2 2 24

1 3 1 1 30

2 1 3

}6,5,4{ 0

z

I

Page 41: Lectures 18-19 Linear Programming. Preparation Linear Algebra

1/4 1/2 1/4 1 9

1/2- 1 4 3/2 0 6

1/4- 1 5/2 3/4 0 21

3/4- 1/2 1/4 0 27-

}5,4,1{ 1

z

I

Page 42: Lectures 18-19 Linear Programming. Preparation Linear Algebra

1/4 1/2 1/4 1 9

1/3- 3/2 8/3 1 0 4

1/4- 1 5/2 3/4 0 21

3/4- 1/2 1/4 0 27-

}2{})5{\}5,4,1({ 2

z

I

Page 43: Lectures 18-19 Linear Programming. Preparation Linear Algebra

1/3 3/8- 1/6- 0 1 8

1/3- 3/2 8/3 1 0 4

0 9/8- 1 1/2 0 0 18

2/3- 3/8- 1/6- 0 0 28-

}2,4,1{ 2

z

I

Page 44: Lectures 18-19 Linear Programming. Preparation Linear Algebra

Puzzle 1

? basis feasible

1st or thesolution feasible basic1st thefind wedo How

Page 45: Lectures 18-19 Linear Programming. Preparation Linear Algebra

Puzzle 2

LP? solve

tohow hold,not does assumptionacy nondegenerWhen

Page 46: Lectures 18-19 Linear Programming. Preparation Linear Algebra

lexicographical ordering

.0 if positivehocally lexicograp is

A vector .1 somefor ...

if , as written ,n larger tha

hicallylexicograp be tosaid is .)...(

and )...,( vectorswoConsider t

1111

21

21

L

iiii

L

n

n

x >x

n i y, x=y, x, =yx

yx >y

x,y,,yyy=

x,,xxx=

Page 47: Lectures 18-19 Linear Programming. Preparation Linear Algebra

Method

positive.hically lexicograp is row topthe

except blesimplex ta initial in the rowevery that makes This

columns. first at the placed is basis feasible initial the

such that columns of ordering therearrange Initially,

m

n

Page 48: Lectures 18-19 Linear Programming. Preparation Linear Algebra

Method(cont’)

pivoting.

under preserved be willrow top theother than rows all of

spositveneshically lexicograp that theguarantees choice This

.0'for )'

' ... ,

'

' ,

'

'( among one

smallesthocally lexicograp theis )'

' ... ,

'

' ,

'

'(such that

choose we, of choiceFor

'''

1

'

''

'

''

1'

''

'

ijij

in

ij

i

ij

i

ji

ni

ji

i

ji

i

aa

a

a

a

a

b

a

a

a

a

a

bi'

i'

Page 49: Lectures 18-19 Linear Programming. Preparation Linear Algebra

Method (cont’)

.0

such that basis feasibleith solution w basic feasible optimalan

findor solution optimal of cenonexisten findseither algorithm theTherefore,

ing.nonincreas is aluefunction v objective theand oncemost at basis feasible

each visit algorithm that theguarantee rules additional above theTherefore,

ordering. hicallexicograpin strictly decreasse top themake pivot will

each positive,hically lexicograp are row top theother than rows all Since

1 AAc - c

I

II

Page 50: Lectures 18-19 Linear Programming. Preparation Linear Algebra

Theorem

optimal. is with associatedsolution feasible

basic then the0, satisfies basis feasible a if Moreove,

0. such that basis

feasible with associatedsolution feasible basic optimalan hasit then

solution, optimalan has gprogramminlinear theIf

. togoes valuemaximum the

then solution, optimal no has gprogramminlinear theIf

1

1

I

AAc - cI

AAc - cI

II

II

Page 51: Lectures 18-19 Linear Programming. Preparation Linear Algebra