10

Click here to load reader

Approximation Algorithms for Minimum K -Cut

Embed Size (px)

Citation preview

Page 1: Approximation Algorithms for Minimum   K  -Cut

DOI: 10.1007/s004530010013

Algorithmica (2000) 27: 198–207 Algorithmica© 2000 Springer-Verlag New York Inc.

Approximation Algorithms for Minimum K-Cut

N. Guttmann-Beck1 and R. Hassin1

Abstract. Let G = (V, E) be a complete undirected graph, with node setV = {v1, . . . , vn} and edge setE. The edges(vi , vj ) ∈ E have nonnegative weights that satisfy the triangle inequality. Given a set of integersK = {ki }pi=1 (

∑pi=1 ki ≤ |V |), theminimum K-cut problemis to compute disjoint subsets with sizes{ki }pi=1,

minimizing the total weight of edges whose two ends are in different subsets. We demonstrate that for anyfixed p it is possible to obtain in polynomial time an approximation of at most three times the optimal value.We also prove bounds on the ratio between the weights of maximum and minimum cuts.

Key Words. Approximation algorithms, Minimum cuts.

1. Introduction. Let G = (V, E) be a complete undirected graph with nonnega-tive edge weightsl (e), e ∈ E, and letK be a set ofp positive integers{ki }pi=1 suchthat

∑pi=1 ki ≤ |V |. A K-cut is a collection of disjoint node sets{Pi }pi=1 such that

∀i ∈ {1, . . . , p} |Pi | = ki . The minimum K-cut problemis to find aK-cut such that∑p−1i=1

∑pj=i+1 l (Pi , Pj ) (wherel (Pi , Pj ) =

∑v∈Pi

∑u∈Pj

l (v,u) ) is minimized.

The version of this problem in which∑p

i=1 ki = |V | and the sizes of the sets are notgiven but their number is required to bep, andp is fixed, is polynomially solvable [2].Whenp is part of the input, this version is NP-hard [1] and Saran and Vazirani [3] gavea 2−2/p approximation algorithm. If, in addition, the sets in the partition are restrictedto be of equal size, the problem is only known to be approximable within|V |(p− 1)/pby Saran and Vazirani [3].

We consider the minimumK -cut problem under the assumption that the weightssatisfy the triangle inequality. The problem is still NP-hard under this assumption becauseeach graph can be made to satisfy the triangle inequality while not changing the problemby adding a high enough constant (for example,

∑e∈E l (e)) to all the edge lengths.

We demonstrate that for any fixedp it is possible to obtain in polynomial time anapproximation of at most three times the optimal value.

Suppose now∑p

i=1 ki = |V | (partitioning all the nodes in the graph). Letlmax, lmin

be the weights of the maximum and minimum cuts in the graph, respectively, and letr = lmax/ lmin. We prove bounds onr for several interesting cases, assuming the triangleinequality. For example, for the special case of partitioning the graph into two equal-sizedsets we prove thatr ≤ 2. Therefore, in this case, every cut can serve as an approximation,with weight at most twice the optimal. When the graph must be partitioned into twounequal-sized setsr can be arbitrarily large and we prove a bound which depends on thesizes of the two sides of the cut.

1 Department of Statistics and Operations Research, Tel Aviv University, Tel Aviv 69978, Israel.{nili,hassin}@math.tau.ac.il.

Received September 4, 1997; revised July 15, 1998. Communicated by H. N. Gabow.

Page 2: Approximation Algorithms for Minimum   K  -Cut

Approximation Algorithms for MinimumK -Cut 199

2. The Approximation Algorithm. We will use the following definitions:

For a set of edgesE, l (E) =∑e∈E l (e).For a set of nodesU , and a nodev, l (v,U ) =∑u∈U l (v,u).Denote byopt the value of a minimumK-cut.

We start by defining a new problem, the min-star problem, which we solve optimallyfor a constantp. We then use its solution to approximate the minimumK-cut problem.Themin-star problemis to find verticesv1, . . . , vp and aK-cut such thatvi ∈ Pi , i =1, . . . , p, and

∑pi=1 ki l (vi ,

⋃j 6=i Pj ) +

∑p−1i=1

∑pj=i+1 ki kj l (vi , vj ) is minimized. The

