Upload
jeff-marriner
View
233
Download
2
Tags:
Embed Size (px)
Citation preview
Definitions
Network Flow– Finite directed graph .– Vertex is distinguished as the source vertex
and vertex is distinguished as the sink vertex.– Every edge has nonnegative capacity and
flow .– A feasible flow satisfies the following
constraints:– Capacity constraints:
– Conservation constraints:
Maximum Flow
A value of a flow is the net flow into the sink.
Since we know , we can simplify the above to .
A maximum flow is a feasible flow of maximum value.
Image from West
Min Cut
A source sink cut consists of the edges from a source set to a sink set , where and partition the set of nodes, with and
The capacity of the cut , written cap(), is the total of the capacities on the edges of .
Among source/sink cuts, the one with the minimum capacity defines the minimum cut.
Image from West
History
A. N. Tolstoi (1930)– “Methods of finding the minimal total
kilometrage in cargo-transportation planning in space.”
– Soviet rail networks– Optimum solution does not have any negative-
cost cycle in its residual graph.
History
T. E. Harris and General F. S. Ross (1955) – “Fundamentals of a Method for Evaluating Rail
Net Capacities”– Formulated the network flow problem.– “Consider a rail network connecting two cities
by way of a number of intermediate cities, where each link of the network has a number assigned to it representing its capacity. Assuming a steady state condition, find a maximal flow from one given city to the other.”
History
L. R. Ford and D. R. Fulkerson (1956)– “Maximal Flow through a Network”– Proposed the Ford-Fulkerson Algorithm that
works in the “cases of most practical interest” by taking advantage of the network planarity.
Ford-Fulkerson Algorithm
Algorithm– Begin with edges initialized to a flow of 0.– While there is a path (no specific path
choosing method) from source to sink with capacity remaining.• Increase the flow on each edge, by the amount equal
to the minimum of the residual capacities of the edges on the path.
• Establish edges in the reverse direction of equal flow.
– Continue until there is no such path remaining.
– The flow into the sink is the maximum flow.
Failures of FF Algorithm
Pathological scenarios
Failure to halt– Ford and Fulkerson gave as an example a
network with 10 vertices and 48 edges on which their algorithm may fail to halt.
– Zwick proved that the smallest possible example of failing to halt is a network that has only 6 vertices and 8 edges.
Image from Wiki
Failures of FF Algorithm
Failure to halt– Edge capacities of , , are , , – chosen such that .– Edge capacities of all other edges are some
integer .– By sending flow through nodes in a specific
order under these conditions, it is possible to ensure that “the algorithm never terminates and the flow does not even converge to the maximum flow.”
Failures of FF AlgorithmStep Augment. path Sent Flow e1 e2 e3
0 1
1 1 0
2 0
3 0
4 0
5 0
Image from Wiki
Residual Values
History
E. A. Dinitz (1970)– “Algorithm for solution of a problem of
maximum flow in a network with power estimation.”
– First publication of the Edmonds-Karp Algorithm.
– Created Dinitz’s Algorithm.
Image from http://www.cs.bgu.ac.il/~dinitz/
History
J. Edmonds and R. M. Karp (1972)– “Theoretical improvements in algorithmic
efficiency for network flow problems.”– Independently published the Edmonds-Karp
Algorithm.
Image from UC BerkleyImage from http://www.iasi.cnr.it/jack/
Edmonds-Karp/Dinitz’s Alg. Edmonds-Karp Algorithm– Based on Ford-Fulkerson– One key difference was that it specifies the use
of shortest augmenting path with available capacity.
– Works for all real capacities.– run time.
Dinitz’s Algorithm– Similar to Edmonds-Karp– Slightly improved run time.
History
R. K. Ahuja, T. L. Magnanti and J. B. Orlin (1993)– “Network Flow: Theory, Algorithms, and
Applications.”– Developed a faster algorithm (a strongly
polynomial running time algorithm) to solve network problems.
Applications
Edge Disjoint Paths Bipartite Matching Baseball Elimination Problem Project Selection Image Segmentation Open Pit Mining Survey Design And many more (Ahuja, Magnanti, Orlin
and Reddy came up with a very complete list of applications).
Baseball Elimination Problem Goal:– Calculate which teams can still win given all
possible outcomes of remaining games.– Winning involves having won the most (or
equal most) games at the conclusion of all games.
Baseball Elimination Problem Example:
Based on the above information, which teams can still win (most, or tied most number of wins)?
Team () Wins () Losses () Remainder ()
Atlanta 83 71 8
Philly 80 79 3
New York 78 78 6
Montreal 77 82 3
Baseball Elimination Problem Let’s add some information:
Based on the above new information, which teams can still win (most, or tied most number of wins)?
Team () W () L () R () Games Against ()Atl. Philly NY Mont.
Atlanta 83 71 8 - 1 6 1
Philly 80 79 3 1 - 0 2
New York 78 78 6 6 0 - 0
Montreal 77 82 3 1 2 0 -
Baseball Elimination Problem Formalizing the problem:– Set of teams .– Distinguished team .– Team has won games already.– Teams and play each other additional times.– Use network flow to determine whether there
is any combination of results that lead to team having the most (or tied for the most) total wins.
Baseball Elimination Problem Calculating whether New York can win:
If all the games flow through, then they can.
AP
PM
PAM
M
A
s t
2
1
1
∞
1
4
7
𝑟 𝑥𝑦
Baseball Elimination Problem Generalization:– Calculating whether can win given :
Use network flow algorithms to solve.
𝑥𝑦
𝑦𝑧
𝑦𝑥𝑧
𝑧
𝑥
s t
𝑟 𝑦𝑧
𝑟 𝑥𝑦
𝑟 𝑥 𝑧
∞
𝑤𝑎+𝑟 𝑎−𝑤𝑥
𝑤𝑎+𝑟 𝑎−𝑤𝑧
Project Selection
Formalizing the problem:– Set of possible projects , where project has
revenue .• indicates profit.• indicates loss.
– Set of prerequisites . If then project can’t be completed without also completing project .
– A subset of projects is feasible if the prerequisite of every project in also belongs to .
Project Selection
Minimum cut formulation:– Let all prerequisite edges have capacity .– Add edge with capacity if – Add edge with capacity if
Image from Wayne
Project Selection
Solution:– The set forms the optimal set of projects if
and only if is a minimum cut of the graph.
Image from Wayne
Image Segmentation
Formalizing the problem:– is the set of pixels and are the edges joining
adjacent pixels.– is the likelihood a pixel is in the foreground.– is the likelihood a pixel is in the background.– is the separation penalty for labeling one of
and as foreground, and the other as background.
Image Segmentation
Objective is to maximize the following:
Turn this into a minimization problem:
Image from Wayne
Image Segmentation
Calculating the minimum cut , yields set as the foreground and as the background.
Image from Wayne
Open Problems
Simplifying network flows by exploiting useless edges.– “We call an edge useful if for some
assignment of capacities, every maximum flow uses edge . If is not useful, then we call it useless.”
Continue to find a faster strongly polynomial network flow algorithm.
References Ahuja, R. K.; Magnanti, T. L.; Orlin, J. B. (1993). “Network flow: theory,
algorithms, and applications”. Prentice Hall. Ahuja, R. K.; Magnanti, T. L.; Orlin, J. B.; Reddy, M.R. (June 1994).
“Applications of network optimization”. Asano, T.; Asano, Y. (2000) “Recent developments in maximum flow
algorithms”. Journal of the Operations Research. Society of Japan 43 (2).
Biedl, T. C.; Brejova, B.; Vinar, T. (2000). “Simplifying flow networks”. Department of Computer Science, University of Waterloo.
Dinic, E. A. (1970). "Algorithm for solution of a problem of maximum flow in a network with power estimation". Soviet Math. Doklady (Doklady) 11: 1277–1280.
Edmonds, Jack; Karp, Richard M. (1972). "Theoretical improvements in algorithmic efficiency for network flow problems". Journal of the ACM (Association for Computing Machinery) 19 (2): 248–264.
Ford, L. R.; Fulkerson, D. R. (1956). "Maximal flow through a network". Canadian Journal of Mathematics 8: 399.
Schrijver, Alexander (2002). “On the history of the transportation and maximum flow problems.” [51] Schrijver,A.
West, Douglas B. (2001). “Introduction to Graph Theory (2nd Edition).” Pearson Education.
References Zwick, Uri (21 August 1995). "The smallest networks on which the Ford-
Fulkerson maximum flow procedure may fail to terminate". Theoretical Computer Science 148 (1): 165–170.
Homework
1) Find the max flow, label the flow for each edge that creates the max flow and draw a min cut where . (0 is source, 5 is sink)
Homework
2) Given a directed graph where the vertices are assigned maximum capacities as well as the edges. Describe/illustrate how you would calculate maximum flow of this graph using established network flow theory/algorithms?