Minimum-cost Flow Problem
   HOME

TheInfoList



OR:

The minimum-cost flow problem (MCFP) is an
optimization Mathematical optimization (alternatively spelled ''optimisation'') or mathematical programming is the selection of a best element, with regard to some criteria, from some set of available alternatives. It is generally divided into two subfiel ...
and
decision problem In computability theory and computational complexity theory, a decision problem is a computational problem that can be posed as a yes–no question on a set of input values. An example of a decision problem is deciding whether a given natura ...
to find the cheapest possible way of sending a certain amount of flow through a flow network. A typical application of this problem involves finding the best delivery route from a factory to a warehouse where the road network has some capacity and cost associated. The minimum cost flow problem is one of the most fundamental among all flow and circulation problems because most other such problems can be cast as a minimum cost flow problem and also that it can be solved efficiently using the network simplex algorithm.


Definition

A flow network is a directed graph G=(V,E) with a source vertex s \in V and a sink vertex t \in V, where each edge (u,v) \in E has capacity c(u,v) > 0, flow f(u,v) and cost a(u,v), with most minimum-cost flow algorithms supporting edges with negative costs. The cost of sending this flow along an edge (u,v) is f(u,v)\cdot a(u,v). The problem requires an amount of flow d to be sent from source s to sink t. The definition of the problem is to minimize the total cost of the flow over all edges: :\sum_ a(u,v) \cdot f(u,v) with the constraints :


Relation to other problems

A variation of this problem is to find a flow which is maximum, but has the lowest cost among the maximum flow solutions. This could be called a minimum-cost maximum-flow problem and is useful for finding minimum cost maximum matchings. With some solutions, finding the minimum cost maximum flow instead is straightforward. If not, one can find the maximum flow by performing a
binary search In computer science, binary search, also known as half-interval search, logarithmic search, or binary chop, is a search algorithm that finds the position of a target value within a sorted array. Binary search compares the target value to the m ...
on d. A related problem is the minimum cost circulation problem, which can be used for solving minimum cost flow. The minimum cost circulation problem has no source and sink; instead it has costs and lower and upper bounds on each edge, and seeks flow amounts within the given bounds that balance the flow at each vertex and minimize the sum over edges of cost times flow. Any minimum-cost flow instance can be converted into a minimum cost circulation instance by setting the lower bound on all edges to zero, and then making an extra edge from the sink t to the source s, with capacity c(t,s)=d and lower bound l(t,s)=d, forcing the total flow from s to t to also be d. The following problems are special cases of the minimum cost flow problem (we provide brief sketches of each applicable reduction, in turn): *
Shortest path problem In graph theory, the shortest path problem is the problem of finding a path between two vertices (or nodes) in a graph such that the sum of the weights of its constituent edges is minimized. The problem of finding the shortest path between t ...
(single-source). Require that a feasible solution to the minimum cost flow problem sends one unit of flow from a designated source s to a designated sink t. Give all edges infinite capacity. * Maximum flow problem. Choose a large demand d (large enough to exceed the maximum flow; for instance, the sum of capacities out of the source vertex) Set the costs of all edges in the maximum flow instance to zero, and introduce a new edge from source to sink with unit cost and capacity d. *
Assignment problem The assignment problem is a fundamental combinatorial optimization problem. In its most general form, the problem is as follows: :The problem instance has a number of ''agents'' and a number of ''tasks''. Any agent can be assigned to perform any t ...
. Suppose that each partite set in the bipartition has n vertices, and denote the bipartition by (X,Y). Give each x \in X supply 1/n and give each y \in Y demand 1/n. Each edge is to have unit capacity.


Solutions

