ArticleslgStudy

computer science

Multi-commodity flow problem

Multi-commodity flow problem is a computer science 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 Multi-commodity flow problem rather than just read about it. In short: The multi-commodity flow problem is a network flow problem with multiple commodities (flow demands) between different source and sink nodes. Definition Given a flow network G(V,E), where edge (u,v)∈E has capacity c(u,v).

Key takeaways

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

Reference excerpt

The multi-commodity flow problem is a network flow problem with multiple commodities (flow demands) between different source and sink nodes.

Definition Given a flow network G(V,E), where edge (u,v)∈E has capacity c(u,v). There are k commodities K1,K2,…,Kk, defined by Ki=(si,ti,di), where si and ti is the source and sink of commodity i, and di is its demand. The variable fi(u,v) defines the fraction of flow i along edge (u,v), where fi(u,v)∈[0,1] in case the flow can be split among multiple paths, and fi(u,v)∈{0,1} otherwise (i.e. "single path routing"). Find an assignment of all flow variables which satisfies the following four constraints: (1) Link capacity: The sum of all flows routed over a link does not exceed its capacity.

∀(u,v)∈E:∑i=1kfi(u,v)⋅di≤c(u,v) (2) Flow conservation on transit nodes: The amount of a flow entering an intermediate node u is the same that exits the node.

∀i∈{1,…,k}:∑(u,w)∈Efi(u,w)−∑(w,u)∈Efi(w,u)=0whenu≠si,ti (3) Flow conservation at the source: A flow must exit its source node completely.

∀i∈{1,…,k}:∑(si,w)∈Efi(si,w)−∑(w,si)∈Efi(w,si)=1 (4) Flow conservation at the destination: A flow must enter its sink node completely.

∀i∈{1,…,k}:∑(w,ti)∈Efi(w,ti)−∑(ti,w)∈Efi(ti,w)=1

Corresponding optimization problems Load balancing is the attempt to route flows such that the utilization U(u,v) of all links (u,v)∈E is even, where

U(u,v)=∑i=1kfi(u,v)⋅dic(u,v) The problem can be solved e.g. by minimizing ∑u,v∈V(U(u,v))2. A common linearization of this problem is the minimization of the maximum utilization Umax, where

∀(u,v)∈E:Umax≥U(u,v) In the minimum cost multi-commodity flow problem, there is a cost a(u,v)⋅f(u,v) for sending a flow on (u,v). You then need to minimize

∑(u,v)∈E(a(u,v)∑i=1kfi(u,v)⋅di) In the maximum multi-commodity flow problem, the demand of each commodity is not fixed, and the total throughput is maximized by maximizing the sum of all demands ∑i=1kdi

Relation to other problems The minimum cost variant of the multi-commodity flow problem is a generalization of the minimum cost flow problem (in which there is merely one source s and one sink t). Variants of the circulation problem are generalizations of all flow problems. That is, any flow problem can be viewed as a particular circulation problem.

Usage Routing and wavelength assignment (RWA) in optical burst switching of Optical Network would be approached via multi-commodity flow formulas, if the network is equipped with wavelength conversion at every node. Register allocation can be modeled as an integer minimum cost multi-commodity flow problem: Values produced by instructions are source nodes, values consumed by instructions are sink nodes and registers as well as stack slots are edges.

Solutions In the decision version of problems, the problem of producing an integer flow satisfying all demands is NP-complete, even for only two commodities and unit capacities (making the problem strongly NP-complete in this case). If fractional flows are allowed, the problem can be solved in polynomial time through linear programming, or through (typically much faster) fully polynomial time approximation schemes.

Applications Multicommodity flow is applied in the overlay routing in content delivery.

External resources Papers by Clifford Stein about this problem: http://www.columbia.edu/~cs2035/papers/#mcf Software solving the problem: https://web.archive.org/web/20130306031532/http://typo.zib.de/opt-long_projects/Software/Mcf/

References

Add: Jean-Patrice Netter, Flow Augmenting Meshings: a primal type of approach to the maximum integer flow in a multi-commodity network, Ph.D. dissertation Johns Hopkins University, 1971

Worked examples

Example 1 — a first encounter with Multi-commodity flow problem

Start with the simplest possible case. Write down what Multi-commodity flow problem claims or describes in one sentence, then invent the smallest concrete situation in which that sentence is true. In computer science, 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 Multi-commodity 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 Multi-commodity 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 Multi-commodity flow problem

In research
Multi-commodity flow problem appears in computer science 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 Multi-commodity 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
Multi-commodity flow problem is common in secondary-school and first-year university syllabi. It links to neighbouring topics NP-complete problems, Network flow problem, so understanding it makes those chapters shorter.
In everyday life
Look for Multi-commodity 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 “Multi-commodity flow problem” →

How to study Multi-commodity flow problem in 20 minutes

  1. Read the reference excerpt below once, without taking notes.
  2. Close the page and write down what Multi-commodity 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 Multi-commodity flow problem out loud to somebody else — or to Teacher Smith in the lgStudy chat.

Frequently asked questions

What is Multi-commodity flow problem in simple terms?

The multi-commodity flow problem is a network flow problem with multiple commodities (flow demands) between different source and sink nodes. Definition Given a flow network G(V,E), where edge (u,v)∈E has capacity c(u,v).

Why does Multi-commodity flow problem matter?

Because it connects several computer science 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 Multi-commodity 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 Multi-commodity flow problem.

Tags

  • NP-complete problems
  • Network flow problem

Keep exploring