Theory of Computing, Volume 2 (2006), pp. 249–266 http://theoryofcomputing.org

Correlation Clustering with a Fixed Number of Clusters^{∗}

Ioannis Giotis  Venkatesan Guruswami^{†}

Received: October 18, 2005; published: October 22, 2006.

Abstract: We continue the investigation of problems concerning correlation clustering or clustering with qualitative information, which is a clustering formulation that has been studied recently (Bansal, Blum, Chawla (2004), Charikar, Guruswami, Wirth (FOCS’03), Charikar, Wirth (FOCS’04), Alon et al. (STOC’05)). In this problem, we are given a complete graph on n nodes (which correspond to nodes to be clustered) whose edges are labeled + (for similar pairs of items) and − (for dissimilar pairs of items). Thus our input consists of only qualitative information on similarity and no quantitative distance measure between items. The quality of a clustering is measured in terms of its number of agreements, which is simply the number of edges it correctly classifies, that is the sum of number of − edges whose endpoints it places in different clusters plus the number of + edges both of whose endpoints it places within the same cluster.

In this paper, we study the problem of finding clusterings that maximize the number of agreements, and the complementary minimization version where we seek clusterings that minimize the number of disagreements. We focus on the situation when the number of clusters is stipulated to be a small constant k. Our main result is that for every k, there is a polynomial time approximation scheme for both maximizing agreements and minimizing disagreements.

∗A preliminary version of this paper appeared in the Proceedings of the 17th Annual ACM-SIAM Symposium on Discrete Algorithms, January 2006.

†Supported in part by NSF CCF-0343672, an Alfred P. Sloan Research Fellowship, and a David and Lucile Packard Foundation Fellowship.

ACM Classification: F.2.2, G.1.2, G.1.6

AMS Classification: 68W25, 05C85

Key words and phrases: clustering, approximation algorithm, random sampling, polynomial time approximation scheme.

Authors retain copyright to their papers and grant “Theory of Computing” unlimited rights to publish the paper electronically and in hard copy. Use of the article is permitted as long as the author(s) and the journal are properly acknowledged. For the detailed

copyright statement, see http://theoryofcomputing.org/copyright.html.

\begin{matrix}c \\ ◯ \end{matrix} 2006 Ioannis Giotis and Venkatesan Guruswami

(The problems are NP-hard for every k ≥ 2.) The main technical work is for the minimization version, as the PTAS for maximizing agreements follows along the lines of the property tester for Max k-CUT by Goldreich, Goldwasser, Ron (1998).

In contrast, when the number of clusters is not specified, the problem of minimizing disagreements was shown to be APX-hard (Chawla, Guruswami, Wirth (FOCS’03)), even though the maximization version admits a PTAS.

1 Introduction

In this work, we investigate problems concerning an appealing formulation of clustering called correlation clustering or clustering using qualitative information that has been studied recently in several works, including [2, 3, 4, 5, 7, 6, 8, 17]. The basic setup here is to cluster a collection of n items given as input only qualitative information concerning similarity between pairs of items; specifically for every pair of items, we are given a (Boolean) label as to whether those items are similar or dissimilar. We are not provided with any quantitative information on the degree of similarity between elements, as is typically assumed in most clustering formulations. These formulations take as input a metric on the items and then aim to optimize some function of the pairwise distances of the items within and across clusters. The objective in our formulation is to produce a partitioning into clusters that places similar objects in the same cluster and dissimilar objects in different clusters, to the extent possible.

An obvious graph-theoretic formulation of the problem is the following: given a complete graph on n nodes with each edge labeled either “+” (similar) or “−” (dissimilar), find a partitioning of the vertices into clusters that agrees as much as possible with the edge labels. The maximization version, call it MaxAgree, seeks to maximize the number of agreements: the number of + edges inside clusters plus the number of − edges across clusters. The minimization version, denoted MinDisAgree, aims to minimize the number of disagreements: the number of − edges within clusters plus the number of + edges between clusters.

In this paper, we study the above problems when the maximum number of clusters that we are allowed to use is stipulated to be a fixed constant k. We denote the variants of the above problems that have this constraint as MaxAgree[k] and MinDisAgree[k]. We note that, unlike most clustering formulations, the MaxAgree and MinDisAgree problems are not trivialized if we do not specify the number of clusters k as a parameter — whether the best clustering uses few or many clusters is automatically dictated by the edge labels. However, the variants we study are also interesting formulations, which are well-motivated in settings where the number of clusters might be an external constraint that has to be met, even if there are “better” clusterings (i. e., one with more agreements) with a different number of clusters. Moreover, the existing algorithms for, say MinDisAgree, cannot be modified in any easy way to output a quality solution with at most k clusters. Therefore k-clustering variants pose new, non-trivial challenges that require different techniques for their solutions.

In the above description, we assumed that every pair of items is labeled as + or − in the input. However, in some settings, the classifier providing the input might be unable to label certain pairs of elements as similar or dissimilar. In these cases, the input is an arbitrary graph G together with ± labels on its edges. We can again study the above problems MaxAgree[k] (resp. MinDisAgree[k]) with the objective being to maximize (resp. minimize) the number of agreements (resp. disagreements) on edges of E (that is, we do not count non-edges of G as either agreements or disagreements). In situations where we study this more general variant, we will refer to these problems as MaxAgree[k] on general graphs and MinDisAgree[k] on general graphs. When we don’t qualify with the phrase “on general graphs,” we will always mean the problems on complete graphs.

Our main result in this paper is a polynomial time approximation scheme (PTAS) for MaxAgree[k] as well as MinDisAgree[k] for k ≥ 2. We now discuss prior work on these problems, followed by a more detailed description of results in this paper.

1.1 Previous and related work

The above problem seems to have been first considered by Ben-Dor et al. [6] motivated by some computational biology questions. Later, Shamir et al. [17] studied the computational complexity of the problem and showed that MaxAgree (and hence also MinDisAgree), as well as MaxAgree[k] (and hence also MinDisAgree[k]) for each k ≥ 2 is NP-hard. They, however, used the term “Cluster Editing” to refer to this problem.

Partially motivated by machine learning problems concerning document classification, Bansal, Blum, and Chawla [5] also independently formulated and considered this problem. In particular, they initiated the study of approximate solutions to MinDisAgree and MaxAgree, and presented a PTAS for MaxAgree and a constant factor approximation algorithm for MinDisAgree (the approximation guarantee was a rather large constant, though). They also noted a simple factor 3 approximation algorithm for MinDis-Agree[2]. Charikar, Guruswami, and Wirth [7] proved that MinDisAgree is APX-hard, and thus one cannot expect a PTAS for the minimization problem similar to the PTAS for MaxAgree. They also gave a factor 4 approximation algorithm for MinDisAgree by rounding a natural LP relaxation using the region growing technique. Recently, Ailon et al. [2] presented an elegant combinatorial factor 3 approximation algorithm with a clever analysis for MinDisAgree; they also get a factor 5/2 approximation using LP techniques on top of their basic approach.

The problems on general graphs have also received attention. It is known that both MaxAgree and MinDisAgree are APX-hard [5, 7]. Using a connection to minimum multicut, several groups [7, 9, 10] presented an O(logn) approximation algorithm for MinDisAgree. In fact, Emanuel and Fiat noted in [10] that the problem is as hard to approximate as minimum multicut (and so this logn factor seems very hard to improve). For the maximization version, algorithms with performance ratio better than 0.766 are known for MaxAgree [7, 18]. The latter work by Swamy [18] shows that a factor 0.7666 approximation can also be achieved when the number of clusters is specified (i. e., for MaxAgree[k] for k ≥ 2).

