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: CME 305: Discrete Mathematics and Algorithms Instructor: Professor Amin Saberi (saberi@stanford.edu) January 28, 2010 Lecture 8: Maxflow MinCut Theorem and its Applications 1 Analysis of FordFulkerson Recall from last lecture the FordFulkerson algorithm for maxflow: Algorithm 1 FordFulkerson, 1956 Start with f ( e ) = 0, ∀ e ∈ E . while there is a path P from s to t in R ( N,f ) do send a flow of value df = min e ∈ P c ( e ) in R along P . augment df in ( N,f ) using the above flow. rebuild the residual network R ( N,f ). end while Output f * . Here, augmenting flow df in ( N,f ), means that for each e ∈ P , f ( e ) = f ( e ) + df and e ∈ E \ P , f ( e ) = f ( e ). Lemma 1 If all edge capacities of N are integral i.e., c ( e ) ∈ N ∪ { } , e ∈ E , FordFulkerson terminates. Proof: Since the capacities are integral, it is not hard to see that the capacity of every edge in R ( N,f ) is always integral. At each step, df is at least one; thus the value of flow f increases by at least one. Since v ( f ) ≤ ∑ e leaving s c ( e ) and the capacities are finite, v ( f ) cannot keep increasing, hence the algorithm stops after a finite step. Theorem 1 If FordFulkerson terminates, it outputs a maximum flow. Proof: Suppose the algorithm terminates at step t , this means that there is no path from s to t in R ( N,f * ); s and t are disconnected. Let S be the set of nodes reachable from s , i.e., v ∈ S iff there exists a path from s to v ; let T = V \ S . We claim that v ( f * ) = c ( S,T ); before proving this claim, note that in the last lecture we showed that for every feasible flow f and every cut ( A,B ), v ( f ) ≤ c ( A,B ). Thus v ( f * ) = c ( S,T ) implies that f * is the maxflow and cut ( S,T ) is the minimum cut. In order to prove v ( f * ) = c ( S,T ), we consider the residual graph; first, we show that there is no path from S to T . By contradiction, assume there exists e from v 1 ∈ S to v 2 ∈ T ; this means that v 2 is reachable by s which contradicts with...
View
Full
Document
This note was uploaded on 06/05/2010 for the course COMPUTER S 700 taught by Professor Joewhite during the Spring '10 term at Universidad San Martín de Porres.
 Spring '10
 JoeWhite
 Algorithms

Click to edit the document details