----------------------------------------------------------------------------- COMP 731 - Data Struc & Algorithms - Lecture 28 - Friday, September 9, 2000 ----------------------------------------------------------------------------- Today: o More on Max Flow Review the Ford-Fulkerson algorithm and its worst-case running time of Theta(m |f^*|) We would like an algorithm whose running time is independent of the sizes of the numbers involved. Such an algorithm was first suggested by Jack Edmonds and Dick Karp. They modified the Ford-Fulkerson algorithm in the following simple way: Always choose an augmenting path of minimum length. (Remind the students how to find a minimum length path in a directed graph, using BFS). In your notes it is proven that the maximum number of augmenting steps will be at most nm. Each augmentation takes O(m) time, so this algorithm will find a maximum flow in O(nm^2) time. Not so efficient, but nicer than O(m |f^*| ) -------------------------------------------------------------- Do Same Example, now with minimum-length path augmentation -------------------------------------------------------------- The best known algorithm for this problem runs in time O(n^3). Applications of Max Flow ------------------------ o Maximal bipartite matching Describe the natural algorithm in which one adds vertices s and t and gives capacities of 1 to all of the edges. O(n^3). Better algorithms are known; my advisor's has an O(n^0.5 m) algorithm. Algorithm is reasonably simple -- proof is over 100 pages long! Do an example. o Minimum connectivity What is the minimum number of EDGES must you delete to disconnect a given undirected graph? Fix a vertex s, replace all edges by a pair of directed edges, given all edges a capacity of 1. Now for each vertex t, find the value of a maximum s-t flow. Use the minimum. this tells you the number of edges in a minimum cut -- and it tells you what edges to delete (how??). Time is O(n^4) with the algorithm claimed, or O(n^2m^2) using the algorithm we saw. Probably the most inefficient polynomial time algorithm that you've seen. Explain correctness. A related problem, what the least number of vertices to remove (along with their adjacent edges) so as to disconnect the graph, that problem is not believed to have a polynomial-time solution (the problem is NP-hard).