Another problem that has been considered, let us call it MaxCorr, is that of maximizing correlation, defined to be the difference between the number of agreements and disagreements. Charikar and Wirth [8] (see also [16]) present a factor O(logn) approximation algorithm for the problem (called MaxQP) of maximizing a quadratic form with general (possibly negative) coefficients, and use this to deduce a factor O(logn) approximation for MaxCorr on complete graphs. (Their approximation guarantee holds also for the weighted version of MaxCorr where there are nonnegative weights on the edges and the goal is to maximize the difference between the sum of the weights of agreements minus the sum of weights of the disagreements.) For MaxCorr on general graphs, an O(logθ(\overline{G})) approximation is presented in [3], where θ(·) is the Lovász Theta Function. Alon et al. [3] also showed an integrality gap of Ω(logn) for the standard semidefinite program relaxation of MaxQP (the largest such integrality gap for a graph is called the Grothendieck constant of the graph — thus these results establish the Grothendieck constant of the complete graph on n vertices to be Θ(logn)). Very recently, for some constant α > 0, Arora et al. [4] proved a factor log^{α} n inapproximability result for MaxQP and the weighted version of MaxCorr.

1.2 Our results

The only previous approximation for MinDisAgree[k] was a factor 3 approximation algorithm for the case k = 2 [5]. The problems were shown to be NP-hard for every k ≥ 2 in [17] using a rather complicated reduction. In this paper, we will provide a much simpler NP-hardness proof and prove that both MaxAgree[k] and MinDisAgree[k] admit a polynomial time approximation scheme for every k ≥ 2.^{1} The existence of a PTAS for MinDisAgree[k] is perhaps surprising in light of the APX-hardness of MinDisAgree when the number of clusters is not specified to be a constant (recall that the maximization version does admit a PTAS even when k is not specified).

It is often the case that minimization versions of problems are harder to solve compared to their complementary maximization versions. The APX-hardness of MinDisAgree despite the existence of a PTAS for MaxAgree is a notable example. The difficulty in these cases is when the optimum value of the minimization version is very small, since then even a PTAS for the complementary maximization problem need not provide a good approximation for the minimization problem. In this work, we first give a PTAS for MaxAgree[k]. This algorithm uses random sampling and follows closely along the lines of the property testing algorithm for Max k-Cut due to [13].

It is interesting to note that our algorithm can also be used as a PTAS for the unbounded clusters case by setting k = Ω(1/ε). It is then not hard to see by a cluster merging procedure that the solution obtained by our algorithm is still within an ε-factor of the optimal solution. Furthermore, since our algorithm runs in linear time (on the number of vertices), it can be a more efficient alternative to the algorithm presented in [5].

In the next section, we develop a PTAS for MinDisAgree[k], which is our main result. The difficulty in obtaining a PTAS for the minimization version is similar to that faced in the problem of Min-k-Sum clustering, which has the complementary objective function to MetricMax-k-Cut. We remark that while an elegant PTAS for MetricMax-k-Cut due to de la Vega and Kenyon [12] has been known for several years, only recently has a PTAS for Min-k-Sum clustering been obtained [11]. We note that although the case of Min-2-Sum clustering was solved in [14] soon after the MetricMaxCut algorithm of [12], the case k > 2 appeared harder. Similarly to this, for MinDisAgree[k], we are able to quite easily give a PTAS for the 2-clustering version using the algorithm for MaxAgree[2], but we have to work harder for the case of k > 2 clusters. Some of the difficulty that surfaces when k > 2 is detailed in Section 4.1.

In Section 5, we also note some results on the complexity of MaxAgree[k] and MinDisAgree[k] on general graphs — these are easy consequences of connections to problems like Max Cut and graph colorability.

Our work seems to nicely complete the understanding of the complexity of problems related to correlation clustering. Our algorithms not only achieve excellent approximation guarantees but are also samplingbased and are thus simple and quite easy to implement.

2 NP-hardness of MinDisAgree and MaxAgree

In this section we show that the exact versions of problems we are trying to solve are NP-hard. An NPhardness result for MaxAgree on complete graphs was shown in [5]; however their reduction crucially relies on the number of clusters growing with the input size, and thus does not yield any hardness when the number of clusters is a fixed constant k. It was shown by Shamir, Sharan, and Tsur [17], using a rather complicated reduction, that these problems are NP-hard for each fixed number k ≥ 2 of clusters. We will provide a short and intuitive proof that MinDisAgree[k] and MaxAgree[k] are NP-hard.

1Our approximation schemes will be randomized and deliver a solution with the claimed approximation guarantee with high probability. For simplicity, we do not explicitly mention this from now on.

Since MaxAgree[k] and MinDisAgree[k] have complementary objectives, it suffices to establish the NP-hardness of MinDisAgree[k]. We will first establish NP-hardness for k = 2, the case for general k will follow by a simple “padding” with (k − 2) large collections of nodes with + edges between nodes in each collection and − edges between different collections.

Theorem 2.1. MinDisAgree[2] on complete graphs is NP-hard.

Proof. We know that GraphMinBisection, namely partitioning the vertex set of a graph into two equal halves so that the number of edges connecting vertices in different halves is minimized, is NP-hard. From an instance G of GraphMinBisection with n (even) vertices we obtain a complete graph G′using the following polynomial time construction.

Start with G and label all existing edges of G as + edges in G′and non-existing edges as − edges. For each vertex v create an additional set of n vertices. Let us call these vertices together with v, a “group” V_{v}. Connect with + edges all pairs of vertices within V_{v}. All other edges with one endpoint in V_{v} are labeled as − edges (except those already labeled).

We will now show that any 2-clustering of G′ with the minimum number of disagreements, has two clusters of equal size with all vertices of any group in the same cluster. Consider some optimal 2-clustering W with two clusters W_{1} and W_{2} such that |W_{1}| ≠ |W_{2}| or not all vertices of some group are in the same cluster. Pick some group V_{v} such that not all its vertices are assigned in the same cluster. Place all the vertices of the group in the same cluster, obtaining W′such that the size difference of the two clusters is minimized. If such a group could not be found, pick a group V_{v} from the larger cluster and place it in the other cluster. Since all groups contain the same number of vertices it must be the case that the size difference between the two clusters is reduced.

Let us assume that V_{v}^{1} vertices of group V_{v} were in W_{1} and V_{v}^{2} in W_{2}. Without loss of generality, let us assume that the clustering W′= (W′_{1},W′_{2}) above is obtained by moving the V_{v}^{1} group vertices into cluster W_{2};

W′_{1}= W_{1}\ V_{v}^{1}, W′_{2}= W_{2}∪ V_{v}^{1}.

We now observe the following facts about the difference in the number of disagreements between W′ and W.

• Clearly the number of disagreements between vertices not in V_{v} and between one vertex in V_{v}^{2} with one in W′_{1}remains the same.

• The number of disagreements is decreased by |V_{v}^{1}| · |V_{v}^{2}| based on the fact that all edges within V_{v} are + edges.

• It is also decreased by at least |V_{v}^{1}| · |W′_{1}| − (n − 1) based on the fact that all but at most n − 1 edges connecting vertices of V_{v} to the rest of the graph are − edges.

• The number of disagreements increases at most |V_{v}^{1}| · |W_{2}\ V_{v}^{2}| because (possibly) all of the vertices in V_{v}^{1} are connected with − edges with vertices in W_{2} outside their group.

