Karakatsanis Multicut and integer multicommodity flow in ... - Corelab
Karakatsanis Multicut and integer multicommodity flow in ... - Corelab
Karakatsanis Multicut and integer multicommodity flow in ... - Corelab
You also want an ePaper? Increase the reach of your titles
YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.
<strong>Multicut</strong> <strong>and</strong> Integer<br />
Multicommodity Flow <strong>in</strong> Trees<br />
Approximation Algorithms,<br />
V. V. Vazirani<br />
Book Chapter 18<br />
Nicolas <strong>Karakatsanis</strong>, 2008
Introduction<br />
The theory of cuts <strong>in</strong> graphs occupies a central place not only <strong>in</strong> the<br />
study of exact algorithms, but also approximation algorithms<br />
Primal-Dual schema was used to derive a factor 2 algorithm for the<br />
weighted vertex cover problem<br />
For that algorithm, the relaxed dual complementary slackness<br />
conditions were automatically satisfied <strong>in</strong> any <strong>in</strong>tegral solution<br />
In this chapter, we will use the primal-dual schema to obta<strong>in</strong> an<br />
algorithm for a generalization of this problem<br />
This time, enforc<strong>in</strong>g relaxed dual complementary slackness conditions<br />
will be a non-trivial part of the algorithm<br />
Moreover, the procedure of reverse delete will be <strong>in</strong>troduced (useful for<br />
several other primal-dual algorithms
The problems <strong>and</strong> their LP-relaxations<br />
s − t<br />
The follow<strong>in</strong>g is an important generalization of the m<strong>in</strong>imum<br />
problem. It also generalizes the multiway cut problem (Chapter 4)<br />
cut<br />
Problem 18.1 (M<strong>in</strong>imum multicut)<br />
( )<br />
Let G = V,<br />
E be an undirected graph with nonnegative capacity e for<br />
each edge e∈ E . Let {( s1, t1) ,...,( sk,<br />
tk)<br />
} be a specified set of pairs of vertices,<br />
where each pair is dist<strong>in</strong>ct, but vertices <strong>in</strong> different pairs are not required<br />
to be dist<strong>in</strong>ct. A multicut is a set of edges whose removal separates each<br />
of the pairs. The problem is to f<strong>in</strong>d a m<strong>in</strong>imum capacity multicut <strong>in</strong> G.<br />
c<br />
The m<strong>in</strong>imum s − t cut problem is the special case of multicut for k = 1.<br />
Problem 18.1 generalizes multiway cut because separat<strong>in</strong>g term<strong>in</strong>als<br />
s ,..., 1<br />
s<br />
k is equivalent to separat<strong>in</strong>g all pairs ( s , for .<br />
i,<br />
sj)<br />
1≤ i < j ≤1<br />
Therefore, the m<strong>in</strong>imum multicut problem is NP-hard even for k = 3 ,<br />
s<strong>in</strong>ce the the multiway cut problem is NP-hard for the case of 3 term<strong>in</strong>als.
The problems <strong>and</strong> their LP-relaxations<br />
( )<br />
In chapter 20 an O log k factor approximation algorithm will be obta<strong>in</strong>ed<br />
for the m<strong>in</strong>imum multicut problem.<br />
In this chapter a factor 2 algorithm will be obta<strong>in</strong>ed for the special case<br />
when G = ( V,<br />
E)<br />
is restricted to be a tree.<br />
S<strong>in</strong>ce G is a tree, there is a unique path between <strong>and</strong> , <strong>and</strong> the<br />
multicut must pick an edge on this path to disconnect s from t<br />
i<br />
i .<br />
The m<strong>in</strong>imum multicut problem is NP-hard even if restricted to trees of<br />
height 1 <strong>and</strong> unit capacity edges.<br />
s i<br />
t i<br />
The m<strong>in</strong>imum multicut problem is NP-hard even if restricted to trees of<br />
height 1 <strong>and</strong> unit capacity edges.
Integer M<strong>in</strong>imum Multicat<br />
Integer programm<strong>in</strong>g formulation<br />
m<strong>in</strong>imize<br />
subject to<br />
∑<br />
e∈E<br />
cd<br />
e<br />
e<br />
∑ de<br />
≥ 1 i∈{ 1,..., k}<br />
e∈<br />
p<br />
i<br />
{ }<br />
d ∈ 0,1 , e∈<br />
E<br />
e<br />
L<strong>in</strong>ear Programm<strong>in</strong>g Relaxation<br />
m<strong>in</strong>imize<br />
subject to<br />
∑<br />
e∈E<br />
cd<br />
e<br />
e<br />
∑ de<br />
≥1,<br />
i∈{ 1,..., k}<br />
e∈<br />
p<br />
i<br />
d ≥ 0 e∈<br />
E<br />
e<br />
d<br />
Consider as the fractional extent to which edge is picked.<br />
e<br />
Fractional multicut: A solution to this LP-relaxation problem<br />
Condition: On each path p i<br />
, the sum of fractions of edges picked<br />
is at least 1.<br />
In general, m<strong>in</strong>imum fractional multicut may be strictly cheaper than<br />
m<strong>in</strong>imum <strong>in</strong>tegral multicut<br />
e
Fractional <strong>multicommodity</strong> <strong>flow</strong><br />
Problem 18.2 (Fractional mutlicommodity <strong>flow</strong>)<br />
We will <strong>in</strong>terpret the dual program as specify<strong>in</strong>g a <strong>multicommodity</strong> <strong>flow</strong> <strong>in</strong><br />
G, with a separate commodity correspond<strong>in</strong>g to each vertex pair ( s .<br />
i,<br />
ti)<br />
Dual variable f i will denote the amount of this commodity routed along the<br />
unique path from s to t .<br />
Dual program formulation (18.2)<br />
i<br />
i<br />
maximize<br />
subject to<br />
k<br />
∑<br />
i=<br />
1<br />
ie : ∈p<br />
f<br />
i<br />
∑ fi<br />
≤ ce,<br />
e∈<br />
E<br />
i<br />
f ≥ 0 i∈{ 1,..., k}<br />
i<br />
The commodities are routed concurrently.<br />
The object is to maximize the sum of the<br />
commodities routed, subject to the<br />
constra<strong>in</strong>t that the sum of <strong>flow</strong>s routed<br />
through an edge is bounded by the<br />
capacity of the edge.<br />
( )<br />
Notice that the sum of <strong>flow</strong>s through an edge uv , <strong>in</strong>cludes <strong>flow</strong> go<strong>in</strong>g <strong>in</strong><br />
either direction, to <strong>and</strong> to<br />
u v v u
Example<br />
Example 18.2<br />
Consider the followig graph with unit capacity edges <strong>and</strong> 3 vertex pairs<br />
The arrows show how to send 32 units of<br />
<strong>flow</strong> by send<strong>in</strong>g 12 unit of each commodity.<br />
Pick<strong>in</strong>g an edge to the extent of 12gives a<br />
multicut of capacity 32 as well.<br />
The above must be optimal solutions to the<br />
primal <strong>and</strong> dual programs<br />
On the other h<strong>and</strong>, any <strong>in</strong>tegral multicut<br />
must pick at least two of the three edges <strong>in</strong><br />
order to disconnect all three pairs. Hence,<br />
m<strong>in</strong>imum <strong>in</strong>tegral multicut has capacity 2<br />
Maximum <strong>in</strong>tegral <strong>multicommodity</strong> <strong>flow</strong> is 1, s<strong>in</strong>ce send<strong>in</strong>g 1 unit of any of<br />
the three commodities will saturate two of the edges.
Integer <strong>multicommodity</strong> <strong>flow</strong><br />
Problem 18.3 (Integer <strong>multicommodity</strong> <strong>flow</strong>)<br />
Graph G <strong>and</strong> the source-s<strong>in</strong>k pairs are specified as <strong>in</strong> the m<strong>in</strong>imum<br />
multicut problem; however, the edge capacities are all <strong>in</strong>tegral. A separate<br />
commodity is def<strong>in</strong>ed for each ( si,<br />
ti)<br />
pair. The object is to maximize the sum<br />
of commodities routed, subject to the edge capacity constra<strong>in</strong>ts <strong>and</strong> subject<br />
to rout<strong>in</strong>g each commodity <strong>in</strong>tegrally.<br />
Integer program formulation (18.3)<br />
maximize<br />
subject to<br />
k<br />
∑<br />
i=<br />
1<br />
ie : ∈p<br />
f<br />
i<br />
∑ fi<br />
≤ ce,<br />
e∈<br />
E<br />
i<br />
+<br />
f i<br />
∈Z i∈{ 1,..., k}<br />
Let us consider the problem when G is<br />
restricted to be a tree.<br />
Construct this <strong><strong>in</strong>teger</strong> program formulation<br />
by constra<strong>in</strong><strong>in</strong>g the f i varaiables to be nonnegative<br />
Clearly the objective function value of this<br />
problem is bounded by that of the l<strong>in</strong>ear<br />
program (18.2)<br />
This problem is NP-hard even for trees of height<br />
3 (though the capacity has to be arbitrary)
Example<br />
Example 18.2<br />
Consider the followig graph with unit capacity edges <strong>and</strong> 3 vertex pairs<br />
The arrows show how to send 32 units of<br />
<strong>flow</strong> by send<strong>in</strong>g 12 unit of each commodity.<br />
Pick<strong>in</strong>g an edge to the extent of 12gives a<br />
multicut of capacity 32 as well.<br />
The above must be optimal solutions to the<br />
primal <strong>and</strong> dual programs<br />
On the other h<strong>and</strong>, any <strong>in</strong>tegral multicut<br />
must pick at least two of the three edges <strong>in</strong><br />
order to disconnect all three pairs. Hence,<br />
m<strong>in</strong>imum <strong>in</strong>tegral multicut has capacity 2<br />
Maximum <strong>in</strong>tegral <strong>multicommodity</strong> <strong>flow</strong> is 1, s<strong>in</strong>ce send<strong>in</strong>g 1 unit of any of<br />
the three commodities will saturate two of the edges.
Overview of Primal-Dual Schema<br />
Let us consider the follow<strong>in</strong>g programs, written <strong>in</strong> st<strong>and</strong>ard form<br />
Primal program<br />
Dual program<br />
m<strong>in</strong>imize<br />
subject to<br />
n<br />
∑<br />
j=<br />
1<br />
n<br />
j=<br />
1<br />
cx<br />
j<br />
j<br />
∑ ax<br />
ij j<br />
≥ bi<br />
, i = 1,...,<br />
x ≥ 0 j = 1,...,<br />
j<br />
m<br />
n<br />
maximize<br />
subject to<br />
m<br />
∑<br />
i=<br />
1<br />
m<br />
i=<br />
1<br />
b y<br />
i<br />
i<br />
∑ ay<br />
ij i<br />
≤ cj<br />
, j = 1,..., n<br />
y ≥ 0, i = 1,..., m<br />
i<br />
Primal complementary slackness conditions<br />
α ≥1<br />
Let<br />
m<br />
For each 1 j n : either or c ≤ a y ≤ c .<br />
≤ ≤ x = 0<br />
j<br />
∑<br />
j<br />
α<br />
i=<br />
1 ij i j<br />
Dual complementary slackness conditions<br />
Let β ≥1<br />
For each 1 ≤i≤m:<br />
either 0 or b n<br />
≤ a x ≤ β ⋅ b .<br />
∑<br />
y<br />
i<br />
= i j=<br />
1 ij j i<br />
Proposition 15.1: If x <strong>and</strong> y are primal <strong>and</strong> dual feasible solutions satisfy<strong>in</strong>g<br />
n<br />
m<br />
the conditions stated above then:<br />
cx ≤α⋅β<br />
⋅ by<br />
∑<br />
∑<br />
j j i i<br />
j= 1 i=<br />
1
Primal-Dual schema based algorithm<br />
We will use the primal-dual schema to obta<strong>in</strong> an algorithm that simultaneously<br />
f<strong>in</strong>ds a multicut <strong>and</strong> an <strong><strong>in</strong>teger</strong> <strong>multicommodity</strong> <strong>flow</strong> that are with<strong>in</strong> a<br />
factor of 2 of each other, provided the given graph is a tree.<br />
Hence, we get approximation algorithms for both problems, of factor 2 <strong>and</strong> 12.<br />
Let us def<strong>in</strong>e the multicut LP to be the primal program. An edge e is saturated<br />
if the total <strong>flow</strong> through it equals its capacity.<br />
We will ensure primal complementary slackness conditions, i.e., α = 1.<br />
We will relax the dual complementary slackness conditions with β = 2 .<br />
Primal conditions: For each e∈ E, de ≠0⇒ f<br />
: i<br />
= c<br />
ie∈<br />
p e<br />
i<br />
Equivalently, any edge picked <strong>in</strong> the multicut must be saturated<br />
Relaxed dual conditions: For each i∈{ 1,..., k}<br />
, fi<br />
≠0 ⇒ de<br />
≤2<br />
e∈<br />
pi<br />
Equivalently, at most two edges can be picked from a path carry<strong>in</strong>g nonzero <strong>flow</strong><br />
Root the tree at an arbitrary vertex. Def<strong>in</strong>e the depth of vertex v to be the<br />
length of the path from v to the root; the depth of the root is 0.<br />
For two vertices u,<br />
υ ∈ V , let lca ( u,<br />
υ ) denote the lowest common ancestor of u <strong>and</strong><br />
v, i.e. the m<strong>in</strong>imum depth vertex on the path from u to v.<br />
∑<br />
∑
Primal-Dual schema based algorithm<br />
Algorithm 18.4 (<strong>Multicut</strong> abd <strong><strong>in</strong>teger</strong> <strong>multicommodity</strong> <strong>flow</strong> <strong>in</strong> trees)<br />
1. Initialization: f ←0; D←0<br />
2. Flow Rout<strong>in</strong>g: For each vertex v, <strong>in</strong> non<strong>in</strong>creas<strong>in</strong>g order of depth, do:<br />
For each pair ( s such that , greedily route <strong>in</strong>tegral <strong>flow</strong><br />
i,<br />
t<br />
i)<br />
lca ( si,<br />
ti)<br />
= υ<br />
from si<br />
to ti<br />
.<br />
Add to D all edges that were saturated <strong>in</strong> the current iteration <strong>in</strong> arbitrary<br />
order.<br />
3. Let e1, e2,..., el<br />
be the ordered list of edges <strong>in</strong> D.<br />
4. Reverse delete: For j=l downto 1 do:<br />
If D− { e j } is a multicut <strong>in</strong> G, then D ←D−{<br />
e j }.<br />
5. Output the <strong>flow</strong> <strong>and</strong> multicut <strong>in</strong> D.
Primal-Dual schema based algorithm<br />
Lemma 18.5<br />
( s t )<br />
( )<br />
Let i,<br />
i be a pair with nonzero <strong>flow</strong>, <strong>and</strong> let lca s . At most one edge<br />
i,<br />
ti<br />
= υ<br />
is picked <strong>in</strong> the multicut from each of the two paths, to <strong>and</strong> t to υ .<br />
si<br />
υ<br />
i<br />
Proof<br />
The argument is the same for each path. Suppose two edges e <strong>and</strong> e′ are<br />
picked from the si<br />
−υ<br />
path, with e be<strong>in</strong>g the deeper edge. Clearly, e′ must<br />
be <strong>in</strong> D all through reverse delete. Consider the moment dur<strong>in</strong>g reverse<br />
delete when edge e is be<strong>in</strong>g tested. S<strong>in</strong>ce eis not discarded, there must be<br />
a pair, say ( sj<br />
, tj<br />
), such that e is the only edge of D on the s<br />
j<br />
− t<br />
j path. Let<br />
u be the lowest common ancestor of s <strong>and</strong> t<br />
j j . S<strong>in</strong>ce e′ does not lie on the<br />
path of s − t , then u must be deeper than e′ <strong>and</strong> hence deeper than υ .<br />
j<br />
j<br />
After u has been processed, D must conta<strong>in</strong><br />
an edge from the s − j<br />
t<br />
j path, say e′′ . S<strong>in</strong>ce<br />
non-zero <strong>flow</strong> has been routed from si<br />
to ti,<br />
e<br />
must be added dur<strong>in</strong>g or after the iteration<br />
<strong>in</strong> which is processed. S<strong>in</strong>ce υ is ancestor<br />
of u, e is added after υ . So e′′ must be <strong>in</strong> D<br />
when e is be<strong>in</strong>g tested. This contradicts<br />
that at this moment is the only edge of D<br />
on the s − t path<br />
e j j
Primal-Dual schema based algorithm<br />
Theorem 18.6<br />
Algorithm 18.4 achieves approximation guarantees of factor 2 for the<br />
m<strong>in</strong>imum multicut problem <strong>and</strong> factor 12 for the maximum <strong><strong>in</strong>teger</strong><br />
<strong>multicommodity</strong> <strong>flow</strong> problem on trees.<br />
Proof<br />
The <strong>flow</strong> found at the end of Step 2 is maximal, <strong>and</strong> s<strong>in</strong>ce at this po<strong>in</strong>t D<br />
conta<strong>in</strong>s all the saturated edges, D is a multicut. S<strong>in</strong>ce the reverse delete<br />
step only discards redundant edges, D is a multicut after this step as well.<br />
Thus, feasible solutions have been found for both the <strong>flow</strong> <strong>and</strong> the<br />
multicut.<br />
S<strong>in</strong>ce each edge <strong>in</strong> the multicut is saturated, the primal conditions are<br />
satisfied. By Lemma 18.5, at most two edges have been picked <strong>in</strong> th<br />
multicut from ach path carry<strong>in</strong>g nonzero <strong>flow</strong>. Therefore, the relaxed dual<br />
conditions are also satisfied. Hence, by proposition 15.1, the capacity of the<br />
multicut found is with<strong>in</strong> twice the <strong>flow</strong>.<br />
S<strong>in</strong>ce a feasible <strong>flow</strong> is a lower bound on the optimal multicut, <strong>and</strong> a<br />
feasible multicut <strong>flow</strong> is an upper bound on the optimal <strong><strong>in</strong>teger</strong> <strong>multicommodity</strong><br />
<strong>flow</strong>, the claim follows.
Primal-Dual schema based algorithm<br />
Corollary 18.7<br />
On the trees with <strong><strong>in</strong>teger</strong> edge capacities, we obta<strong>in</strong> the follow<strong>in</strong>g m<strong>in</strong>-max<br />
relationship, based on theorem 18.6:<br />
where represents the value of <strong>flow</strong> function F <strong>and</strong> c C represents the<br />
capacity of multicut C.<br />
F ( )<br />
In chapter 20 is presented an O( log k)<br />
factor algorithm for the m<strong>in</strong>imum<br />
multicut problem <strong>in</strong> general graphs; once aga<strong>in</strong>, the lower bound used is an<br />
optimal fractional multicut.<br />
On the other h<strong>and</strong>, no notrivial approximation algorithms are known for the<br />
<strong><strong>in</strong>teger</strong> <strong>multicommodity</strong> <strong>flow</strong> problem <strong>in</strong> graphs more general than trees.<br />
As shown <strong>in</strong> example 18.8, even for planar graphs, the <strong>in</strong>tegrality gap of an<br />
LP analogous to (18.2) is lower bounded by n 2, where n is the number of<br />
source-s<strong>in</strong>k pairs specified
Example<br />
Example 18.8<br />
Consider the follow<strong>in</strong>g planar graph with n source-s<strong>in</strong>k pairs.<br />
Every edge is of unit capacity.<br />
Any pair of paths between the ith <strong>and</strong> jth<br />
source-s<strong>in</strong>k pairs <strong>in</strong>tersect <strong>in</strong> at least one<br />
unit capacity edge.<br />
The magnified part shows how this is<br />
arranged at each <strong>in</strong>tersection.<br />
Thus send<strong>in</strong>g one unit of any commodity<br />
blocks all other commodities.<br />
On the other h<strong>and</strong>, hald a unit of each<br />
commodity can be routed simultaneously<br />
Therefore, the <strong>in</strong>tegrality gap for this example is n 2