kramer’s (a.k.a cramer’s) rule

15
Kramer’s (a.k.a Cramer’s) Rule Component j of x = A -1 b is Form B j by replacing column j of A with b. a b a a a b a a B A B x nn n n n n ij j j j 2 1 1 1 12 , det det

Upload: kamala

Post on 05-Jan-2016

24 views

Category:

Documents


2 download

DESCRIPTION

Kramer’s (a.k.a Cramer’s) Rule. Component j of x = A -1 b is Form B j by replacing column j of A with b. Total Unimodularity. A square, integer matrix B is unimodular (UM) if its determinant is 1 or -1. - PowerPoint PPT Presentation

TRANSCRIPT

Page 1: Kramer’s (a.k.a Cramer’s) Rule

Kramer’s (a.k.a Cramer’s) Rule

• Component j of

x = A-1b is

• Form Bj by replacing column j of A with b.

abaa

abaaBA

Bx

nnnnn

nij

j

j

j

21

1112

,det

det

Page 2: Kramer’s (a.k.a Cramer’s) Rule

Total Unimodularity• A square, integer matrix B is unimodular

(UM) if its determinant is 1 or -1.• An integer matrix A is called totally

unimodular (TUM) if every square, nonsingular submatrix of A is UM.

• From Cramer’s rule, it follows that if A is TUM and b is an integer vector, then every BFS of the constraint system Ax = b is integer.

Page 3: Kramer’s (a.k.a Cramer’s) Rule

TUM Theorem• An integer matrix A is TUM if

– All entries are -1, 0 or 1– At most two non-zero entries appear in any column– The rows of A can be partitioned into two disjoint sets

such that• If a column has two entries of the same sign, their rows are

in different sets.

• If a column has two entries of different signs, their rows are in the same set.

• The MCNFP constraint matrices are TUM.

Page 4: Kramer’s (a.k.a Cramer’s) Rule

General Form of the MCNF Problem

Aji

Vi

uxlbxx

xc

ijijij

iAijj

jiAjij

ij

Ajiijij

),(

st

min

),|(),|(

),(

Page 5: Kramer’s (a.k.a Cramer’s) Rule

1

2

3

110

011

101312312

A

x xxxFlow Balance Constraint Matrix

100000100

010000010

001000001

000100100

000010010

000001001

C

Capacity Constraints

0

x

l

u

e

s

x

C

bAxConstraints in Standard Form

Page 6: Kramer’s (a.k.a Cramer’s) Rule

Shortest Path Problems• Defined on a Network

– Nodes, Arcs and Arc Costs– Two Special Nodes

• Origin Node s• Destination Node t

• A path from s to t is an alternating sequence of nodes and arcs starting at s and ending at t:

s,(s,v1),v1,(v1,v2),…,(vi,vj),vj,(vj,t),t

Page 7: Kramer’s (a.k.a Cramer’s) Rule

1 2 3

4

5 10

7 71

s=1, t=3

1,(1,2),2,(2,3),3 Length = 151,(1,2),2,(2,4),4,(4,3) Length = 131,(1,4),4,(4,3),3 Length = 14

We Want a Minimum Length Path From s to t.

Page 8: Kramer’s (a.k.a Cramer’s) Rule

Maximizing Rent Example

• Optimally Select Non-Overlapping Bids for 10 periods Arrive Day Depart Day Bid ($)

1 2 2

1 5 7

2 4 2

3 7 1

3 8 11

4 5 1

4 6 6

5 6 3

5 9 7

7 8 4

7 9 5

8 10 3

Page 9: Kramer’s (a.k.a Cramer’s) Rule

d1 d2-2

d3 d4 d5 d6 d7 d8

d9

d10-7

-2

-1

-11

-1

-6

0 0-3

-7

0 -4-5

-3

s

t

Shortest Path Formulation

Page 10: Kramer’s (a.k.a Cramer’s) Rule

MCNF Formulation of Shortest Path Problems

• Origin Node s has a supply of 1

• Destination Node t has a demand of 1

• All other Nodes are Transshipment Nodes

• Each Arc has Capacity 1

• Tracing A Unit of Flow from s to t gives a Path from s to t

Page 11: Kramer’s (a.k.a Cramer’s) Rule

Maximum Flow Problems

• Defined on a Network– Source Node s– Sink Node t– All Other Nodes are Transshipment Nodes– Arcs have Capacities, but no Costs

• Maximize the Flow from s to t

Page 12: Kramer’s (a.k.a Cramer’s) Rule

Example: Rerouting Airline Passengers

Due to a mechanical problem, Fly-By-Night Airlines had to cancel flight 162 - its only non-stop flight from San Francisco to New York. The table below shows the number of seats available on Fly-By-Night's other flights.

Flight From To Number of seats160 San Francisco Denver 5115 San Francisco Houston 6153 Denver Atlanta 4102 Denver Chicago 2170 Houston Atlanta 5150 Atlanta New York 7180 Chicago New York 4

Page 13: Kramer’s (a.k.a Cramer’s) Rule

Formulate a maximum flow problem that will tell Fly-By-Nighthow to reroute as many passengers from San Francisco to New York as possible.

SF

D

H

C

A

NY

5

6

2

4

5

4

7

SF

D

H

C

A

NY

(4,5)(2,2)

(2,4)

(5,5)

(2,4)

(7,7)

Max Flow from SF to NY= 2+2+5=9

(flow, capacity)

(5,6)

Page 14: Kramer’s (a.k.a Cramer’s) Rule

MCNF Formulation of Maximum Flow Problems

• Let Arc Cost = 0 for all Arcs

• Add an infinite capacity arc from t to s– Give this arc a cost of -1

Page 15: Kramer’s (a.k.a Cramer’s) Rule

Maximum-Flow Minimum-Cut Theorem

• Removing arcs (D,C) and (A,NY) cuts off SF from NY.

• The set of arcs{(D,C), (A,NY)} is an s-t cut with capacity 2+7=9.

• The value of a maximum s-t flow = the capacity of a minimum s-t cut.

SF

D

H

C

A

NY

5

6

2

4

5

4

7

SF

D

H

C

A

NY

5

64

5

4