{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

# 23-maxflowapps - Algorithms Lecture 23 Applications of...

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
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: Algorithms Lecture 23: Applications of Maximum Flow [ Fa’10 ] 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) 23 Applications of Maximum Flow 23.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. 23.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

{[ snackBarMessage ]}

### Page1 / 10

23-maxflowapps - Algorithms Lecture 23 Applications of...

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

View Full Document
Ask a homework question - tutors are online