problem is called min-star because for fixedv1, . . . , vp the contribution to the objectivefunction which is associated withvi is proportional to the sum of edge weights of a starsubgraph whose center isvi .

THEOREM2.1. Algorithm Find Partition (see Figure1) solves the min-star problem. Itcan be executed in time O(n(p+1)).

Fig. 1.Algorithm Find Partition.

Page 3: Approximation Algorithms for Minimum   K  -Cut

200 N. Guttmann-Beck and R. Hassin

PROOF. Let v̄1, . . . , v̄p, V̄1, . . . , V̄p be an optimal solution for themin-star problem.Since the algorithm checks all the subsets ofV of size p it also checks the subset{v̄1, . . . , v̄p}. For this subset the sum

∑p−1i=1

∑pj=i+1 ki kj l (v̄i , v̄j ) is constant, so we need

to find a partition (P1, . . . , Pp) which minimizes∑p

i=1 ki l (v̄i ,⋃

j 6=i Pj ), this is achievedby finding an optimal solution to the transportation problem (wherexi j = 1 if and onlyif vertexaj is assigned to the subsetPi ).

For a fixed value ofp we can solve the transportation problem in timeO(n), using thealgorithms given by Tokuyama and Nakano [4] . There areO(np) subsets{v1, . . . , vp} ⊂V , so altogether the time complexity isO(np+1).

We now show that the weight of the partition found as an optimal solution for themin-star problem is no more than 3opt.

THEOREM2.2. Let (v1, . . . , vp, P1, . . . , Pp) be the output of FindPartition. Let O1,

. . . ,Op be a minimum K-cut. Then

apx=∑i< j

l (Pi , Pj ) ≤ 3∑i< j

l (Oi ,Oj ) = 3opt.

PROOF. Denote byS∗ the optimal solution value for the min-star problem. By thetriangle inequality

apx =∑i< j

l (Pi , Pj ) =∑i< j

∑ui ∈Piuj ∈Pj

l (ui ,uj )

≤∑i< j

∑ui ∈Piuj ∈Pj

(l (ui , vj )+ l (vi , vj )+ l (vi ,uj ))

=∑i< j

(kj l (vj , Pi )+ ki kj l (vi , vj )+ ki l (vi , Pj ))

=p∑

i=1

ki l (vi ,∪j 6=i Pj )+∑i< j

ki kj l (vi , vj ) = S∗.

On the other hand, according to Theorem 2.1Find Partition solves the min-star problemso that, for everyu1 ∈ O1, . . . ,up ∈ Op,

S∗ =p∑

i=1

ki l

(vi ,⋃j 6=i

Pj

)+∑i< j

ki kj l (vi , vj ) ≤p∑

i=1

ki l

(ui ,⋃j 6=i

Oj

)+∑i< j

ki kj l (ui ,uj ).

Summing over all(u1, . . . ,up) such thatu1 ∈ O1, . . . ,up ∈ Op we get that

S∗p∏

l=1

kl ≤p∑

i=1

(p∏

l=1

kl

)l

(Oi ,

⋃j 6=i

Oj

)+∑i< j

(p∏

l=1

kl

)l (Oi ,Oj )

=(

p∏l=1

kl

)(∑i 6= j

l (Oi ,Oj )+∑i< j

l (Oi ,Oj )

)

Page 4: Approximation Algorithms for Minimum   K  -Cut

Approximation Algorithms for MinimumK -Cut 201

=(

p∏l=1

kl

)(3∑i< j

l (Oi ,Oj )

)= 3

(p∏

l=1

kl

)opt.

HenceS∗ ≤ 3opt, giving thatapx≤ S∗ ≤ 3opt.

We now show that the bound of Theorem 2.2 is the best possible. Consider the graphshown in Figure 2. It has 2n+n2+2 nodes classified into setsA andB each containingn nodes, a setC containingn2 nodes, and two distinguished nodesx andy. The edgeweights are set according to the following rules:

• An edge connecting two nodes inside each set is of weight 1.• ∀a ∈ A,b ∈ B, l (a,b) = 2.• ∀a ∈ A, c ∈ C, l (a, c) = 1.• ∀b ∈ B, c ∈ C, l (b, c) = 3.• ∀a ∈ A, l (a, x) = l (a, y) = 1.• ∀b ∈ B, l (b, x) = 2, l (b, y) = 1.• ∀c ∈ C, l (c, x) = 1, l (c, y) = 2.• l (x, y) = 1.