Overall, the difference in the number of disagreements is at most

|V_{v}^{1}| · |W_{2}\ V_{v}^{2}| − |V_{v}^{1}| · |V_{v}^{2}| − |V_{v}^{1}| · |W′_{1}| + (n − 1) .

Notice that since ||W′_{1}| − |W′_{2}|| was minimized it must be the case that |W′_{1}| ≥ |W_{2} \ V_{v}^{2}|. Moreover since a group has an odd number of vertices and the total number of vertices of G′is even, it follows that |W′_{1}| ≠ |W_{2}\ V_{v}^{2}| and thus |W′_{1}| − |W_{2}\ V_{v}^{2}| ≥ 1. Therefore the total number of disagreements increases at most

(n − 1) − |V_{v}^{1}| · (|V_{v}^{2}| + 1) .

Since |V_{v}^{1}| + |V_{v}^{2}| = n + 1 and V_{v}^{1} cannot be empty, it follows that |V_{v}^{1}| · (|V_{v}^{2}| + 1) ≥ n and the number of disagreements strictly decreases, contradicting the optimality of W.

Therefore the optimal solution to the MinDisAgree[2] instance has two clusters of equal size and all vertices of any group are contained in a single cluster. It is now trivial to see that an optimal solution to the GraphMinBisection problem can be easily derived from the MinDisAgree[2] solution which completes the reduction.

We now prove the NP-hardness for more than two clusters.

Theorem 2.2. For every fixed k ≥ 2, there exists n such that MaxAgree[k] and MinDisAgree[k] on complete graphs are NP-hard.

Proof. Consider an instance of the MinDisAgree[2] problem on a graph G with n vertices. Create a graph G′by adding to G, k − 2 “groups” of n + 1 vertices each. All edges within a group are marked as + edges, while the remaining edges are marked as − edges.

Consider now a k-clustering of G′ such that the number of disagreements is minimized. It is easy to see that all the vertices of a group must make up one cluster. Also observe that any of the original vertices cannot end up in one group’s cluster since that would induce n + 1 disagreements, strictly more than it could possibly induce in any of the 2 remaining clusters. Therefore the 2 non-group clusters are an optimal 2-clustering of G. The theorem easily follows.

3 PTAS for maximizing agreement with k clusters

In this section we will present a PTAS for MaxAgree[k] for every fixed constant k. Our algorithm follows closely the PTAS for Max k-CUT by Goldreich et al. [13]. In the next section, we will present our main result, namely a PTAS for MinDisAgree[k], using the PTAS for MaxAgree[k] together with additional ideas.^{2}

Theorem 3.1. For every k ≥ 2, there is a polynomial time approximation scheme for MaxAgree[k].

Proof. We first note that for every k ≥ 2, and every instance of MaxAgree[k], the optimum number OPT of agreements is at least n^{2}/16. Let n_{+} be the number of positive edges, and n_{−} = \binom{n}{2} − n_{+} be the number of negative edges. By placing all vertices in a single cluster, we get n_{+} agreements. By placing vertices randomly in one of k clusters, we get an expected (1 − 1/k)n_{−} agreements just on the negative edges. Therefore

OPT ≥ max\{n_{+} ,(1 − 1/k)n_{−} \} ≥ \frac{(1 − 1/k)}{2} \binom{n}{2} ≥ n^{2}/16 .

The proof now follows from Theorem 3.2 which guarantees a solution within additive εn^{2} of OPT for arbitrary ε > 0.

2This is also similar in spirit, for example, to the PTAS for Min 2-sum clustering based on the PTAS for Metric Max CUT [14, 12].

Algorithm MaxAg(k,ε):

\underline{Input}: A labeling ℒ: \binom{n}{2} → \{+,−\} of the edges of the complete graph on vertex set V.

\underline{Output}: A k-clustering of the graph, i. e., a partition of V into (at most) k parts W_{1},W_{2},...,W_{k}.

1. Construct an arbitrary partition of the graph into roughly equal parts, (V^{1},V^{2},...,V^{m}),m = ⌈\frac{4}{ε}⌉.

2. For i = 1...m, choose uniformly at random with replacement from V \ V^{i}, a subset S^{i} of size r = \frac{32^{2}}{2ε^{2}} log \frac{64mk}{εδ}.

3. Set W to be an arbitrary (or random) clustering.

4. For each clustering of each of the sets S^{i} into (S_{1}^{i},...,S_{k}^{i}) do

(a) For i = 1...m do the following (i) For each vertex v ∈ V^{i} do (1) For j = 1...k, let

β_{j}(v) = |Γ^{+} (v) ∩ S_{j}^{i}| + ∑_{l≠j} |Γ^{−} (v) ∩ S_{l}^{i}|.

(2) Place v in cluster argmax_{j}β_{j}(v).

(b) If the clustering formed by step (a) has more agreements than W, set W to be that clustering.

5. Output W.

Figure 1: MaxAg(k,ε) algorithm

Theorem 3.2. On input ε, δ and a labeling ℒ of the edges of a complete graph G with n vertices, with probability at least 1 − δ, algorithm MaxAg outputs a k-clustering of the graph such that the number of agreements induced by this k-clustering is at least OPT − εn^{2}/2, where OPT is the optimal number of agreements induced by any k-clustering of G. The running time of the algorithm is n · k^{O(ε^{−3} log(k/(εδ)))}.

The proof of this theorem is presented in Section 3.2, and we now proceed to describe the algorithm in Figure 1.

3.1 Overview

Our algorithm is given a complete graph G(V,E) on n vertices. All the edges are marked as + or −, denoting agreements or disagreements respectively. For a vertex v, let Γ^{+} (v) be the set of vertices adjacent to v via + edges, and Γ^{−} (v) the set of vertices adjacent to v via − edges.

Initially, note that our algorithm works in m = O(1/ε) steps. We partition the vertices into m almost equal parts V^{1},V^{2},...,V^{m} (each with Θ(εn) vertices) in an arbitrary way. In the ith step, we place the vertices of V^{i} into clusters. This is done with the aid of a sufficiently large, but constant-sized, random sample S^{i} drawn from vertices outside V^{i}. (The random samples for different steps are chosen independently.) The algorithm tries all possible ways in which all the samples can be clustered, and for each poossibility, it clusters V^{i} by placing each vertex in the cluster that maximizes the agreement with respect to the clustering of the sample S^{i}.

The analysis is based on the following rationale. Fix some optimal clustering D as a reference. Assume that the considered clustering of S^{i} matches the clustering of V^{1}∪ ··· ∪ V^{i−1} the algorithm has computed so far and the optimal clustering on V^{i+1} ∪ ··· ∪ V^{m} (since we try all possible clusterings of S^{i}, we will also try this particular clustering). In this case, using standard random sampling bounds, we can show that with high probability over the choice of S^{i}, the clustering of V^{i} chosen by the algorithm is quite close, in terms of number of agreements, to the clustering of V^{i} by the optimal clustering D. This will imply that with constant probability our choice of the S^{i} will allow us to place the vertices in such a way that the decrease in the number of agreements with respect to an optimal clustering is O(ε^{2}n^{2}) per step. Therefore, the algorithm will output a solution that has at most O(εn^{2}) fewer agreements compared to the optimal solution.

3.2 Performance analysis of MaxAg(k,ε) algorithm.

