lecture_15

# lecture_15 - Edmond Karp Algorithm Identical structure as...

This preview shows pages 1–7. Sign up to view the full content.

Identical structure as the Ford and Fulkerson algorithm. Start with zero flow f (i.e., f(u,v)=0 for all (u,v) E). Repeat b Construct the residual network G f with forward & backward edges. b Find a path p with residual capacity rc from s to t in G f b If no such path exists, return f as the maximum flow . b Otherwise, augment the flow f with respect to p and rc. The only difference is how to find the augmentation path (from s to t) in a residual network G f . Always use breadth first search . The path found contains the fewest edges among all paths from s to t in G f . Time complexity: distance lemma + critical edge lemma shortest

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
Breadth first search How to find the augmentation path (from s to t) in a residual network G f . Always use breadth first search starting from s . Note that the residual capacities are not considered in the process. s FS: The path found by BFS from a vertex u to a vertex v (including T) contains the shortest (fewest edges) among all paths from s to v in G f . Time complexity: distance lemma + critical edge lemma BFS: Explore a node‘s unvisited neighbors before moving to another node. Shortest distance from s =1 Shortest distance from s =2
Background: Forward and backward edges Suppose G contains an edge e = (u,v) with capacity c(e). In any residual network G f , s the forward edge (u,v) has zero capacity then the backward edge (v,u) has capacity = c(e); s the backward edge (v,u) has zero capacity then the forward edge (u,v) has capacity = c(e). s t u v x c(e)- x Residual network G f s t u v x / c(e) G

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
Edges may disappear after augmentation. s t u v x c(e)- x Residual network G f Augmenting path P If rc( P ) = rc( (u,v) ) = x, then augmenting f with P will give a new residual network with rc( (u,v) ) = 0, i.e., (u,v) will disappear. s t u v x-x =0 c(e)- x + x = c(e) f’ = f plus P. G f’
Distance Lemma Intuitively , w.r.t. the residual networks computed after each augmentation, the shortest path from s to any particular vertex is gradually getting longer and longer. Notations . s The EK algorithm repeatedly finds augmenting paths and s--v s-----v G f G f’ s---------- v G f’’ better flows f 0 (empty flow), f 1 , f 2 , , f i , s For each such flow f i , consider the corresponding residual network G f i , let d f i (u,v) be the distance = smallest number of edges on a path from u to v. Lemma . Consider any f i and f i+1 . For any vertex v, d f i+1 (s,v) d f i (s,v).

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
Distance Lemma . d f i+1 (s,v) d f i (s,v). List the vertexes v in ascending order of d f i+1 (s,v). We prove the distance lemma by
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

### Page1 / 29

lecture_15 - Edmond Karp Algorithm Identical structure as...

This preview shows document pages 1 - 7. Sign up to view the full document.

View Full Document
Ask a homework question - tutors are online