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 ) {\displaystyle \,G(V,E)} , where edge ( u , v ) ∈ E {\displaystyle (u,v)\in E} has capacity c ( u , v ) {\displaystyle \,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 ) {\displaystyle \,G(V,E)} , where edge ( u , v ) ∈ E {\displaystyle (u,v)\in E} has capacity c ( u , v ) {\displaystyle \,c(u,v)} . There are k {\displaystyle \,k} commodities K 1 , K 2 , … , K k {\displaystyle K_{1},K_{2},\dots ,K_{k}} , defined by K i = ( s i , t i , d i ) {\displaystyle \,K_{i}=(s_{i},t_{i},d_{i})} , where s i {\displaystyle \,s_{i}} and t i {\displaystyle \,t_{i}} is the source and sink of commodity i {\displaystyle \,i} , and d i {\displaystyle \,d_{i}} is its demand. The variable f i ( u , v ) {\displaystyle \,f_{i}(u,v)} defines the fraction of flow i {\displaystyle \,i} along edge ( u , v ) {\displaystyle \,(u,v)} , where f i ( u , v ) ∈ [ 0 , 1 ] {\displaystyle \,f_{i}(u,v)\in [0,1]} in case the flow can be split among multiple paths, and f i ( u , v ) ∈ { 0 , 1 } {\displaystyle \,f_{i}(u,v)\in \{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 = 1 k f i ( u , v ) ⋅ d i ≤ c ( u , v ) {\displaystyle \forall (u,v)\in E:\,\sum _{i=1}^{k}f_{i}(u,v)\cdot d_{i}\leq c(u,v)}

(2) Flow conservation on transit nodes: The amount of a flow entering an intermediate node u {\displaystyle u} is the same that exits the node.

∀ i ∈ { 1 , … , k } : ∑ ( u , w ) ∈ E f i ( u , w ) − ∑ ( w , u ) ∈ E f i ( w , u ) = 0 w h e n u ≠ s i , t i {\displaystyle \forall i\in \{1,\ldots ,k\}:\,\sum _{(u,w)\in E}f_{i}(u,w)-\sum _{(w,u)\in E}f_{i}(w,u)=0\quad \mathrm {when} \quad u\neq s_{i},t_{i}}

(3) Flow conservation at the source: A flow must exit its source node completely.

∀ i ∈ { 1 , … , k } : ∑ ( s i , w ) ∈ E f i ( s i , w ) − ∑ ( w , s i ) ∈ E f i ( w , s i ) = 1 {\displaystyle \forall i\in \{1,\ldots ,k\}:\,\sum _{(s_{i},w)\in E}f_{i}(s_{i},w)-\sum _{(w,s_{i})\in E}f_{i}(w,s_{i})=1}

(4) Flow conservation at the destination: A flow must enter its sink node completely.

… excerpt ends here. Continue reading the full article.

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.

Affiliate

Preply — study more efficiently by working with a personal tutor. 50% off.

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 ) {\displaystyle \,G(V,E)} , where edge ( u , v ) ∈ E {\displaystyle (u,v)\in E} has capacity c ( u , v ) {\displays…

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