Consider an arbitrary optimal k-clustering of the graph D ≡ (D_{1},...,D_{k}). We consider the subsets of each cluster over our partition of vertices, defined as

D_{j}^{i} ≡ D_{j} ∩ V^{i} for j = 1,...,k, and
D^{i} ≡ (D_{1}^{i},...,D_{k}^{i}) .

Let’s also call the clustering output by our algorithm W ≡ (W_{1},...,W_{k}) and define in the same fashion subsets of our clustering:

W_{j}^{i} ≡ W_{j} ∩ V^{i} for j = 1,...,k, and
W^{i} ≡ (W_{1}^{i},...,W_{k}^{i}) .

To be able to measure the performance of our algorithm at each step, we need to have an image of the graph with all the clustered vertices up to the current point, while the rest of the vertices will be viewed under the arbitrary clustering defined above. Intuitively, this image of the graph will enable us to bound within each step the difference in agreements against the arbitrary clustering while taking into account the clustering decisions made thus far. More formally, we define a sequence of hybrid clusterings, such that hybrid clustering H^{i}, for i = 1,2,...,m + 1, consists of the vertices as clustered by our algorithm up to (not including) the ith step and the rest of the vertices as clustered by D;

H^{i} ≡ (H_{1}^{i},...,H_{k}^{i}) ,
ℋ^{i} ≡ (ℋ_{1}^{i},...,ℋ_{k}^{i}) ,
H_{j}^{i} ≡ (∪_{l=1}^{i−1} W_{j}^{l}) ∪ (∪_{l=i}^{m} D_{j}^{l}) for j = 1,...,k,
ℋ_{j}^{i} ≡ H_{j}^{i} \ V^{i} for j = 1,...,k.

Since we are going through all possible clusterings of the random sample sets S^{i}, for the rest of the analysis consider the loop iteration when the clustering of each S^{i} exactly matches how it is clustered in ℋ^{i},^{3} i. e., for j = 1,2,...,k, we have S_{j}^{i} = S^{i} ∩ ℋ_{j}^{i}. Of course, taking the overall best clustering can only help us.

The following lemma captures the fact that our random sample with high probability gives us a good estimate on the number of agreements towards each cluster for most of the vertices considered.

Lemma 3.3. For i = 1...m, with probability at least 1 − (δ/4m) on the choice of S^{i}, for all but at most an ε/8 fraction of the vertices v ∈ V^{i}, the following holds for j = 1,...k,

| \frac{|Γ^{+} (v) ∩ S_{j}^{i}|}{r} − \frac{|Γ^{+} (v) ∩ ℋ_{j}^{i}|}{|V \ V^{i}|} | ≤ \frac{ε}{32} .  (3.1)

(Note that if (3.1) above holds, then it also holds with Γ^{−} (v) in place of Γ^{+} (v).)

3The clustering in question might not match the actual final clustering of these vertices.

Proof. Consider an arbitrary vertex v ∈ V^{i} and the randomly chosen set S^{i} = {u_{1},...,u_{r}}. For each j ∈ {1,...,k}, we define the random variables

