04 Flow Decomposition
04 Flow Decomposition
2
The Minimum Cost Flow Problem
uij = capacity of arc (i,j).
cij = unit cost of shipping flow from node i to
node j on (i,j).
xij = amount shipped on arc (i,j)
Minimize ∑ (i,j) ∈A cij xij
3
Flow Decomposition and Transformations
◆ Flow Decomposition
◆ Removing Lower Bounds
◆ Removing Upper Bounds
◆ Node splitting
4
Flows along Paths
1
1 1
2 One unit of flow
5
1 around the cycle C
1
4 1 3
5
C
Properties of Path Flows
1 2 2 2 3 2 4 2 5 Flow(2, P)
P
6
Property of Cycle Flows
◆ If p is a cycle, then sending one unit of flow along
p satisfies conservation of flow everywhere.
1
1 1
5 2
1 1
4 1 3
7
Representations as Flows along Paths and Cycles
δ ij (P) = 0 if (i,j) ∉ P
δ ij (C) = 0 if (i,j) ∉ C
8
Representations as Flows along Paths and Cycles
◆ Claim: one can convert the path and cycle flows into an
arc flow x as follows: for each arc (i,j) ∈ A
9
Flow Decomposition
Notation:
10
Flow Decomposition Algorithm
Initialize Search(s, y)
begin
y := x; Carry out a depth first search
P := ∅ ; starting with node s until finding a
directed cycle C in G(y) or a path P
C:= ∅; in G(y) from s to a node t in
end DemandNodes(y).
Select(s, y)
begin
if SupplyNodes(y) = ∅, then s ∈ SupplyNodes(y);
else s ∈ N(y)
end 11
Capacities of Paths and Cycles
8 1 5 The capacity of C is
5 4 denoted as ∆ (C, y)
9 4 = min arc flow on C
7 wrt flow y.
7 2
∆ (C) = 4
C
13
Complexity Analysis
◆ Select initial node:
O(1) per path or cycle, assuming that we maintain a
set of supply nodes and a set of balanced nodes
incident to a positive flow arc
◆ Update step
O(n) per path or cycle
14
Complexity Analysis (continued)
Lemma. The number of paths and cycles found in the
flow decomposition is at most m + n – 1.
15
Conclusion
Flow Decomposition Theorem. Any non-negative
feasible flow x can be decomposed into the
following:
16
Corollary
A circulation is a flow with the property that the
flow in is the flow out for each node.
17
An application of Flow Decomposition
Consider the problem of finding a shortest path from
node 1 to all other nodes. Assume that all arc costs
are non-negative.
The model:
Minimize ∑ cijxij
( i, j )∈ A
Subject to ∑ x i j
j
− ∑x j i =
j
{
n−1 i f i=1
−1 i f i ≠1
5 1 1 6 -1
3
4
3
5
-1 -1
The decomposition of flows yields the paths:
1-2, 1-3, 1-3-4
1-3-4-5 and 1-3-4-6.
There are no cycles in the decomposition.
19
Trees have no cycles.
Other Applications of Flow Decomposition
◆ Reformulations of Problems.
There are network flow models that use path
and cycle based formulations.
Multicommodity Flows
20
Transformations
The minimum cost flow problem
uij = capacity of arc (i,j).
cij = unit cost of flow sent on (i,j).
xij = amount shipped on arc (i,j)
22
Eliminating Lower Bound on Arc Flows
Suppose that there is a lower bound lij on the arc flow in (i,j)
Then let yij = xij - lij . Then xij = yij + lij
Minimize Σ cij xij
Σ j xij - Σ k xki = bi for all i ∈ N.
and lij ≤ xij ≤ uij for all (i,j) ∈ A.
23
Eliminating Upper Bounds on Arc Flows
The minimum cost flow problem
Min Σ cij xij
i j i <i,j> j 24
Node Splitting
2
2 44 Flow x
4
1 6 6 Arc numbers
5
are capacities
3 5
Suppose that we want to add the constraint that the
flow into node 4 is at most 7.
Method: split node 4 into two nodes, say 4’ and 4”
2 7
2 4 Flow x’ can be
4 4
’ obtained from
6 ”
1 5 6 flow x, and vice
versa.
3 5 25
Summary
1. Any feasible flow can be decomposed into the sum of
flows around cycles plus the sum of flows from nodes
with supply to nodes with demand.
26