0% found this document useful (0 votes)
236 views34 pages

Minimum Cost Flows: Primal Dual Algorithm and The Out-of-Kilter Algorithm

The document discusses two algorithms for solving minimum cost flow problems: 1) The primal-dual algorithm, which transforms the problem into a maximum flow problem on an augmented network and solves it using shortest path algorithms. 2) The out-of-kilter algorithm, which maintains feasibility and optimality conditions at each iteration by sending flow along shortest paths and updating node potentials.

Uploaded by

dlpkrshna
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
236 views34 pages

Minimum Cost Flows: Primal Dual Algorithm and The Out-of-Kilter Algorithm

The document discusses two algorithms for solving minimum cost flow problems: 1) The primal-dual algorithm, which transforms the problem into a maximum flow problem on an augmented network and solves it using shortest path algorithms. 2) The out-of-kilter algorithm, which maintains feasibility and optimality conditions at each iteration by sending flow along shortest paths and updating node potentials.

Uploaded by

dlpkrshna
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 34

Minimum Cost Flows

Primal Dual Algorithm

and the Out-of-Kilter Algorithm


Overview of lecture
• Quick review of min cost flow and optimality conditions

• Primal Dual algorithm

• Out-of-kilter algorithm

2
Optimality Conditions
Theorem. Suppose that x* is flow and π* is a vector of node
potential. Then x* and π* are optimal if
1. the flow x* is feasible and
2. cπ*ij ≥ 0 for all (i, j) ∈ G(x*).
The second property is often called dual feasibility.

3
Optimality Conditions
The cycle canceling algorithm starts with a feasible
flow and maintains a feasible flow at each iteration.
It terminates with dual feasibility.

The successive shortest path algorithm starts with


(and maintains) an infeasible flow x and node
potentials π that are dual feasible. It stops when it
obtains a flow that is feasible.

It’s main subroutine involves sending flow along a 4

path from a node with excess to a node with deficit.


b(i) b(j)
Primal –Dual Algorithm   (, )
i j
• min-cost  max-flow
• single excess node and single deficit
node.
2 -2
  (, )