for ℓ = 1,...r, α_{j}^{ℓ} = \{ \begin{matrix}1, & if u_{ℓ} ∈ Γ^{+} (v) ∩ S_{j}^{i}; \\ 0, & otherwise. \end{matrix}

Clearly ∑ _{ℓ=1}^{r} α_{j}^{ℓ} = |Γ^{+} (v) ∩ S_{j}^{i}| and

Pr[α_{j}^{l} = 1] = \frac{|Γ^{+} (v) ∩ ℋ_{j}^{i}|}{|V \ V^{i}|} .

Using an additive Chernoff bound we get that

Pr[ | \frac{|Γ^{+} (v) ∩ S_{j}^{i}|}{r} − \frac{|Γ^{+} (v) ∩ ℋ_{j}^{i}|}{|V \ V^{i}|} | > \frac{ε}{32}] < 2 · exp( −2( \frac{ε}{32})^{2}r) = \frac{εδ}{32mk}

where r and m were defined in our algorithm as r = (32^{2}/2ε^{2})log(64mk/εδ) and m = ⌈4/ε⌉. In particular, r was chosen to precisely match this bound’s inequality requirements.

We can now use a standard probabilistic argument. Defining a random variable to count the number of vertices not satisfying inequality (3.1) and, using Markov’s inequality, we observe that for that particular j, inequality (3.1) holds for all but a fraction ε/8 of vertices v ∈ V^{i}, with probability at least 1 − (δ/4mk). Using a probability union bound the lemma easily follows.

We define agree(A) to be equal to the number of agreements induced by k-clustering A. Now consider the placement of the V^{i} vertices in clusters W_{1}^{i},...,W_{k}^{i}, as performed by the algorithm during step i. We will examine the number of agreements compared to the placement of the same vertices under H^{i} (placement under the optimal clustering), more specifically we will bound the difference in the number of agreements induced by placing vertices differently than H^{i}. The following lemma formalizes this concept.

Lemma 3.4. For i = 0,...m, we have agree(H^{i+1} ) ≥ agree(D) − i · \frac{1}{8}ε^{2}n^{2}.

Proof. Observe that H^{1} ≡ D and H^{m+1} ≡ W. The only vertices placed differently between H^{i+1} and H^{i} are the vertices in V^{i}. Suppose that our algorithm places v ∈ V^{i} in cluster x, but v is placed in cluster x′under H^{i}. For such vertex v the number of agreements towards clusters other than x,x′remains the same, therefore we will focus on the number of agreements towards these two clusters and the number of agreements within V^{i}.

The number of agreements we could lose by thus misplacing v is

diff_{xx′}(v) = |Γ^{+} (v) ∩ ℋ_{x′}^{i}| − |Γ^{+} (v) ∩ ℋ_{x}^{i}| + |Γ^{−} (v) ∩ ℋ_{x}^{i}| − |Γ^{−} (v) ∩ ℋ_{x′}^{i}| .

Since our algorithm chose cluster x, by construction

|Γ^{+} (v) ∩ S_{x}^{i}| + |Γ^{−} (v) ∩ S_{x′}^{i}| ≥ |Γ^{+} (v) ∩ S_{x′}^{i}| + |Γ^{−} (v) ∩ S_{x}^{i}| .  (3.2)

If inequality (3.1) holds for vertex v, using it for Γ^{+} (v) and Γ^{−} (v) in both clusters x, x′, we obtain bounds on the difference of agreements between our random sample’s clusters S_{x}^{i},S_{x′}^{i}and the hybrid clusters ℋ_{x}^{i},ℋ_{x′}^{i}. Combining with inequality (3.2) we get that diff_{xx′}(v) is at most (ε/8)n. Therefore the total decrease in the number of agreements by this type of vertices is at most (ε/8)n|V^{i}| ≤ (ε/8) · n^{2}/m.

By Lemma 3.3 there are at most (ε/8)|V^{i}| vertices in V^{i} for which inequality (3.1) doesn’t hold. The total number of agreements originating from these vertices is at most (ε/8)|V^{i}|n ≤ (ε/8) · n^{2}/m. Finally, the total number of agreements from within V_{i} is at most |V^{i}|^{2} ≤ (ε/4) · n^{2}/m.

Overall the number of agreements that we could lose in one step of the algorithm is at most (ε/2) · n^{2}/m ≤ (ε^{2}/8)n^{2}. The lemma follows by induction.

The approximation guarantee of Theorem 3.2 easily follows from Lemma 3.4. We need to go through all possible k-clusterings of our random sample sets, a total of k^{mr} loop iterations. The inner loop (over i) runs m times, and each of those iterations can be implemented in O(nr) time. The claimed running time bound of our algorithm thus follows.

4 PTAS for minimizing disagreements with k clusters

This section is devoted to the proof of the following theorem, which is our main result in this paper.

Theorem 4.1 (Main). For every k ≥ 2, there is a PTAS for MinDisAgree[k].

The algorithm for MinDisAgree[k] will use the approximation scheme for MaxAgree[k] as a subroutine. The latter already provides a very good approximation for the number of disagreements unless this number is very small. So in the analysis, the main work is for the case when the optimum clustering is right on most of the edges.

4.1 Idea behind the algorithm

The case of two clusters turns out to be a lot simpler and we use it to first illustrate the basic idea. By the PTAS for maximization, we only need to focus on the case when the optimum clustering has only OPT = γn^{2} disagreements for some small γ > 0. We draw a random sample S and try all partitions of it, and focus on the run when we guess the right partition S = (S_{1},S_{2}), namely the way some fixed optimal clustering 𝒟 partitions S. Since the optimum has a very large number of agreements, there must exist a set A of size at least (1 − O(γ))n such that each node in A has a clear choice of which side it prefers to be on. Moreover, for each node in A, we can find out its choice correctly (with high probability) based on edges connecting it to nodes in the sample S. Therefore, we can find a clustering which agrees with 𝒟 on a set A of at least 1 − O(γ) fraction of the nodes. We can then go through this clustering, and for each node in parallel, switch it to the other side if that improves the solution to produce the final clustering. Nodes in A have a clear preference therefore they won’t get switched, thus they will remain clustered exactly as in the optimum 𝒟. The number of extra disagreements compared to 𝒟 on edges amongst nodes in V \ A is obviously at most the number of those edges which is O(γ^{2}n^{2}). For edges connecting a node u ∈ V \ A to nodes in A, since we placed u on the “better” side, and A is placed exactly as in 𝒟 in the final clustering, we can have at most O(γn) extra disagreements per node compared to 𝒟 (this is the error introduced by the edges from a node in A towards the misplaced nodes in V \ A). Therefore we get a clustering with at most OPT + O(γ^{2}n^{2}) = (1 + O(γ))OPT disagreements.

Our k-clustering algorithm for k > 2 uses a similar high-level approach, but is more complicated. The main thing which breaks down compared to the k = 2 case is the following. For two clusters, if 𝒟 has agreements on a large, i. e. (1 − O(γ)), fraction of edges incident on a node u (i. e. if u ∈ A in the above notation), then we are guaranteed to place u exactly as in 𝒟 based on the sample S (when we guess its correct clustering), since the other option will have much poorer agreement. This is not the case when k > 2, and one can get a large number of agreements by placing a node in say one of two possible clusters. Therefore, it does not seem possible to argue that each node in A is correctly placed, and then to use this to finish off the clustering.

However, what we can show is that nodes in A that are incorrectly placed, call this set B, must be in small clusters of 𝒟, and thus are few in number. Moreover, every node in A that falls in one of the large clusters that we produce, is guaranteed to be correctly placed. (These facts are the content of Lemma 4.4.) The nodes in B still need to be clustered, and even a small additional number of mistakes per node in clustering them is more than we can afford. We get around this predicament by noting that nodes in B and A \ B are in different sets of clusters in 𝒟. It follows that we can cluster B recursively in new clusters (and our algorithm is guaranteed to terminate because B is clustered using fewer than k clusters). The actual algorithm must also deal with nodes outside A, and in particular decide which of these nodes are recursively clustered along with B.

With this intuition in place, we now proceed to the formal specification of the algorithm that gives a factor (1 + ε) approximation for MinDisAgree[k] in Figure 2. We will use a small enough absolute constant c_{1} in the algorithm; the choice c_{1} = 1/20 will work.

Algorithm MinDisAg(k,ε):

\underline{Input}: A labeling ℒ: \binom{n}{2} → \{+,−\} of the edges of the complete graph on vertex set V = \{1,...,n\}. \underline{Output}: A k-clustering of the graph, i. e., a partition of V into (at most) k parts V_{1},V_{2},...,V_{k}.

0. If k = 1, return the obvious 1-clustering.

1. Run the PTAS for MaxAgree[k] from previous section on input ℒ with accuracy \frac{ε^{2}c_{1}^{2}}{32k^{4}}. Let ClusMax be the k-clustering returned.

2. Set β = \frac{c_{1}ε}{16k^{2}}. Pick a sample S ⊆ V by drawing \frac{5logn}{β^{2}} vertices u.a.r with replacement.

3. ClusVal = 0; /* Keeps track of value of best clustering found so far*/

4. For each partition S̃of S as S_{1}∪ S_{2}∪ ··· ∪ S_{k}, perform the following steps:

(a) Initialize the clusters C_{i} ≡ S_{i} for 1 ≤ i ≤ k.

(b) For each u ∈ V \ S

(i) For each i = 1,2,...,k, compute pvalS̃(u,i), defined to be 1/|S| times the number of agreements on edges connecting u to nodes in S if u is placed in cluster i along with S_{i}.

(ii) Let j_{u} = arg max_{i}pvalS̃(u,i), and valS̃(u) =^{def} pvalS̃(u,j_{u}).

(iii) Place u in cluster C_{j_{u}}, i. e., C_{j_{u}} ≡ C_{j_{u}} ∪ {u}.

(c) Compute the set of large and small clusters as Large ≡ \{j | 1 ≤ j ≤ k, |C_{j}| ≥ \frac{n}{2k}\}, and Small ≡ \{1,2,...,k\} \ Large. Let l = |Large| and s = k − l = |Small|. /* Note that s < k. */

(d) Cluster W =^{def} ⋃_{j∈Small} C_{j} into s clusters using recursive call to algorithm MinDisAg(s,ε/3). Let the clustering output by the recursive call be W ≡ W′_{1}∪ W′_{2}∪ ··· ∪ W′_{s} (where some of the W′_{i}’s may be empty)

(e) Let 𝒞 be the clustering comprising of the k clusters {C_{j}}_{j∈Large} and {W′_{i}}_{1≤i≤s} . If the number of agreements of 𝒞 is at least ClusVal, update ClusVal to this value, and update ClusMin ≡ 𝒞.

5. Output the better of the two clusterings ClusMax and ClusMin.

Figure 2: MinDisAg(k,ε) algorithm

4.2 Performance analysis of the algorithm

We now analyze the approximation guarantee of the above algorithm. We need some notation. Let

𝒜 ≡ A_{1}∪ A_{2}∪ ··· ∪ A_{k}

be any k-clustering of the nodes in V. Define the function val^{𝒜} : V → [0,1] as follows: val^{𝒜} (u) equals the fraction of edges incident upon u whose labels agree with clustering 𝒜 (i. e., we count negative edges that are cut by 𝒜 and positive edges that lie within the same A_{i} for some i). Also define disagr(𝒜) to be the number of disagreements of 𝒜 with respect to the labeling L. (Clearly disagr(𝒜) = \frac{n−1}{2} ∑_{u∈V}(1 − val^{𝒜} (u)).) For a node u ∈ V and 1 ≤ i ≤ k, let 𝒜^{(u,i)} denote the clustering obtained from 𝒜 by moving u to A_{i} and leaving all other nodes untouched. We define the function pval^{𝒜} : V × {1,2,...,k} → [0,1] as follows: pval^{𝒜} (u,i) equals the fraction of edges incident upon u that agree with the clustering 𝒜^{(u,i)}.

In the following, we fix 𝒟 to be any optimal k-clustering that partitions V as V ≡ D_{1} ∪ D_{2} ∪ ··· ∪ D_{k}. Let γ be defined to be disagr(𝒟)/n^{2} so that the clustering 𝒟 has γn^{2} disagreements with respect to the input labeling L.

Call a sample S of nodes, each drawn uniformly at random with replacement, to be α-good if the nodes in S are distinct^{4} and for each u ∈ V and i ∈ {1,2,...,k},

|pvalS̃(u,i) − pval^{𝒟} (u,i)| ≤ α ,  (4.1)

for the partition S̃of S, defined as S̃= {S_{1},...,S_{k}} with S_{i} = S ∩ D_{i} (where pvalS̃(·,·) is as defined in the algorithm). The following lemma follows by a standard Chernoff and union bound argument similar to Lemma 3.3.^{5}

Lemma 4.2. The sample S picked in Step 2 is β-good with high probability, at least 1 − O(1/\sqrt{n}), where β is defined in Figure 2.

Therefore, in what follows we assume that the sample S is β-good. In the rest of the discussion we focus on the run of the algorithm for the partition S̃of S that agrees with the optimal partition 𝒟, i. e., S_{i} = S ∩ D_{i}. (All lemmas stated apply for this run of the algorithm, though we don’t make this explicit in the statements.) Let (C_{1},C_{2},...,C_{k}) be the clusters produced by the algorithm at the end of Step 4(c) on this run. Let’s begin with the following simple observation.

Lemma 4.3. Suppose a node u ∈ D_{s} is placed in cluster C_{r} at the end of Step 4(b) for r ≠ s, 1 ≤ r,s ≤ k. Then pval^{𝒟} (u,r) ≥ pval^{𝒟} (u,s) − 2β = val^{𝒟} (u) − 2β.

Proof. Note that since u ∈ D_{s}, val^{𝒟} (u) = pval^{𝒟} (u,s). By the β-goodness of S (recall inequality (4.1)), pvalS̃(u,s) ≥ pval^{𝒟} (u,s) − β. Since we chose to place u in C_{r} instead of C_{s}, we must have pvalS̃(u,r) ≥ pvalS̃(u,s). By the β-goodness of S again, we have pval^{𝒟} (u,r) ≥ pvalS̃(u,r) − β. Combining these three inequalities gives us the claim of the lemma.

Define the set of nodes of low value in the optimal clustering 𝒟 as T_{low} =^{def} {u | val^{𝒟} (u) ≤ 1 − c_{1}/k^{2}}. The total number of disagreements is at least the number of disagreements induced by these low valued nodes, therefore

4Note that in the algorithm we draw elements of the sample with replacement, but for the analysis, we can pretend that S consists of distinct elements, since this happens with high probability.

5Since our sample size is Ω(logn) as opposed to O(1) that was used in Lemma 3.3, we can actually ensure (4.1) holds for every vertex with high probability.

|T_{low}| ≤ \frac{2k^{2}disagr(𝒟)}{(n − 1)c_{1}} = \frac{2k^{2}γn^{2}}{(n − 1)c_{1}} ≤ \frac{4k^{2}γn}{c_{1}} .  (4.2)

The following key lemma asserts that the large clusters produced in Step 4(c) are basically correct.

Lemma 4.4. Suppose γ ≤ c_{1}/16k^{3}. Let Large ⊆ {1,2,...,k} be the set of large clusters as in Step 4(c) of the algorithm. Then for each i ∈ Large, C_{i}\ T_{low} ≡ D_{i}\ T_{low}, that is with respect to nodes of high value, C_{i} precisely agrees with the optimal cluster D_{i}.

Proof. Choose i arbitrarily from Large. We will first prove the inclusion C_{i}\T_{low} ⊆ D_{i}\T_{low}. Suppose this is not the case and there exists u ∈ C_{i}\(D_{i}∪T_{low}), so u ∈ D_{j} for some j ≠ i. Since u ∉ T_{low}, we have val^{𝒟} (u) ≥ 1 − c_{1}/k^{2}, which implies pval^{𝒟} (u,j) ≥ 1 − c_{1}/k^{2}. By Lemma 4.3, this gives pval^{𝒟} (u,i) ≥ 1 − c_{1}/k^{2}− 2β. Therefore we have

2(1 − c_{1}/k^{2}− β) ≤ pval^{𝒟} (u,i) + pval^{𝒟} (u,j) ≤ 2 − \frac{|D_{i}| + |D_{j}| − 1}{n}

where the second inequality follows from the simple but powerful observation that each edge connecting u to a vertex in D_{i} ∪ D_{j} is correctly classified in exactly one of the two placements of u in the ith and jth clusters (when leaving every other vertex as in clustering 𝒟). We conclude that both |D_{i}| and |D_{j}| are at most:

|D_{i}|,|D_{j}| ≤ 2( \frac{c_{1}}{k^{2}} + β) n + 1 .  (4.3)

What we have shown is that if u ∈ C_{i}\ (D_{i}∪ T_{low}), then u ∈ D_{j} for some j with |D_{j}| ≤ 2(c_{1}/k^{2}+ β)n + 1. It follows that |C_{i}\ (D_{i}∪ T_{low})| ≤ 2(c_{1}/k + βk)n + k. Therefore,

|D_{i}| ≥ |C_{i}| − |T_{low}| − 2( \frac{c_{1}}{k} + βk) n − k ≥ \frac{n}{2k}− \frac{4k^{2}γn}{c_{1}}− 2( \frac{c_{1}}{k} + βk) n − k > 2( \frac{c_{1}}{k^{2}} + β) n + 1

where the last inequality follows since γ ≤ c_{1}/16k^{3}, k ≥ 2, c_{1} = 1/20, β is tiny and by using a crude bound. This contradicts (4.3), and so we conclude C_{i}\ T_{low} ⊆ D_{i}\ T_{low}.

We now consider the other inclusion D_{i}\ T_{low} ⊆ C_{i}\ T_{low}. If a node v ∈ D_{i}\ (C_{i}∪ T_{low}) is placed in C_{q} for q ≠ i, then a similar argument to how we concluded (4.3) establishes |D_{i}| ≤ 2(c_{1}/k^{2}+ β)n + 1, which is impossible since we have shown D_{i} ⊇ C_{i}\ T_{low}, and hence

|D_{i}| ≥ |C_{i}| − |T_{low}| ≥ \frac{n}{2k}− \frac{4k^{2}γn}{c_{1}}> 2( \frac{c_{1}}{k^{2}} + β) n + 1 ,

where the last step follows similarly as above.

The next lemma states that there is a clustering which is very close to optimum and agrees exactly with our large clusters. This justifies the approach taken by the algorithm to find a near-optimal clustering by focusing on the small clusters among (C_{1},C_{2},...,C_{k}) and reclustering them recursively.

Lemma 4.5. Assume γ ≤ c_{1}/16k^{3}. There exists a clustering ℱ that partitions V as V ≡ F_{1}∪ F_{2}∪ ··· F_{k}, that satisfies the following:

(i) F_{i} ≡ C_{i} for every i ∈ Large,

(ii) The number of disagreements of the clustering ℱ is at most disagr(ℱ) ≤ γn^{2}( 1 + \frac{4k^{2}}{c_{1}}(β + \frac{2k^{2}γ}{c_{1}})).

Proof. By the previous lemma, we know that the clustering 𝒞 = (C_{1},...,C_{k}) agrees with the optimal clustering 𝒟 on the large clusters, except possibly for vertices belonging to T_{low}. To get the clustering ℱ claimed in the lemma, we will start with 𝒟 and move any elements of T_{low} where 𝒟 and 𝒞 differ to the corresponding cluster of 𝒞. This will yield a clustering ℱ which agrees with 𝒞 on the large clusters, and we will argue that only few extra disagreements are introduced in the process. The formal details follow.

Consider the clustering formed from 𝒟 by performing the following in parallel for each w ∈ T_{low}: If w ∈ C_{r} and w ∈ D_{s} for some r ≠ s, move w to D_{r}. Let ℱ ≡ F_{1} ∪ ···∪ F_{k} be the resulting clustering. By construction,

F_{i}∩ T_{low} ≡ C_{i}∩ T_{low}, for 1 ≤ i ≤ k.

Since we only move nodes in T_{low}, clearly F_{i} \ T_{low} ≡ D_{i} \ T_{low} for 1 ≤ i ≤ k. By Lemma 4.4, however, C_{i}\ T_{low} ≡ D_{i}\ T_{low} for i ∈ Large; we conclude that F_{i} ≡ C_{i} for each i ∈ Large.

Now the only extra edges that the clustering ℱ can get wrong, compared to 𝒟, are those incident upon nodes in T_{low}, and therefore

disagr(ℱ) − disagr(𝒟) ≤ (n − 1) ∑_{w∈T_{low}}(val^{𝒟} (w) − val^{ℱ} (w)) .  (4.4)

If a node w belongs to the same cluster in ℱ and 𝒟 (i. e., we did not move it), then since no node outside T_{low} is moved in obtaining ℱ from 𝒟, we have

val^{ℱ} (w) ≥ val^{𝒟} (w) − |T_{low}|/(n − 1) .  (4.5)

If we moved a node w ∈ T_{low} from D_{s} to D_{r}, then by Lemma 4.3 we have pval^{𝒟} (w,r) ≥ val^{𝒟} (w) − 2β. Therefore for such a node w

val^{ℱ} (w) ≥ pval^{𝒟} (w,r) − |T_{low}|/(n − 1) ≥ val^{𝒟} (w) − 2β − |T_{low}|/(n − 1) .  (4.6)

Combining (4.4), (4.5) and (4.6), we can conclude

disagr(ℱ) − disagr(𝒟) ≤ (n − 1)|T_{low}|( 2β + \frac{|T_{low}|}{n − 1}) .

The claim now follows using the upper bound on |T_{low}| from (4.2) (and using n^{2}/(n − 1)^{2} ≤ 2).

Lemma 4.6. If the optimal clustering 𝒟 has γn^{2} disagreements for γ ≤ c_{1}/16k^{3}, then the clustering ClusMin found by the algorithm has at most γn^{2}(1 + ε/3)(1 + 4k^{2}β/c_{1}+ 8k^{4}γ/c_{1}^{2}) disagreements.

Proof. We note that when restricted to the set of all edges except those entirely within W, the set of agreements of the clustering 𝒞 in Step 4(e) coincides precisely with that of ℱ. Let n_{1} be the number of disagreements of ℱ on edges that lie within W and let n_{2} be the number of disagreements on all other edges. Since W is clustered recursively, we know the number of disagreements in 𝒞 is at most

n_{2}+ n_{1}( 1 + \frac{ε}{3}) ≤ (n_{1}+ n_{2})( 1 + \frac{ε}{3}) .

The claim follows from the bound on n_{1}+ n_{2} from Lemma 4.5, Part (ii).

Theorem 4.7. For every ε > 0, algorithm MinDisAg(k,ε) delivers a clustering with number of disagreements within a factor (1 + ε) of the optimum.

Proof. Let OPT = γn^{2} be the number of disagreements of an optimal clustering. The solution ClusMax returned by the maximization algorithm has at most

OPT + \frac{ε^{2}c_{1}^{2}n^{2}}{32k^{4}} = γn^{2}( 1 + \frac{ε^{2}c_{1}^{2}}{32k^{4}γ})

disagreements. The solution ClusMin has at most γn^{2}(1 + ε/3)(1 + 4k^{2}β/c_{1} + 8k^{4}γ/c_{1}^{2})) disagreements. If γ > εc_{1}^{2}/32k^{4}, the former is within (1 + ε) of the optimal. If γ ≤ εc_{1}^{2}/32k^{4} (which also satisfies the requirement γ ≤ c_{1}/16k^{3} we had in Lemma 4.6), the latter clustering ClusMin achieves approximation ratio (1+ε/3)(1+ε/2) ≤ (1+ε) (recall that β ≤ εc_{1}/16k^{2}). Thus the better of these two solutions is always an (1 + ε) approximation.