Fig. 2.An example whereapx≈ 3opt.

Page 5: Approximation Algorithms for Minimum   K  -Cut

202 N. Guttmann-Beck and R. Hassin

We wish to partition this graph into two sets, one containingn+ 1 nodes and the othercontainingn2 + n+ 1 nodes. When we choose the nodesx, y, as centers of stars, thenthe partition{x} ∪ B, {y} ∪ A ∪ C defines an optimal solution for the minimum starproblem since the stars only use edges of weight 1. HenceFind Partition may outputthe cut{x} ∪ B, {y} ∪ A∪ C. The weight of this cut is dominated byl (B,C) = 3n3.

On the other hand, the partition{x} ∪ A, {y} ∪ B ∪ C gives a cut whose value isdominated byl (A,C) = n3. So in this case (whenn goes to infinity)apx= 3opt.

3. Bounds onlmax/lmin. In this section we assume∑p

i=1 ki = |V | and show that wecan bound the ratio between the maximum and minimum cuts of a graph. For example,we show that the triangle inequality assumption implies that any cut can be used as anapproximation in the case of two equal-sized sets, with weight at most 2opt.

3.1. Partitioning into Two Equal-Sized Sets. Given a graphG = (V, E) with edgeweights satisfying the triangle inequality, suppose we wish to partition the graph intotwo equal-sized sets. Let(P1, P2) be a minimum cut, and let(R1, R2) be a maximumcut. DenoteA = P1∩ R1, B = P2∩ R1, C = P1∩ R2, andD = P2∩ R2 (see Figure 3).For these definitionslmin = l (P1, P2) andlmax= l (R1, R2). Then

lmin = l (P1, P2) = l (A, B)+ l (B,C)+ l (A, D)+ l (C, D),(1)

while

lmax= l (R1, R2) = l (A,C)+ l (B,C)+ l (A, D)+ l (B, D).(2)

LEMMA 3.1. If V1,V2,V3 ⊂ V are disjoint, then

|V3|l (V1,V2) ≤ |V2|l (V1,V3)+ |V1|l (V3,V2).

Fig. 3.The setsA, B, C, andD.

Page 6: Approximation Algorithms for Minimum   K  -Cut

Approximation Algorithms for MinimumK -Cut 203

PROOF. By the triangle inequality, for everyw ∈ V3,

l (V1,V2) =∑v∈V1

∑u∈V2

l (v,u) ≤∑v∈V1

∑u∈V2

(l (v,w)+ l (w,u))

= |V2|l (w,V1)+ |V1|l (w,V2).

The claimed inequality is obtained by summation over allw ∈ V3.

We denote|A| = |D| = p and|B| = |C| = q.

LEMMA 3.2.

min

{2q

pl (A, D),

2p

ql (B,C)

}≤ l (A, D)+ l (B,C).

PROOF. Suppose otherwise, then

2q

pl (A, D) > l (A, D)+ l (B,C),

and

2p

ql (B,C) > l (A, D)+ l (B,C).

This gives

2q − p

pl (A, D) > l (B,C)

and

2p− q

ql (B,C) > l (A, D),

so that

2q − p

pl (A, D) >

1

(2p− q)/ql (A, D).

Sincel (A, D) ≥ 0 this implies

2q − p

p

2p− q

q> 1,

or

−2(p− q)2 > 0.

A contradiction.

THEOREM3.3.

lmax≤ 2lmin.

Page 7: Approximation Algorithms for Minimum   K  -Cut

204 N. Guttmann-Beck and R. Hassin

PROOF. The following inequalities can be concluded from Lemma 3.1:

l (A,C) ≤ q

pl (A, D)+ l (C, D),

l (B, D) ≤ q

pl (A, D)+ l (A, B),

l (A,C) ≤ p

ql (B,C)+ l (A, B),

l (B, D) ≤ p

ql (B,C)+ l (C, D).

Hence

l (A,C)+ l (B, D) ≤ l (C, D)+ l (A, B)+min

{2q

pl (A, D),

2p

ql (B,C)

}.

Using Lemma 3.2 and (1),

