This preview has intentionally blurred sections. Sign up to view the full version.View Full Document
Unformatted text preview: Chapter 7 Network Flow II - The Vengeance By Sariel Har-Peled , October 15, 2007 Version: 0.1 7.1 Accountability Figure 7.1: http://www.cs.berkeley.edu/ ~jrs/ The comic in Figure 7.1 is by Jonathan Shewchuk and is referring to the Calvin and Hobbes comics. People that do not know maximum flows: essentially everybody. Average salary on earth < $5 , 000 People that know maximum flow - most of them work in programming related jobs and make at least $10 , 000 a year. Salary of people that learned maximum flows: > $10 , 000 Salary of people that did not learn max- imum flows: < $5 , 000 Salary of people that know Latin: 0 (unemployed). Thus, by just learning maximum flows (and not knowing Latin) you can double your future salary! 7.2 Ford-Fulkerson Method This work is licensed under the Creative Commons Attribution-Noncommercial 3.0 License. To view a copy of this license, visit http://creativecommons.org/licenses/by-nc/3.0/ or send a letter to Creative Commons, 171 Second Street, Suite 300, San Francisco, California, 94105, USA. 1 Ford-Fulkerson ( G , s , t ) Initialize flow f to zero while ∃ path π from s to t in G f do c f ( π ) ← min c f ( u , v ) ( u → v ) ∈ π for ∀ ( u → v ) ∈ π do f ( u , v ) ← f ( u , v ) + c f ( p ) f ( v , u ) ← f ( v , u )- c f ( p ) The Ford-Fulkerson method is depicted on the right. Lemma 7.2.1 If the capacities on the edges of G are integers, then Ford-Fulkerson runs in O ( m | f * | ) time, where | f * | is the amount of flow in the maximum flow and m = | E ( G ) | . Proof: Observe that the Ford-Fulkerson method performs only subtraction,addition and min operations. Thus, if it finds an augmenting path, then c f ( p ) must be a positive integer number. Namely, c f ( p ) ≥ 1. Thus, | f * | must be an integer number (by induction), and each iteration of the algorithm improves the flow by at least 1. It follows that after | f * | iterations the algorithm stops. Each iteration takes O ( m + n ) = O ( m ) time, as can be easily verified. The following observation is an easy consequence of our discussion. Observation 7.2.2 (Integrality theorem.) If the capacity function c takes on only integral values, then the maximum flow f produced by the Ford-Fulkerson method has the property that | f | is integer-valued. Moreover, for all vertices u and v, the value of f ( u , v ) is also an integer....
View Full Document
This note was uploaded on 06/14/2009 for the course CS 473 taught by Professor Viswanathan during the Fall '08 term at University of Illinois at Urbana–Champaign.
- Fall '08