To conclude Theorem 4.1, we examine the running time of MinDisAg. Step 4 will be run for k^{|S|} = n^{O(k^{4}/ε^{2})} iterations. During each iteration, the placement of vertices is done in O(nlogn) time. Finally, observe that there is always at least one large cluster, therefore the recursive call is always done on at most (k − 1) clusters. It follows that the running time of MinDisAg(k,ε) can be described from the recurrence T (k,ε) ≤ n^{O(k^{4}/ε^{2})}(nlogn + T (k − 1,ε/3)) from which we derive that the total running time is bounded by n^{O(9^{k}/ε^{2})}logn.

5 Complexity on general graphs

So far, we have discussed the MaxAgree[k] and MinDisAgree[k] problems on complete graphs. In this section, we note some results on the complexity of these problems when the graph can be arbitrary. As we will see, the problems become much harder in this case.

Theorem 5.1. There is a polynomial time factor 0.878 approximation algorithm for MaxAgree[2] on general graphs. For every k ≥ 3, there is a polynomial time factor 0.7666 approximation algorithm for MaxAgree[k] on general graphs.

Proof. The bound for the 2-clusters case follows from the Goemans-Williamson algorithm for MaxCut modified in the obvious way to account for the positive edges. Specifically, we can write a semidefinite program relaxation for MaxAgree[2] similar to the GW semidefinite relaxation of MaxCut: There is a unit vector associated with each vertex, and the objective function, which now includes terms for the positive edges, equals

