Edmunds-Karp Algorithm: Choosing Good Augmenting Paths

Slides:



Advertisements
Similar presentations
Maximum flow Main goals of the lecture:
Advertisements

Bo Hong Electrical and Computer Engineering Department Drexel University
Max Flow: Shortest Augmenting Path
Prof. Swarat Chaudhuri COMP 482: Design and Analysis of Algorithms Spring 2012 Lecture 19.
1 Chapter 7 Network Flow Slides by Kevin Wayne. Copyright © 2005 Pearson-Addison Wesley. All rights reserved.
1 Chapter 7 Network Flow Slides by Kevin Wayne. Copyright © 2005 Pearson-Addison Wesley. All rights reserved.
1 COMMONWEALTH OF AUSTRALIA Copyright Regulations 1969 WARNING This material has been reproduced and communicated to you by or on behalf.
1 Efficient implementation of Dinic’s algorithm for maximum flow.
Advanced Algorithms Piyush Kumar (Lecture 2: Max Flows) Welcome to COT5405 Slides based on Kevin Wayne’s slides.
The max flow problem
1 Efficient implementation of Dinic’s algorithm for maximum flow.
Chapter 26 Maximum Flow How do we transport the maximum amount data from source to sink? Some of these slides are adapted from Lecture Notes of Kevin.
1 COMMONWEALTH OF AUSTRALIA Copyright Regulations 1969 WARNING This material has been reproduced and communicated to you by or on behalf.
Chapter 7 April 28 Network Flow.
Taken from Kevin Wayne’s slides (Princeton University) COSC 3101A - Design and Analysis of Algorithms 13 Maximum Flow.
10/11/10 A. Smith; based on slides by E. Demaine, C. Leiserson, S. Raskhodnikova, K. Wayne Adam Smith Algorithm Design and Analysis L ECTURE 21 Network.
Algorithm Design and Analysis (ADA)
Chapter 7 May 3 Ford-Fulkerson algorithm Step-by-step walk through of an example Worst-case number of augmentations Edmunds-Karp modification Time complexity.
1 EE5900 Advanced Embedded System For Smart Infrastructure Static Scheduling.
Ford-Fulkerson Recap.
Max-flow, Min-cut Network flow.
Submodularity Reading Group Minimum Cut, Dinic’s Algorithm
Algorithm Design and Analysis
Lectures on Network Flows
Algorithms and Networks Hans Bodlaender
COMP 382: Reasoning about Algorithms
Max-flow, Min-cut Network flow.
Network Flow 2016/04/12.
Instructor: Shengyu Zhang
Edmonds-Karp Algorithm
CSE Algorithms Max Flow Problems 11/21/02 CSE Max Flow.
Efficient implementation of Dinic’s algorithm for maximum flow
Chapter 7 Network Flow Slides by Kevin Wayne. Copyright © 2005 Pearson-Addison Wesley. All rights reserved.
Lecture 10 Network flow Max-flow and Min-cut Ford-Fulkerson method
Introduction to Maximum Flows
Analysis of Algorithms
7. Ford-Fulkerson Demo.
7. Ford-Fulkerson Demo.
Correctness of Edmonds-Karp
Richard Anderson Lecture 21 Network Flow
Max Flow Min Cut, Bipartite Matching Yin Tat Lee
Augmenting Path Algorithm
Flow Networks and Bipartite Matching
Primal-Dual Algorithm
Complexity of Ford-Fulkerson
Algorithms (2IL15) – Lecture 7
Chapter 7 Network Flow Slides by Kevin Wayne. Copyright © 2005 Pearson-Addison Wesley. All rights reserved.
EE5900 Advanced Embedded System For Smart Infrastructure
Network Flow.
Lecture 21 Network Flow, Part 1
7. Ford-Fulkerson Demo.
Dinitz's algorithm for finding a maximum flow in a network.
MAXIMUM flow by Eric Wengert.
Augmenting Path Algorithm
and 6.855J The Goldberg-Tarjan Preflow Push Algorithm for the Maximum Flow Problem Obtain a network, and use the same network to illustrate the.
Introduction to Maximum Flows
and 6.855J The Goldberg-Tarjan Preflow Push Algorithm for the Maximum Flow Problem Obtain a network, and use the same network to illustrate the.
7. Edmonds-Karp Algorithm
Maximum Flow Neil Tang 4/8/2008
7. Edmonds-karp Demo.
Maximum flow: The preflow/push method of Goldberg and Tarjan (87)
7. Ford-Fulkerson Demo.
7. Ford-Fulkerson Demo.
7. Ford-Fulkerson Demo.
7. Ford-Fulkerson Demo.
Introduction to Maximum Flows
Network Flow.
7. Ford-Fulkerson Demo.
7. Ford-Fulkerson Demo.
Class 11 Max Flows Obtain a network, and use the same network to illustrate the shortest path problem for communication networks, the max flow.
Presentation transcript:

Edmunds-Karp Algorithm: Choosing Good Augmenting Paths Use care when selecting augmenting paths. Some choices lead to exponential algorithms. Clever choices lead to polynomial algorithms. Goal: choose augmenting paths so that: Can find augmenting paths efficiently. Few iterations. Edmonds-Karp (1972): choose augmenting path with Max bottleneck capacity. (fat path) Sufficiently large capacity. (capacity-scaling) Fewest number of arcs. (shortest path)

Shortest Augmenting Path Intuition: choosing path via breadth first search. Easy to implement. may implement by coincidence! Finds augmenting path with fewest number of arcs. FOREACH e  E f(e)  0 Gf  residual graph WHILE (there exists augmenting path) find such a path P by BFS f  augment(f, P) update Gf RETURN f ShortestAugmentingPath(V, E, s, t)

Shortest Augmenting Path: Overview of Analysis L1. Throughout the algorithm, the length of the shortest path never decreases. Proof ahead. L2. After at most m shortest path augmentations, the length of the shortest augmenting path strictly increases. Theorem. The shortest augmenting path algorithm runs in O(m2n) time. O(m+n) time to find shortest augmenting path via BFS. O(m) augmentations for paths of exactly k arcs. If there is an augmenting path, there is a simple one.  1  k < n  O(mn) augmentations.

Shortest Augmenting Path: Analysis Level graph of (V, E, s). For each vertex v, define (v) to be the length (number of arcs) of shortest path from s to v. LG = (V, EG) is subgraph of G that contains only those arcs (v,w)  E with (w) = (v) + 1. 2 5 G: s 3 6 t 2 5 LG: s 3 6 t  = 0  = 1  = 2  = 3

Shortest Augmenting Path: Analysis Level graph of (V, E, s). For each vertex v, define (v) to be the length (number of arcs) of shortest path from s to v. L = (V, F) is subgraph of G that contains only those arcs (v,w)  E with (w) = (v) + 1. Compute in O(m+n) time using BFS, deleting back and side arcs. P is a shortest s-v path in G if and only if it is an s-v path L. 2 5 L: s 3 6 t  = 0  = 1  = 2  = 3

Shortest Augmenting Path: Analysis L1. Throughout the algorithm, the length of the shortest path never decreases. Let f and f' be flow before and after a shortest path augmentation. Let L and L' be level graphs of Gf and Gf ' Only back arcs added to Gf ' path with back arc has length greater than previous length 2 5 L s 3 6 t  = 0  = 1  = 2  = 3 2 5 L' s 3 6 t

Shortest Augmenting Path: Analysis L2. After at most m shortest path augmentations, the length of the shortest augmenting path strictly increases. At least one arc (the bottleneck arc) is deleted from L after each augmentation. No new arcs added to L until length of shortest path strictly increases. 2 5 L s 3 6 t  = 0  = 1  = 2  = 3 2 5 L' s 3 6 t

Shortest Augmenting Path: Review of Analysis L1. Throughout the algorithm, the length of the shortest path never decreases. L2. After at most m shortest path augmentations, the length of the shortest augmenting path strictly increases. Theorem. The shortest augmenting path algorithm runs in O(m2n) time. O(m+n) time to find shortest augmenting path via BFS. O(m) augmentations for paths of exactly k arcs. O(mn) augmentations. Note: (mn) augmentations necessary on some networks.

m3/2 log (n2 / m) log U mn2/3 log (n2 / m) log U History Year Discoverer Method Big-Oh 1951 Dantzig Simplex mn2U 1955 Ford, Fulkerson Augmenting path mnU 1970 Edmonds-Karp Shortest path m2n 1970 Dinitz Shortest path mn2 1972 Edmonds-Karp, Dinitz Capacity scaling m2 log U 1973 Dinitz-Gabow Capacity scaling mn log U 1974 Karzanov Preflow-push n3 1983 Sleator-Tarjan Dynamic trees mn log n 1986 Goldberg-Tarjan FIFO preflow-push mn log (n2 / m) . . . . . . . . . . . . 1997 Goldberg-Rao Length function m3/2 log (n2 / m) log U mn2/3 log (n2 / m) log U