engm 631 maximum flow solutions. maximum flow models (flow, capacity) (0,3) (2,2) (5,7) (0,8)...

27
ENGM 631 Maximum Flow Solutions

Upload: calvin-peters

Post on 20-Jan-2018

228 views

Category:

Documents


0 download

DESCRIPTION

Maximum Flow Models (Flow, Capacity) [External Flow] (0,3) (2,2) (5,7) (0,8) (3,6) (6,8) (3,3) (4,4) (4,10) Maximal Flow 1.Capacity is only relevant parameter. 2.Find maximal flow from source to sink. S S [M] [-M]

TRANSCRIPT

Page 1: ENGM 631 Maximum Flow Solutions. Maximum Flow Models (Flow, Capacity) (0,3) (2,2) (5,7) (0,8) (3,6)…

ENGM 631

Maximum Flow Solutions

Page 2: ENGM 631 Maximum Flow Solutions. Maximum Flow Models (Flow, Capacity) (0,3) (2,2) (5,7) (0,8) (3,6)…

Maximum Flow Models(Flow, Capacity)

(0,3

)

(2,2)(5,7)

(0,8

)

(3,6)

1

2

3

4

5

6

(6,8)

(3,3)

(4,4)

(4,10)

Page 3: ENGM 631 Maximum Flow Solutions. Maximum Flow Models (Flow, Capacity) (0,3) (2,2) (5,7) (0,8) (3,6)…

Maximum Flow Models(Flow, Capacity)[External Flow]

(0,3

)

(2,2)(5,7)

(0,8

)

(3,6)

1

2

3

4

5

6

(6,8)

(3,3)

(4,4)

(4,10)

Maximal Flow1. Capacity is only relevant

parameter.2. Find maximal flow from

source to sink.

S S

[M] [-M]

Page 4: ENGM 631 Maximum Flow Solutions. Maximum Flow Models (Flow, Capacity) (0,3) (2,2) (5,7) (0,8) (3,6)…

Maximum Flow 1. Find a flow augmenting path defined by a sequence of arcs P

=(k1, k2,.v.v.vkp) 2. Determine the maximum flow increase along the path

3. Change the flow in the arcs on the path