∑_{(i,j) negative} \frac{1 − ⟨v_{i},v_{j}⟩}{2} + ∑_{(i,j) positive} \frac{1 + ⟨v_{i},v_{j}⟩}{2} .

The rounding is identical to the GW random hyperplane rounding. By the GW analysis, we know that the probability that v_{i} and v_{j} are separated by a random hyperplane is at least 0.878 times (1/2)(1 − ⟨v_{i},v_{j}⟩). By a similar calculation, it can be shown that the probability that v_{i} and v_{j} are not separated by a random hyperplane is at least 0.878 times (1/2)(1 + ⟨v_{i},v_{j}⟩). These facts imply that the expected agreement of the clustering produced by random hyperplane rounding is at least 0.878 times the optimum value of the above semidefinite program, which in turn is at least as large as the maximum agreement with two clusters.

The bound for k ≥ 3 is obtained by Swamy [18] who also notes that slightly better bounds are possible for 3 ≤ k ≤ 5.

The MaxAgree[2] problem on general graphs includes as a special case the MaxCut problem. Therefore, by the recent work on hardness of approximating MaxCut [15], the above approximation guarantee for MaxAgree[2] is the best possible, unless the Unique Games Conjecture is false.

Theorem 5.2. There is a polynomial time O(\sqrt{logn}) approximation algorithm for MinDisAgree[2] on general graphs. For k ≥ 3, MinDisAgree[k] on general graphs cannot be approximated within any finite factor.