l (A,C)+ l (B, D) ≤ lmin.

By (1) also

l (B,C)+ l (A, D) ≤ lmin,

and we get from (2) thatlmax≤ 2lmin, as claimed.

To see that the bound of Theorem 3.3 is tight consider a graph with 4n nodes:v1, . . . , v2n, u1, . . . ,u2n. The weights are set according to the following rules:

• ∀i, j, l (vi , vj ) = 0.• ∀i, j, l (ui ,uj ) = 0.• ∀i, j, l (vi ,uj ) = 1.

We wish to partition this graph into two equal-sized sets each containing 2n nodes.The cut {v1, . . . , v2n}, {u1, . . . ,u2n} has weight 4n2. On the other hand, the cut{v1, . . . , vn} ∪ {u1, . . . ,un}, {un+1, . . . ,u2n} ∪ {vn+1, . . . , v2n} has weight of 2n2. So inthis caselmax= 2lmin.

3.2. Partitioning into k Equal-Sized Sets

LEMMA 3.4. If (A, B) is a partition of V into two equal-sized sets, then l(A)+ l (B) ≤2l (A, B).

PROOF. By the triangle inequality, for every four nodesa1,a2 ∈ A, b1,b2 ∈ B,

l (a1,a2) ≤ l (a1,b1)+ l (a2,b1),

l (a1,a2) ≤ l (a1,b2)+ l (a2,b2),

l (b1,b2) ≤ l (a1,b1)+ l (a1,b2),

l (b2,b2) ≤ l (a2,b1)+ l (a2,b2).

Page 8: Approximation Algorithms for Minimum   K  -Cut

Approximation Algorithms for MinimumK -Cut 205

Summing these four inequalities and dividing by 2 we get

l (a1,a2)+ l (b1,b2) ≤ l (a1,b1)+ l (a2,b1)+ l (a1,b2)+ l (a2,b2).

Summing this over alla1,a2,b1,b2 we get

2|V |2(l (A)+ l (B)) ≤ 4|V |2l (A, B),

hence

l (A)+ l (B) ≤ 2l (A, B).

LEMMA 3.5. Let G= (V, E) be a graph with|V | = kn. If {Pi }ki=1 is a partitioning ofV into k equal-sized sets then the value of the cut, lc, satisfies lc= ∑i< j l (Pi , Pj ) ≥((k− 1)/(k+ 1))l (E).

PROOF. By Lemma 3.4, fori 6= j ,

l (Pi )+ l (Pj ) ≤ 2l (Pi , Pj ).

Summing overj = 1, . . . , k, j 6= i , we get

(k− 1)l (Pi )+k∑

j=1

l (Pj )− l (Pi ) ≤ 2k∑

j=1j 6=i

l (Pi , Pj ).

Summing overi = 1, . . . , k we get

(k− 1)k∑

i=1

l (Pi )+ kk∑

j=1

l (Pj )−k∑

i=1

l (Pi ) ≤ 2∑i 6= j

l (Pi , Pj ),

or

2(k− 1)k∑

i=1

l (Pi ) ≤ 4lc.

Since∑k

i=1 l (Pi ) = l (E)− lc we get

(k− 1)(l (E)− lc) ≤ 2lc,

giving the required result:

lc ≥ k− 1

k+ 1l (E).

REMARK 3.6. This bound is tight. For example, letG = (V1 ∪ V2, E) where|V1| =|V2| = n. Let all the edges connecting nodes insideV1 or V2 have a weight of two unitsand all the edges connecting one node fromV1 and one node fromV2 have a unit weight.For the cut which separatesV1 from V2, l (V1,V2) = n2. Sincel (V1) = l (V2) = n(n−1)we get thatl (E) = 3n2− 2n, giving that asymptoticallyl (V1,V2) = L(E)/3.

Page 9: Approximation Algorithms for Minimum   K  -Cut

206 N. Guttmann-Beck and R. Hassin

THEOREM3.7. Let lmax and lmin denote the weight of maximum and minimum(respec-tively) cuts of a given graph into k equal-sized sets. Then

(k− 1)lmax≤ (k+ 1)lmin.

PROOF. Since the edges inlmax are a subset ofE then by Lemma 3.5

lmax ≤ l (E) ≤ k+ 1

k− 1lmin.

