16-maxflowalgs - Algorithms Lecture 16 Max-Flow Algorithms...

Info iconThis preview shows pages 1–3. Sign up to view the full content.

View Full Document Right Arrow Icon

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

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

Unformatted text preview: Algorithms Lecture 16: Max-Flow Algorithms 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) 16 Max-Flow Algorithms 16.1 Recap Fix a directed graph G = ( V , E ) that does not contain both an edge u v and its reversal v u , and fix a capacity function c : E IR . For any flow function f : E IR , the residual capacity is defined as c f ( u v ) = c ( u v )- f ( u v ) if u v E f ( v u ) if v u E otherwise . The residual graph G f = ( V , E f ) , where E f is the set of edges whose non-zero residual capacity is positive. s t 10/20 0/10 10/10 0/5 10/10 5/15 5/10 5/20 0/15 s t 10 10 5 10 5 15 5 10 5 15 5 10 10 A flow f in a weighted graph G and its residual graph G f . In the last lecture, we proved the Max-flow Min-cut Theorem: In any weighted directed graph network, the value of the maximum ( s , t )-flow is equal to the capacity of the minimum ( s , t )-cut. The proof of the theorem is constructive. If the residual graph contains a path from s to t , then we can increase the flow by the minimum capacity of the edges on this path, so we must not have the maximum flow. Otherwise, we can define a cut ( S , T ) whose capacity is the same as the flow f , such that every edge from S to T is saturated and every edge from T to S is empty, which implies that f is a maximum flow and ( S , T ) is a minimum cut. s t 10 10 5 10 5 15 5 10 5 15 5 10 10 s t 10/20 5/10 5/10 5/5 10/10 5/15 0/10 10/20 0/15 An augmenting path in G f and the resulting (maximum) flow f . 1 Algorithms Lecture 16: Max-Flow Algorithms 16.2 Ford-Fulkerson Its not hard to realize that this proof translates almost immediately to an algorithm, first developed by Ford and Fulkerson in the 1950s: 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, in the words case, the Ford-Fulkerson algorithm runs in O ( E | f * | ) time. 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. However, if we allow irrational capacities, the algorithm can 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 thisof augmentations may not even converge to the maximum flow!...
View Full Document

{[ snackBarMessage ]}

Page1 / 6

16-maxflowalgs - Algorithms Lecture 16 Max-Flow Algorithms...

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

View Full Document Right Arrow Icon
Ask a homework question - tutors are online