Proof. The bound for 2-clustering follows by the simple observation that MinDisAgree[2] on general graphs reduces to Min2CNFDeletion, i. e., given an instance of 2SAT, determining the minimum number of clauses that have to be deleted to make it satisfiable. The latter problem admits an O(\sqrt{logn}) approximation algorithm [1]. The result on MinDisAgree[k] for k ≥ 3 follows by a reduction from k-coloring. When k ≥ 3, it is NP-hard to tell if a graph is k-colorable, and thus even given an instance of MinDisAgree[k] with only negative edges, it is NP-hard to determine if the optimum number of disagreements is zero or positive.

Acknowledgments. We thank the anonymous referees for several useful comments on the presentation.

References

[1] * A. Agarwal, M. Charikar, K. Makarychev, and Y. Makarychev: O(\sqrt{logn}) approximation algorithms for Min Uncut, Min 2CNF deletion, and directed cut problems. In Proc. 37th STOC, pp. 573–581. ACM Press, 2005. [STOC:10.1145/1060590.1060675]. 5

[2] * N. Ailon, M. Charikar, and A. Newman: Aggregating Inconsistent Information: Ranking and Clustering. In Proc. 37th STOC, pp. 684–693. ACM Press, 2005. [STOC:1060590.1060692]. 1, 1.1

[3] * N. Alon, K. Makarychev, Y. Makarychev, and A. Naor: Quadratic forms on graphs. In Proc. 37th STOC, pp. 486–493. ACM Press, 2005. [STOC:10.1145/1060590.1060664]. 1, 1.1

[4] * S. Arora, E. Berger, E. Hazan, G. Kindler, and S. Safra: On non-approximability for quadratic programs. In Proc. 46th FOCS, pp. 206–215. IEEE Computer Society Press, 2005. [FOCS:10.1109/SFCS.2005.57]. 1, 1.1

[5] * N. Bansal, A. Blum, and S. Chawla: Correlation clustering. Machine Learning, Special Issue on Clustering, 56:89–113, 2004. [doi:10.1023/B:MACH.0000033116.57574.95]. 1, 1.1, 1.2, 2

[6] * A. Ben-Dor, R. Shamir, and Z. Yakhini: Clustering gene expression patterns. Journal of Computational Biology, 6:281–297, 1999. 1, 1.1

[7] * M. Charikar, V. Guruswami, and A. Wirth: Clustering with qualitative information. Journal of Computer and System Sciences, 71(3):360–383, October 2005. [JCSS:10.1016/j.jcss.2004.10.012]. 1, 1.1

[8] * M. Charikar and A. Wirth: Maximizing quadratic programs: extending Grothendieck’s inequality. In Proc. 45th FOCS, pp. 54–60. IEEE Computer Society Press, 2004. [FOCS:10.1109/FOCS.2004.39]. 1, 1.1 [9] * E. Demaine and N. Immorlica: Correlation clustering with partial information. In Proc.

6th Internat. Workshop on Approximation Algorithms for Combinatorial Optimization Problems (AP-PROX’03), volume 2764 of LNCS, pp. 1–13. Springer, 2003. [doi:10.1007/b11961]. 1.1

[10] * D. Emanuel and A. Fiat: Correlation clustering—minimizing disagreements on arbitrary weighted graphs. In Proc. 11th European Symp. on Algorithms (ESA’03), pp. 208–220. Springer, 2003. [doi:10.1007/b13632]. 1.1

[11] * W. Fernandez de la Vega, M. Karpinski, C. Kenyon, and Y. Rabani: Approximation schemes for clustering problems. In Proc. 35th STOC, pp. 50–58. ACM Press, 2003. [STOC:10.1145/780542.780550]. 1.2

[12] * W. Fernandez de la Vega and C. Kenyon: A randomized approximation scheme for metric max-cut. In Proc. 39th FOCS, pp. 468–471. IEEE Computer Society Press, 1998. [FOCS:10.1109/SFCS.1998.743497]. 1.2, 2

[13] * O. Goldreich, S. Goldwasser, and D. Ron: Property testing and its connection to learning and approximation. Journal of the ACM, 45(4):653–750, July 1998. [JACM:10.1145/285055.285060]. 1.2, 3

[14] * P. Indyk: A sublinear-time approximation scheme for clustering in metric spaces. In Proc. 40th FOCS, pp. 154–159. IEEE Computer Society Press, 1999. [FOCS:10.1109/SFFCS.1999.814587]. 1.2, 2

[15] * S. Khot, G. Kindler, E. Mossel, and R. O’Donnell: Optimal inapproximability results for Max Cut and other 2-variable CSPs. In Proc. 45th FOCS, pp. 146–154. IEEE Computer Society Press, 2004. [FOCS:10.1109/FOCS.2004.49]. 5

[16] * A. Nemirovski, C. Roos, and T. Terlaky: On maximization of quadratic form over intersection of ellipsoids with common center. Mathematical Programming, 86(3):463–473, 1999. [STACS:922f1ftd6bpfxhk7]. 1.1

[17] * R. Shamir, R. Sharan, and D. Tsur: Cluster graph modification problems. In Proc. 28th Workshop on Graph Theory (WG’02), pp. 379–390, 2002. 1, 1.1, 1.2, 2

[18] * C. Swamy: Correlation Clustering: Maximizing agreements via semidefinite programming. In Proc. 15th ACM-SIAM Symp. on Discrete Algorithms (SODA’04), pp. 519–520. SIAM, 2004. [SODA:982866]. 1.1, 5

AUTHORS

Ioannis Giotis Department of Computer Science and Engineering, University of Washington, Seattle, WA

 giotis cswashingtonedu
 http://www.cs.washington.edu/homes/giotis/

Venkatesan Guruswami Department of Computer Science and Engineering, University of Washington, Seattle, WA

venkat cswashingtonedu
http://www.cs.washington.edu/homes/venkat/

ABOUT THE AUTHORS

Ioannis Giotis is a graduate student in the Department of Computer Science and Engineering at the University of Washington. Ioannis received his undergraduate degree from the Computer Engineering and Informatics Department at the University of Patras, Greece. His research interests include game theory, probabilistic techniques, and approximation algorithms.

Venkatesan Guruswami is an Assistant Professor of Computer Science and Engineering at the University of Washington in Seattle. Venkat received his Bachelor’s degree from the Indian Institute of Technology at Madras in 1997 and his Ph. D. from the Massachusetts Institute of Technology in 2001 under the supervision of Madhu Sudan. He was a Miller Research Fellow at the University of California, Berkeley during 2001-2002. His research interests include the theory of error-correcting codes, approximation algorithms for optimization problems and corresponding hardness results, algebraic algorithms, explicit combinatorial constructions, and pseudorandomness. Venkat is a recipient of the David and Lucile Packard Fellowship (2005), Alfred P. Sloan Research Fellowship (2005), an NSF Career Award (2004), ACM’s Doctoral Dissertation Award (2002), and the IEEE Information Theory Society Paper Award (2000). Venkat was born and grew up in the South Indian metropolis of Chennai. He enjoys playing badminton and other racquet games, hiking within his humble limits, listening to Carnatic (South Indian classical) music, and staring at Mount Rainier (on the few days Seattle weather is kind enough to permit a glimpse).