Chapter 8
Network Flow III  Applications
By
Sariel HarPeled
, October 15, 2007
±
Version: 0.1
8.1
Edge disjoint paths
8.1.1
Edgedisjoint paths in a directed graphs
Question 8.1.1
Given a graph
G
(either directed or undirected), two vertices s and t, and a pa
rameter k, the task is to compute k paths from s to t in
G
, such that they are
edge disjoint
; namely,
these paths do not share an edge.
To solve this problem, we will convert
G
(assume
G
is a directed graph for the time being)
into a network ﬂow graph
H
, such that every edge has capacity 1. Find the maximum ﬂow in
G
(between
s
and
t
). We claim that the value of the maximum ﬂow in the network
H
, is equal to the
number of edge disjoint paths in
G
.
Lemma 8.1.2
If there are k edge disjoint paths in
G
between s and t, then the maximum ﬂow in H
is at least k.
Proof:
Given
k
such edge disjoint paths, push one unit of ﬂow along each such path. The resulting
ﬂow is legal in
h
and it has value
k
.
Deﬁnition 8.1.3 (
0
/
1
ﬂow.)
A ﬂow
f
is
0
/
1
ﬂow
if every edge has either no ﬂow on it, or one unit
of ﬂow.
Lemma 8.1.4
Let f be a
0
/
1
ﬂow in a network H with ﬂow value
μ
. Then there are
μ
edge disjoint
paths between s and t in H.
Proof:
By induction on the number of edges in
H
that has one unit of ﬂow assigned to them by
f
. If
μ
=
0 then there is nothing to prove.
±
This work is licensed under the Creative Commons AttributionNoncommercial 3.0 License. To view a copy of
this license, visit
http://creativecommons.org/licenses/bync/3.0/
or send a letter to Creative Commons,
171 Second Street, Suite 300, San Francisco, California, 94105, USA.
1
This preview has intentionally blurred sections. Sign up to view the full version.
View Full DocumentOtherwise, start traversing the graph
H
from
s
traveling only along edges with ﬂow 1 assigned
to them by
f
. We mark such an edge as used, and do not allow one to travel on such an edge again.
There are two possibilities:
(i) We reached the target vertex
t
. In this case, we take this path, add it to the set of output
paths, and reduce the ﬂow along the edges of the generated path
π
to 0. Let
H
0
be the resulting
ﬂow network and
f
0
the resulting ﬂow. We have

f
0

=
μ

1,
H
0
has less edges, and by induction,
it has
μ

1 edge disjoint paths in
H
0
between
s
and
t
. Together with
π
this forms
μ
such paths.
(ii) We visit a vertex
v
for the second time. In this case, our traversal contains a cycle
C
, of
edges in
H
that have ﬂow 1 on them. We set the ﬂow along the edges of
C
to 0 and use induction
on the remaining graph (since it has less edges with ﬂow 1 on them). The value of the ﬂow
f
did
not change by removing
C
, and as such it follows by induction that there are
μ
edge disjoint paths
between
s
and
t
in
H
.
Since the graph
G
is simple, there are at most
n
=

V
(
H
)

edges that leave
s
. As such, the
maximum ﬂow in
H
is
n
. Thus, applying the FordFulkerson algorithm, takes
O
(
mn
) time. The
extraction of the paths can also be done in linear time by applying the algorithm in the proof of
Lemma 8.1.4. As such, we get:
Theorem 8.1.5
Given a directed graph
This is the end of the preview. Sign up
to
access the rest of the document.
 Fall '08
 Viswanathan
 Algorithms, Shortest path problem, Flow network, Maximum flow problem, Maxflow mincut theorem, Network flow

Click to edit the document details