4. Repeat until no flow augmenting paths can be found

),:(minmin

),:min(

Pkkx

Pkkxu

k

kk

0

0

kk xx'

Page 5: ENGM 631 Maximum Flow Solutions. Maximum Flow Models (Flow, Capacity) (0,3) (2,2) (5,7) (0,8) (3,6)…

Maximum Flow

1. Find an augmenting path2. Determine the maximum flow augmentation

possible3. Augment flow by that amount

Page 6: ENGM 631 Maximum Flow Solutions. Maximum Flow Models (Flow, Capacity) (0,3) (2,2) (5,7) (0,8) (3,6)…

Maximum Flow Models(Flow, Capacity)

(0,3

)

(0,2)(0,7)

(0,8

)

(0,6)

1

2

3

4

5

6

(0,8)

(0,3)

(0,4)

(0,10)

Find a path top to bottom that has Additional capacity. Increase flow to Available capacity

Page 7: ENGM 631 Maximum Flow Solutions. Maximum Flow Models (Flow, Capacity) (0,3) (2,2) (5,7) (0,8) (3,6)…

Augmented Path(Flow, Capacity)

(0,3

)

(0,2)(0,7)

(0,8

)

(0,6)

1

2

3

4

5

6

(4,8)

(0,3)

(4,4)

(4,10)

(4) (4)

Page 8: ENGM 631 Maximum Flow Solutions. Maximum Flow Models (Flow, Capacity) (0,3) (2,2) (5,7) (0,8) (3,6)…

Augmented Path(Flow, Capacity)

(0,3

)

(0,2)(0,7)

(0,8

)

(0,6)

1

2

3

4

5

6

(4,8)

(0,3)

(4,4)

(4,10)

(4) (4)

Page 9: ENGM 631 Maximum Flow Solutions. Maximum Flow Models (Flow, Capacity) (0,3) (2,2) (5,7) (0,8) (3,6)…

Augmented Path(Flow, Capacity)

(0,3

)

(0,2)(0,7)

(0,8

)

(0,6)

1

2

3

4

5

6

(4,8)

(0,3)

(4,4)

(4,10)

(4) (6)

Page 10: ENGM 631 Maximum Flow Solutions. Maximum Flow Models (Flow, Capacity) (0,3) (2,2) (5,7) (0,8) (3,6)…

Augmented Path(Flow, Capacity)

(0,3

)

(2,2)(0,7)

(0,8

)

(0,6)

1

2

3

4

5

6

(6,8)

(0,3)

(4,4)

(4,10)

(6) (4)

Page 11: ENGM 631 Maximum Flow Solutions. Maximum Flow Models (Flow, Capacity) (0,3) (2,2) (5,7) (0,8) (3,6)…

Augmented Path(Flow, Capacity)

(0,3

)

(2,2)(0,7)

(0,8

)

(0,6)

1

2

3

4

5

6

(6,8)

(0,3)

(4,4)

(4,10)

(6) (4)

Page 12: ENGM 631 Maximum Flow Solutions. Maximum Flow Models (Flow, Capacity) (0,3) (2,2) (5,7) (0,8) (3,6)…

Augmented Path(Flow, Capacity)

(0,3

)

(2,2)(0,7)

(0,8

)

(0,6)

1

2

3

4

5

6

(6,8)

(0,3)

(4,4)

(4,10)

(6) (4)

Page 13: ENGM 631 Maximum Flow Solutions. Maximum Flow Models (Flow, Capacity) (0,3) (2,2) (5,7) (0,8) (3,6)…

Augmented Path(Flow, Capacity)

(0,3

)

(2,2)(0,7)

(0,8

)

(0,6)

1

2

3

4

5

6

(6,8)

(0,3)

(4,4)

(4,10)

(6) (4)

Page 14: ENGM 631 Maximum Flow Solutions. Maximum Flow Models (Flow, Capacity) (0,3) (2,2) (5,7) (0,8) (3,6)…

Augmented Path(Flow, Capacity)

(0,3

)

(2,2)(3,7)

(0,8

)

(3,6)

1

2

3

4

5

6

(6,8)

(3,3)

(4,4)

(4,10)

(9) (9)

Page 15: ENGM 631 Maximum Flow Solutions. Maximum Flow Models (Flow, Capacity) (0,3) (2,2) (5,7) (0,8) (3,6)…

Augmented Path(Flow, Capacity)

(0,3

)

(2,2)(3,7)

(0,8

)

(3,6)

1

2

3

4

5

6

(6,8)

(3,3)

(4,4)

(4,10)

Arc 2-4 at capacity

(9) (9)

Page 16: ENGM 631 Maximum Flow Solutions. Maximum Flow Models (Flow, Capacity) (0,3) (2,2) (5,7) (0,8) (3,6)…

Augmented Path(Flow, Capacity)

(0,3

)

(2,2)(3,7)

(0,8

)

(3,6)

1

2

3

4

5

6

(6,8)

(3,3)

(4,4)

(4,10)

Arc 2-4 at capacityArc 2-5 at capacity

(9) (9)

Page 17: ENGM 631 Maximum Flow Solutions. Maximum Flow Models (Flow, Capacity) (0,3) (2,2) (5,7) (0,8) (3,6)…

Augmented Path(Flow, Capacity)

(0,3

)

(2,2)(3,7)

(0,8

)

(3,6)

1

2

3

4

5

6

(6,8)

(3,3)

(4,4)

(4,10)

Arc 2-4 at capacityArc 2-5 at capacityArc 3-5 at capacity

(9) (9)

Page 18: ENGM 631 Maximum Flow Solutions. Maximum Flow Models (Flow, Capacity) (0,3) (2,2) (5,7) (0,8) (3,6)…

Augmented Path(Flow, Capacity)

(0,3

)

(2,2)(3,7)

(0,8

)

(3,6)

1

2

3

4

5

6

(6,8)

(3,3)

(4,4)

(4,10)

(9) (9)

No other path exists start to end that has additional capacity

Page 19: ENGM 631 Maximum Flow Solutions. Maximum Flow Models (Flow, Capacity) (0,3) (2,2) (5,7) (0,8) (3,6)…

Augmented Path(Flow, Capacity)

(0,3

)

(2,2)(3,7)

(0,8

)

(3,6)

1

2

3

4

5

6

(6,8)

(3,3)

(4,4)

(4,10)

(9) (9)

Page 20: ENGM 631 Maximum Flow Solutions. Maximum Flow Models (Flow, Capacity) (0,3) (2,2) (5,7) (0,8) (3,6)…

Minimum Cut Algorithm

1. Find all possible cuts source to sink 2. Find the cut that has minimal capacity 3. Minimal capacity cut = maximum flow

Page 21: ENGM 631 Maximum Flow Solutions. Maximum Flow Models (Flow, Capacity) (0,3) (2,2) (5,7) (0,8) (3,6)…

(Flow, Capacity)

(0,3

)

(2,2)(5,7)

(0,8

)

(3,6)

1

2

3

4

5

6

(6,8)

(3,3)

(4,4)

(4,10)

(Capacity = 14)

Minimum Cut Algorithm

Page 22: ENGM 631 Maximum Flow Solutions. Maximum Flow Models (Flow, Capacity) (0,3) (2,2) (5,7) (0,8) (3,6)…

(Flow, Capacity)

(0,3

)

(2,2)(5,7)

(0,8

)

(3,6)

1

2

3

4

5

6

(6,8)

(3,3)

(4,4)

(4,10)

(Capacity = 11)

Minimum Cut Algorithm

Page 23: ENGM 631 Maximum Flow Solutions. Maximum Flow Models (Flow, Capacity) (0,3) (2,2) (5,7) (0,8) (3,6)…

(Flow, Capacity)

(0,3

)

(2,2)(5,7)

(0,8

)

(3,6)

1

2

3

4

5

6

(6,8)

(3,3)

(4,4)

(4,10)

(Capacity = 11)

Minimum Cut Algorithm

Page 24: ENGM 631 Maximum Flow Solutions. Maximum Flow Models (Flow, Capacity) (0,3) (2,2) (5,7) (0,8) (3,6)…

(Flow, Capacity)

(0,3

)

(2,2)(5,7)

(0,8

)

(3,6)

1

2

3

4

5

6

(6,8)

(3,3)

(4,4)

(4,10)

(Capacity = 11)

Minimum Cut Algorithm

Page 25: ENGM 631 Maximum Flow Solutions. Maximum Flow Models (Flow, Capacity) (0,3) (2,2) (5,7) (0,8) (3,6)…

(Flow, Capacity)

(0,3

)

(2,2)(5,7)

(0,8

)

(3,6)

1

2

3

4

5

6

(6,8)

(3,3)

(4,4)

(4,10)

(Capacity = 17)

Minimum Cut Algorithm

Page 26: ENGM 631 Maximum Flow Solutions. Maximum Flow Models (Flow, Capacity) (0,3) (2,2) (5,7) (0,8) (3,6)…

Maximum Flow Models(Flow, Capacity)

(0,3

)

(2,2)(5,7)

(0,8

)

(3,6)

1

2

3

4

5

6

(6,8)

(3,3)

(4,4)

(4,10)

(Capacity = 9)

Page 27: ENGM 631 Maximum Flow Solutions. Maximum Flow Models (Flow, Capacity) (0,3) (2,2) (5,7) (0,8) (3,6)…

Maximum Flow Models(Flow, Capacity)

(0,3

)

(2,2)(5,7)

(0,8

)

(3,6)

1

2

3

4

5

6

(6,8)

(3,3)

(4,4)

(4,10)

(Capacity = 9)