Download presentation
Presentation is loading. Please wait.
1
Analysis of Algorithms
Minimum Cost Flow Uri Zwick Tel Aviv University December 2015 Last modified: December 9, 2015
2
A Flow network A Flow π=(πΊ,π,π,π ,π‘) πΊ=(π,πΈ) β A directed graph
π:πΈβ β + β A cost function π βπ β A source vertex π:πΈββ β A capacity function π‘βπ β A sink vertex A Flow π:πΈβ β + is a (feasible) flow iff (i) 0β€π π β€π(π), for every πβπΈ. (Capacity constraint) (ii) π πΏ β π£ =π( πΏ + π£ ), for every π£βπβ{π ,π‘}. (Conservation) The value of a flow is πππ π = π =π πΏ + π =π( πΏ β π‘ ). The cost of a flow is πΆππ π‘ π =π(π)= πβπΈ π π π(π) . Find a maximum flow of minimum cost.
3
Flows with demands/supplies
π=(πΊ,π,π,π) π:πβ β β A demand function. (Where π π = π£ π π£ =0.) π:πΈβ β + is a (feasible) flow iff (i) 0β€π π β€π(π), for every πβπΈ. (Capacity constraint) (ii) π πΏ β π£ βπ πΏ + π£ =π(π£), for every π£βπ. (Demand/supply) Exercise: Show that the demand-supply version is equivalent to the sink-source version. Circulations A flow that satisfies the conservation constraint at all vertices. Exercise: Show that the min cost flow problem is equivalent to the problem of finding a min cost circulation.
4
Flow Decomposition Exercise: Prove the theorem.
Let π=(πΊ,π,π,π ,π‘) be a flow network. If π is a simple path from π to π‘, let π π be a flow such that π π π =1 if πβπ, and π π π =0, otherwise. ( π π is not necessarily feasible.) Similarly, if πΆ is a simple directed cycle in πΊ, let π πΆ be a circulation in which one unit of flow flows on each edge of πΆ. Theorem: Let π:πΈβ β + be a flow in π. Then, there is a collection of simple π -π‘ paths π 1 , π 2 ,β¦, π π , and a collection of simple cycles πΆ 1 , πΆ 2 ,β¦, πΆ π , and constants πΌ 1 , πΌ 2 ,β¦, πΌ π >0 and π½ 1 , π½ 2 ,β¦, π½ π >0, such that π+πβ€π and π= π=1 π πΌ π π π π + π=1 π π½ π π πΆ π . Furthermore, if π is a circulation, i.e., π =0, then π=0, i.e., the flow is decomposed into flows on directed cycles. Exercise: Prove the theorem.
5
Residual Network 1,β8 1,5,8 0,1,3 1, 3 4, 8 1,3,7 2, 7 1, β7 2, 5 0,2,5 1, β4 1,1,4 π π π
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.