This preview has intentionally blurred sections. Sign up to view the full version.View Full Document
Unformatted text preview: Algorithms Lecture 17: Applications of Maximum Flow For a long time it puzzled me how something so expensive, so leading edge, could be so useless, and then it occurred to me that a computer is a stupid machine with the ability to do incredibly smart things, while computer pro- grammers are smart people with the ability to do incredibly stupid things. They are, in short, a perfect match. — Bill Bryson, Notes from a Big Country (1999) 17 Applications of Maximum Flow 17.1 Edge-Disjoint Paths One of the easiest applications of maximum flows is computing the maximum number of edge-disjoint paths between two specified vertices s and t in a directed graph G using maximum flows. A set of paths in G is edge-disjoint if each edge in G appears in at most one of the paths; several edge-disjoint paths may pass through the same vertex, however. If we give each edge capacity 1, then the maxflow from s to t assigns a flow of either 0 or 1 to every edge. Since any vertex of G lies on at most two saturated edges (one in and one out, or none at all), the subgraph S of saturated edges is the union of several edge-disjoint paths and cycles. Moreover, the number of paths is exactly equal to the value of the flow. Extracting the actual paths from S is easy—just follow any directed path in S from s to t , remove that path from S , and recurse. Conversely, we can transform any collection of k edge-disjoint paths into a flow by pushing one unit of flow along each path from s to t ; the value of the resulting flow is exactly k . It follows that the maxflow algorithm actually computes the largest possible set of edge-disjoint paths. The overall running time is O ( V E ) , just like for maximum bipartite matchings. The same algorithm can also be used to find edge-disjoint paths in undirected graphs. We simply replace every undirected edge in G with a pair of directed edges, each with unit capacity, and compute a maximum flow from s to t in the resulting directed graph G using the Ford-Fulkerson algorithm. For any edge uv in G , if our max flow saturates both directed edges u v and v u in G , we can remove both edges from the flow without changing its value. Thus, without loss of generality, the maximum flow assigns a direction to every saturated edge, and we can extract the edge-disjoint paths by searching the graph of directed saturated edges. 17.2 Vertex Capacities and Vertex-Disjoint Paths Suppose we have capacities on the vertices as well as the edges. Here, in addition to our other constraints, we require that for any vertex v other than s and t , the total flow into v (and therefore the total flow out of v ) is at most some non-negative value c ( v ) . How can we compute a maximum flow with these new constraints?...
View Full Document
- Fall '10
- Graph Theory, Glossary of graph theory, Bipartite graph, maximum flow