3.3. Partitioning into Two Unequal-Sized Sets. First we show that when partitioningthe graph into two unequal-sized sets, the weight of the maximum cut may be muchbigger than the weight of the minimum cut. Then we show that we can still bound themaximum cut, but the bound depends on of the sizes of the two node sets.

Let V = {u1, . . . ,un−1} ∪ {v}. For eachi, j ∈ {1, . . . ,n− 1} setl (ui ,uj ) to 0. Foreachi ∈ {1, . . . ,n − 1} setl (v,ui ) to 1. Suppose we wish to partition this graph intotwo sets, one containingn − 1 nodes, and the other containing 1 node. In this case, abest partition would be{u1}, {u2, . . . ,un−1}∪ {v} giving a cut of weight 1. However, thepartition{v}, {u1, . . . ,un−1} gives a cut of weightn− 1.

LEMMA 3.8. Let A= {a1, . . . ,at }, B = {b1, . . . ,bs}, s ≤ t , be a partitioning of V.Then l(E) ≤ (2+ (t − 2)/s)l (A, B).

PROOF. By the triangle inequality, for everyi, j, k,

l (ai ,aj ) ≤ l (ai ,bk)+ l (aj ,bk).

Summing this inequality overj ∈ {1, . . . , t}\{i } (for a fixedk) we get

t∑j=1j 6=i

l (ai ,aj ) ≤ (t − 1)l (ai ,bk)+t∑

j=1

l (aj ,bk)− l (ai ,bk).

Summing overi ∈ {1, . . . , t} we get that, for everyk ∈ {1, . . . , s},

2∑i< j

l (ai ,aj ) ≤ (t − 1)t∑

i=1

l (ai ,bk)+ tt∑

j=1

l (aj ,bk)−t∑

i=1

l (ai ,bk)

= 2(t − 1)t∑

i=1

l (ai ,bk)

= 2(t − 1)l (A,bk).

Summing overk = 1, . . . , s and dividing by 2s we get

l (A) =∑i< j

l (ai ,aj ) ≤ t − 1

sl (A, B).

Page 10: Approximation Algorithms for Minimum   K  -Cut

Approximation Algorithms for MinimumK -Cut 207

Similarly,

l (B) =∑i< j

l (bi ,bj ) ≤ s− 1

tl (A, B).

By the last two inequalities and the assumptions ≤ t ,

s(l (A)+ l (B)) = s

(∑i< j

l (ai ,aj )+∑i< j

l (bi ,bj )

)

≤(

st − 1

s+ s

s− 1

t

)l (A, B)

≤ (t − 1+ s− 1)l (A, B) = (s+ t − 2)l (A, B).

Sincel (A)+ l (B) = l (E)− l (A, B),

s(l (E)− l (A, B)) ≤ (s+ t − 2)l (A, B),

proving

l (E) ≤(

2+ t − 2

s

)l (A, B).

REMARK 3.9. This bound is tight. Suppose thats= t = n. Substituting in the lemma’sbound we getl (E) ≤ (3− 2/n)l (A, B). The example in Remark 3.6 hass= t = n andl (E) = 3n2− 2n. It presents a cut withl (A, B) = n2 so that the bound is achieved.

THEOREM3.10. Let lmax and lmin denote the weight of maximum and minimum cuts,respectively, of a given graph into two sets S,T with |S|/|T | = s/t (s ≤ t), thenlmax≤ (2+ (t − 2)/s)lmin.

PROOF. Since the edges in the maximum cut are a subset ofE it follows from Lemma 3.8that

lmax≤ l (E) ≤(

2+ t − 2

s

)lmin.

References

[1] M. R. Garey and D. S. Johnson,Computers and Intractability: A Guide to the Theory of NP-completeness,Freeman, San Francisco, CA, 1979.

[2] O. Goldschmidt and D. S. Hochbaum, A polynomial algorithm for thek-cut problem for fixedk, Math-ematics of Operations Research, 19 (1994), 24–37.

[3] H. Saran and V. Vazirani, Findingk cuts within twice the optimal,SIAM Journal on Computing, 24(1995), 101–108.

[4] T. Tokuyama and J. Nakano, Geometric algorithms for the minimum cost assignment problem,RandomStructures and Algorithms, 6 (1995), 393–405.