The minimum cost flow problem can be solved by
linear programming Linear programming (LP), also called linear optimization, is a method to achieve the best outcome (such as maximum profit or lowest cost) in a mathematical model whose requirements and objective are represented by linear function#As a polynomia ...
, since we optimize a linear function, and all constraints are linear. Apart from that, many combinatorial algorithms exist. Some of them are generalizations of maximum flow algorithms, others use entirely different approaches. Well-known fundamental algorithms (they have many variations): * ''Cycle canceling'': a general primal method. * ''Cut canceling'': a general dual method. * ''Minimum mean cycle canceling'': a simple strongly polynomial algorithm. * ''Successive shortest path'' and ''capacity scaling'': dual methods, which can be viewed as the generalization of the Ford–Fulkerson algorithm. * ''Cost scaling'': a primal-dual approach, which can be viewed as the generalization of the push-relabel algorithm. * '' Network simplex algorithm'': a specialized version of the
linear programming Linear programming (LP), also called linear optimization, is a method to achieve the best outcome (such as maximum profit or lowest cost) in a mathematical model whose requirements and objective are represented by linear function#As a polynomia ...
simplex method. * '' Out-of-kilter algorithm'' by D. R. Fulkerson


Application


Minimum weight bipartite matching

Given a
bipartite graph In the mathematics, mathematical field of graph theory, a bipartite graph (or bigraph) is a Graph (discrete mathematics), graph whose vertex (graph theory), vertices can be divided into two disjoint sets, disjoint and Independent set (graph theo ...
, the goal is 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 whose total weight is minimized. The idea is to reduce this problem to a network flow problem. Let . 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 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′''.


See also

* LEMON (C++ library) * GNU Linear Programming Kit * Network flow problem


References

{{reflist, refs= {{cite book , author = Ravindra K. Ahuja , author-link = Ravindra K. Ahuja , author2 = Thomas L. Magnanti , author2-link = Thomas L. Magnanti , author3 = James B. Orlin , author3-link = James B. Orlin , name-list-style = amp , title = Network Flows: Theory, Algorithms, and Applications , year = 1993 , publisher = Prentice-Hall, Inc. , isbn = 978-0-13-617549-0 {{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 , issue = 3 , pages = 205–220 , year = 1967 , doi=10.1287/mnsc.14.3.205 , citeseerx = 10.1.1.228.7696 {{cite journal , author = Refael Hassin , title = The minimum cost flow problem: A unifying approach to existing algorithms and a new tree search algorithm , journal = Mathematical Programming , volume = 25 , pages = 228–239 , year = 1983 , doi=10.1007/bf02591772 {{cite journal , author = Thomas R. Ervolina & S. Thomas McCormick , title = Two strongly polynomial cut cancelling algorithms for minimum cost network flow , journal = Discrete Applied Mathematics , volume = 4 , pages = 133–165 , year = 1993 , issue = 2 , doi=10.1016/0166-218x(93)90025-j , doi-access = free {{cite journal , author = Andrew V. Goldberg , author-link = Andrew V. Goldberg , author2 = Robert E. Tarjan , author2-link = Robert E. Tarjan , name-list-style = amp , title = Finding minimum-cost circulations by canceling negative cycles , journal = Journal of the ACM , volume = 36 , number = 4 , pages = 873–886 , year = 1989 , doi=10.1145/76359.76368 {{cite journal , author = Jack Edmonds , author-link = Jack Edmonds , author2 = Richard M. Karp , author2-link = Richard M. Karp , name-list-style = amp , title = Theoretical improvements in algorithmic efficiency for network flow problems , journal = Journal of the ACM , volume = 19 , number = 2 , pages = 248–264 , year = 1972 , doi=10.1145/321694.321699 , doi-access = free {{cite journal , last1=Goldberg , first1=Andrew V. , authorlink1=Andrew V. Goldberg , last2=Tarjan , first2=Robert E. , authorlink2=Robert Tarjan , name-list-style = amp , title=Finding minimum-cost circulations by successive approximation , journal=
Mathematics of Operations Research ''Mathematics of Operations Research'' is a quarterly peer-reviewed scientific journal established in February 1976. It focuses on areas of mathematics relevant to the field of operations research such as continuous optimization, discrete optimizat ...
, volume=15 , number=3 , pages=430–466 , year=1990 , doi=10.1287/moor.15.3.430
{{cite journal , author = James B. Orlin , author-link = James B. Orlin , title = A polynomial time primal network simplex algorithm for minimum cost flows , journal = Mathematical Programming , volume = 78 , issue = 2 , pages = 109–129 , year = 1997 , doi=10.1007/bf02614365 , hdl = 1721.1/2584 , hdl-access = free


External links


LEMON C++ library with several maximum flow and minimum cost circulation algorithms


Network flow problem Mathematical problems