This preview shows pages 1–2. Sign up to view the full content.
This preview has intentionally blurred sections. Sign up to view the full version.View Full Document
Unformatted text preview: Algorithms Lecture 22: Max-Flow Algorithms [ Fa10 ] A process cannot be understood by stopping it. Understanding must move with the flow of the process, must join it and flow with it. The First Law of Mentat, in Frank Herberts Dune (1965) Theres a difference between knowing the path and walking the path. Morpheus [Laurence Fishburne], The Matrix (1999) 22 Max-Flow Algorithms 22.1 Ford-Fulkerson augmenting path Ford and Fulkersons proof of the Maxflow Mincut theorem, described in the previous lecture note, translates immediately to an algorithm to compute maximum flows: Starting with the zero flow, repeatedly augment the flow along any path s t in the residual graph, until there is no such path. If every edge capacity is an integer, then every augmentation step increases the value of the flow by a positive integer. Thus, the algorithm halts after | f * | iterations, where f * is the actual maximum flow. Each iteration requires O ( E ) time, to create the residual graph G f and perform a whatever-first-search to find an augmenting path. Thus the Ford-Fulkerson algorithm runs in O ( E | f * | ) time in the worst case. The following example shows that this running time analysis is essentially tight. Consider the 4-node network illustrated below, where X is some large integer. The maximum flow in this network is clearly 2 X . Moreover, the Ford-Fulkerson could alternate between pushing 1 unit of flow along the augmenting path s u v t and then pushing 1 unit of flow along the augmenting path s v u t , leading to a running time of ( X ) = ( | f * | ) . t s X X 1 X X u v A bad example for the Ford-Fulkerson algorithm. Ford and Fulkersons algorithm works quite well in many practical situations, or in settings where the maximum flow value | f * | is small, but without further constraints on the augmenting paths, this is not an efficient algorithm in general. The example network above can be described using only O ( log X ) bits; thus, the running time of Ford-Fulkerson is exponential in the input size. If we multiply all the capacities by the same (positive) constant, the maximum flow increases everywhere by the same constant factor. It follows that if all the edge capacities are rational , then the Ford-Fulkerson algorithm eventually halts, although still in exponential time. However, if we allow irrational capacities, the algorithm can actually loop forever, always finding smaller and smaller augmenting paths! Worse yet, this infinite sequence of augmentations may not even converge to the maximum flow! Perhaps the simplest example of this effect was discovered by Uri Zwick. Consider the six-node network shown on the next page. Six of the nine edges have some large integer capacity X , two have capacity 1, and one has capacity = ( p 5- 1 ) / 2 0.618034, chosen so that 1- = 2 . To prove that the Ford-Fulkerson algorithm can get stuck, we can watch the residual capacities of the three horizontal edges as the algorithm progresses. (The residual capacities of the othercapacities of the three horizontal edges as the algorithm progresses....
View Full Document
This note was uploaded on 10/14/2011 for the course ECON 101 taught by Professor Smith during the Spring '11 term at West Virginia University Institute of Technology.
- Spring '11