Maurizio Patrignani
seminar on the paper
on the single-sourceunsplittable flow problem
authored by
Yefim Dinitz Naveen Garg
Michel X. Goemans
FOCS ‘98
the model – capacitated graph
• directed graph G(V,E)• capacity on edges c : E R+
4.1
2.3
1.62.9
2.6 1.7
1.0 1.5
2.2
2.1
2.6
8.5
3.4
3.2
4.1
2.3
1.62.9
2.6 1.7
1.0 1.5
2.2
2.1
2.6
8.5
3.4
3.2
• a single source s and k terminals ti with demands di R+
• a vertex may contain an arbitrary number of terminals
the model – source and terminals
s
t11.2
t2t3
0.9
3.1
t43.1
t51.5
t62.1
4.1
2.3
1.62.9
2.6 1.7
1.0 1.5
2.2
2.1
2.6
8.5
3.4
3.2
s
t11.2
t2t3
0.9
3.1
t43.1
t51.5
t62.1
• each commodity flows along a single path from s to ti (unsplittable)
• the flow on each edge is a real number (fractional) f : E R+ 0
the model – unsplittable, fractional flows
• if flows were allowed to split• a (splittable) single source multicommodity flow can be obtained
from a single source network flow• consider a flow of the simple network flow problem and iterate:
• find a maximal route (blue) from s to ti on the flow network (red)• add such route to the splittable flow of ti
• update flow and demand di
the model – relationships with other models
3.0
0.5
1.0 1.0
0.5
7.0 3.0
2.0s
4.5 2.0
0.5
1.0
1.0
0.5
6.0 3.0
2.0s
3.5
simple network flow is an easy problemsimple network flow problem (and, hence, splittable single source
multicommodity flow problem) admits a solution
for any vertex set S (sS) the total demand of terminals in S is at most the total capacity of the edges entering S
4.1
2.3
1.62.9
2.6 1.7
1.0 1.5
2.2
2.1
2.68.5
3.4
3.2
s
1.20.9
3.11.5
2.1cut condition
four possible questions
feasibility: can one route all commodities unsplittably?
minimum congestion: find the smallest 1, such that the problem is feasible if all capacities are multiplied by ?
maximum routable demands: max(iT di) over all subsets T of demands D
minimum number of rounds: if we partition the demands into rounds, how many rounds are needed in order to have all feasible rounds?
2C
Cthe obtained instance is feasible
the partition instance admits a
solution
reduction from partition
feasibility is NP-hard
C
Cs
1.20.9
3.13.1
1.52.1
2C
Cthe minimum congestion =C
the partition instance admits a
solution
reduction from partition
minimum congestion is NP-hard
1
1s
1.20.9
3.13.1
1.52.1
C
2C
C2 rounds are needed to
unsplittably route all demands
the partition instance admits a solution
reduction from partition
minimum number of rounds is NP-hard
s
1.20.9
3.13.1
1.52.1
C
2C
CC demands can be unsplittably
satisfied
the partition instance admits a solution
reduction from partition
maximum routable demand is NP-hard
s
1.20.9
3.13.1
1.52.1
example of applicationscheduling on a parallel machine
machines jobs
T
T
T
T
p1
p2
p3
p4
p5
pn
notations and assumptions
notations:• dmax = maximum demand• cmin = minimum capacity
assumptions:• flow is acyclic (thus, graph G is acyclic)• cmin dmax, that is, any commodity can be routed on any edge
results of the paper
if the cut condition is verified:
1. all demands can be unsplittably routed violating the capacities by at most the maximum demand dmax
• since cmin dmax then congestion is at most two (best possible)
2. all demands can be unsplittably routed in at most 5 rounds3. 22.6% of demands can be routed unsplittably
we will focus on result 1.
basic idea of the paper
start from a single-source, splittable, fractional flow satisfying all demands
start from a single-source, splittable, fractional flow satisfying all demands
transform it into an unsplittable flow that, in the worst case, violates capacities of dmax
transform it into an unsplittable flow that, in the worst case, violates capacities of dmax
preliminary (simplification) phase
f
if f d
f-d
• remove each edge e with f(e)=0• remove each ti that is on the same vertex as s• remove each vertex that has no incident edge
stop when all terminals are regular
a terminal is regular i fi < d
d d
f1
f2
d
algorithm architecture
preliminary simplification
search for alternating cycle
augment flow
move terminals
s is the only vertex?
end
yes
no
invariant condition
invariant condition: each vertex v containing terminals has at least a regular terminal (it follows that v has at least two incoming edges)
rather than asking for all regular terminals, a relaxed invariant condition will be pursued
f1
f2
d2d1
search for alternating cycle
as soon as it is possible start a new forward path
arbitrarily chosen outgoing edge
go forward as long as possible (but the grafo is acyclic!)
forward path
arbitrarily chosen incoming edge
no outgoing edges
backward path
go backward till you find vertices with only one outgoing edge
arbitrarily chosen vertex
search for alternating cyclestop when you reach an already visited vertex
it may happen that• a forward path intersects a forward path (represented in the figure above)• a forward path intersects a backward path• a backward path intersects a forward path
surely a terminal here
surely a terminal here
augment flowdecrease the flow on forward paths and increase on backward paths of the same quantity
the balance of each vertex is granted
augment flowaugment/decrement flow until one of these two conditions holds: condition one
a forward edge disappears
condition twoa non-movable terminal becomes movable
an edge e = (u,v) is called singular if the directed subgraph reachable from e is a path
singular edges
the edges of a backward path are all singular
singular edges
once an edge becomes singular it stays singular until it is removed
move terminal t along edge e if:
1) e is singular and f(e) = d
move terminals
2) e is not singular and f(e) d
with a preference for (1)
in other words:1) you move preferentially through singular edges, only if the flow is matched
(and the singular edge is then removed)2) you move on non-singular edges if no other move can be done
singular edges
non singular edge
exampleconsider this instanceall terminals are regular
4
7
u
v
ws
86
2
3 2
examplesearch for an alternating cycle
4
7
u
v
ws
86
2
3 2
exampleaugment/decrease flow
4
7
u
v
ws
86
2
3 2
-2 -2
+2+2
exampleaugment/decrease flow
4
7
u
v
ws
86
3 2
6
54
20
examplemove terminals
4
7
u
v
ws
66
5 4
examplemove terminals
7
u
v
s
66
5 4
• it is not possible to move terminal 4 to s since (s,v) is singular and f(s,v)>4
• it is not possible to move terminal 4 to u since (u,v) is singular and f(u,v)>4
end of the first iteration
examplesearch for an alternating cycle (iteration 2)
7
u
v
s
66
5 4
exampleaugment/decrease flow (iteration 2)
7
u
v
s
66
5 4
-2
-2
+2
exampleaugment/decrease flow (iteration 2)
7
u
v
s
66
5 4
4
7
4
examplemove terminals (iteration 2)
7
u
v
s
44
7 4
• it is not possible to move terminal 4 to s since (s,v) is singular and f(s,v) > 4
examplemove terminals (iteration 2)
u
v
s
44
4
done
7
examplemove terminals (iteration 2)
u
s
4
4
done
7
examplemove terminals (iteration 2)
s
47
done
examplefinal solution of the unsplittable flow problem
4
7
u
v
ws
86
2
3 2
47
main result
the algorithm finds an unsplittable flow such that the total flow on each edge e violates its capacity (actually, violates the initial flow on e) of a quantity that is less than the maximum demand
• before edge e becomes singular• the value of all terminals moved through e is at most the initial
flow f(e)
• after edge e becomes singular• at most one terminal may be moved through e (and this deletes e)
the sum of the flows of all commodities, with the exception of at most one, on edge e is less than the initial flow f(e)
corollary
tightness
M
M
M
M
M
M
M
M
• an unsplittable flow necessarily violates the capacity of M-M/q on some edge
• growing q, M/q goes to zero and the unsplittable flow violates the capacity of M, the maximum demand
s
M
M-M/q
M-M/q
M-M/q
M-M/q
consider this example
preliminary simplification
search for alternating cycle
augment flow
move terminals
s is the only vertex?
end
yes
no
running time
O(n)
O(m) times (removes at
least one edge)
O(k)
O(km) total
O(nm + km)
m = |E|n = |V|k = no. terminals
O(km)
correctness
lemma 3.2: if, at the beginning of an iteration, v contains an irregular terminal, then
1. the out-degree of v is zero2. v contains no other irregular terminal3. v contains another (regular) terminal
lemma 3.2: if, at the beginning of an iteration, v contains an irregular terminal, then
1. the out-degree of v is zero2. v contains no other irregular terminal3. v contains another (regular) terminal
lemma 3.3: at the beginning of any iteration, the in-degree of any vertex containing one or more terminals is at least 2
lemma 3.3: at the beginning of any iteration, the in-degree of any vertex containing one or more terminals is at least 2
lemma 3.4: as long as all terminals have not reached the source, the algorithm always finds an alternating cycle
lemma 3.4: as long as all terminals have not reached the source, the algorithm always finds an alternating cycle
lemma 3.1: whenever an edge becomes singular, it remains so until it is removed from the graph
lemma 3.1: whenever an edge becomes singular, it remains so until it is removed from the graph
lemma 3.1
• when e becomes singular, the statement obviously true
• no edge is added during the process (edges are removed only)
• by removing an edge the property can not be violated
euv e’
lemma 3.1: whenever an edge becomes singular, it remains so until it is removed from the graph
lemma 3.1: whenever an edge becomes singular, it remains so until it is removed from the graph
lemma 3.2
v
lemma 3.2: if, at the beginning of an iteration, v contains an irregular terminal tj, then
1. the out-degree of v is zero2. v contains no other irregular terminal3. v contains another (regular) terminal
lemma 3.2: if, at the beginning of an iteration, v contains an irregular terminal tj, then
1. the out-degree of v is zero2. v contains no other irregular terminal3. v contains another (regular) terminal
79
8
8
18
• terminal with demand 7 is not regular
• terminal with demand 18 is regular
lemma 3.2
v
79
8
8
18
• since tj is irregular, at least one edge e entering v must have f(e) > dj
• consider the iteration i when you moved terminal tj to v
• since tj was not moved further backwards, edge e was singular
• f(e) can not be increased from below tj to above tj in a following iteration
• hence edge (v,w) was singular and out-degree of v is zero after
iteration i
we
lemma 3.2
v
79
8
8
18
• at most one irregular terminal can be moved to a vertex v
• this proves that v contains no other irregular terminals
• since f(e) > tj and out-degree of v is zero, the conservation of the
flow implies that there is at least another (regular) terminal on v
e
lemma 3.3
if a vertex has irregular terminals it has also (at least) one regular terminal
vertices with regular terminals have in-degree at least two by definition
lemma 3.3: at the beginning of any iteration, the in-degree of any vertex containing one or more terminals is at least 2
lemma 3.3: at the beginning of any iteration, the in-degree of any vertex containing one or more terminals is at least 2
lemma 3.4lemma 3.4: as long as all terminals have not reached the source, the algorithm always finds an alternating cycle
lemma 3.4: as long as all terminals have not reached the source, the algorithm always finds an alternating cycle
• when constructing a forward path you stop at a vertex v with no outgoing edges
• flow conservation implies that v has terminals• by lemma 3.3 vertex v has in-degree at least 2
• when constructing a backward path you may be stuck at a vertex v with no incoming edges
• necessarily v=s• contradiction
s
how can this branch be connected to s?
the end