{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

# 22-maxflowalgs - Algorithms Lecture 22 Max-Flow...

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

Algorithms Lecture 22: Max-Flow Algorithms [ Fa’10 ] 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 Herbert’s Dune (1965) There’s 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 Fulkerson’s 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 Fulkerson’s 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 other six edges will always be at least X - 3.) c Copyright 2011 Jeff Erickson. Released under a Creative Commons Attribution-NonCommercial-ShareAlike 3.0 License (

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

View Full Document
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

### Page1 / 6

22-maxflowalgs - Algorithms Lecture 22 Max-Flow...

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

View Full Document
Ask a homework question - tutors are online