u w
  (,
) )
(  ,
v z
  (, )
2 -2

5
b(i) b(j)
Primal –Dual Algorithm   (, )
i j
• min-cost  max-flow
• single excess node and single deficit
node.
2 -2
 Add nodes s and t.
  (, )
u w
s   (, t
) )
(  ,
v z
  (, )
2 -2

6
b(i) b(j)
Primal –Dual Algorithm   (, )
i j
•  min-cost  max-flow
• single excess node and single deficit
node.
2 -2
 Add nodes s and t.
  (, )
4 ,) u w
 For every v such that b(v)>0:  (
Add an edge (s,v) such that u(s,v)=b(v) s   (, t
) )
 b(s) =   (, (  ,
) v z
  (, )
2 -2

7
b(i) b(j)
Primal –Dual Algorithm   (, )
i j
•  min-cost  max-flow
• single excess node and single deficit
node.
2 -2
  (, ) -4
 Add nodes s and t.
4 ,) u  
w (,
( )
 For every v such that b(v)>0:  
Add an edge (s,v) such that u(s,v)=b(v) s   (, t
) )
 b(s) =   (,   (, )
) v z  ( ,
 For every v such that b(v)<0:
Add an edge (v,t) such that u(v,t)= -b(v)
  (, )
 b(t) =
2 -2

8
b(i) b(j)
Primal –Dual Algorithm   (, )
i j
•  min-cost  max-flow
• single excess node and single deficit
node.
0 0
  (, ) -4
 Add nodes s and t.
4 ,) u w   (,
( )
 For every v such that b(v)>0:  
Add an edge (s,v) such that u(s,v)=b(v) s   (, t
) )
 b(s) =   (,   (, )
) v z  ( ,
 For every v such that b(v)<0:
Add an edge (v,t) such that u(v,t)= -b(v)
  (, )
 b(t) =
0 0
 For all
9
b(i) b(j)
Primal –Dual Algorithm   (, )
i j
• min-cost  max-flow
• single excess node and single deficit
node.
0 0
• a minimum cost flow in the
  (, )   -4
4 ,) u w (,)
transformed network gives a  (
minimum cost flow in the original s   (, t
) )
network   (,   (, )
) v z  ( ,
• There exists a feasible solution iff all   (, )
the edges from s are saturated. 0 0

10
Primal –Dual Algorithm
• Similar to the previous SSP :
• Start with optimal (RC) feasible pseudoflow
• At every step keeps optimality (RC) and tries to build a feasible
flow.

• Instead of sending flow along one shortest path at a time it solve


maximum flow that send flow along all shortest paths.

11
Primal –Dual Algorithm
•  (x) Admissible network :

• will contain only arcs in G(x) with =0

• =

• Every directed path from node s to node t in is a shortest path in


G(x) between the same pair of nodes.

12
Primal –Dual Algorithm
• algorithm
  primal-dual;
• begin
• x: = 0 and : = 0;
• e(s) : = b(s) and e(t) : = b(t);
• while e(s) > 0 do
• begin
• determine shortest path distances d(·) from node s to all other nodes
in G(x) with respect to the reduced costs ;
• update : = - d;
• define the admissible network ;
• establish a maximum flow from node s to node t in ;
• update e(s) , e(t), and G(x);
• end; 13
• end;
b(i) b(j)
Primal –Dual Algorithm i
  (, )
j

• Example network:

2 -2
  (, )
u w
  (,
) )
(  ,
v z
  (, )
2 -2

14
b(i) b(j)
  (, )
Primal –Dual Algorithm i j

• Transformed network

2 -2 0 0
  (, )   (, )
u w ) u w   (,
)
  (,
  (, 4 s   (, t -4
) ) ,) )
(  ,   (,  ( )
v z ) v z (  ,
  (, )   (, )
2 -2 0 0

15
b(i) b(j)
  (, )
Primal –Dual Algorithm i j

• We start with x=0, so G(x) = G

0 0
  (, )
) u w   (,
)
  (,
4 s   (, t -4
,) )
  (,  ( )
) v z (  ,
  (, )
0 0

16
b(i) b(j)
  (, )
Primal –Dual Algorithm i j

•  =0, so = (i) + (j) =

0 0
  (, )
) u w   (,
)
  (,
4 s   (, t -4
,) )
  (,  ( )
) v z (  ,
  (, )
0 0

17
b(i) b(j)
  (, )
Primal –Dual Algorithm i j

• Running shortest path from s yield vector


d = (0,0,0,1,2,1)

0 0
  (, )
) u w   (,
)
  (,
4 s   (, t -4
,) )
  (,  ( )
) v z (  ,
  (, )
0 0

18
b(i) b(j)
  (, )
Primal –Dual Algorithm i j

• Running shortest path from s yield vector


d = (0,0,0,1,2,1)
1
0
0 0
0   (, ) 1
) u w   (,
)
  (,
4 s   (, t -4
,) )
  (,  ( )
) v z (  ,
  (, )
0 0
0 2
19
  (, )
Primal –Dual Algorithm𝑐 𝜋
i
=𝑐 𝑢 , 𝑣 − 𝜋 ( 𝑢 ) + 𝜋 ( 𝑣 )
j
  𝑢, 𝑣

•  G(x) after updating (= -d) :

 (w) = 1 1
 (u) = 0 0
 (s) = 0  e(s)= -4 0 0
e(s) = 4   (, )   (, (t) = 1   (, )
) u w
) 0 ) u w   (,
  (, ) 1
  (,   (,
s ) ) t 4 s   (, t -4
  (, (, ) )
) v  
, )   (,
)   (, )
z  ( v z (  ,
  (, )   (, )
0 0
 (v) = 0  (z) = 2 0 2
20
𝑟  ❑
Primal –Dual Algorithm i
𝑖𝑗
j
𝑐  𝜋𝑢 , 𝑣 =𝑐 𝑢 , 𝑣 − 𝜋 ( 𝑣 )+ 𝜋 ( 𝑢 )
•  The admissible network ( = 0)

 (w) = 1
 (s) = 0  (u) = 0
 e(s)= -4
e(s) = 4
u
  (, )
w   (, (t) = 1  1
) ) u w  2
  (, 2 
  (,
s ) ) t s  1 t
  (,   (, )  2

) v z  ( ,
v z
  (, )  2
 (v) = 0  (z) = 2
21
𝑟  ❑
Primal –Dual Algorithm i
𝑖𝑗
j

• Run max flow from s to t:

 1
u w  2

s  1 t

 2
v z
 2

22
𝑟  ❑
Primal –Dual Algorithm i
𝑖𝑗
j

• Run max flow from s to t:

 0
u w  0

s  1 t

 1
v z
 2

23
Primal –Dual Algorithm
• Correctness + Runtime:
• The primal-dual algorithm sends flow along all shortest paths at
once; therefore, proof of correctness is similar to the successive
shortest path one

• Excess of the node s decreases at every iteration

• Since everything is integral the distance between s


and t increases by at least one unit.

24
Primal –Dual Algorithm
•  Correctness + Runtime:
• Let U be an upper bound to the supply and C an upper bound to
the costs.

• Number of iteration bounded by min{nU,nC}


e(s)
The value of no node potential can fall below –nC

• O(min{nU,nC}* {S(n,m,nC) + M(n,m,U)} where S(n,m,nC) is the


running time for shortest path and M(n,m,U) is the running time 25
for Max Flow.
Optimality Conditions
(Reminder)
• Complementary
  Slackness:
Theorem: A feasible solution x* is an optimal solution of the MCF problem if
and only if for some set of node potentials , the reduced costs and flow values
satisfy the following complementary slackness conditions for every edge (u,v) in
the network:
 If then
 If then
 If then

Out-Of-Kilter Algorithm

26
The Out of Kilter Algorithm
• An edge can be in one of 2 states:

• In-kilter : satisfy the complementary slackness

• Out-of-kilter : don’t satisfy the complementary slackness

28
Kilter Diagram
  The kilter diagram represents
the conditions:

 If then
 If then
 If then

29
Kilter Number
•• kilter
  number of each edge (i, j) is the
magnitude of the change in required
to make the edge an in-kilter arc
while keeping fixed.

• A kilter number can be thought of as


the change required to bring a flow
into feasibility and eventually
optimality.

• we can add up all the kilter numbers


to find how far from optimality we
are at any given time.

30
• An in-kilter edge has a kilter number
of zero.
Kilter Number
 
 

 < 0 -|   If then
 If then
 =0  If then



31
Kilter Number – residual
network
   

 We must send units of flow


in the edge (I,j) so that it
drops out of the residual
network and satisfy the RC

32
The Out of Kilter Algorithm
  Start with a feasible flow and = 0

 Iterate while we still have out-of-kilter edges


 Look at G(x) and select and out-of-kilter (p,q)
 Edges are given a cost of the higher of zero or the reduced cost.
 Run shortest path and update the potential function same as before
 If after the update the reduce cost of the edge(p,q) is negative
 We use a shortest path to find the cheapest cycle that includes the out of
kilter edge using the residual graph.
 Having found the cycle, we check the amount of flow that can be
augmented (min in the cycle ) and update the flow variables (x) and the
residual graphs (G(x)).

33
The Out of Kilter Algorithm
 Correctness:
 Kilter numbers of the edges are non-increasing
 Two operations in the algorithm affect the kilter numbers of arcs:
 updating node potentials

 augmenting flow along the cycle W

 At each iteration the algorithm selects and edge (p,q)


 Makes it in-kilter during potential update
 decrease it by at least 1 by the flow augmentation

34
The Out of Kilter Algorithm
 
 Runtime:
 The algorithm terminate within O(mU) iterations

 Dominant computation is shortest path computation

  total runtime is : O(

35

You might also like