DOC PREVIEW
UT Dallas CS 6363 - lec12

This preview shows page 1-2-3 out of 8 pages.

Save
View full document
Premium Document
Do you want full access? Go Premium and unlock all 8 pages.
Access to all documents
Download any document
Ad free experience

Unformatted text preview:

Lecture 12 0 0 1 Graph Algorithms Maximum Flow Chapter 26 Given a directed graph G V E in which each edge u v E has a capacity c u v 0 If u v E we assume that c u v 0 We also distinguish two vertices s origin source and t destination sink A flow in G is a function f V V R that satisfies the following three properties Capacity Constraint f u v c u v u v V Skew symmetry f v Pu f u v u v V Flow conservation v V f u v 0 u V s t f u v Pis called the net flow from u to v The value of f denoted by f is equal to v V f s v In the maximum flow problem we want the flow f with maximum f For example consider the following problem 12 a c 20 9 t 7 s 4 10 16 13 4 b 14 d The following is a flow 4 9 8 13 c 15 20 t 7 7 1 4 10 s 12 12 a 11 16 4 4 b 11 14 The value of this flow is 19 1 d Cancellation Consider the following diagram b b 10 2 4 a 4 5 10 8 10 b a 3 4 a 4 8 10 a 4 10 a b b In the first diagram we have the capacities the second has a flow of 8 from a to b the third has an additional flow of 3 from b to a cancelling the flow in both directions gives us the next diagram with 5 from a to b and none in the other direction Finally an additional flow of 7 from b to a cancels the previous flow and introduces a flow of 2 from b to a Because of this we define the concept of residual capacity as follows cf u v c u v f u v The residual capacity for the above case would look like b b b 2 12 a 9 5 a 9 2 b 5 a 12 a 4 10 a b And a residual network as follows Given a flow network G V E c E R and a flow f the residual network Gf V Ef where Ef u v V V cf u v 0 Please note that Ef may contain edges not present in E The main step of the algorithm is to find a directed path from s to t in Gf called an augmenting path and saturate it To saturate a path P we add a flow equal to min u v P cf u v along the path This step is repeated until there is no such path Please note that after any flow change 2 you must redefine the residual network We show all this by an example below 12 a c 20 t 7 s 4 10 16 9 13 4 t 7 9 4 12 a 4 c 8 7 t s 14 12 a 4 d c 9 8 9 t 7 12 a s 9 4 7 9 12 t 4 b d 7 10 c 1 12 12 a 12 16 c 19 20 2 9 11 13 d 3 t 7 7 7 s 4 11 b t 4 4 9 11 10 19 10 12 s 7 8 4 d a c 12 10 4 d 4 14 4 4 b t 12 10 4 9 4 8 4 4 b 4 12 10 12 c 12 4 13 4 b 12 12 10 4 10 13 d 14 a 4 12 9 s 4 b 12 s 13 d 14 t 7 b 12 20 7 7 13 s c 4 9 10 4 10 s 12 12 a 12 16 20 7 c 16 4 12 a d 14 4 b 4 4 b 11 14 d Residual networks are on the left column and flows on the right The last step does not have a path in the residual network The solution at this time is optimal The path is the residual network is found using BFS and BFS is shown 3 below B S 1 E B 2 G D C F H B 2 E G S 1 S 1 D C 2 B 2 S 1 I F H E 3 G B 2 S 1 I F H E 3 G B 2 S 1 I F 3 H E 3 G 4 B 2 S 1 I F 3 H 4 E 3 G 4 C E S 1 Q E D B 2 F Q D F G Q F G H 4 E 3 G 4 F 3 H 4 E 3 G 4 D 3 C 2 H F 3 D 3 S 1 I F 3 Q B 2 D 3 C 2 C 2 C S 1 D 3 C 2 B C 2 D 3 C 2 Q G 4 D 3 B 2 D C 2 E 3 I F 3 H 4 E 3 G 4 D 3 I Q G H I 5 Q H I I 5 Q I I 5 Q is empty H C 2 H 4 F 3 H 4 Proofs P Let f X Y u X f u v Then it is easy to show v Y f X X f X Y f X Y Z f Z X Y 0 X V f Y X X Y V f X Z f Y Z X Y Z V X Y f Z X f Z Y X Y Z V X Y Using this it is easy to show that f f s V f V t Lemma 1 Let f be a flow in G V E from s to t Let f 0 be a flow in the residual network Gf induced by f Then f f 0 is a flow in G with a value f f 0 f f 0 4 Proof f f 0 u v f u v f 0 u v f v u f 0 v u f v u f 0 v u f f 0 u v f f 0 u v f u v f 0 u v f u v cf u v f u v c u v since f 0 u v cf u v c u v f u v For all u V s t X X X f f 0 u v f u v f 0 u v v V v V v V 0 0 0 Finally f f 0 X f f 0 s v v V X f s v v V X f 0 s v v V 0 f f A cut S V S separates s and t if s S and t V S If we let T V S the capacity of the cut S T is c S T Recall by our notation X c S T c u v …


View Full Document

UT Dallas CS 6363 - lec12

Documents in this Course
Exam #1

Exam #1

5 pages

lec4

lec4

5 pages

lec3

lec3

5 pages

lec1

lec1

3 pages

lec14

lec14

11 pages

lec13

lec13

22 pages

lec11

lec11

3 pages

lec10new

lec10new

11 pages

lec9

lec9

13 pages

lec8

lec8

9 pages

lec7

lec7

10 pages

lec6

lec6

8 pages

lec7

lec7

10 pages

lec6

lec6

8 pages

lec4

lec4

5 pages

lec3

lec3

5 pages

lec1

lec1

3 pages

lec14

lec14

11 pages

lec13

lec13

22 pages

lec12

lec12

8 pages

lec11

lec11

3 pages

lec10new

lec10new

11 pages

lec9

lec9

13 pages

lec8

lec8

9 pages

lec4

lec4

5 pages

lec3

lec3

5 pages

lec1

lec1

3 pages

lec14

lec14

11 pages

lec13

lec13

22 pages

lec12

lec12

8 pages

lec11

lec11

3 pages

lec10new

lec10new

11 pages

lec9

lec9

13 pages

lec8

lec8

9 pages

lec7

lec7

10 pages

lec6

lec6

8 pages

lec14

lec14

11 pages

lec13

lec13

22 pages

lec12

lec12

8 pages

lec11

lec11

3 pages

lec10new

lec10new

11 pages

lec9

lec9

13 pages

lec8

lec8

9 pages

lec7

lec7

10 pages

lec6

lec6

8 pages

lec4

lec4

5 pages

lec3

lec3

5 pages

lec1

lec1

3 pages

greedy

greedy

4 pages

siphon

siphon

18 pages

hwk5

hwk5

3 pages

Load more
Loading Unlocking...
Login

Join to view lec12 and access 3M+ class-specific study document.

or
We will never post anything without your permission.
Don't have an account?
Sign Up

Join to view lec12 and access 3M+ class-specific study document.

or

By creating an account you agree to our Privacy Policy and Terms Of Use

Already a member?