ArticleslgStudy

mathematics

Minimum-cost flow problem

Minimum-cost flow problem is a mathematics topic covered in the lgStudy science library. This page brings together a partial reference excerpt, illustrations, worked examples, real-world applications and a short study plan, so you can understand Minimum-cost flow problem rather than just read about it. In short: The minimum-cost flow problem (MCFP) is an optimization and decision problem 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.

Minimum-cost flow problem — main illustration
Minimum-cost flow problem — illustration

Key takeaways

  • Minimum-cost flow problem belongs to mathematics; place it in that map before memorising details.
  • Learn the definition first, then one example that makes the definition concrete.
  • Connect Minimum-cost flow problem to a quantity you can measure, compute or draw — that is where exam questions come from.
  • Reproduce the core statement of Minimum-cost flow problem from memory before moving on to harder problems.

Reference excerpt

The minimum-cost flow problem (MCFP) is an optimization and decision problem 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∈V and a sink vertex t∈V, where each edge (u,v)∈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)⋅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:

∑(u,v)∈Ea(u,v)⋅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 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 (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. Suppose that each partite set in the bipartition has n vertices, and denote the bipartition by (X,Y). Give each x∈X supply 1/n and give each y∈Y demand 1/n. Each edge is to have unit capacity.

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. 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 simplex method. Out-of-kilter algorithm by D. R. Fulkerson

Cycle canceling algorithms These algorithms are iterative and like the Ford–Fulkerson algorithm they define a residual graph. If there is flow f(u,v) on arc e=(u,v), then its residual capacity is defined to be c(e)−f(e) and its residual cost is a(e). The reverse arc (which has negative flow value) has a negative cost −a(e). The algorithms then start with an arbitrary feasible flow and iteratively improve the cost of the solution by pushing flow around negative-cost cycles. In the Minimum mean cycle canceling, the algorithm selects a cycle that has minimum mean cost (the ratio of the total cycle cost to the number of arcs). Such a cycle can be found in polynomial time (by binary search using the Bellman-Ford algorithm) and the total number of iterations has been proven to be polynomial.

Almost-linear time algorithm A deterministic almost-linear time algorithm is known to solve the minimum-cost flow problem on directed graphs. That is, on a graph with m edges and polynomially bounded demands, costs, and capacities, the algorithm runs in time m1+o(1).

Application

Minimum weight bipartite matching

Given a bipartite graph G = (A ∪ B, E), 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 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 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

External links LEMON C++ library with several maximum flow and minimum cost circulation algorithms The MCFClass C++ project library with some minimum cost flow and shortest path algorithms

Worked examples

Example 1 — a first encounter with Minimum-cost flow problem

Start with the simplest possible case. Write down what Minimum-cost flow problem claims or describes in one sentence, then invent the smallest concrete situation in which that sentence is true. In mathematics, the smallest case is usually a single object, a single equation or a single measurement. Check that every symbol or term in your sentence has a meaning in that case.

Example 2 — changing one variable

Take the situation from Example 1 and change exactly one quantity: double it, halve it, or set it to zero. Predict what should happen to Minimum-cost flow problem before you calculate. Comparing your prediction with the result is the fastest way to find out whether you understand the idea or only the words.

Example 3 — an exam-style question

Typical questions about Minimum-cost flow problem ask you to (a) state it precisely, (b) apply it to given data, and (c) explain a limitation. Practise writing all three answers in under five minutes; the third part is what separates a full-mark answer from an average one.

Applications of Minimum-cost flow problem

In research
Minimum-cost flow problem appears in mathematics research whenever the underlying quantities have to be modelled precisely. Papers usually cite it as a starting assumption and then explore where it breaks down.
In technology and industry
Engineering practice reuses Minimum-cost flow problem in design rules, simulations and safety margins. Knowing the idea lets you read a specification sheet and understand why the numbers look the way they do.
In the classroom
Minimum-cost flow problem is common in secondary-school and first-year university syllabi. It links to neighbouring topics Mathematical problems, Network flow problem, so understanding it makes those chapters shorter.
In everyday life
Look for Minimum-cost flow problem outside the textbook — in sport, cooking, traffic, electronics or the sky above you. An example you found yourself is remembered far longer than one you were given.
Ask Teacher Smith questions about this articleOpens your AI tutor with a question about “Minimum-cost flow problem” →

How to study Minimum-cost flow problem in 20 minutes

  1. Read the reference excerpt below once, without taking notes.
  2. Close the page and write down what Minimum-cost flow problem means in your own words.
  3. Compare your version with the excerpt and mark what you missed.
  4. Work through the three examples above with pen and paper.
  5. Explain Minimum-cost flow problem out loud to somebody else — or to Teacher Smith in the lgStudy chat.

Frequently asked questions

What is Minimum-cost flow problem in simple terms?

The minimum-cost flow problem (MCFP) is an optimization and decision problem 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 netw…

Why does Minimum-cost flow problem matter?

Because it connects several mathematics ideas at once: it gives you a definition you can apply, a quantity you can calculate, and a way to check whether a result is plausible.

How should I study Minimum-cost flow problem?

Read the excerpt, restate it from memory, then work through the examples and applications listed on this page. The five-step study plan above takes about twenty minutes.

What does this page cover?

It gives you a compact reference excerpt plus original lgStudy explanations, examples, applications and study material on Minimum-cost flow problem.

Tags

  • Mathematical problems
  • Network flow problem

Keep exploring