|
|
Line 1: |
Line 1: |
| The '''minimum-cost flow problem''' is to find the cheapest possible way of sending a certain amount of flow through a [[flow network]]. Solving this problem is useful for real-life situations involving networks with costs associated (e.g. telecommunications networks), as well as in other situations where the analogy is not so obvious, such as where to locate warehouses.
| | Greetings! I am Myrtle Shroyer. South Dakota is where me and my husband reside and my family members loves it. The preferred pastime for my kids and me is to perform baseball and I'm attempting to make it a occupation. Since she was eighteen she's been operating as a meter reader but she's always needed her own business.<br><br>Feel free to surf to my web-site :: [http://mirim.ir/index.php?do=/profile-699/info/ std testing at home] |
| | |
| == Definition ==
| |
| | |
| Given a flow network, that is, a directed graph <math>G=(V,E)</math> with source {{math|s ∈ V}} and sink {{math|t ∈ V}}, where edge {{math|(u,v) ∈ E}} has capacity <math>c(u,v) > 0</math>, flow <math>f(u,v) \ge 0</math> and cost <math>a(u,v)</math> (most minimum-cost flow algorithms support edges with negative costs). The cost of sending this flow is <math>f(u,v)\cdot a(u,v)</math>. You are required to send an amount of flow <math>d</math> from s to t.
| |
| | |
| The definition of the problem is to minimize the '''total cost''' of the flow:
| |
| | |
| :<math>\sum_{(u,v) \in E} a(u,v) \cdot f(u,v)</math>
| |
| | |
| with the constraints
| |
| :{|
| |
| |-
| |
| | '''Capacity constraints''': || <math>\,f(u,v) \le c(u,v)</math>
| |
| |-
| |
| | '''Skew symmetry''': || <math>\,f(u,v) = - f(v,u)</math>
| |
| |-
| |
| | '''Flow conservation''': || <math>\,\sum_{w \in V} f(u,w) = 0 \text{ for all } u \neq s, t</math>
| |
| |-
| |
| | '''Required flow''': || <math>\,\sum_{w \in V} f(s,w) = d \text{ and } \sum_{w \in V} f(w,t) = d</math>
| |
| |}
| |
| | |
| == Relation to other problems ==
| |
| | |
| A variation of this problem is to find a flow which is maximum, but has the lowest cost among the maximums. This could be called a [[minimum-cost maximum-flow problem]]. This is useful for finding minimum cost maximum [[Matching (graph theory)|matching]]s.
| |
| | |
| With some solutions, finding the minimum cost maximum flow instead is straightforward. If not, you can do a [[binary search]] on <math>d</math>.
| |
| | |
| A related problem is the [[minimum cost circulation problem]], which can be used for solving minimum cost flow. You do this by setting the lower bound on all edges to zero, and then make an extra edge from the sink <math>t</math> to the source <math>s</math>, with capacity <math>c(t,s)=d</math> and lower bound <math>l(t,s)=d</math>, forcing the total flow from <math>s</math> to <math>t</math> to also be <math>d</math>.
| |
| | |
| The problem can be specialized into two other problems:
| |
| * if the capacity constraint is removed, the problem is reduced to the [[shortest path problem]],
| |
| * if the costs are all set equal to zero, the problem is reduced to the [[maximum flow problem]].
| |
| | |
| == Solutions ==
| |
| | |
| The minimum cost flow problem can be solved by [[linear programming]], since we optimize a linear function, and all constraints are linear.
| |
| | |
| Apart from that, many combinatorial algorithms exist, for a comprehensive survey, see {{ref|AMO93}}. Some of them are generalizations of [[maximum flow|maximum flow algorithms]], others use entirely different approaches.
| |
| | |
| Well-known fundamental algorithms (they have many variations):
| |
| | |
| * ''Cycle canceling'': a general primal method.{{ref|K67}}
| |
| * ''Minimum mean cycle canceling'': a simple [[strongly polynomial]] algorithm.{{ref|GT89}}
| |
| * ''Successive shortest path'' and ''capacity scaling'': dual methods, which can be viewed as the generalizations of the [[Ford–Fulkerson algorithm]].{{ref|EK72}}
| |
| * ''Cost scaling'': a primal-dual approach, which can be viewed as the generalization of the [[push-relabel algorithm]].{{ref|GT90}}
| |
| * ''Network simplex'': a specialized version of the [[linear programming]] [[simplex method]], which runs in polynomial time.{{ref|O97}}
| |
| * ''[[Out-of-kilter algorithm]]'' by [[D. R. Fulkerson]].
| |
| | |
| == Application == | |
| === Minimum weight bipartite matching ===
| |
| [[File:Minimum weight bipartite matching.pdf|thumb|Reducing Minimum weight bipartite matching to minimum cost max flow problem]]
| |
| Given an bipartite graph ''G'' = (''A'' ∪ ''B'', ''E''), we like to find the maximum cardinality matching in ''G'' that has minimum cost. Let ''w'': ''E'' → ''R'' be a weight function on the edges of ''E''. The minimum weight bipartite matching problem or assignment problem is to find a
| |
| perfect matching ''M'' ⊆ ''E'' whose total weight is minimized. The idea is to reduce this problem to a network flow problem.
| |
| | |
| Let ''G’'' = (''V’''=''A''∪''B'', ''E’''=''E''). Assign the capacity of all the edges in ''E’'' to 1. Add a source vertex ''s'' and connect it to all the vertices in ''A’'' and add a sink
| |
| vertex ''t'' and connect all vertices inside group ''B’'' to the this vertex. The capacity of all the new edges is 1 and their costs is 0. It is proved that there is minimum weight perfect bipartite matching in ''G'' if and only if there a minimum cost flow in ''G’''. {{ref|AMO93}}
| |
| | |
| == See also ==
| |
| *[[LEMON (C++ library)]]
| |
| | |
| == References ==
| |
| | |
| # {{Note|AMO93}}{{cite book
| |
| | author = [[Ravindra K. Ahuja]], [[Thomas L. Magnanti]], and [[James B. Orlin]]
| |
| | title = Network Flows: Theory, Algorithms, and Applications
| |
| | year = 1993
| |
| | publisher = Prentice-Hall, Inc.
| |
| | isbn = 0-13-617549-X
| |
| }}
| |
| # {{Note|K67}}{{cite journal
| |
| | author = Morton Klein
| |
| | title = A primal method for minimal cost flows with applications to the assignment and transportation problems
| |
| | journal = Management Science
| |
| | volume = 14
| |
| | pages = 205–220
| |
| | year = 1967
| |
| }}
| |
| # {{Note|GT89}}{{cite journal
| |
| | author = [[Andrew V. Goldberg]] and [[Robert E. Tarjan]]
| |
| | title = Finding minimum-cost circulations by canceling negative cycles
| |
| | journal = Journal of the ACM
| |
| | volume = 36
| |
| | number = 4
| |
| | pages = 873–886
| |
| | year = 1989
| |
| }}
| |
| # {{Note|EK72}}{{cite journal
| |
| | author = [[Jack Edmonds]] and [[Richard M. Karp]]
| |
| | title = Theoretical improvements in algorithmic efficiency for network flow problems
| |
| | journal = Journal of the ACM
| |
| | volume = 19
| |
| | number = 2
| |
| | pages = 248–264
| |
| | year = 1972
| |
| }}
| |
| # {{Note|GT90}}{{cite journal
| |
| | author = [[Andrew V. Goldberg]] and [[Robert E. Tarjan]]
| |
| | title = Finding minimum-cost circulations by successive approximation
| |
| | journal = Math. Oper. Res.
| |
| | volume = 15
| |
| | number = 3
| |
| | pages = 430–466
| |
| | year = 1990
| |
| }}
| |
| # {{Note|O97}}{{cite journal
| |
| | author = [[James B. Orlin]]
| |
| | title = A polynomial time primal network simplex algorithm for minimum cost flows
| |
| | journal = Mathematical Programming
| |
| | volume = 78
| |
| | pages = 109–129
| |
| | year = 1997
| |
| }}
| |
| | |
| == External links ==
| |
| * [http://lemon.cs.elte.hu/ LEMON C++ library with several maximum flow and minimum cost circulation algorithms]
| |
| | |
| [[Category:Network flow]]
| |
Greetings! I am Myrtle Shroyer. South Dakota is where me and my husband reside and my family members loves it. The preferred pastime for my kids and me is to perform baseball and I'm attempting to make it a occupation. Since she was eighteen she's been operating as a meter reader but she's always needed her own business.
Feel free to surf to my web-site :: std testing at home