Introduction
Correlation clustering is a fundamental problem in unsupervised learning that formalizes the goal of grouping similar elements together and separating dissimilar elements. Given a complete graph G = ( V , E + ∪ E − ) G=(V,E^+ \cup E^-) G = ( V , E + ∪ E − ) with edges partitioned into positive ( + ) (+) ( + ) edges E + E^+ E + and negative ( − ) (-) ( − ) edges E − E^- E − , correlation clustering seeks a partition of V V V minimizing the number of disagreements, i.e., ( + ) (+) ( + ) edges with endpoints in different clusters and ( − ) (-) ( − ) edges with endpoints in the same cluster. Correlation clustering was first introduced by Bansal, Blum, and Chawla [9 ] and has since been the subject of extensive theoretical study (see, e.g., [GG06, BGK13, BDV18, AEKM20, CLM+21, AW22, BCMT22, [CFL⁺22, Vel22, BCMT23, CLMP24, CCL⁺24, DMM24, BDP⁺25, CCL⁺25, GS26], and references therein), as well as a wide range of practical applications, including automated labeling [AHK⁺09, CKP08], community mining [31 , 38 , 42 , 41 SDE⁺21, AAD⁺23] , document clustering [9 ZCC⁺08, 17 ] , duplicate detection [6 ] , and many others.
While the classical formulation of correlation clustering assumes a fixed signed complete graph G = ( V , E + ∪ E − ) G=(V,E^{+}\cup E^{-}) G = ( V , E + ∪ E − ) , many real-world applications involve data that evolves over time. For example, in a social network, individuals can join and leave the network, causing the friendly and hostile relationships to evolve, reflected as the changes in ( + ) (+) ( + ) and ( − ) (-) ( − ) edges. More generally, input labels can fluctuate due to noisy data sources, and a vertex might be temporarily dropped from the network due to reliability issues. In such scenarios, the most straightforward way to maintain correlation clustering solutions is to recompute an optimal clustering from scratch after every update. However, this approach is computationally expensive and impractical, which motivates the design of efficient and high-quality correlation clustering algorithms in the dynamic setting .
As a result, there has recently been considerable research studying dynamic algorithms for correlation clustering [BDH⁺19, CZ19, BCMT23, DMM24, CLMP24, BCC⁺24, BDP⁺25, CCL⁺26]. One line of work assumes that the input is a signed complete graph in which all edges are initially negative, and each update consists of flipping the label of a single edge, either from negative to positive or vice versa. The goal is to maintain a clustering that approximately minimizes disagreement after each such update. Efficiency is typically measured by the amortized update time , defined as the total time spent over a sequence of updates divided by the number of updates performed. Achieving an update time of polylog ( n ) \operatorname{polylog}(n) polylog ( n ) is a natural target, as it almost matches the cost of reading a single edge label. Initial breakthroughs by [BDH⁺19, CZ19] gave dynamic algorithms with 3-approximation guarantees and polylog ( n ) \operatorname{polylog}(n) polylog ( n ) amortized update time. Subsequent work improved the efficiency further: [12 , 33 ] achieved constant update time for O ( 1 ) O(1) O ( 1 ) approximation, and [BCC⁺24] improved the approximation ratio to 3 − Ω ( 1 ) 3-\Omega(1) 3 − Ω ( 1 ) while retaining polylog ( n ) \operatorname{polylog}(n) polylog ( n ) update time. Most recently, [CCL⁺26] designed a dynamic algorithm that almost matches the best offline approximation factor using polylog ( n ) \operatorname{polylog}(n) polylog ( n ) update time, as long as the clustering is represented with a special data structure.
Vertex insertions/deletions. While much of the prior work focuses on edge label updates in a fixed vertex set, many practical scenarios involve more fundamental structural changes, namely, the insertion or deletion of vertices along with their incident edges. For instance, in evolving social or communication networks, users may join or leave the system, causing a cascade of updates to the pairwise relationships encoded in the graph. This naturally motivates the study of fully dynamic correlation clustering algorithms that can efficiently handle vertex updates.
Formally, the input is an evolving signed complete graph on a fixed set of at most n n n nodes. The algorithm operates in the adjacency list model, where it has direct access to the current set of ( + ) (+) ( + ) neighbors for each node. We assume that adjacency lists are maintained and updated externally by users or an upstream system, and are provided to the algorithm in fully updated form at each step. This reflects common practical settings, such as social or communication networks, where users independently report their connections, and such updates can be performed in parallel or asynchronously outside the algorithm’s control. As a result, the algorithm is not charged for assembling or modifying adjacency lists.
The graph is implicitly defined by these lists: a pair of nodes shares a ( + ) (+) ( + ) edge if they appear in each other’s lists, and a ( − ) (-) ( − ) edge otherwise. Each update consists of either the insertion or deletion of a single node’s adjacency list. In an insertion, a new node v v v arrives along with its full set of ( + ) (+) ( + ) neighbors, which implicitly defines the labels of all edges incident to v v v . In a deletion, a node v v v and all of its incident edges are removed from the graph. The algorithm must maintain, at all times, a clustering that achieves a constant-factor approximation to the minimum number of disagreements. We remark that while it is natural to aim for polylog ( n ) \operatorname{polylog}(n) polylog ( n ) update time for each edge insertions and deletions, it is significantly less clear what is achievable for vertex insertions and deletions. In particular, a single vertex update can simultaneously affect up to Θ ( n ) \Theta(n) Θ ( n ) edge labels. Therefore, the following question is a major open problem in dynamic algorithms for correlation clustering:
Is it possible to maintain a constant-factor approximation for correlation clustering using polylog ( n ) \operatorname{polylog}(n) polylog ( n ) update time in the vertex insertion/deletion model?
Our Contributions
In this paper, we answer the above question in the affirmative, presenting the first fully dynamic algorithm for correlation clustering that maintains an O ( 1 ) O(1) O ( 1 ) -approximation under a worst-case fixed ordering of vertex insertions and deletions, with polylogarithmic amortized update time. A key distinction between our work and recent dynamic correlation clustering algorithms [30 , 34 ] lies in the treatment of deletions. While all of these works, including ours, support arbitrary order of vertex insertions, prior algorithms are limited to random-order deletions , where deleted vertices are sampled at random from the current vertex set. In contrast, our algorithm is the first to support arbitrary order of vertex deletions while maintaining an O ( 1 ) O(1) O ( 1 ) -approximation and polylogarithmic amortized update time. This makes our method substantially more robust in fully dynamic settings.
En route to our efficient dynamic algorithm, we encountered and resolved several major technical challenges, and the ideas in our solutions can be of independent interest (see § 2 for an overview). First, explicitly maintaining the standard sparse-dense decomposition needs Ω ( n ) \Omega(\sqrt{n}) Ω ( n ) amortized update time (Lemma A.1 ). We bypass this bottleneck by introducing a “partially correct tolerant decomposition” framework. This allows for controlled structural errors by partitioning the graph into singletons, tolerant clusters, and isolated clusters, which makes it possible to maintain efficiently. We form each cluster as a standard almost-clique, but maintain it only under the relaxed definition (Lemma 4.1 ). Second, we extend the charging scheme of [8 ASV23] to bound the costs of tolerant and isolated clusters, and we charge misclassified singletons, level by level, to the truly sparse singletons (Theorem 2). Third, to achieve polylogarithmic update time, we combine three mechanisms: (i) lazy refreshment : a cluster K K K is rebuilt only after ε ∣ K ∣ \varepsilon|K| ε ∣ K ∣ newly inserted vertices have joined it, or ε ∣ K ∣ \varepsilon|K| ε ∣ K ∣ of its past members have been deleted, where ∣ K ∣ |K| ∣ K ∣ is its size at formation (Algorithm 1 and Algorithm 3); (ii) identification : when a cluster forms, the outside vertices adjacent to at least half of it are moved to the singleton set, so that vertices which a later deletion may make dense with the new cluster are already tracked (Algorithm 2); (iii) approximate degree buckets : every singleton enters all O ( log n ) O(\log n) O ( log n ) degree lists, and periodically, sampling decides whether level i i i must be scanned fully, or only until 2 i polylog ( n ) 2^i\operatorname{polylog}(n) 2 i polylog ( n ) scanned vertices test sparse (Algorithm 4 and Algorithm 5). Finally, for the running time, a forward-charging budget scheme lets each new cluster pay for its formation from the budgets of past updates and pass fresh budgets to the vertices it identifies (§ 10.3 ). Together, these techniques give the guarantees of Theorem 1.
Theorem 1. For the correlation clustering problem on a signed complete graph G = ( V , E + ∪ E − ) G = (V, E^{+} \cup E^{-}) G = ( V , E + ∪ E − ) , there exists a randomized fully dynamic vertex-update algorithm that, given the positive subgraph
G + = ( V , E + ) G^{+} = (V, E^{+}) G + = ( V , E + ) and a sequence of poly ( ∣ V ∣ ) \operatorname{poly}(|V|) poly ( ∣ V ∣ ) worst-case vertex insertions and deletions, together with all incident ( + ) (+) ( + ) edges, maintains an O ( 1 ) O(1) O ( 1 ) -approximation to the optimal correlation clustering with high probability in polylog ( n ) \operatorname{polylog}(n) polylog ( n ) amortized update time.
Adversarial robustness is an important goal for dynamic and streaming algorithms whose future inputs may depend on their past behavior. Instead of having an input stream fixed before the algorithm starts, in the standard black-box model, the adversary chooses each update after seeing the algorithm’s past outputs. This matters in practice whenever the output feeds back into the input, for instance, on social platforms, users join, leave, or change connections in response to the communities they are shown, and a dynamic clustering algorithm used as a subroutine to determine the communities receives updates that depend on its earlier answers [43 ] . Therefore, adversarial robustness has been studied extensively for streaming problems [16 , 37 ] , and it has also drawn more attention in dynamic graph algorithms [26 , 43 , 18 , 14 ] . Essentially, our algorithm in Theorem 1 is robust against the more powerful white-box model [2 ] , where a computationally unbounded adversary may inspect the entire maintained state and all previously drawn random bits before choosing the next vertex insertion or deletion. Thus we achieve robustness while preserving the O ( 1 ) O(1) O ( 1 ) -approximation and the polylog ( n ) \operatorname{polylog}(n) polylog ( n ) amortized update time guarantees (see Theorem 8).
Technical Overview
Our goal is to maintain an O ( 1 ) O(1) O ( 1 ) -approximate solution for min-disagreement correlation clustering under vertex insertions and deletions, while using only polylogarithmic amortized time per update. The main difficulty is that a single vertex update can modify Θ ( n ) \Theta(n) Θ ( n ) edges, which may drastically change the structural role of many remaining vertices. In particular, under vertex deletions, dense structure can emerge after a carefully chosen blocking set disappears, and an algorithm that search for local neighborhood changes may fail to detect this change with polylogarithmic time. This makes the model much more challenging than the comparable edge dynamic settings in [12 , 33 , 14 , 24 ] .
Our framework: partially correct tolerant sparse-dense decomposition
Roughly speaking, there are two popular ways to obtain O ( 1 ) O(1) O ( 1 ) -approximation for correlation clustering, pivot algorithm (see, e.g. [3 , 11 , 12 CKL+24, 33 , 34 ] ) and sparse-dense decomposition (see, e.g. [29 , 8 , 7 , 30 ] )1 .
Difficulty of pivot-based algorithms. Pivot-based algorithms iteratively select an unassigned vertex as a “pivot” and form a cluster around it, based on the similarity relationships with the remaining vertices. They often achieve strong approximation ratios, but although [34 ] adapted them to handle vertex insertions . However, the pivot algorithm faces some inherent challenges with vertex deletions . To see the issue, suppose a pivot is selected and its cluster is formed, and then the pivot is deleted. Then this can invalidate a large number of cluster assignments, requiring a large number of updates that seem incompatible with both efficiency and maintaining a good approximation guarantee.
The sparse-dense decomposition technique. Another popular technique for correlation clustering is the sparse-dense decomposition (SDD) technique (also called “preclustering” in the literature), which partitions the graph into sparse singleton vertices and dense almost-cliques. Roughly speaking, we define a sparse edge as one whose endpoints have significantly different neighborhoods and a sparse vertex if many of its incident edges are sparse; intuitively, these vertices act as bridges connecting unrelated parts of the graph. Removing them leaves a graph that decomposes into “almost-cliques”: groups of vertices whose sizes are similar to their degrees, and whose numbers of non-neighbors inside and neighbors outside are small. In the offline setting, this decomposition gives a constant-factor approximation by clustering each almost-clique together and keeping each sparse vertex as singletons (see, e.g. [29 , 8 , 7 ] ).
A notable advantage of the sparse-dense decomposition technique is that, when randomization is allowed, we can efficiently use samples to determine whether a vertex should join a cluster. As such, it is quite natural to use this technique in the vertex dynamic setting, where sampling is perhaps the most natural operation. Indeed, building on the decomposition techniques, [30 ] gave the first dynamic algorithm that achieves O ( 1 ) O(1) O ( 1 ) -approximation with polylog n n n update time that supports arbitrary-order insertion and random deletion . Indeed, their analysis crucially relies on the assumption that only a random vertex can be deleted, as this randomness ensures that the graph structure only change gradually, thereby ruling out worst-case scenarios in which the removal of a carefully chosen set of “blocking” vertices suddenly force the formation of a dense cluster.
Sparse-dense decomposition cannot work. We would naturally wonder whether a simple variant of the algorithm in [30 ] can support worst-case vertex deletion. Alas, the story becomes much more involved when arbitrary deletions are allowed: the standard decomposition is far too rigid for the fully dynamic vertex-update model. We formally prove in Section A that strictly maintaining a valid standard ε \varepsilon ε -sparse-dense decomposition (defined as in, e.g., [29 , 8 ] ) would necessarily require an expected amortized update time of Ω ( n ) \Omega(\sqrt{n}) Ω ( n ) per update.
To see the difficulty, consider O ( n ) O(\sqrt{n}) O ( n ) disjoint cliques, each of size O ( n ) O(\sqrt{n}) O ( n ) , so the graph is fully structured into dense components. Now insert O ( n ) O(\sqrt{n}) O ( n ) new vertices, each connecting to all existing vertices across all cliques. These new connections create many cross-cluster inconsistencies, causing every original vertex to become incident to a large number of “sparse” edges, and thus forcing essentially all vertices to be reclassified as sparse. This triggers a global recomputation of the decomposition and incurs Θ ( n ) \Theta(n) Θ ( n ) changes. However, removing these O ( n ) O(\sqrt{n}) O ( n ) inserted vertices restores the original clique structure, so the algorithm will need to put the Θ ( n ) \Theta(n) Θ ( n ) vertices back into the clusters, which induces a high time complexity!
From exact decomposition to partially correct tolerant decomposition. The above issue suggests a fundamental barrier for maintaining exact sparse-dense decompositions. However, the example also reveals that exact maintenance is unnecessary for achieving an O ( 1 ) O(1) O ( 1 ) -approximation in correlation clustering. In particular, even if we do not update cluster assignments when sparse vertices are inserted, the resulting inconsistencies can be charged to the cost of the sparse edges, preserving a constant-factor guarantee in the above example. As such, our first step is to relax the definition of dense structure. In what follows, we will see that the min-disagreement correlation clustering is surprisingly “graceful”, in the sense that even some strong structural inconsistency in the decomposition can still lead to constant-factor approximation in the cost. Conceptually, our new “tolerant” SDD framework provides the first separation between the stronger decomposition problem and the correlation clustering objective.
To ensure efficiency under worst-case deletion, our framework tolerates three specific structural inconsistencies:
Tolerant Clusters (Out-edge violations): Clusters may have many outgoing positive edges, provided those external edges are sufficiently sparse and there are not many internal non-edges inside. Intuitively, clusters remain internally cohesive but need not be externally isolated. This is useful because it makes the decomposition robust to vertex insertions that introduce many external connections, since we do not need to modify clusters in response. In fact, observe that such relaxation already overcomes the Ω ( n ) \Omega(\sqrt{n}) Ω ( n ) update time lower bound we discussed above: when high-degree sparse interlopers are inserted, we simply do not make any updates to the clusters.
Isolated Clusters (Non-edge violations): Clusters may contain many non-edges, provide they have enough number of sparse edges outside the cluster . Intuitively, clusters are relaxed from near-cliques to loosely coherent groups that may be internally incomplete. This avoids costly restructuring when internal density is violated due to outside clustering “stealing” vertices from this cluster (more details to be discussed later).
Partially Correct Singletons: The pool of singletons (denoted as V ~ s i n g l e t o n \widetilde{V}_{\mathrm{singleton}} V singleton ) is permitted to include vertices that should belong to clusters, provided the total number of accumulated edges does not dominate the total number of edges that are actually sparse . Intuitively, singletons act as a buffer for uncertain assignments. This is useful because it allows us to defer reassignment decisions while still controlling the overall disagreement cost.
At a high level, the first two types of tolerant structure can ensure that the algorithm does not need to update the clusters too often, and the misclassification of the dense clusters can ease the required time complexity for cluster-forming subroutines. We call this new decomposition framework a partially correct tolerant decomposition .
Why the relaxed structure still gives an O ( 1 ) O(1) O ( 1 ) -approximation. While our relaxed structure deviates considerably from the sparse-dense decomposition, we can nevertheless still guarantee a constant-factor approximation with the following analysis:
Tolerant Clusters (Bounding out-edge cost): As long as the number of non-edges inside a cluster is small, grouping the set of vertices would still induce a relatively small cost. The main risk of tolerating many outgoing edges is accidentally splitting a larger truly dense cluster. However, our rules ensure that these outgoing edges point primarily to either sparse vertices or to disagreement neighbors of the cluster. Hence, OPT must pay a cost comparable to these edges, allowing us to charge the cost to OPT.
Isolated Clusters (Bounding non-edge cost): When the number of non-edges inside a cluster is large, grouping k k k vertices together joins many non-neighbors and can induce Θ ( k 2 ) \Theta(k^2) Θ ( k 2 ) disagreement costs. However, our rules require that each of these vertices must have Ω ( k ) \Omega(k) Ω ( k ) sparse incident edges outside of the cluster. Again, these edges induce Ω ( k 2 ) \Omega(k^2) Ω ( k 2 ) cost for any valid clustering (including OPT); as such, we can still keep the vertices together and charge the cost to OPT.
Partially Correct Singletons (Bounding misclassification cost): Finally, for k k k dense vertices with degree around 2 i 2^i 2 i , mistakenly putting them as singletons incurs roughly k ⋅ 2 i k \cdot2^i k ⋅ 2 i cost. We tolerate this only when there are many sparse vertices in the graph, which induces cost much more than k ⋅ 2 i k \cdot2^i k ⋅ 2 i to OPT. Hence we can still keep the dense vertices as singletons and charge the cost to OPT.
The formal proof is built on the charging argument similar to the techniques in [29 , 8 , 7 ] , albeit it is considerably more involved. In a standard analysis, the clustering costs are charged to edges with unavoidable costs in the graph (and thus to OPT). One major complication in our setting is that since the pool of singleton vertices can still contain dense vertices, we cannot always find edge sets for the charging of edges going out of a cluster. Instead, our novel charging scheme charges these costs to the edges on singleton vertices, and then transfer the charges of singleton vertices to OPT.
Tracking the set of singleton vertices and merging into clusters
The immediate advantage of allowing a tolerant structure in singleton vertices is that it becomes much easier to merge dense vertices into clusters. To understand why, we first give some intuition for what it means for a set of vertices to “block” clusters from forming. In correlation clustering, a valid dense cluster must be both well-connected internally (forming a near-clique) and isolated externally (having few edges to outside vertices). Thus, even if a clique V V V exists, a large external set S S S with many connections to this clique can prevent V V V from being recognized as a cluster because the clique no longer appears sufficiently isolated. In this sense, the external set S S S acts as a “blocking set” that hides the clique and prevents it from being merged.
Consider a concrete example where a large blocking set S S S of size Θ ( n ) \Theta(n) Θ ( n ) hides two such groups of vertices. The first group is n 0.49 n^{0.49} n 0.49 disjoint O ( 1 ) O(1) O ( 1 ) -sized cliques, each connecting to O ( 1 ) O(1) O ( 1 ) vertices in S S S , and the second group is a single n \sqrt{n} n -sized clique connecting to O ( n ) O(\sqrt{n}) O ( n ) vertices in S S S . If we keep deleting the “blocking vertices” inside S S S that correspond to the O ( 1 ) O(1) O ( 1 ) -sized cliques, those tiny cliques suddenly become perfectly isolated and should be clustered. However, if we insist that dense clusters must be formed immediately upon being unblocked, it is virtually impossible for us to efficiently locate these newly freed singleton vertices from the large pool of V ~ s i n g l e t o n \widetilde{V}_{\mathrm{singleton}} V singleton (here, and throughout, we use V ~ s i n g l e t o n \widetilde{V}_{\mathrm{singleton}} V singleton to denote the set of singleton vertices maintained by the algorithm). Note that notification-based approaches will not work here since no random neighbors for a vertex s ∈ S s \in S s ∈ S outside S S S can be sampled unless we sample Ω ( n ) \Omega(n) Ω ( n ) neighbors. On the other hand, if we only care about unclustered vertices that are “dominating” because their aggregate contribution to the approximation cost is large enough, then we do not need to search for or form any of the tiny O ( 1 ) O(1) O ( 1 ) -sized cliques until the n \sqrt{n} n -sized clique becomes unblocked. Therefore, since the large n \sqrt{n} n -sized clique dominates the singleton pool, it suffices to sample O ( 2 i log 2 n ) = O ~ ( n ) O(2^i \log^2 n) = \widetilde{O}(\sqrt{n}) O ( 2 i log 2 n ) = O ( n ) vertices from the singleton vertices every O ( 2 i ) O(2^i) O ( 2 i ) updates, i.e. with polylog n n n work each update, find the unblocked massive clique, form a cluster, and recurse.
Figure 2. Illustration of a large blocking set S S S that blocks potential clusters of different sizes. If we insist on forming clusters for all dense vertices, then deleting the vertices adjacent to the triangles becomes very hard to detect unless we go over the entire V ~ s i n g l e t o n \widetilde{V}_{\mathrm{singleton}} V singleton set. On the other hand, the tolerant structure in V ~ s i n g l e t o n \widetilde{V}_{\mathrm{singleton}} V singleton can effectively resolve the issue.
It turns out that we can formalize the notion of “dominating” for groups of vertices with degree around 2 i 2^{i} 2 i . In particular, we say a level i i i is dominating if the k k k dense vertices with degree around 2 i 2^{i} 2 i satisfy k ⋅ 2 i = Ω ( ∣ V ~ s i n g l e t o n ∣ / log n ) k \cdot2^{i} = \Omega(|\widetilde{V}_{\mathrm{singleton}}|/\log n) k ⋅ 2 i = Ω ( ∣ V singleton ∣/ log n ) . The intuition behind this definition is that the quantity k ⋅ 2 i k \cdot2^{i} k ⋅ 2 i captures the total contribution of these vertices to the approximation cost; therefore, a dominating level contributes a significant fraction of the overall correlation clustering cost. A uniformly sampled vertex of V ~ s i n g l e t o n \widetilde{V}_{\mathrm{singleton}} V singleton is one of these k k k dense vertices with probability k / ∣ V ~ s i n g l e t o n ∣ ≥ 1 / ( 2 i log n ) k/|\widetilde{V}_{\mathrm{singleton}}| \ge1/(2^{i}\log n) k /∣ V singleton ∣ ≥ 1/ ( 2 i log n ) . Hence, Θ ( 2 i log 2 n ) \Theta(2^{i}\log^{2} n) Θ ( 2 i log 2 n ) samples detect a dominating level with high probability, which if we perform after every O ( 2 i ) O(2^{i}) O ( 2 i ) updates costs polylog( n ) (n) ( n ) per event.
Tracking a few vertices merging to a large cluster. Unfortunately, the reality is much more challenging than the ideal case for entire clusters waiting to be formed: it could happen that a few vertices for a dominating group need to be merged to an already-existing large cluster. Consider a scenario where a large cluster K K K of size n n n has only O ( 1 ) O(1) O ( 1 ) vertices in V ~ s i n g l e t o n \widetilde{V}_{\mathrm{singleton}} V singleton waiting to merge into it. Furthermore, suppose there are also n 0.99 n^{0.99} n 0.99 sparse vertices elsewhere. Since the O ( 1 ) O(1) O ( 1 ) vertices have degree 2 i ≈ n 2^{i} \approx n 2 i ≈ n , then level i i i is dominating. However, uniform sampling over V ~ s i n g l e t o n \widetilde{V}_{\mathrm{singleton}} V singleton would hit these O ( 1 ) O(1) O ( 1 ) dense vertices with probability O ( 1 / n 0.99 ) O(1/n^{0.99}) O ( 1/ n 0.99 ) , making it impossible to sample these vertices in polylogarithmic time.
Degree Bucketing Approach. The above example shows that dominance alone is insufficient, as vertices at other degree scales can overwhelm uniform sampling. We therefore organize singleton vertices by degree and search for dominating structures across multiple scales. The algorithm partitions V ~ s i n g l e t o n \widetilde{V}_{\mathrm{singleton}} V singleton into O ( log n ) O(\log n) O ( log n ) separate lists V ~ l i s t , ( i ) \widetilde{V}_{\mathrm{list},(i)} V list , ( i ) , where each list contains vertices whose degrees are around 2 i 2^{i} 2 i . By separating vertices according to degree, the algorithm filters out the large number of low-degree sparse vertices and focuses sampling efforts on the degree scale where a dominating structure may exist.
To maintain these degree buckets efficiently across updates, the algorithm implements a top-down pruning and prioritization mechanism that separates vertices based on whether they have a “low degree” or “high degree” relative to the level i i i :
Low-Degree Vertices (Safe Pruning): For any list V ~ l i s t , ( i ) \widetilde{V}_{\mathrm{list},(i)} V list , ( i ) , a vertex u u u is considered to have a low degree for that level if its current degree drops below 2 i / 10 2^i/10 2 i /10 . Such vertices are safely pruned (deleted) from V ~ l i s t , ( i ) \widetilde{V}_{\mathrm{list},(i)} V list , ( i ) . Structurally, a vertex with such a small degree can only become important for level i i i again after many new vertex insertions, at which point the algorithm will track the new updates.
High-Degree Vertices (Priority-Based Deferral): Vertices in V ~ l i s t , ( i ) \widetilde{V}_{\mathrm{list},(i)} V list , ( i ) with degrees substantially larger than 2 i 2^i 2 i (belonging to some level j > i j>i j > i ) cannot simply be pruned because they might become part of a dominating cluster. To manage them efficiently, the algorithm adopts a top-down processing order, using the sparse populations in higher levels j > i j>i j > i to decide whether to complete a scan of level i i i , because performing a full scan on level i i i might visit too many sparse vertices of higher degree. Crucially, to determine whether to defer to a higher level, the algorithm can efficiently estimate if a higher level j > i j>i j > i dominates level i i i using O ~ ( 2 i ) \widetilde{O}(2^i) O ( 2 i ) samples. When a comparison prevents a full scan, the algorithm still attempts the scan with an allowance of O ( 2 i log 2 n ) O(2^i\log^2 n) O ( 2 i log 2 n ) unsuccessful sparsity tests. This ensures the top-down scheme remains both correct and polylogarithmically efficient under edge cases.
By utilizing the top-down prioritization and degree pruning, the algorithm isolates the appropriate dominating level. The key idea here is that instead of blindly sampling from the entire singleton pool, the algorithm can focus on the refined list V ~ l i s t , ( i ) \widetilde{V}_{\mathrm{list},(i)} V list , ( i ) corresponding to the dominating degree scale. This allows the algorithm to efficiently identify dense structures and merge their vertices into clusters while avoiding the global sampling bottleneck.
Maintaining clusters
We now discuss the subroutines that maintain clusters over time. The basic building blocks for our cluster-maintaining algorithm are cluster formation , which groups vertices from V ~ s i n g l e t o n \widetilde{V}_{\mathrm{singleton}} V singleton into a new cluster, and cluster refreshment , which periodically cleans up an existing cluster K K K by removing sparse vertices and admitting new dense ones. Our refreshment algorithm tracks vertex insertions (inc ( K ) \operatorname{inc}(K) inc ( K ) ) and deletions (del ( K ) \operatorname{del}(K) del ( K ) ) made by the external sequence of updates. If a vertex is added to a cluster K K K , we will only track it if it is after the cluster formation or the last refreshment. Crucially, if a vertex is moved out of K K K by the algorithm, the del ( K ) \operatorname{del}(K) del ( K ) does not track it, as it is only responsible for vertices deleted from the graph.
Because we only track vertex insertions and deletions, it might seem that no vertex could ever be moved out of K K K between two refreshments. However, consider the scenario where a separate cluster K ′ K' K ′ grows to be much larger than K K K . In this case, the vertices in K K K might become densely connected to K ′ K' K ′ , meaning they should ideally merge into the larger cluster. To facilitate this without breaking our tracking rules, we implement a “notification” procedure that allows the larger K ′ K' K ′ clusters to algorithmically reach in and extract vertices from K K K .
Losing control of cluster sizes: tolerant structures to the rescue. Unfortunately, this notification procedure comes with severe side effects. A cluster K K K might not undergo any refreshment, yet its densely connected vertices can effectively abandon it to join another cluster K ′ K' K ′ . We seemingly lose control of these clusters, leaving behind a group of clusters with many non-edges. This is the “vertices being stolen” scenario we discussed in the intuitions for isolated clusters.
This is exactly where our Type (2) Tolerant Structure (Isolated Clusters) plays a crucial role. Though the vertices of K K K were dense enough to join K ′ K' K ′ , the edges between the vertices in K ′ K' K ′ and the remaining vertices of K K K cannot be removed unless the vertices are deleted. Therefore, the remaining vertices in K K K now have a large number of edges with endpoints in K ′ K' K ′ . Since our relaxed decomposition permits a cluster to lack a number of internal edges as long as it has sufficiently dense external connections, this prevents the algorithm from being forced to immediately dismantle or repair the cluster, while still maintaining the desired approximation guarantees. Finally, to handle the case where the outside cluster K ′ K' K ′ is deleted (in which case the structural justification for K K K ’s missing edges vanishes and K K K must be dismantled), we use a “lazy tracker” to track all vertices that have ever joined the cluster. The correctness of the algorithm then follows by maintaining the structural properties as prescribed by the partially correct tolerant decomposition.
Amortization of the running time
In our discussion about the tracking of the V ~ s i n g l e t o n \widetilde{V}_{\mathrm{singleton}} V singleton vertices, we established that maintaining the degree buckets is highly time-efficient. Therefore, what remains is to analyze two parts: 1) the overhead of updating statistics in the cluster-maintaining algorithm; and 2) the amortized time spent performing cluster formation and refreshment (i.e., distributing the cost of expensive operations across the sequence of updates that triggered them).
For the first part, recall that we track inc ( K ) \operatorname{inc}(K) inc ( K ) and del ( K ) \operatorname{del}(K) del ( K ) to control the data stream updates. The tracking of inc ( K ) \operatorname{inc}(K) inc ( K ) can be accomplished in O ( log n ) O(\log n) O ( log n ) worst-case time per counter increment. However, the analysis for del ( K ) \operatorname{del}(K) del ( K ) is slightly harder, as we need to track the number of deleted vertices that ever joined the cluster. When a vertex v v v is deleted, it could change the counter for multiple clusters that v v v joined before (efficiently stored in a doubly-linked list { K 1 , … , K d } \{K_1,\ldots,K_d\} { K 1 , … , K d } ), and we need to bound the number of such clusters. We show that the size of those clusters is geometrically increasing, assuming that they are not refreshed by the time when v v v is deleted, and so there are at most O ( log n ) O(\log n) O ( log n ) of them.
We next amortize the time complexity for cluster formation and refreshment to past updates in the graph, including insertion and deletion of the vertices of the graph. In particular, when a new cluster K K K is formed, we aim to locate a sufficiently large group of data stream updates (e.g., Ω ( ∣ K ∣ ) \Omega(|K|) Ω ( ∣ K ∣ ) updates), so that we can charge the cost of forming K K K via an O ( 1 ) O(1) O ( 1 ) -to-1 mapping. For instance, if K K K is formed or refreshed due to a sequence of ε ∣ K ∣ \varepsilon|K| ε ∣ K ∣ data stream updates, e.g., inc ( K ) \operatorname{inc}(K) inc ( K ) or del ( K ) \operatorname{del}(K) del ( K ) reaching ε ∣ K ∣ \varepsilon|K| ε ∣ K ∣ which triggers a refreshment, we can charge the efficiency cost of forming K K K to those updates, losing only a 1 ε \frac{1}{\varepsilon} ε 1 -multiplicative factor.
However, the main challenge is that vertices in K K K may have been previously removed from an older cluster due to algorithmic identification, so we cannot locate new data stream updates with respect to vertices in K K K that are available to charge. To solve this, one could attempt to trace these algorithmically removed vertices back to the insertions that are responsible for their removal, e.g., if vertices in K K K were previously identified and moved to V ~ s i n g l e t o n \widetilde{V}_{\mathrm{singleton}} V singleton by K ′ K' K ′ , then we charge the time of forming K K K to that of forming K ′ K' K ′ . However, the charging mapping in this scenario might not be well-defined, e.g., it could happen that vertices in K K K were previously moved to V ~ s i n g l e t o n \widetilde{V}_{\mathrm{singleton}} V singleton by K ′ K' K ′ , while vertices in K ′ K' K ′ were previously moved to V ~ s i n g l e t o n \widetilde{V}_{\mathrm{singleton}} V singleton by an earlier cluster K ′ ′ K'' K ′′ , resulting in an infinite chain, and we risk double-charging the same data stream updates.
Forward-charging budgeting. Instead, we design a forward-charging budgeting scheme without tracking historical information, and thus avoiding the undesirable chain of chargings. We add a budget Ψ \Psi Ψ (a constant to be determined) for each data stream update and transfer the budget to the clusters with which it is associated, e.g., we transfer a part of Ψ \Psi Ψ to K K K if a vertex is a data stream addition to K K K . Then we show that every newly-formed cluster K K K has a total budget of at least Ω ( ε ∣ K ∣ Φ ) \Omega(\varepsilon|K|\Phi) Ω ( ε ∣ K ∣Φ ) . Therefore, the cluster uses the budget to pay for its own formation time, and then passes on the remaining budgets to all vertices it removes via identification. The key observation is that a cluster at most identifies O ( ε ∣ K ∣ ) O(\varepsilon|K|) O ( ε ∣ K ∣ ) vertices, as those vertices must be densely-connected to K K K , so the cost is safely charged if we have a larger total budget. This process is captured by the following minted budget inequality:
C 1 ε ∣ K ∣ Φ ⏟ Unused Budgets ≥ ∣ K ∣ ⋅ polylog ( n ) poly ( ε ) ⏟ Time for algorithmic operations + C 2 ε ∣ K ∣ Φ ⏟ Budgets being passed on \underbrace{C_1\varepsilon|K|\Phi}_{\text{Unused Budgets}} \ge|K|\cdot\underbrace{\frac{\operatorname{polylog}(n)}{\operatorname{poly}(\varepsilon)}}_{\text{Time for algorithmic operations}}+\underbrace{C_2\varepsilon|K|\Phi}_{\text{Budgets being passed on}} Unused Budgets C 1 ε ∣ K ∣Φ ≥ ∣ K ∣ ⋅ Time for algorithmic operations poly ( ε ) polylog ( n ) + Budgets being passed on C 2 ε ∣ K ∣Φ
Then the inequality holds if C 1 > C 2 C_1>C_2 C 1 > C 2 and Φ > polylog ( n ) ( C 1 − C 2 ) poly ( ε ) \Phi> \frac{\operatorname{polylog}(n)}{(C_1-C_2)\operatorname{poly}(\varepsilon)} Φ > ( C 1 − C 2 ) poly ( ε ) polylog ( n ) . With this inequality, we prove that the total amount of budgets K K K has is larger than the amount of usage, including the time for algorithmic operations and the budgets that pass on to other vertices. Therefore, the charging scheme works and our amortized update time is Ψ \Psi Ψ , i.e., the budget we assign to each data stream update.
Putting everything together. The final algorithm can therefore be viewed as dynamically maintaining the partially correct tolerant decomposition. The tolerant cluster definitions prevent the algorithm from overreacting to every insertion, and the partially correct singleton invariant ensures that temporary misclassifications do not accumulate enough error to break the overall approximation guarantee. If a vertex is deleted from a degree list V ~ l i s t , ( i ) \widetilde{V}_{\mathrm{list},(i)} V list , ( i ) , it can be recovered later using the cluster notification procedures. On the other hand, all calls to the cluster formation and refreshment algorithms, including those induced by the singleton vertex-tracking algorithm, can be resolved by the charging scheme. This combination of flexible structural rules and efficient degree-bucketing enables constant-factor approximation for correlation clustering with vertex deletions in polylogarithmic amortized update time.
Robustness against a white-box adversary. We briefly introduce the idea to demonstrate the robustness of our algorithm and defer the formal proof to Section B. The key is that each randomized subroutine uses fresh samples to establish properties of the current graph, such as sparsity, the validity of a cluster, or the size of a degree level. Although these outcomes determine the maintained clusters and lists, our structural lemmas, refreshment rules, and budgeting arguments apply deterministically to arbitrary update sequences whenever the local guarantees hold. In particular, our proof only requires the randomness when a sample is freshly drawn, so no earlier sample must remain representative of a later graph. Thus, we union bound across all calls of local randomized subroutines, and conditioned on their successes, we show the correctness of our algorithm against white-box adversary.
Preliminaries
We introduce the basic notation and the notion of sparse-dense decomposition in this section.
Notation. As standard, we denote an unweighted graph G = ( V , E ) G=(V,E) G = ( V , E ) with V V V as the set of the vertices and E E E as the set of the edges. For any subset of vertices, A ⊆ V A\subseteq V A ⊆ V , we use A ‾ = V ∖ A \overline{A}=V\setminus A A = V ∖ A to denote the complementary set of vertices in G G G . Let A = { A 1 , A 2 , … } \mathcal{A}=\{A_1,A_2,\ldots\} A = { A 1 , A 2 , … } be a family of collections of vertices. We say that A \mathcal{A} A is a partition of G G G if ⋃ i A i = V \bigcup_i A_i=V ⋃ i A i = V , and, for any pair V i , V j ∈ A V_i,V_j\in\mathcal{A} V i , V j ∈ A , V i ∩ V j = ∅ V_i\cap V_j=\varnothing V i ∩ V j = ∅ .
For any vertex v ∈ V v\in V v ∈ V , we use N ( v ) N(v) N ( v ) to denote the set of neighbors of v v v , and N [ v ] N[v] N [ v ] to denote the augmented neighborhood, i.e., N [ v ] : = N ( v ) ∪ { v } N[v]:=N(v)\cup\{v\} N [ v ] := N ( v ) ∪ { v } . For a fixed set of vertices U U U , we use N U ( v ) N_U(v) N U ( v ) to denote the set of neighbors of v v v that are in U U U , i.e., N U ( v ) : = N ( v ) ∩ U N_U(v):=N(v)\cap U N U ( v ) := N ( v ) ∩ U .
For correlation clustering, we have both the positive and negative subgraphs. Unless specified otherwise, we use G + = ( V , E + ) G^+=(V,E^+) G + = ( V , E + ) to denote the positive subgraph and G − = ( V , E − ) G^-=(V,E^-) G − = ( V , E − ) to denote the negative subgraph. We use OPT \operatorname{OPT} OPT and cost ( ALG ) \operatorname{cost}(\operatorname{ALG}) cost ( ALG ) to denote the optimal correlation clustering cost and the cost induced by a certain algorithm, respectively. Furthermore, for a special set of vertices S ⊆ V S \subseteq V S ⊆ V , when we write OPT ( S ) \operatorname{OPT}(S) OPT ( S ) , we mean the clustering cost in the optimal solution induced by the set of edges incident on S S S , i.e., the set of edges in ⋃ v ∈ S ⋃ u ∈ V ∖ { v } ( u , v ) \bigcup_{v\in S}\bigcup_{u\in V\setminus\{v\}}(u,v) ⋃ v ∈ S ⋃ u ∈ V ∖ { v } ( u , v ) .
The Problem Description and the Model
We first introduce the problem of (min-disagreement) correlation clustering on signed complete graphs, which is the focus of this paper.
Problem 1 (Min-disagreement correlation clustering). Let G = ( V , E + ∪ E − ) G=(V,E^+\cup E^-) G = ( V , E + ∪ E − ) be a signed complete graph, where V V V is the set of vertices, E + E^+ E + is the set of positive edges (similarity), and E − E^- E − is the set of negative edges (dissimilarity).
A clustering C \mathcal{C} C of G G G is a partition of the vertex set V V V into a set of disjoint clusters, C = { C 1 , C 2 , … , C k } \mathcal{C}=\{C_1,C_2,\ldots,C_k\} C = { C 1 , C 2 , … , C k } , such that V = ⋃ i = 1 k C i V=\bigcup_{i=1}^k C_i V = ⋃ i = 1 k C i and C i ∩ C j = ∅ C_i\cap C_j=\varnothing C i ∩ C j = ∅ for i ≠ j i\ne j i = j .
The set of disagreements with respect to a clustering C \mathcal{C} C consists of two types of edges:
(1) Positive edges whose endpoints are in different clusters.
(2) Negative edges whose endpoints are in the same cluster.
The cost for min-disagreement, denoted cost ( C ) \operatorname{cost}(\mathcal{C}) cost ( C ) , is the total number of such disagreeing edges. Formally, the cost is defined as:
cost ( C ) = ∣ { ( u , v ) ∈ E + ∣ u ∈ C i , v ∈ C j , i ≠ j } ∣ + ∣ { ( u , v ) ∈ E − ∣ u , v ∈ C i for some i } ∣ \operatorname{cost}(\mathcal{C})=\left|\{(u,v)\in E^+\mid u\in C_i,v\in C_j,i\ne j\}\right|+\left|\{(u,v)\in E^-\mid u,v\in C_i\text{ for some }i\}\right| cost ( C ) = {( u , v ) ∈ E + ∣ u ∈ C i , v ∈ C j , i = j } + {( u , v ) ∈ E − ∣ u , v ∈ C i for some i } The goal of the Min-Disagreement Correlation Clustering problem is to find an (approximately) optimal clustering C ∗ \mathcal{C}^* C ∗ that minimizes this cumulative cost.
In its vanilla form, the graphs for correlation clustering are presented as an adjacency list of the entire graph with edges and labels. However, as shown in [8 ] , such a model does not support fast correlation clustering. As such, we instead consider the adjacency list model for the positive subgraph G + = ( V , E + ) G^+=(V,E^+) G + = ( V , E + ) . This model was initiated by [8 ] , and it has been used extensively in the dynamic setting [30 , 14 , 34 ] .
Definition 1 (The adjacency list model of G + = ( V , E + ) G^+=(V,E^+) G + = ( V , E + ) , [8 , 30 ] ). Let G = ( V , E + ∪ E − ) G=(V,E^+\cup E^-) G = ( V , E + ∪ E − ) be a signed complete graph, and let G + = ( V , E + ) G^+=(V,E^+) G + = ( V , E + ) be the subgraph of G G G consisting of only the positive edges. The adjacency list model for the G + G^+ G + subgraph is a query model where an algorithm can perform the following operations in O ( 1 ) O(1) O ( 1 ) time:
(1) Positive Degree Query: For any given vertex v ∈ V v\in V v ∈ V , this query returns its degree in the G + G^+ G + subgraph, denoted as deg + ( v ) \deg^+(v) deg + ( v ) .
(2) Positive Neighbor Query: For any given vertex v ∈ V v\in V v ∈ V and any integer i i i such that 1 ≤ i ≤ deg + ( v ) 1\le i\le\deg^+(v) 1 ≤ i ≤ deg + ( v ) , this query returns the i i i -th vertex in the adjacency list of v v v in G + G^+ G + . This allows for iterating through all positive neighbors of a vertex.
(3) Positive Edge Query: For any two vertices u , v u,v u , v , this query returns whether ( u , v ) ∈ E + (u,v)\in E^+ ( u , v ) ∈ E + .
Sampling from a Neighbor: An algorithm can sample a random neighbor of a vertex v v v from N + ( v ) N^{+}(v) N + ( v ) in O ( 1 ) O(1) O ( 1 ) time. In particular, we can first make a degree query to get d = deg + ( v ) d = \deg^{+}(v) d = deg + ( v ) , then select a random integer i i i from [ 1 , d ] [1,d] [ 1 , d ] , and finally make a neighbor query to retrieve the i i i -th neighbor.
We then introduce the model for vertex-dynamic updates on the adjacency list of G + G^{+} G + . The model was explored by [30 , 34 ] , although they did not consider the case of worst-case deletion . We introduce our model as follows.
Definition 2 (Worst-case dynamic vertex insertion-deletion model, cf. [30 , 34 ] ). In our model, the G + G^{+} G + subgraph started as G + = ( ∅ , ∅ ) G^{+} = (\emptyset, \emptyset) G + = ( ∅ , ∅ ) . At each time t t t , a vertex can be
The adjacency list is updated after each vertex update, i.e., if v v v already exists in the graph, and u u u arrives with a v v v as its neighbor, then u u u is also added to the neighbor of v v v , denoting that ( u , v ) (u,v) ( u , v ) is a ( + ) (+) ( + ) edge. Our amortized update time efficiency is compared to the number of vertex insertions and deletions. The insertions and deletions are assumed to be arbitrary, i.e., they are fixed in advance in a worst-case. We also know an integer n n n which is an upper bound of the number of vertices that ever exist in the graph.
Compared to the existing work of [30 , 34 ] , our model notably allows arbitrary deletions to the vertices in the graph.
Number of vertices and updates. We assume there are at least 10000 vertices in the graph, since we can otherwise run O ( 1 ) O(1) O ( 1 ) brute-force algorithms. On the other hand, we focus on the case when the number of updates is bounded by poly ( n ) \operatorname{poly}(n) poly ( n ) , since this is the regime we can apply union bounds. Handling extremely long updates (e.g., exponentially many updates) remains an interesting open problem.
Standard Technique Tools
We review some standard technical results that will be used repeatedly in our paper.
Concentration inequalities We use the following standard variant of the Chernoff-Hoeffding bound.
Proposition 3.1 (Chernoff-Hoeffding bound). Let X 1 , … , X n X_1,\ldots,X_n X 1 , … , X n be n n n independent random variables with support in [ 0 , 1 ] [0,1] [ 0 , 1 ] . Define X : = ∑ i = 1 n X i X := \sum_{i=1}^{n} X_i X := ∑ i = 1 n X i . Then, for every δ ∈ ( 0 , 1 ] \delta\in(0,1] δ ∈ ( 0 , 1 ] , there is
Pr ( ∣ X − E [ X ] ∣ > δ ⋅ E [ X ] ) ≤ 2 ⋅ exp ( − δ 2 E [ X ] 3 ) . \Pr\left(\lvert X-\mathbb{E}[X]\rvert> \delta\cdot\mathbb{E}[X]\right) \le2\cdot\exp\left(-\frac{\delta^2\mathbb{E}[X]}{3}\right). Pr ( ∣ X − E [ X ]∣ > δ ⋅ E [ X ] ) ≤ 2 ⋅ exp ( − 3 δ 2 E [ X ] ) . Furthermore, for every δ > 0 \delta> 0 δ > 0 , there is
Pr ( ∣ X − E [ X ] ∣ > δ ⋅ E [ X ] ) ≤ 2 ⋅ exp ( − δ 2 E [ X ] 2 + δ ) . \Pr\left(\lvert X-\mathbb{E}[X]\rvert> \delta\cdot\mathbb{E}[X]\right) \le2\cdot\exp\left(-\frac{\delta^2\mathbb{E}[X]}{2+\delta}\right). Pr ( ∣ X − E [ X ]∣ > δ ⋅ E [ X ] ) ≤ 2 ⋅ exp ( − 2 + δ δ 2 E [ X ] ) .
Data structure that supports fast updates and search. We use the following standard data structure that allows us to add, search, and delete an element from a (single) list of items in O ( log n ) O(\log n) O ( log n ) time.
Proposition 3.2. There exists a deterministic algorithm and a corresponding data structure for maintaining a dynamic set S S S of n n n elements, supporting the following operations with the specified worst-case time complexities:
Search: Check for an element’s existence in O ( log n ) O(\log n) O ( log n ) time.
Insertion: Add an element in O ( log n ) O(\log n) O ( log n ) time.
Deletion: Remove an element in O ( log n ) O(\log n) O ( log n ) time.
Random Sampling: Select an element uniformly at random in O ( log n ) O(\log n) O ( log n ) time.
Return Size: Return the size of the set in O ( log n ) O(\log n) O ( log n ) time.
The Standard Sparse-Dense Decomposition
We now introduce the standard sparse-dense decomposition that gives a partition of the graph. The vertices are divided into almost-cliques , which roughly means the vertices that can be “bundled together”, and sparse vertices , which roughly means the vertices that cannot join any almost-cliques. The technique has a rich history in theoretical computer science, and we use the version of [8 ] for the purpose of correlation clustering.
Definition 3 (Standard ε \varepsilon ε -sparse-dense decomposition, [8 ] ). Given a graph G = ( V , E ) G = (V, E) G = ( V , E ) , an ε \varepsilon ε -sparse-dense decomposition { V s p a r s e , K 1 , … , K k } \{V_{\mathrm{sparse}}, K_1, \ldots, K_k\} { V sparse , K 1 , … , K k } , denoted as S D D G , ε \mathrm{SDD}_{G,\varepsilon} SDD G , ε , is a partition of G G G consisting of:
Sparse vertices V s p a r s e V_{\mathrm{sparse}} V sparse : For a a fixed constant η 0 ∈ ( 0 , 1 ] \eta_0 \in(0, 1] η 0 ∈ ( 0 , 1 ] , with ε ~ = η 0 ε \widetilde{\varepsilon} = \eta_0 \varepsilon ε = η 0 ε , for any vertex v ∈ V s p a r s e v \in V_{\mathrm{sparse}} v ∈ V sparse , either N ( v ) = ∅ N(v) = \varnothing N ( v ) = ∅ , or there are at least ε ~ ⋅ deg v \widetilde{\varepsilon} \cdot\deg v ε ⋅ deg v neighbors u u u such that ∣ N [ v ] △ N [ u ] ∣ > η 0 ⋅ ε ⋅ max { ∣ N [ u ] ∣ , ∣ N [ v ] ∣ } |N[v] \mathbin{\triangle} N[u]| > \eta_0 \cdot\varepsilon\cdot\max\{|N[u]|, |N[v]|\} ∣ N [ v ] △ N [ u ] ∣ > η 0 ⋅ ε ⋅ max { ∣ N [ u ] ∣ , ∣ N [ v ] ∣ } .
Dense vertices partitioned into ε \varepsilon ε -almost-cliques K 1 , … , K k K_1, \ldots, K_k K 1 , … , K k : For every i ∈ [ k ] i \in[k] i ∈ [ k ] , each K i K_i K i has the following properties. Let Δ ( K i ) = max v ∈ K i ∣ N [ v ] ∣ \Delta(K_i) = \max_{v \in K_i} |N[v]| Δ ( K i ) = max v ∈ K i ∣ N [ v ] ∣ be the maximum closed degree of the vertices in K i K_i K i (the degree is counted in G G G ), then:
i). Every vertex v ∈ K i v \in K_i v ∈ K i has at most ε ⋅ Δ ( K i ) \varepsilon\cdot\Delta(K_i) ε ⋅ Δ ( K i ) non-neighbors inside K i K_i K i , excluding v v v itself;
ii). Every vertex v ∈ K i v \in K_i v ∈ K i has at most ε ⋅ Δ ( K i ) \varepsilon\cdot\Delta(K_i) ε ⋅ Δ ( K i ) neighbors outside K i K_i K i ;
iii). Size of each K i K_i K i satisfies ( 1 − ε ) ⋅ Δ ( K i ) ≤ ∣ K i ∣ ≤ ( 1 + ε ) ⋅ Δ ( K i ) (1 - \varepsilon) \cdot\Delta(K_i) \le|K_i| \le(1 + \varepsilon) \cdot\Delta(K_i) ( 1 − ε ) ⋅ Δ ( K i ) ≤ ∣ K i ∣ ≤ ( 1 + ε ) ⋅ Δ ( K i ) .
When we refer to a sparse-dense decomposition S D D G , ε \mathrm{SDD}_{G,\varepsilon} SDD G , ε , we mean a partition of G G G with the labels on the vertices, i.e., for each vertex u ∈ S D D G , ε u \in\mathrm{SDD}_{G,\varepsilon} u ∈ SDD G , ε , there is a corresponding label indicating whether it is a sparse vertex, and if not, which almost-clique it belongs to.
We could similarly define whether a vertex is ε \varepsilon ε -sparse or ε \varepsilon ε -dense. These notions can be formalized as follows.
Definition 4 (cf. [8 , 7 ] ). Given a graph G = ( V , E ) G = (V, E) G = ( V , E ) , we define the ε \varepsilon ε -sparse vertices and ε \varepsilon ε -dense vertices as follows.
We say that a vertex v v v is ε \varepsilon ε -sparse if either N ( v ) = ∅ N(v)=\varnothing N ( v ) = ∅ , or there exists at least ε ⋅ deg v \varepsilon\cdot\deg v ε ⋅ deg v neighbors u u u such that ∣ N [ v ] △ N [ u ] ∣ > ε ⋅ max { ∣ N [ u ] ∣ , ∣ N [ v ] ∣ } \lvert N[v]\mathbin{\triangle}N[u]\rvert>\varepsilon\cdot\max\{\lvert N[u]\rvert,\lvert N[v]\rvert\} ∣ N [ v ] △ N [ u ]∣ > ε ⋅ max {∣ N [ u ]∣ , ∣ N [ v ]∣} .
When talking about sparsity with parameters, a vertex that is ε \varepsilon ε -dense is also allowed to be ε ′ \varepsilon' ε ′ -dense for ε ′ ≥ ε \varepsilon'\geq\varepsilon ε ′ ≥ ε . Converse, a vertex that is ε \varepsilon ε -sparse also implies that it can be ε ′ ′ \varepsilon'' ε ′′ sparse for ε ′ ′ ≤ ε \varepsilon''\leq\varepsilon ε ′′ ≤ ε . It is known in the literature that in a valid sparse-dense decomposition, no vertices of positive degree in an ε \varepsilon ε -almost-clique can be more than 6 ε 6\varepsilon 6 ε -sparse, for ε ≤ 1 / 20 \varepsilon\leq1/20 ε ≤ 1/20 .
Proposition 3.3 ([8 , 7 ] ). Let S D D G , ε SDDG,\varepsilon S D D G , ε be a valid ε \varepsilon ε -sparse-dense decomposition for graph G G G , where ε ≤ 1 / 20 \varepsilon\leq1/20 ε ≤ 1/20 . Then, for any ε \varepsilon ε -almost clique K K K and any vertex v ∈ K v\in K v ∈ K of positive degree, v v v is 6 ε 6\varepsilon 6 ε -dense.
Proof. Let Δ = Δ ( K ) \Delta=\Delta(K) Δ = Δ ( K ) . For u , v ∈ K u,v\in K u , v ∈ K , the bounds on non-neighbors inside K K K and neighbors outside K K K give ∣ N [ u ] △ N [ v ] ∣ ≤ 4 ε Δ \lvert N[u]\mathbin{\triangle}N[v]\rvert\leq4\varepsilon\Delta ∣ N [ u ] △ N [ v ]∣ ≤ 4 ε Δ , while ∣ N [ v ] ∣ ≥ ( 1 − 2 ε ) Δ \lvert N[v]\rvert\geq(1-2\varepsilon)\Delta ∣ N [ v ]∣ ≥ ( 1 − 2 ε ) Δ . Thus every positive neighbor of v v v inside K K K is in 6 ε 6\varepsilon 6 ε -agreement with v v v . If v v v has a neighbor outside K K K , then ε Δ ≥ 1 \varepsilon\Delta\geq1 ε Δ ≥ 1 , so deg ( v ) ≥ ( 1 − 3 ε ) Δ \deg(v)\geq(1-3\varepsilon)\Delta deg ( v ) ≥ ( 1 − 3 ε ) Δ and fewer than 6 ε deg ( v ) 6\varepsilon\deg(v) 6 ε deg ( v ) neighbors lie outside K K K . Otherwise every positive neighbor agrees. Hence v v v is 6 ε 6\varepsilon 6 ε -dense.
As long as ε \varepsilon ε is a constant, the sparse-dense decomposition gives an O ( 1 ) O(1) O ( 1 ) approximation. The formal statement is given as follows.
Proposition 3.4 ([8 , 7 ] ). Let G = ( V , E + ∪ E − ) G=(V,E^+\cup E^-) G = ( V , E + ∪ E − ) be a correlation clustering instance, and let S D D ′ SDD' S D D ′ be a standard ε \varepsilon ε -sparse-dense decomposition on G + = ( V , E + ) G^+=(V,E^+) G + = ( V , E + ) such that every vertex v ∈ V s p a r s e v\in V_{\mathrm{sparse}} v ∈ V sparse is ε ~ \widetilde{\varepsilon} ε -sparse for a fixed constant ε ~ > 0 \widetilde{\varepsilon}>0 ε > 0 and every K i K_i K i is an ε \varepsilon ε -almost-clique. Then, for any sufficiently small constant ε > 0 \varepsilon>0 ε > 0 , if we
to form a correlation clustering, we can get an O ( 1 ) O(1) O ( 1 ) -multiplicative approximation to the optimal correlation clustering cost.
For a pair of vertices ( u , v ) (u,v) ( u , v ) , we can also define ε \varepsilon ε -agreements between u u u and $v.
Definition 5. We say a pair of vertices u u u and v v v are in ε \varepsilon ε -agreement if ∣ N [ u ] △ N [ v ] ∣ ≤ ε ⋅ max { ∣ N [ u ] ∣ , ∣ N [ v ] ∣ } \lvert N[u]\mathbin{\triangle}N[v]\rvert\leq\varepsilon\cdot\max\{\lvert N[u]\rvert,\lvert N[v]\rvert\} ∣ N [ u ] △ N [ v ]∣ ≤ ε ⋅ max {∣ N [ u ]∣ , ∣ N [ v ]∣} .
Existing algorithmic tools for sparse-dense decomposition
In this section, we describe the existing technical tools for testing whether a vertex is sparse and for forming cliques.
Testing whether a vertex is α ε \alpha\varepsilon α ε -sparse/dense using O ( log 2 n ε 2 ) O\left(\frac{\log^2 n}{\varepsilon^2}\right) O ( ε 2 l o g 2 n ) time for any constant α \alpha α .
Forming an ε \varepsilon ε -almost-clique when a vertex is ε / 20 \varepsilon/20 ε /20 -dense.
Lemma 3.1. There exists an algorithm such that given a vertex v ∈ V v\in V v ∈ V and the adjacency list of the graph G = ( V , E ) G=(V,E) G = ( V , E ) , with high probability, in O ( log 2 n α 2 ε 2 ) O\left(\frac{\log^2 n}{\alpha^2\varepsilon^2}\right) O ( α 2 ε 2 l o g 2 n ) time answers “whether v v v is α ε \alpha\varepsilon α ε -sparse” for any constant α \alpha α with 0 < α ε ≤ 1 / 100 0<\alpha\varepsilon\leq1/100 0 < α ε ≤ 1/100 , and η = 1 / 10 \eta=1/10 η = 1/10 , such that
Proof. Let ε ′ = α ε / 42 ≤ 1 / 4200 \varepsilon'=\alpha\varepsilon/42 \le1/4200 ε ′ = α ε /42 ≤ 1/4200 , so Lemma 3.2 of [14 ] applies. If deg ( v ) = 0 \deg(v)=0 deg ( v ) = 0 , return yes.
Low degree (deg ( v ) < 3000 log n / ε ′ \deg(v)<3000\log n/\varepsilon' deg ( v ) < 3000 log n / ε ′ ). We can simply decide Definition 4 exactly. For each u ∈ N ( v ) u \in N(v) u ∈ N ( v ) , ∣ N [ u ] △ N [ v ] ∣ = ∣ N [ u ] ∣ + ∣ N [ v ] ∣ − 2 ∣ N [ u ] ∩ N [ v ] ∣ |N[u]\triangle N[v]|=|N[u]|+|N[v]|-2|N[u]\cap N[v]| ∣ N [ u ] △ N [ v ] ∣ = ∣ N [ u ] ∣ + ∣ N [ v ] ∣ − 2∣ N [ u ] ∩ N [ v ] ∣ , and the intersection costs O ( deg ( v ) ) O(\deg(v)) O ( deg ( v )) pair queries. The total time is O ( deg ( v ) 2 ) = O ( log 2 n / ( α ε ) 2 ) O(\deg(v)^2)=O(\log^2 n/(\alpha\varepsilon)^2) O ( deg ( v ) 2 ) = O ( log 2 n / ( α ε ) 2 ) .
High degree. [14 ] uses sparsity for open neighborhoods: v v v is θ \theta θ -sparse (for open neighborhoods) if at least θ deg v \theta\deg v θ deg v neighbors u u u satisfy ∣ N ( u ) △ N ( v ) ∣ ≥ θ max { deg u , deg v } |N(u)\triangle N(v)|\ge\theta\max\{\deg u,\deg v\} ∣ N ( u ) △ N ( v ) ∣ ≥ θ max { deg u , deg v } . Run this test with parameter ε ′ \varepsilon' ε ′ . With high probability it answers yes if v v v is 42 ε ′ 42\varepsilon' 42 ε ′ -sparse, and no if v v v is not 38 ε ′ 38\varepsilon' 38 ε ′ -sparse (for open neighborhoods). For adjacent u , v u,v u , v ,
∣ N ( u ) △ N ( v ) ∣ = ∣ N [ u ] △ N [ v ] ∣ + 2 , max { ∣ N [ u ] ∣ , ∣ N [ v ] ∣ } = max { deg u , deg v } + 1. (1) |N(u)\triangle N(v)|=|N[u]\triangle N[v]|+2,\qquad\max\{|N[u]|,|N[v]|\}=\max\{\deg u,\deg v\}+1. \tag*{(1)} ∣ N ( u ) △ N ( v ) ∣ = ∣ N [ u ] △ N [ v ] ∣ + 2 , max { ∣ N [ u ] ∣ , ∣ N [ v ] ∣ } = max { deg u , deg v } + 1. (1)
If v v v is α ε \alpha\varepsilon α ε -sparse, it has at least α ε deg v = 42 ε ′ deg v \alpha\varepsilon\deg v=42\varepsilon'\deg v α ε deg v = 42 ε ′ deg v witnesses u u u . By (1) , each has ∣ N ( u ) △ N ( v ) ∣ > α ε ( max { deg u , deg v } + 1 ) + 2 > 42 ε ′ max { deg u , deg v } |N(u)\triangle N(v)|>\alpha\varepsilon(\max\{\deg u,\deg v\}+1)+2>42\varepsilon'\max\{\deg u,\deg v\} ∣ N ( u ) △ N ( v ) ∣ > α ε ( max { deg u , deg v } + 1 ) + 2 > 42 ε ′ max { deg u , deg v } . So v v v is 42 ε ′ 42\varepsilon' 42 ε ′ -sparse (for open neighborhoods), and the test answers yes. If v v v is 38 ε ′ 38\varepsilon' 38 ε ′ -sparse (for open neighborhoods), it has at least 38 42 α ε deg v ≥ 0.9 α ε deg v \frac{38}{42}\alpha\varepsilon\deg v\ge0.9\alpha\varepsilon\deg v 42 38 α ε deg v ≥ 0.9 α ε deg v witnesses u u u . By (1) , each has
∣ N [ u ] △ N [ v ] ∣ ≥ 38 42 α ε max { deg u , deg v } − 2 > 0.9 α ε ( max { deg u , deg v } + 1 ) , |N[u]\triangle N[v]|\ge\frac{38}{42}\alpha\varepsilon\max\{\deg u,\deg v\}-2>0.9\alpha\varepsilon(\max\{\deg u,\deg v\}+1), ∣ N [ u ] △ N [ v ] ∣ ≥ 42 38 α ε max { deg u , deg v } − 2 > 0.9 α ε ( max { deg u , deg v } + 1 ) ,
since 38 42 − 0.9 = 1 210 \frac{38}{42}-0.9=\frac{1}{210} 42 38 − 0.9 = 210 1 and max { deg u , deg v } ≥ deg v ≥ 126000 log n / ( α ε ) > 210 ( 2 + 0.9 α ε ) / ( α ε ) \max\{\deg u,\deg v\}\ge\deg v\ge126000\log n/(\alpha\varepsilon)>210(2+0.9\alpha\varepsilon)/(\alpha\varepsilon) max { deg u , deg v } ≥ deg v ≥ 126000 log n / ( α ε ) > 210 ( 2 + 0.9 α ε ) / ( α ε ) . So v v v is 0.9 α ε 0.9\alpha\varepsilon 0.9 α ε -sparse. Contrapositively, a vertex that is not ( 1 − η ) α ε (1-\eta)\alpha\varepsilon ( 1 − η ) α ε -sparse is not 38 ε ′ 38\varepsilon' 38 ε ′ -sparse (for open neighborhoods), and the test answers no. The test takes O ( log 2 n / ε ′ 2 ) = O ( log 2 n / ( α ε ) 2 ) O(\log^2 n/\varepsilon'^2)=O(\log^2 n/(\alpha\varepsilon)^2) O ( log 2 n / ε ′2 ) = O ( log 2 n / ( α ε ) 2 ) time.
Lemma 3.2. There is an algorithm that, given an ε / 20 \varepsilon/20 ε /20 -dense vertex v v v , for ε ≤ 1 / 200 \varepsilon\le1/200 ε ≤ 1/200 , that does not belong to any maintained cluster, with high probability does one of the following.
Merge: it adds v v v to an existing cluster C C C in O ( log 2 n / ε 2 ) O(\log^2 n/\varepsilon^2) O ( log 2 n / ε 2 ) time. Before and after admission, C C C has a 4 ε 4\varepsilon 4 ε -dense core of size at least ( 1 − 8 ε ) ∣ C ∣ (1-8\varepsilon)|C| ( 1 − 8 ε ) ∣ C ∣ and the dense core after admission contains v v v . A merge happens whenever deg ( v ) ≥ 10 / ε \deg(v)\ge10/\varepsilon deg ( v ) ≥ 10/ ε and some cluster C C C has ∣ N ( v ) ∖ C ∣ < 3 ε deg ( v ) |N(v)\setminus C|<3\varepsilon\deg(v) ∣ N ( v ) ∖ C ∣ < 3 ε deg ( v ) and ∣ C ∣ ≤ ( 1 + 4 ε ) deg ( v ) |C|\le(1+4\varepsilon)\deg(v) ∣ C ∣ ≤ ( 1 + 4 ε ) deg ( v ) .
Form: it forms an ( ε / 2 ) (\varepsilon/2) ( ε /2 ) -almost-clique C C C that includes v v v such that ( 1 − ε / 20 ) ∣ N [ v ] ∣ ≤ ∣ C ∣ ≤ ( 1 + 0.051 ε ) ∣ N [ v ] ∣ (1-\varepsilon/20)|N[v]|\le|C|\le(1+0.051\varepsilon)|N[v]| ( 1 − ε /20 ) ∣ N [ v ] ∣ ≤ ∣ C ∣ ≤ ( 1 + 0.051 ε ) ∣ N [ v ] ∣ in O ( ∣ C ∣ log 2 n / ε 2 ) O(|C|\log^2 n/\varepsilon^2) O ( ∣ C ∣ log 2 n / ε 2 ) time. C C C contains every vertex that is in ( ε / 5 ) (\varepsilon/5) ( ε /5 ) -agreement with v v v and no 2 ε 2\varepsilon 2 ε -sparse vertex. If deg ( v ) < 10 / ε \deg(v)<10/\varepsilon deg ( v ) < 10/ ε , then C = N [ v ] C=N[v] C = N [ v ] is an isolated exact clique.
Proof. Let K ′ K' K ′ consist of v v v and its positive neighbors in ( ε / 20 ) (\varepsilon/20) ( ε /20 ) -agreement with v v v . Then ∣ K ′ ∣ ≥ ( 1 − ε / 20 ) ∣ N [ v ] ∣ |K'|\ge(1-\varepsilon/20)|N[v]| ∣ K ′ ∣ ≥ ( 1 − ε /20 ) ∣ N [ v ] ∣ and ( 1 − ε / 20 ) ∣ N [ v ] ∣ ≤ ∣ N [ u ] ∣ ≤ ∣ N [ v ] ∣ / ( 1 − ε / 20 ) (1-\varepsilon/20)|N[v]|\le|N[u]|\le|N[v]|/(1-\varepsilon/20) ( 1 − ε /20 ) ∣ N [ v ] ∣ ≤ ∣ N [ u ] ∣ ≤ ∣ N [ v ] ∣/ ( 1 − ε /20 ) for every u ∈ K ′ u\in K' u ∈ K ′ . If deg ( v ) < 10 / ε \deg(v)<10/\varepsilon deg ( v ) < 10/ ε , fewer than ( ε / 20 ) deg ( v ) < 1 (\varepsilon/20)\deg(v)<1 ( ε /20 ) deg ( v ) < 1 neighbors disagree with v v v ; every neighbor therefore satisfies ∣ N [ u ] △ N [ v ] ∣ ≤ ( ε / 20 ) ∣ N [ v ] ∣ / ( 1 − ε / 20 ) < 1 |N[u]\triangle N[v]|\le(\varepsilon/20)|N[v]|/(1-\varepsilon/20)<1 ∣ N [ u ] △ N [ v ] ∣ ≤ ( ε /20 ) ∣ N [ v ] ∣/ ( 1 − ε /20 ) < 1 . Thus N [ v ] N[v] N [ v ] is an isolated exact clique, which we return directly.
Otherwise, sample O ( log n ) O(\log n) O ( log n ) neighbors of v v v and collect their cluster labels, giving O ( log n ) O(\log n) O ( log n ) candidates. For each candidate C C C , estimate ∣ N ( v ) ∖ C ∣ / deg ( v ) |N(v)\setminus C|/\deg(v) ∣ N ( v ) ∖ C ∣/ deg ( v ) to additive error ε / 10 \varepsilon/10 ε /10 using O ( ε − 2 log n ) O(\varepsilon^{-2}\log n) O ( ε − 2 log n ) fresh neighbor samples, accepting if the estimate is at most 3.1 ε 3.1\varepsilon 3.1 ε and ∣ C ∣ ≤ ( 1 + 4 ε ) deg ( v ) |C|\le(1+4\varepsilon)\deg(v) ∣ C ∣ ≤ ( 1 + 4 ε ) deg ( v ) . A cluster satisfying the stated completeness condition is sampled and accepted with high probability. For an accepted cluster, T = { v } ∪ ( K ′ ∩ C ) T=\{v\}\cup(K'\cap C) T = { v } ∪ ( K ′ ∩ C ) satisfies
∣ T ∣ ≥ 1 + ( 1 − 3.25 ε ) deg ( v ) . |T|\ge1+(1-3.25\varepsilon)\deg(v). ∣ T ∣ ≥ 1 + ( 1 − 3.25 ε ) deg ( v ) .
Every u ∈ T u \in T u ∈ T has fewer than 3.302 ε ∣ N [ v ] ∣ 3.302\varepsilon|N[v]| 3.302 ε ∣ N [ v ] ∣ neighbors outside T T T and fewer than 0.051 ε ∣ N [ v ] ∣ 0.051\varepsilon|N[v]| 0.051 ε ∣ N [ v ] ∣ non-neighbors inside T T T . Removing v v v adds at most 1 ≤ ε ∣ N [ v ] ∣ / 10 1 \leq\varepsilon|N[v]|/10 1 ≤ ε ∣ N [ v ] ∣/10 outside neighbors. The closed-degree bounds above, ∣ T ∖ { v } ∣ ≥ ( 1 − 3.35 ε ) ∣ N [ v ] ∣ |T \setminus\{v\}| \geq(1 - 3.35\varepsilon)|N[v]| ∣ T ∖ { v } ∣ ≥ ( 1 − 3.35 ε ) ∣ N [ v ] ∣ , and
∣ T ∖ { v } ∣ ∣ C ∣ ≥ 1 − 3.25 ε 1 + 4 ε > 1 − 8 ε \frac{|T \setminus\{v\}|}{|C|} \geq\frac{1 - 3.25\varepsilon}{1 + 4\varepsilon} > 1 - 8\varepsilon ∣ C ∣ ∣ T ∖ { v } ∣ ≥ 1 + 4 ε 1 − 3.25 ε > 1 − 8 ε
show that T ∖ { v } T \setminus\{v\} T ∖ { v } and T T T are the required 4 ε 4\varepsilon 4 ε -almost-clique cores before and after admission.
If no candidate is accepted, enumerate N [ v ] N[v] N [ v ] , sample O ( log n ) O(\log n) O ( log n ) uniform members w w w of N [ v ] N[v] N [ v ] , and enumerate N [ w ] N[w] N [ w ] whenever ∣ N [ w ] ∣ ≤ 2 ∣ N [ v ] ∣ |N[w]| \leq2|N[v]| ∣ N [ w ] ∣ ≤ 2∣ N [ v ] ∣ . Their union has O ( ∣ N [ v ] ∣ log n ) O(|N[v]|\log n) O ( ∣ N [ v ] ∣ log n ) candidate vertices and incidences. Every vertex in ( ε / 5 ) (\varepsilon/5) ( ε /5 ) -agreement with v v v has more than $0.9|N[v]|$ common positive neighbors with v v v in K ′ K' K ′ , so all such vertices are enumerated with high probability. For each candidate u u u , estimate ∣ N [ u ] △ N [ v ] ∣ / max { ∣ N [ u ] ∣ , ∣ N [ v ] ∣ } |N[u]\triangle N[v]|/\max\{|N[u]|,|N[v]|\} ∣ N [ u ] △ N [ v ] ∣/ max { ∣ N [ u ] ∣ , ∣ N [ v ] ∣ } to additive error ε / 100 \varepsilon/100 ε /100 using O ( ε − 2 log n ) O(\varepsilon^{-2}\log n) O ( ε − 2 log n ) samples from N [ u ] N[u] N [ u ] and positive-edge queries to v v v (or equality with v v v ). Accept estimates at most $0.3\varepsilon. Consequently, the output C C C contains K ′ K' K ′ and every ( ε / 5 ) (\varepsilon/5) ( ε /5 ) -agreeing vertex, while every accepted vertex is in 0.31 ε 0.31\varepsilon 0.31 ε -agreement with v v v .
Each vertex in C ∖ N [ v ] C \setminus N[v] C ∖ N [ v ] has at least ( 1 − ε / 20 − 0.31 ε / ( 1 − 0.31 ε ) ) ∣ N [ v ] ∣ (1-\varepsilon/20-0.31\varepsilon/(1-0.31\varepsilon))|N[v]| ( 1 − ε /20 − 0.31 ε / ( 1 − 0.31 ε )) ∣ N [ v ] ∣ neighbors in K ′ K' K ′ , whereas each member of K ′ K' K ′ has at most ( ε / 20 ) ∣ N [ v ] ∣ / ( 1 − ε / 20 ) (\varepsilon/20)|N[v]|/(1-\varepsilon/20) ( ε /20 ) ∣ N [ v ] ∣/ ( 1 − ε /20 ) neighbors outside N [ v ] N[v] N [ v ] . Counting these edges gives
∣ C ∖ N [ v ] ∣ ≤ ( ε / 20 ) ∣ N [ v ] ∣ ( 1 − ε / 20 ) ( 1 − ε / 20 − 0.31 ε / ( 1 − 0.31 ε ) ) < 0.051 ε ∣ N [ v ] ∣ . |C \setminus N[v]| \leq\frac{(\varepsilon/20)|N[v]|}{(1-\varepsilon/20)(1-\varepsilon/20-0.31\varepsilon/(1-0.31\varepsilon))} < 0.051\varepsilon|N[v]|. ∣ C ∖ N [ v ] ∣ ≤ ( 1 − ε /20 ) ( 1 − ε /20 − 0.31 ε / ( 1 − 0.31 ε )) ( ε /20 ) ∣ N [ v ] ∣ < 0.051 ε ∣ N [ v ] ∣.
Hence the stated size bounds hold. Agreement with v v v , together with K ′ ⊆ C K' \subseteq C K ′ ⊆ C and this bound on ∣ C ∖ N [ v ] ∣ |C \setminus N[v]| ∣ C ∖ N [ v ] ∣ , gives each member of C C C fewer than 0.37 ε ∣ N [ v ] ∣ 0.37\varepsilon|N[v]| 0.37 ε ∣ N [ v ] ∣ internal non-neighbors and fewer than 0.37 ε ∣ N [ v ] ∣ 0.37\varepsilon|N[v]| 0.37 ε ∣ N [ v ] ∣ external neighbors. Moreover, ∣ N [ v ] ∣ ≤ Δ ( C ) ≤ ∣ N [ v ] ∣ / ( 1 − 0.31 ε ) |N[v]| \leq\Delta(C) \leq|N[v]|/(1-0.31\varepsilon) ∣ N [ v ] ∣ ≤ Δ ( C ) ≤ ∣ N [ v ] ∣/ ( 1 − 0.31 ε ) and
( 1 − ε / 2 ) Δ ( C ) ≤ ( 1 − ε / 20 ) ∣ N [ v ] ∣ ≤ ∣ C ∣ ≤ ( 1 + 0.051 ε ) ∣ N [ v ] ∣ ≤ ( 1 + ε / 2 ) Δ ( C ) , (1-\varepsilon/2)\Delta(C) \leq(1-\varepsilon/20)|N[v]| \leq|C| \leq(1+0.051\varepsilon)|N[v]| \leq(1+\varepsilon/2)\Delta(C), ( 1 − ε /2 ) Δ ( C ) ≤ ( 1 − ε /20 ) ∣ N [ v ] ∣ ≤ ∣ C ∣ ≤ ( 1 + 0.051 ε ) ∣ N [ v ] ∣ ≤ ( 1 + ε /2 ) Δ ( C ) ,
so C C C is an ( ε / 2 ) (\varepsilon/2) ( ε /2 ) -almost-clique. For u , w ∈ C u,w \in C u , w ∈ C , their normalized neighborhood difference is at most 0.62 ε / ( 1 − 0.31 ε ) 2 < 0.63 ε 0.62\varepsilon/(1-0.31\varepsilon)^2 < 0.63\varepsilon 0.62 ε / ( 1 − 0.31 ε ) 2 < 0.63 ε , while deg ( u ) ≥ ( 1 − 0.41 ε ) ∣ N [ v ] ∣ \deg(u) \geq(1-0.41\varepsilon)|N[v]| deg ( u ) ≥ ( 1 − 0.41 ε ) ∣ N [ v ] ∣ . Thus fewer than 0.38 ε 0.38\varepsilon 0.38 ε of u u u ’s neighbors lie outside C C C , and all its neighbors inside C C C are in 2 ε 2\varepsilon 2 ε -agreement with it; no member is 2 ε 2\varepsilon 2 ε -sparse. All guarantees hold simultaneously by Chernoff bounds and a union bound. Constant-time adjacency queries give O ( log 2 n / ε 2 ) O(\log^2 n/\varepsilon^2) O ( log 2 n / ε 2 ) merge time; enumerating and deduplicating candidates in a searchable dictionary, then testing them, takes O ( ∣ C ∣ log 2 n / ε 2 ) O(|C|\log^2 n/\varepsilon^2) O ( ∣ C ∣ log 2 n / ε 2 ) time. □
In fact, the algorithm for Lemma 3.2 does not have to follow the rigid definition of sparse-dense decomposition, but is rather capable of identifying vertices that are “common neighbors” of the almost-clique C C C . We will use the following lemma to handle certain subroutines in our algorithm.
Lemma 3.3. There exists an algorithm that, given parameters 0 < γ ≤ δ / 2 < 1 0 < \gamma\leq\delta/2 < 1 0 < γ ≤ δ /2 < 1 and an ε \varepsilon ε -almost-clique C C C (Definition 3), where ε ≤ 1 / 2 \varepsilon\leq1/2 ε ≤ 1/2 , with high probability identifies a set of vertices C ˉ ⊆ V ∖ C \bar{C} \subseteq V \setminus C C ˉ ⊆ V ∖ C such that
every vertex u ∉ C u \notin C u ∈ / C satisfying ∣ N ( u ) ∩ C ∣ ≥ δ ⋅ ∣ C ∣ |N(u) \cap C| \geq\delta\cdot|C| ∣ N ( u ) ∩ C ∣ ≥ δ ⋅ ∣ C ∣ belongs to C ˉ \bar{C} C ˉ ;
no vertex in C ˉ \bar{C} C ˉ satisfies ∣ N ( u ) ∩ C ∣ ≤ γ ⋅ ∣ C ∣ |N(u) \cap C| \leq\gamma\cdot|C| ∣ N ( u ) ∩ C ∣ ≤ γ ⋅ ∣ C ∣ .
The algorithm runs in O ( ∣ C ∣ log n / δ ) O(|C|\log n/\delta) O ( ∣ C ∣ log n / δ ) time.
Proof. The algorithm is as follows.
Sample a multiset S S S of ⌈ 500 log n / δ ⌉ \lceil500\log n/\delta\rceil ⌈ 500 log n / δ ⌉ vertices from C C C independently uniformly at random.
Enumerate the neighbors of the sampled vertices, counting multiplicities. Add all vertices u ∉ C u\notin C u ∈ / C such that u u u has at least 400 log n 400\log n 400 log n neighbors in S S S to C ‾ \overline{C} C .
Intersections with S S S below count multiplicity. For each v v v with at least δ ∣ C ∣ \delta|C| δ ∣ C ∣ neighbors in C C C , if we sample a vertex u u u uniformly at random from C C C , the probability for ( u , v ) (u,v) ( u , v ) to be an edge is at least δ \delta δ . Therefore, if we sample ⌈ 500 log n / δ ⌉ \lceil500\log n/\delta\rceil ⌈ 500 log n / δ ⌉ vertices from C C C , the expected number of edges we identify between v v v and S S S is at least 500 log n 500\log n 500 log n . By concentration inequality (Proposition 3.1 ), we have
Pr ( ∣ N ( v ) ∩ S ∣ ≤ 400 log n ) ≤ exp ( − ( 0.2 ) 2 500 log n 3 ) ≤ 1 / poly ( n ) . \Pr\left(|N(v)\cap S|\le400\log n\right)\le\exp\left(-\frac{(0.2)^2 500\log n}{3}\right)\le1/\operatorname{poly}(n). Pr ( ∣ N ( v ) ∩ S ∣ ≤ 400 log n ) ≤ exp ( − 3 ( 0.2 ) 2 500 log n ) ≤ 1/ poly ( n ) .
On the other hand, for any vertex w w w with at most γ ∣ C ∣ ≤ δ / 2 ⋅ ∣ C ∣ \gamma|C|\le\delta/2\cdot|C| γ ∣ C ∣ ≤ δ /2 ⋅ ∣ C ∣ neighbors in C C C , the expected number of neighbors is at most 251 log n 251\log n 251 log n . Here rounding the sample size adds at most δ / 2 < 1 \delta/2<1 δ /2 < 1 to 250 log n 250\log n 250 log n , and log n ≥ 1 \log n\ge1 log n ≥ 1 . Again, by concentration inequality, we have
Pr ( ∣ N ( w ) ∩ S ∣ ≥ 400 log n ) ≤ exp ( − ( 0.59 ) 2 251 log n 3 ) ≤ 1 / poly ( n ) . \Pr\left(|N(w)\cap S|\ge400\log n\right)\le\exp\left(-\frac{(0.59)^2 251\log n}{3}\right)\le1/\operatorname{poly}(n). Pr ( ∣ N ( w ) ∩ S ∣ ≥ 400 log n ) ≤ exp ( − 3 ( 0.59 ) 2 251 log n ) ≤ 1/ poly ( n ) .
A union bound gives both guarantees simultaneously for all vertices. Each sampled vertex has degree at most Δ ( C ) ≤ ∣ C ∣ / ( 1 − ε ) ≤ 2 ∣ C ∣ \Delta(C)\le|C|/(1-\varepsilon)\le2|C| Δ ( C ) ≤ ∣ C ∣/ ( 1 − ε ) ≤ 2∣ C ∣ . Store C C C in an array, mark its vertices, and count sampled-neighbor incidences in temporary per-vertex counters, resetting only the marks and counters touched by the call. Enumeration and counting take O ( ∣ C ∣ ∣ S ∣ ) O(|C||S|) O ( ∣ C ∣∣ S ∣ ) time, so the total running time is O ( ∣ C ∣ log n / δ ) O(|C|\log n/\delta) O ( ∣ C ∣ log n / δ ) , as desired. □
For each of these subroutines, any prescribed failure probability ξ > 0 \xi>0 ξ > 0 is obtained by replacing each sample-size factor log n \log n log n by a sufficiently large multiple of log ( n / ξ ) \log(n/\xi) log ( n / ξ ) , with the same replacement in its time bound. All samples are fresh and independent after the graph and the input to the call have been fixed, and all inclusion and exclusion guarantees hold simultaneously.
Notations
We keep a table of notions in Table 1 to help the readers understand our algorithm and analysis.
Correlation Clustering with a Partially Correct Tolerant Sparse-Dense Decomposition
We introduce a new version of sparse-dense decomposition in this section to obtain algorithms with polylog ( n ) \operatorname{polylog}(n) polylog ( n ) update time. There are several nuanced issues if we want to simply use the original decomposition as in Definition 3. As it will be clear in later sections of the paper (and as in the discussion in § 2 ), we need to “tolerate” the following aspects in our maintained clustering structure to ensure efficiency.
(1) The “wrong categorization” of sparse vertices. Ideally, we would want to keep a set of sparse vertices V s p a r s e V_{\mathrm{sparse}} V sparse . However, some rather dense vertices might be in this set because the cost of the particular wrong cluster has not dominated the overall cost.
Table 1. Notation and semantics for the variables and objects maintained by our algorithms.
(2) The outgoing edges on the vertices in clusters. We would want the almost-cliques K 1 ∪ … ∪ K k K_1 \cup\ldots\cup K_k K 1 ∪ … ∪ K k to have few out-going edges. However, this might lead to large update time. These vertices are sparse to all existing almost-cliques, which would cause a high update time complexity. Therefore, we need to use a new notion that allows out-going edges.
(3) The clusters without dense parts. Finally, even for the non-neighbors inside the clusters, we will need to relax the requirements when the cluster size is proportional to the degree. This is necessary since in some cases, some of the dense vertices in a cluster might join other (much bigger) clusters, and we do not have control over the those clusters.
In light of the above discussion, we will argue that it suffices to maintain a data structure with the following properties:
(1) A sufficiently large fraction of singleton vertices are actually sparse.
(2) Clusters will not partition sufficiently dense collections of vertices (“tolerate clusters ”). (3) Clusters will not contain sparse vertices with many non-edges between them unless there are many edges going out of the cluster (“isolated clusters ”).
See Figure 1 for an illustration of the structural inconsistency we allow.
Figure 1. Illustration of tolerant clusters and isolated clusters.
We will eventually argue that even with the above relaxations, the clustering can still maintain an 1 / poly ( ε ) 1/\operatorname{poly}(\varepsilon) 1/ poly ( ε ) -approximation, which translates into O ( 1 ) O(1) O ( 1 ) -approximation with constant ε \varepsilon ε .
A partially correct tolerant sparse-dense decomposition
We introduce the formal notion of partially correct tolerant sparse-dense decomposition as follows.
Definition 6 (Partially correct tolerant decomposition). Given a graph G = ( V , E ) G=(V,E) G = ( V , E ) , we say a partition { V ~ s i n g l e t o n , ⋃ j K j t o l e r a n t , ⋃ j K j i s o l a t e } \{\widetilde{V}_{\mathrm{singleton}},\bigcup_j K_j^{\mathrm{tolerant}},\bigcup_j K_j^{\mathrm{isolate}}\} { V singleton , ⋃ j K j tolerant , ⋃ j K j isolate } of G G G is a partially correct tolerant ( ε s , ε τ , ε l ) (\varepsilon_s,\varepsilon_\tau,\varepsilon_l) ( ε s , ε τ , ε l ) -sparse-dense decomposition if it satisfies the following properties, for fixed positive constants C t , C l , η d , η l , C 0 C_t,C_l,\eta_d,\eta_l,C_0 C t , C l , η d , η l , C 0 .
Partially correct singleton (“sparse”) vertices V ~ s i n g l e t o n \widetilde{V}_{\mathrm{singleton}} V singleton :
i ) i) i ) . Let V ~ s i n g l e t o n ( i ) \widetilde{V}_{\mathrm{singleton}}(i) V singleton ( i ) be the set of vertices v ∈ V ~ s i n g l e t o n v\in\widetilde{V}_{\mathrm{singleton}} v ∈ V singleton such that deg ( v ) ∈ [ 2 i , 2 i + 1 ) \deg(v)\in[2^i,2^{i+1}) deg ( v ) ∈ [ 2 i , 2 i + 1 ) , where i = 0 , … , ⌊ log 2 n ⌋ i=0,\ldots,\lfloor\log_2 n\rfloor i = 0 , … , ⌊ log 2 n ⌋ and indices outside this range denote empty buckets.
i i ) ii) ii ) . For each such level i i i , we further partition the set into:
V ~ s i n g l e t o n , c o r r e c t ( i ) \widetilde{V}_{\mathrm{singleton,\,correct}}(i) V singleton , correct ( i ) : the set of vertices v ∈ V ~ s i n g l e t o n ( i ) v\in\widetilde{V}_{\mathrm{singleton}}(i) v ∈ V singleton ( i ) that are ε s \varepsilon_s ε s -sparse.
V ~ s i n g l e t o n , i n c o r r e c t ( i ) : = V ~ s i n g l e t o n ( i ) ∖ V ~ s i n g l e t o n , c o r r e c t ( i ) \widetilde{V}_{\mathrm{singleton,\,incorrect}}(i):=\widetilde{V}_{\mathrm{singleton}}(i)\setminus\widetilde{V}_{\mathrm{singleton,\,correct}}(i) V singleton , incorrect ( i ) := V singleton ( i ) ∖ V singleton , correct ( i ) .
i i i ) iii) iii ) . For each such level i i i ,
either ∑ j ∈ { i − 1 , i , i + 1 } ∣ V ~ s i n g l e t o n , c o r r e c t ( j ) ∣ ≥ 1 100 ⋅ ∣ V ~ s i n g l e t o n ( i ) ∣ \sum_{j\in\{i-1,i,i+1\}}\left|\widetilde{V}_{\mathrm{singleton,\,correct}}(j)\right|\ge\frac{1}{100}\cdot\left|\widetilde{V}_{\mathrm{singleton}}(i)\right| ∑ j ∈ { i − 1 , i , i + 1 } V singleton , correct ( j ) ≥ 100 1 ⋅ V singleton ( i ) .
or ∑ v ∈ V ~ s i n g l e t o n , i n c o r r e c t ( i ) deg ( v ) ≤ 1 C 0 log n ∑ j ∑ v ∈ V ~ s i n g l e t o n , c o r r e c t ( j ) deg ( v ) \sum_{v\in\widetilde{V}_{\mathrm{singleton,\,incorrect}}(i)}\deg(v)\le\frac{1}{C_0\log n}\sum_j\sum_{v\in\widetilde{V}_{\mathrm{singleton,\,correct}}(j)}\deg(v) ∑ v ∈ V singleton , incorrect ( i ) deg ( v ) ≤ C 0 l o g n 1 ∑ j ∑ v ∈ V singleton , correct ( j ) deg ( v ) .
i v ) iv) i v ) . Let V ~ s i n g l e t o n , c o r r e c t : = ⋃ i V ~ s i n g l e t o n , c o r r e c t ( i ) \widetilde{V}_{\mathrm{singleton,\,correct}}:=\bigcup_i\widetilde{V}_{\mathrm{singleton,\,correct}}(i) V singleton , correct := ⋃ i V singleton , correct ( i ) and V ~ s i n g l e t o n , i n c o r r e c t : = ⋃ i V ~ s i n g l e t o n , i n c o r r e c t ( i ) \widetilde{V}_{\mathrm{singleton,\,incorrect}}:=\bigcup_i\widetilde{V}_{\mathrm{singleton,\,incorrect}}(i) V singleton , incorrect := ⋃ i V singleton , incorrect ( i ) .
Tolerant clusters ⋃ j K j t o l e r a n t \bigcup_jK_j^{\mathrm{tolerant}} ⋃ j K j tolerant . Each K j t o l e r a n t K_j^{\mathrm{tolerant}} K j tolerant either has K j t o l e r a n t = { v } K_j^{\mathrm{tolerant}}=\{v\} K j tolerant = { v } and N ( v ) = ∅ N(v)=\varnothing N ( v ) = ∅ , or each vertex v ∈ K j t o l e r a n t v\in K_j^{\mathrm{tolerant}} v ∈ K j tolerant satisfies the following properties.
i ) i) i ) . v v v has at most ε τ ⋅ ∣ K j t o l e r a n t ∣ \varepsilon_\tau\cdot|K_j^{\mathrm{tolerant}}| ε τ ⋅ ∣ K j tolerant ∣ non-neighbors inside K j t o l e r a n t K_j^{\mathrm{tolerant}} K j tolerant not counting v v v itself.
i i ) ii) ii ) . At least one of the following is true
either v v v is η d ⋅ ε τ \eta_d\cdot\varepsilon_\tau η d ⋅ ε τ -sparse.
or let K v ⊆ N [ v ] K_v\subseteq N[v] K v ⊆ N [ v ] be the set of vertices that are in C t ε τ C_t\varepsilon_\tau C t ε τ -agreement with v v v , including v v v itself, at least ε τ \varepsilon_\tau ε τ -fraction of K v ∖ K j t o l e r a n t K_v\setminus K_j^{\mathrm{tolerant}} K v ∖ K j tolerant is in V ~ s i n g l e t o n \widetilde{V}_{\mathrm{singleton}} V singleton .
Isolated clusters ⋃ j K j i s o l a t e \bigcup_jK_j^{\mathrm{isolate}} ⋃ j K j isolate . Each cluster K j i s o l a t e K_j^{\mathrm{isolate}} K j isolate satisfies
i ) i) i ) . K j i s o l a t e K_j^{\mathrm{isolate}} K j isolate is not a tolerant cluster.
i i ) ii) ii ) . For each v ∈ K j i s o l a t e v\in K_j^{\mathrm{isolate}} v ∈ K j isolate , at least one of the following is true
either v v v is η l ⋅ ε l \eta_l\cdot\varepsilon_l η l ⋅ ε l -sparse and deg ( v ) ≥ ∣ K j i s o l a t e ∣ / 2 \deg(v)\ge\left|K_j^{\mathrm{isolate}}\right|/2 deg ( v ) ≥ K j isolate /2 ;
or let K v ⊆ N [ v ] K_v\subseteq N[v] K v ⊆ N [ v ] be the set of vertices that are in C l ε l C_l\varepsilon_l C l ε l -agreement with v v v , including v v v itself, we have at least ε l \varepsilon_l ε l -fraction of K v ∖ K j i s o l a t e K_v\setminus K_j^{\mathrm{isolate}} K v ∖ K j isolate is in V ~ s i n g l e t o n \widetilde{V}_{\mathrm{singleton}} V singleton , and ∣ K v ∖ K j i s o l a t e ∣ ≥ ε l ⋅ ∣ K j i s o l a t e ∣ \left|K_v\setminus K_j^{\mathrm{isolate}}\right|\ge\varepsilon_l\cdot\left|K_j^{\mathrm{isolate}}\right| K v ∖ K j isolate ≥ ε l ⋅ K j isolate .
Note that in the new definition, the vertices in a cluster might actually satisfy the properties for the sparse vertices . As such, we forgo the separation between sparse vertices and almost-cliques2 , and we will simply check whether a given partition satisfies the properties as prescribed by Definition 6. We further observe that a decomposition in the original definition also satisfies the properties as prescribed by Definition 6.
Lemma 4.1. Let S D D G ε SDDG_{\varepsilon} S D D G ε be a standard ε \varepsilon ε -sparse-dense decomposition (see Definition 3) with ε ≤ 1 / 50 \varepsilon\le1/50 ε ≤ 1/50 . Then, S D D G ε SDDG_{\varepsilon} S D D G ε is also a partially correct tolerant ( η 0 ⋅ ε , 2 ε , 0 ) (\eta_0 \cdot\varepsilon, 2\varepsilon, 0) ( η 0 ⋅ ε , 2 ε , 0 ) -sparse-dense decomposition (Definition 6), with C t ≤ 1 C_t \le1 C t ≤ 1 .
Proof. Isolated vertices are regarded as tolerant singleton clusters. All remaining singleton vertices in S D D G ε SDDG_{\varepsilon} S D D G ε are actually η 0 ⋅ ε \eta_0 \cdot\varepsilon η 0 ⋅ ε -sparse. Therefore, there are no V ~ s i n g l e t o n , i n c o r r e c t \widetilde{V}_{\mathrm{singleton, incorrect}} V singleton , incorrect , and all singleton vertices for all levels i ∈ [ O ( log n ) ] i \in[O(\log n)] i ∈ [ O ( log n )] are η 0 ε \eta_0\varepsilon η 0 ε -sparse. For almost-cliques K j K_j K j and any vertex u ∈ K j u \in K_j u ∈ K j , the number of internal non-neighbors is at most ε Δ ( K j ) ≤ ε ∣ K j ∣ / ( 1 − ε ) ≤ 2 ε ∣ K j ∣ \varepsilon\Delta(K_j) \le\varepsilon|K_j|/(1-\varepsilon) \le2\varepsilon|K_j| ε Δ ( K j ) ≤ ε ∣ K j ∣/ ( 1 − ε ) ≤ 2 ε ∣ K j ∣ . For a positive neighbor v v v outside K j K_j K j , either v v v is a singleton or v v v is in another almost-clique. In the latter case, let Δ \Delta Δ be the larger maximum closed degree of the two almost-cliques. The size, internal non-neighbor, and exterior-degree bounds give
∣ N [ u ] △ N [ v ] ∣ ≥ ( 1 − 3 ε ) Δ ≥ 1 2 max { ∣ N [ u ] ∣ , ∣ N [ v ] ∣ } > 2 C t ε max { ∣ N [ u ] ∣ , ∣ N [ v ] ∣ } . |N[u] \mathbin{\triangle} N[v]| \ge(1-3\varepsilon)\Delta\ge\frac{1}{2}\max\{|N[u]|,|N[v]|\} > 2C_t\varepsilon\max\{|N[u]|,|N[v]|\}. ∣ N [ u ] △ N [ v ] ∣ ≥ ( 1 − 3 ε ) Δ ≥ 2 1 max { ∣ N [ u ] ∣ , ∣ N [ v ] ∣ } > 2 C t ε max { ∣ N [ u ] ∣ , ∣ N [ v ] ∣ } .
Thus every 2 C t ε 2C_t\varepsilon 2 C t ε -agreeing positive neighbor outside K j K_j K j is a singleton, which leads to the desired statement. □
Although Lemma 4.1 is a straightforward observation, it gives us a powerful tool: we could form the decomposition according to Definition 3, and maintain the decomposition according to Definition 6.
Approximation analysis of the partially correct tolerant sparse-dense decomposition
Throughout this section we suppress dependence on C t , C l , η d , η l , C 0 C_t, C_l, \eta_d, \eta_l, C_0 C t , C l , η d , η l , C 0 in O ( ⋅ ) O(\cdot) O ( ⋅ ) . We need to prove that if we could maintain a partially correct tolerant sparse-dense decomposition on G + = ( V , E + ) G^+=(V,E^+) G + = ( V , E + ) , we can maintain an O ( 1 ) O(1) O ( 1 ) -approximation for correlation clustering. A more formal statement is as follows.
Theorem 2. Let G = ( V , E + ∪ E − ) G=(V,E^+\cup E^-) G = ( V , E + ∪ E − ) be a correlation clustering instance, and let S D D p a r t i a l SDD^{\mathrm{partial}} S D D partial be a partially correct tolerate ( ε s , ε τ , ε l ) (\varepsilon_s,\varepsilon_\tau,\varepsilon_l) ( ε s , ε τ , ε l ) -sparse-dense decomposition on G + = ( V , E + ) G^+=(V,E^+) G + = ( V , E + ) as defined by Definition 6. Then, for suitable choices of positive constant ε s , ε τ , ε l ≤ 1 / 500 \varepsilon_s,\varepsilon_\tau,\varepsilon_l \le1/500 ε s , ε τ , ε l ≤ 1/500 , if we arrange the correlation clustering as follows:
cluster the vertices in each cluster K j t o l e r a n t K_j^{\mathrm{tolerant}} K j tolerant and K j i s o l a t e K_j^{\mathrm{isolate}} K j isolate together;
cluster each vertex v ∈ V ~ s i n g l e t o n v \in\widetilde{V}_{\mathrm{singleton}} v ∈ V singleton as a singleton cluster.
Then, we can get an O ( 1 ) O(1) O ( 1 ) -multiplicative approximation to the optimal correlation clustering cost. If there are no isolated clusters, we also allow ε l = 0 \varepsilon_l=0 ε l = 0 and omit their cost analysis.
We prove Theorem 2 for the rest of this section. The partially correct decomposition in Definition 6 looks involved; nevertheless, compared to Proposition 3.4 , the changes in the costs can be categorized into the following aspects.
(+) edges incident on the vertices in V ~ s i n g l e t o n \widetilde{V}_{\mathrm{singleton}} V singleton , especially the costs induced by V ~ s i n g l e t o n , i n c o r r e c t \widetilde{V}_{\mathrm{singleton, incorrect}} V singleton , incorrect on all levels.
At a high level, the proof of Theorem 2 first bounds the costs induced by the vertices that are actually sparse and the tolerant clusters. We then charge the costs for V ~ s i n g l e t o n , i n c o r r e c t \widetilde{V}_{\mathrm{singleton, incorrect}} V singleton , incorrect and the costs induced by K j i s o l a t e K_j^{\mathrm{isolate}} K j isolate clusters to these costs.
A charging scheme
Before we formally prove the approximation guarantees, we introduce the charging framework of [8 , 7 ] . This is particularly important for the analysis of the cost induced by the ε s \varepsilon_s ε s -sparse vertices (V ~ s i n g l e t o n , c o r r e c t \widetilde{V}_{\mathrm{singleton, correct}} V singleton , correct , not to be confused with V ~ s i n g l e t o n \widetilde{V}_{\mathrm{singleton}} V singleton ). Recall that we deal with a signed complete graph G = ( V , E + ∪ E − ) G = (V, E^+ \cup E^-) G = ( V , E + ∪ E − ) ; we do not care about the time index t t t in this section since this argument is for the partition (which can be offline). To be consistent with the notation of [8 , 7 ] , we use z ∈ V z \in V z ∈ V and edges f f f incident on z z z (f ∈ E + ( z ) ∪ E − ( z ) f \in E^+(z) \cup E^-(z) f ∈ E + ( z ) ∪ E − ( z ) ) as the variable for the set of edges being charged . The charging scheme is as follows.
Charging scheme of [8 , 7 ] .
Initially, charge ( z , f ) = 0 \operatorname{charge}(z,f)=0 charge ( z , f ) = 0 for all z ∈ V z \in V z ∈ V and f ∈ E ( z ) f \in E(z) f ∈ E ( z ) ;
For any edge e ∈ E e \in E e ∈ E with cost A L G ( e ) = 1 \operatorname{cost}^{\mathrm{ALG}}(e)=1 cost ALG ( e ) = 1 , we will find a collection of vertex-edge pairs, called the charge-set of e e e :
ChargeSet ( e ) ⊆ { ( z , f ) ∣ z ∈ V , f ∈ E ( z ) , and cost O P T ( f ) = 1 } . \operatorname{ChargeSet}(e) \subseteq\left\{(z,f) \mid z \in V,\ f \in E(z),\ \text{and }\operatorname{cost}^{\mathrm{OPT}}(f)=1\right\}. ChargeSet ( e ) ⊆ { ( z , f ) ∣ z ∈ V , f ∈ E ( z ) , and cost OPT ( f ) = 1 } .
For simplicity of notation, we define ChargeSet ( e ) = ∅ \operatorname{ChargeSet}(e)=\varnothing ChargeSet ( e ) = ∅ if cost A L G ( e ) = 0 \operatorname{cost}^{\mathrm{ALG}}(e)=0 cost ALG ( e ) = 0 .
Increase charge ( z , f ) \operatorname{charge}(z,f) charge ( z , f ) for all ( z , f ) ∈ ChargeSet ( e ) (z,f) \in\operatorname{ChargeSet}(e) ( z , f ) ∈ ChargeSet ( e ) by ∣ ChargeSet ( e ) ∣ − 1 \lvert\operatorname{ChargeSet}(e)\rvert^{-1} ∣ ChargeSet ( e ) ∣ − 1 .
The charging scheme works because every charged vertex-edge pair includes an edge that OPT must also pay for. Consequently, limiting the maximum charge on any single pair to a constant value is sufficient to demonstrate that ALG provides an O ( 1 ) O(1) O ( 1 ) -approximation. This observation is formally stated in the lemma below, drawn from [8 , 7 ] .
Lemma 4.2 ([8 , 7 ] ). Suppose there is a choice of ChargeSet ( e ) \operatorname{ChargeSet}(e) ChargeSet ( e ) for edges e ∈ E e \in E e ∈ E in the charging scheme such that for all z ∈ V z \in V z ∈ V and f ∈ E ( z ) f \in E(z) f ∈ E ( z ) , we have charge ( z , f ) ≤ α \operatorname{charge}(z,f) \leq\alpha charge ( z , f ) ≤ α for some α ≥ 1 \alpha\geq1 α ≥ 1 . Then, the algorithm ALG is a 2 α 2\alpha 2 α -approximation to the optimal correlation clustering cost, i.e., cost ( A L G ) ≤ 2 α ⋅ O P T \operatorname{cost}(\mathrm{ALG}) \leq2\alpha\cdot\mathrm{OPT} cost ( ALG ) ≤ 2 α ⋅ OPT .
By Lemma 4.2, we just need to define charges for the edges in a way that we only write O ( 1 ) O(1) O ( 1 ) charges to any vertex-edge pair. Following the approach in [8 , 7 ] , this analysis is broken into two parts: handling sparse vertices and handling almost-cliques.
Costs induced by ( + ) (+) ( + ) edges on V ~ s i n g l e t o n \widetilde{V}_{\mathrm{singleton}} V singleton
We observe that since we put vertices in V ~ s i n g l e t o n \widetilde{V}_{\mathrm{singleton}} V singleton as singleton vertices , only the ( + ) (+) ( + ) edges will induce costs. To bound the cost induced by the vertices in V ~ s i n g l e t o n \widetilde{V}_{\mathrm{singleton}} V singleton , we take a two-step approach:
We first analyze the costs induced by the vertices that are actually ε s \varepsilon_s ε s -sparse, i.e., the vertices in V ~ s i n g l e t o n , c o r r e c t \widetilde{V}_{\mathrm{singleton},\ \mathrm{correct}} V singleton , correct .
We then charge the costs induced by V ~ s i n g l e t o n , i n c o r r e c t \widetilde{V}_{\mathrm{singleton},\ \mathrm{incorrect}} V singleton , incorrect to the costs induced by V ~ s i n g l e t o n , c o r r e c t \widetilde{V}_{\mathrm{singleton},\ \mathrm{correct}} V singleton , correct .
Cost induced by ( + ) (+) ( + ) edges on V ~ s i n g l e t o n , c o r r e c t \widetilde{V}_{\mathrm{singleton},\ \mathrm{correct}} V singleton , correct . For the vertices that are ε s \varepsilon_s ε s -sparse, we can directly invoke the lemma in [8 , 7 ] since the properties for sparse vertices in Definition 6 has not changed from the same notion in Definition 3.3
Lemma 4.3 ([8 , 7 ] ). There exist sets ChargeSet ( e ) \operatorname{ChargeSet}(e) ChargeSet ( e ) such that for every ε s \varepsilon_s ε s -sparse vertex v v v and e ∈ E ( v ) e \in E(v) e ∈ E ( v ) , there is
for all vertex-edge pairs ( z , f ) : sparse-charge ( z , f ) = O ( ε s − 2 ) . \text{for all vertex-edge pairs }(z,f):\quad\operatorname{sparse\text{-}charge}(z,f)=O(\varepsilon_s^{-2}). for all vertex-edge pairs ( z , f ) : sparse - charge ( z , f ) = O ( ε s − 2 ) .
The same charging bound applies to the number of positive edges incident on any set of ε s \varepsilon_s ε s -sparse vertices: apply the argument to a clustering that makes those vertices singletons. With closed neighborhoods, disagreement witnesses exclude the two endpoints, and the charging argument is unchanged.
As such, the total costs induced by the sparse vertices can be bounded by O ( ε s − 2 ) ⋅ O P T O(\varepsilon_s^{-2})\cdot\mathrm{OPT} O ( ε s − 2 ) ⋅ OPT as follows.
Lemma 4.4. Given the positive subgraph G + = ( V , E + ) G^+=(V,E^+) G + = ( V , E + ) of a correlation clustering instance, and let S D D G , ε p a r t i a l = { V ~ s i n g l e t o n , ⋃ j K j t o l e r a n t , ⋃ j K j i s o l a t e } SDD^{\mathrm{partial}}_{G,\varepsilon}=\{\widetilde{V}_{\mathrm{singleton}},\bigcup_j K_j^{\mathrm{tolerant}},\bigcup_j K_j^{\mathrm{isolate}}\} S D D G , ε partial = { V singleton , ⋃ j K j tolerant , ⋃ j K j isolate } be a partially correct tolerate ( ε s , ε τ , ε l ) (\varepsilon_s,\varepsilon_\tau,\varepsilon_l) ( ε s , ε τ , ε l ) -sparse-dense decomposition on the positive subgraph G + G^+ G + . Then, let cost ( A L G , V ~ s i n g l e t o n , c o r r e c t ) \operatorname{cost}(\mathrm{ALG},\widetilde{V}_{\mathrm{singleton},\ \mathrm{correct}}) cost ( ALG , V singleton , correct ) be the cost induced by the ( + ) (+) ( + ) edges on V ~ s i n g l e t o n , c o r r e c t \widetilde{V}_{\mathrm{singleton},\ \mathrm{correct}} V singleton , correct . We have that
cost ( A L G , V ~ s i n g l e t o n , c o r r e c t ) ≤ O ( 1 ε s 2 ) ⋅ O P T . \operatorname{cost}(\mathrm{ALG},\widetilde{V}_{\mathrm{singleton},\ \mathrm{correct}})\le O\left(\frac{1}{\varepsilon_s^2}\right)\cdot\mathrm{OPT}. cost ( ALG , V singleton , correct ) ≤ O ( ε s 2 1 ) ⋅ OPT .
Cost induced by ( + ) (+) ( + ) edges on V ~ s i n g l e t o n , i n c o r r e c t \widetilde{V}_{\mathrm{singleton},\ \mathrm{incorrect}} V singleton , incorrect . In general, the vertices in V ~ s i n g l e t o n , i n c o r r e c t \widetilde{V}_{\mathrm{singleton},\ \mathrm{incorrect}} V singleton , incorrect might induce high cost since each v ∈ V ~ s i n g l e t o n , i n c o r r e c t v\in\widetilde{V}_{\mathrm{singleton},\ \mathrm{incorrect}} v ∈ V singleton , incorrect can pay deg + ( v ) \deg^+(v) deg + ( v ) cost. However, the catch here is that the total cost induced by the vertices in V ~ s i n g l e t o n , i n c o r r e c t \widetilde{V}_{\mathrm{singleton},\ \mathrm{incorrect}} V singleton , incorrect cannot dominate the cost in V ~ s i n g l e t o n \widetilde{V}_{\mathrm{singleton}} V singleton . In what follows, we will prove the approximation guarantees induced by the ( + ) (+) ( + ) edges on the vertices of V ~ s i n g l e t o n , i n c o r r e c t \widetilde{V}_{\mathrm{singleton},\ \mathrm{incorrect}} V singleton , incorrect by charging to the costs induced by the ( + ) (+) ( + ) edges on V ~ s i n g l e t o n , c o r r e c t \widetilde{V}_{\mathrm{singleton},\ \mathrm{correct}} V singleton , correct .
Lemma 4.5. Given the positive subgraph G + = ( V , E + ) G^+=(V,E^+) G + = ( V , E + ) of a correlation clustering instance, and let S D D G , ε p a r t i a l = { V ~ s i n g l e t o n , ⋃ j K j t o l e r a n t , ⋃ j K j i s o l a t e } SDD^{\mathrm{partial}}_{G,\varepsilon}=\{\widetilde{V}_{\mathrm{singleton}},\bigcup_j K_j^{\mathrm{tolerant}},\bigcup_j K_j^{\mathrm{isolate}}\} S D D G , ε partial = { V singleton , ⋃ j K j tolerant , ⋃ j K j isolate } be a partially correct tolerate ( ε s , ε τ , ε l ) (\varepsilon_s,\varepsilon_\tau,\varepsilon_l) ( ε s , ε τ , ε l ) -sparse-dense decomposition on the positive subgraph G + G^+ G + . Then, let cost ( A L G , V ~ s i n g l e t o n , i n c o r r e c t ) \operatorname{cost}(\mathrm{ALG},\widetilde{V}_{\mathrm{singleton},\ \mathrm{incorrect}}) cost ( ALG , V singleton , incorrect ) be the cost induced by the ( + ) (+) ( + ) edges on V ~ s i n g l e t o n , i n c o r r e c t \widetilde{V}_{\mathrm{singleton},\ \mathrm{incorrect}} V singleton , incorrect . We have that
cost ( A L G , V ~ s i n g l e t o n , i n c o r r e c t ) ≤ O ( 1 ) ⋅ cost ( A L G , V ~ s i n g l e t o n , c o r r e c t ) . \operatorname{cost}(\mathrm{ALG},\widetilde{V}_{\mathrm{singleton},\ \mathrm{incorrect}})\le O(1)\cdot\operatorname{cost}(\mathrm{ALG},\widetilde{V}_{\mathrm{singleton},\ \mathrm{correct}}). cost ( ALG , V singleton , incorrect ) ≤ O ( 1 ) ⋅ cost ( ALG , V singleton , correct ) .
Proof. We analyze the two cases in V ~ s i n g l e t o n \widetilde{V}_{\mathrm{singleton}} V singleton , incorrect for each level i ∈ [ O ( log n ) ] i \in[O(\log n)] i ∈ [ O ( log n )] :
Case A ) A) A ) . ∑ j ∈ { i − 1 , i , i + 1 } ∣ V ~ s i n g l e t o n , c o r r e c t ( j ) ∣ ≥ 1 100 ⋅ ∣ V ~ s i n g l e t o n ( i ) ∣ \sum_{j\in\{i-1,i,i+1\}} \left|\widetilde{V}_{\mathrm{singleton},\ \mathrm{correct}(j)}\right| \ge\frac{1}{100}\cdot\left|\widetilde{V}_{\mathrm{singleton}(i)}\right| ∑ j ∈ { i − 1 , i , i + 1 } V singleton , correct ( j ) ≥ 100 1 ⋅ V singleton ( i ) . In this case, note that since a vertex v ∈ V ~ s i n g l e t o n , c o r r e c t ( i ) v\in\widetilde{V}_{\mathrm{singleton},\ \mathrm{correct}(i)} v ∈ V singleton , correct ( i ) , we have deg + ( v ) ≥ 2 i \deg^{+}(v)\ge2^i deg + ( v ) ≥ 2 i . Therefore, counting an incident edge at most twice, we have that
cost ( A L G , V ~ s i n g l e t o n , c o r r e c t ( i ) ) ≥ 1 2 2 i ⋅ ∣ V ~ s i n g l e t o n , c o r r e c t ( i ) ∣ . \operatorname{cost}(\mathrm{ALG},\widetilde{V}_{\mathrm{singleton},\ \mathrm{correct}(i)}) \ge\frac{1}{2}2^i\cdot\left|\widetilde{V}_{\mathrm{singleton},\ \mathrm{correct}(i)}\right|. cost ( ALG , V singleton , correct ( i ) ) ≥ 2 1 2 i ⋅ V singleton , correct ( i ) .
On the other hand, the cost induced by V ~ s i n g l e t o n , i n c o r r e c t ( i ) \widetilde{V}_{\mathrm{singleton},\ \mathrm{incorrect}(i)} V singleton , incorrect ( i ) is upper-bounded by
cost ( A L G , V ~ s i n g l e t o n , i n c o r r e c t ( i ) ) ≤ cost ( A L G , V ~ s i n g l e t o n ( i ) ) ≤ 2 i + 1 ⋅ ∣ V ~ s i n g l e t o n ( i ) ∣ ≤ 200 ⋅ 2 i ⋅ ∑ j ∈ { i − 1 , i , i + 1 } ∣ V ~ s i n g l e t o n , c o r r e c t ( j ) ∣ (by the condition of Case A.) ≤ 800 ⋅ ∑ j ∈ { i − 1 , i , i + 1 } cost ( A L G , V ~ s i n g l e t o n , c o r r e c t ( j ) ) . \begin{aligned}
\operatorname{cost}(\mathrm{ALG},\widetilde{V}_{\mathrm{singleton},\ \mathrm{incorrect}(i)}) &\le\operatorname{cost}(\mathrm{ALG},\widetilde{V}_{\mathrm{singleton}(i)})\\
&\le2^{i+1}\cdot\left|\widetilde{V}_{\mathrm{singleton}(i)}\right|\\
&\le200\cdot2^i\cdot\sum_{j\in\{i-1,i,i+1\}}\left|\widetilde{V}_{\mathrm{singleton},\ \mathrm{correct}(j)}\right|\\
&\qquad\text{(by the condition of Case A.)}\\
&\le800\cdot\sum_{j\in\{i-1,i,i+1\}}\operatorname{cost}(\mathrm{ALG},\widetilde{V}_{\mathrm{singleton},\ \mathrm{correct}(j)}).
\end{aligned} cost ( ALG , V singleton , incorrect ( i ) ) ≤ cost ( ALG , V singleton ( i ) ) ≤ 2 i + 1 ⋅ V singleton ( i ) ≤ 200 ⋅ 2 i ⋅ j ∈ { i − 1 , i , i + 1 } ∑ V singleton , correct ( j ) (by the condition of Case A.) ≤ 800 ⋅ j ∈ { i − 1 , i , i + 1 } ∑ cost ( ALG , V singleton , correct ( j ) ) .
Case B ) B) B ) . ∑ v ∈ V ~ s i n g l e t o n , i n c o r r e c t ( i ) deg + ( v ) ≤ 1 C 0 log n ⋅ ∑ i ∑ v ∈ V ~ s i n g l e t o n , c o r r e c t ( i ) deg + ( v ) \sum_{v\in\widetilde{V}_{\mathrm{singleton},\ \mathrm{incorrect}(i)}}\deg^{+}(v)\le\frac{1}{C_0\log n}\cdot\sum_i\sum_{v\in\widetilde{V}_{\mathrm{singleton},\ \mathrm{correct}(i)}}\deg^{+}(v) ∑ v ∈ V singleton , incorrect ( i ) deg + ( v ) ≤ C 0 l o g n 1 ⋅ ∑ i ∑ v ∈ V singleton , correct ( i ) deg + ( v ) . In this case, we know that
cost ( A L G , V ~ s i n g l e t o n , i n c o r r e c t ( i ) ) ≤ ∑ v ∈ V ~ s i n g l e t o n , i n c o r r e c t ( i ) deg + ( v ) ≤ 1 C 0 log n ⋅ ∑ i ∑ v ∈ V ~ s i n g l e t o n , c o r r e c t ( i ) deg + ( v ) ≤ O ( 1 log n ) ⋅ cost ( A L G , V ~ s i n g l e t o n , c o r r e c t ) . \begin{aligned}
\operatorname{cost}(\mathrm{ALG},\widetilde{V}_{\mathrm{singleton},\ \mathrm{incorrect}(i)}) &\le\sum_{v\in\widetilde{V}_{\mathrm{singleton},\ \mathrm{incorrect}(i)}}\deg^{+}(v)\\
&\le\frac{1}{C_0\log n}\cdot\sum_i\sum_{v\in\widetilde{V}_{\mathrm{singleton},\ \mathrm{correct}(i)}}\deg^{+}(v)\\
&\le O\left(\frac{1}{\log n}\right)\cdot\operatorname{cost}(\mathrm{ALG},\widetilde{V}_{\mathrm{singleton},\ \mathrm{correct}}).
\end{aligned} cost ( ALG , V singleton , incorrect ( i ) ) ≤ v ∈ V singleton , incorrect ( i ) ∑ deg + ( v ) ≤ C 0 log n 1 ⋅ i ∑ v ∈ V singleton , correct ( i ) ∑ deg + ( v ) ≤ O ( log n 1 ) ⋅ cost ( ALG , V singleton , correct ) .
Therefore, in either case, we have that
cost ( A L G , V ~ s i n g l e t o n , i n c o r r e c t ( i ) ) ≤ 800 ⋅ ∑ j ∈ { i − 1 , i , i + 1 } cost ( A L G , V ~ s i n g l e t o n , c o r r e c t ( j ) ) + O ( 1 log n ) ⋅ cost ( A L G , V ~ s i n g l e t o n , c o r r e c t ) , \begin{aligned}
\operatorname{cost}(\mathrm{ALG},\widetilde{V}_{\mathrm{singleton},\ \mathrm{incorrect}(i)})\le800\cdot\sum_{j\in\{i-1,i,i+1\}}\operatorname{cost}(\mathrm{ALG},\widetilde{V}_{\mathrm{singleton},\ \mathrm{correct}(j)})+O\left(\frac{1}{\log n}\right)\cdot\operatorname{cost}(\mathrm{ALG},\widetilde{V}_{\mathrm{singleton},\ \mathrm{correct}}),
\end{aligned} cost ( ALG , V singleton , incorrect ( i ) ) ≤ 800 ⋅ j ∈ { i − 1 , i , i + 1 } ∑ cost ( ALG , V singleton , correct ( j ) ) + O ( log n 1 ) ⋅ cost ( ALG , V singleton , correct ) ,
which implies
∑ i = 0 O ( log n ) cost ( A L G , V ~ s i n g l e t o n , incorrect ( i ) ) ≤ ∑ i = 0 O ( log n ) ( 800 ⋅ ∑ j ∈ { i − 1 , i , i + 1 } cost ( A L G , V ~ s i n g l e t o n , correct ( j ) ) + O ( 1 log n ) ⋅ cost ( A L G , V ~ s i n g l e t o n , correct ) ) ≤ O ( 1 ) ⋅ ∑ i = 0 O ( log n ) ∑ j ∈ { i − 1 , i , i + 1 } cost ( A L G , V ~ s i n g l e t o n , correct ( j ) ) + O ( log n ) ⋅ 1 C 0 log n ⋅ cost ( A L G , V ~ s i n g l e t o n , correct ) (there are at most O ( log n ) levels) ≤ O ( 1 ) ⋅ cost ( A L G , V ~ s i n g l e t o n , correct ) , \begin{aligned}
\sum_{i=0}^{O(\log n)} \operatorname{cost}(\mathrm{ALG},\widetilde{V}_{\mathrm{singleton}},\operatorname{incorrect}(i)) \\
&\le\sum_{i=0}^{O(\log n)}\left(800\cdot\sum_{j\in\{i-1,i,i+1\}}\operatorname{cost}(\mathrm{ALG},\widetilde{V}_{\mathrm{singleton}},\operatorname{correct}(j))+O\left(\frac{1}{\log n}\right)\cdot\operatorname{cost}(\mathrm{ALG},\widetilde{V}_{\mathrm{singleton}},\operatorname{correct})\right) \\
&\le O(1)\cdot\sum_{i=0}^{O(\log n)}\sum_{j\in\{i-1,i,i+1\}}\operatorname{cost}(\mathrm{ALG},\widetilde{V}_{\mathrm{singleton}},\operatorname{correct}(j))
+O(\log n)\cdot\frac{1}{C_0\log n}\cdot\operatorname{cost}(\mathrm{ALG},\widetilde{V}_{\mathrm{singleton}},\operatorname{correct})
\qquad\text{(there are at most }O(\log n)\text{ levels)} \\
&\le O(1)\cdot\operatorname{cost}(\mathrm{ALG},\widetilde{V}_{\mathrm{singleton}},\operatorname{correct}),
\end{aligned} i = 0 ∑ O ( l o g n ) cost ( ALG , V singleton , incorrect ( i )) ≤ i = 0 ∑ O ( l o g n ) 800 ⋅ j ∈ { i − 1 , i , i + 1 } ∑ cost ( ALG , V singleton , correct ( j )) + O ( log n 1 ) ⋅ cost ( ALG , V singleton , correct ) ≤ O ( 1 ) ⋅ i = 0 ∑ O ( l o g n ) j ∈ { i − 1 , i , i + 1 } ∑ cost ( ALG , V singleton , correct ( j )) + O ( log n ) ⋅ C 0 log n 1 ⋅ cost ( ALG , V singleton , correct ) (there are at most O ( log n ) levels) ≤ O ( 1 ) ⋅ cost ( ALG , V singleton , correct ) ,
where the last line follows since ∑ j = 0 O ( log n ) cost ( A L G , V ~ s i n g l e t o n , correct ( j ) ) ≤ 2 cost ( A L G , V ~ s i n g l e t o n , correct ) \sum_{j=0}^{O(\log n)}\operatorname{cost}(\mathrm{ALG},\widetilde{V}_{\mathrm{singleton}},\operatorname{correct}(j))\le2\operatorname{cost}(\mathrm{ALG},\widetilde{V}_{\mathrm{singleton}},\operatorname{correct}) ∑ j = 0 O ( l o g n ) cost ( ALG , V singleton , correct ( j )) ≤ 2 cost ( ALG , V singleton , correct ) and each level is accounted for at most 3 times. As such, we conclude that cost ( A L G , V ~ s i n g l e t o n , incorrect ) ≤ ∑ i cost ( A L G , V ~ s i n g l e t o n , incorrect ( i ) ) ≤ O ( 1 ) ⋅ cost ( A L G , V ~ s i n g l e t o n , correct ) \operatorname{cost}(\mathrm{ALG},\widetilde{V}_{\mathrm{singleton}},\operatorname{incorrect})\le\sum_i\operatorname{cost}(\mathrm{ALG},\widetilde{V}_{\mathrm{singleton}},\operatorname{incorrect}(i))\le O(1)\cdot\operatorname{cost}(\mathrm{ALG},\widetilde{V}_{\mathrm{singleton}},\operatorname{correct}) cost ( ALG , V singleton , incorrect ) ≤ ∑ i cost ( ALG , V singleton , incorrect ( i )) ≤ O ( 1 ) ⋅ cost ( ALG , V singleton , correct ) , as desired by the lemma statement.
Combining Lemmas 4.4 and 4.5 leads to the following approximation guarantee for the ( + ) (+) ( + ) edges on V ~ s i n g l e t o n \widetilde{V}_{\mathrm{singleton}} V singleton .
Lemma 4.6. Given the positive subgraph G + = ( V , E + ) G^{+}=(V,E^{+}) G + = ( V , E + ) of a correlation clustering instance, and let S D D G , ε p a r t i a l = { V ~ s i n g l e t o n , ⋃ j K j t o l e r a n t , ⋃ j K j i s o l a t e } SDD^{\mathrm{partial}}_{G,\varepsilon}=\{\widetilde{V}_{\mathrm{singleton}},\bigcup_jK^{\mathrm{tolerant}}_j,\bigcup_jK^{\mathrm{isolate}}_j\} S D D G , ε partial = { V singleton , ⋃ j K j tolerant , ⋃ j K j isolate } be a partially correct tolerant ( ε s , ε τ , ε l ) (\varepsilon_s,\varepsilon_\tau,\varepsilon_l) ( ε s , ε τ , ε l ) -sparse-dense decomposition on the positive subgraph G + G^{+} G + . Then, let cost ( A L G , V ~ s i n g l e t o n ) \operatorname{cost}(\mathrm{ALG},\widetilde{V}_{\mathrm{singleton}}) cost ( ALG , V singleton ) be the cost induced by the ( + ) (+) ( + ) edges on V ~ s i n g l e t o n \widetilde{V}_{\mathrm{singleton}} V singleton . We have that
cost ( A L G , V ~ s i n g l e t o n ) ≤ O ( 1 ε s 2 ) ⋅ O P T . \operatorname{cost}(\mathrm{ALG},\widetilde{V}_{\mathrm{singleton}})\le O\left(\frac{1}{\varepsilon_s^2}\right)\cdot\mathrm{OPT}. cost ( ALG , V singleton ) ≤ O ( ε s 2 1 ) ⋅ OPT .
The cost induced by tolerant clusters
We now turn to the tolerant clusters with potentially many neighbors outside. We will eventually show that this will not blow up the approximation by too much. To the above end, we analyze the two sets of edges that induce costs: the costs for the ( + ) (+) ( + ) edges going out of the cluster and the costs for the ( − ) (-) ( − ) edges within the same cluster. In the remainder of the writing for the cost induced by tolerant clusters, we use K t o l e r a n t K^{\mathrm{tolerant}} K tolerant (without the index j j j for K j t o l e r a n t K^{\mathrm{tolerant}}_j K j tolerant ) to denote the tolerant cluster when the context is clear.
The ( + ) (+) ( + ) edges going out of the clusters. We first handle the case for the ( + ) (+) ( + ) edges going out of almost-cliques. For each K j t o l e r a n t K^{\mathrm{tolerant}}_j K j tolerant , we let K j t o l e r a n t ( s p a r s e ) K^{\mathrm{tolerant}}_j(\mathrm{sparse}) K j tolerant ( sparse ) be the set of vertices that η d ε τ \eta d\varepsilon_\tau η d ε τ -sparse, and we let K j t o l e r a n t ( s i n g l e t o n ) K^{\mathrm{tolerant}}_j(\mathrm{singleton}) K j tolerant ( singleton ) be the set of vertices v v v such that K v ∖ K j t o l e r a n t K_v\setminus K^{\mathrm{tolerant}}_j K v ∖ K j tolerant has at least ε τ \varepsilon_\tau ε τ -fraction in V ~ s i n g l e t o n \widetilde{V}_{\mathrm{singleton}} V singleton . Note that K j t o l e r a n t = K j t o l e r a n t ( s p a r s e ) ∪ K j t o l e r a n t ( s i n g l e t o n ) K^{\mathrm{tolerant}}_j=K^{\mathrm{tolerant}}_j(\mathrm{sparse})\cup K^{\mathrm{tolerant}}_j(\mathrm{singleton}) K j tolerant = K j tolerant ( sparse ) ∪ K j tolerant ( singleton ) . We first observe that by Lemma 4.3, the ( + ) (+) ( + ) edges incident on ⋃ j K j t o l e r a n t ( s p a r s e ) \bigcup_jK^{\mathrm{tolerant}}_j(\mathrm{sparse}) ⋃ j K j tolerant ( sparse ) is at most O ( 1 / ε τ 2 ) ⋅ O P T O(1/\varepsilon_\tau^2)\cdot\mathrm{OPT} O ( 1/ ε τ 2 ) ⋅ OPT .
Lemma 4.7. The total cost induced by ( + ) (+) ( + ) edges going out of K j t o l e r a n t K^{\mathrm{tolerant}}_j K j tolerant for any j j j and incident on ⋃ j K j t o l e r a n t ( s p a r s e ) \bigcup_jK^{\mathrm{tolerant}}_j(\mathrm{sparse}) ⋃ j K j tolerant ( sparse ) is at most O ( 1 / ε τ 2 ) ⋅ O P T O(1/\varepsilon_\tau^2)\cdot\mathrm{OPT} O ( 1/ ε τ 2 ) ⋅ OPT .
We now need to handle the edges incident on ⋃ j K j t o l e r a n t ( s i n g l e t o n ) \bigcup_j K_j^{\mathrm{tolerant}}(\mathrm{singleton}) ⋃ j K j tolerant ( singleton ) . We further divide these edges into the following categories:
E + ( K j t o l e r a n t ( s i n g l e t o n ) , K v ) E^{+}(K_j^{\mathrm{tolerant}}(\mathrm{singleton}),K_v) E + ( K j tolerant ( singleton ) , K v ) : the set of edges going out of K j t o l e r a n t K_j^{\mathrm{tolerant}} K j tolerant for any j j j , and the other endpoint is in K v K_v K v , where v ∈ K j t o l e r a n t ( s i n g l e t o n ) v \in K_j^{\mathrm{tolerant}}(\mathrm{singleton}) v ∈ K j tolerant ( singleton ) is the first endpoint.
E + ( K j t o l e r a n t ( s i n g l e t o n ) , d i s a g r e e ) E^{+}(K_j^{\mathrm{tolerant}}(\mathrm{singleton}),\mathrm{disagree}) E + ( K j tolerant ( singleton ) , disagree ) : the set of edges going out of K j t o l e r a n t K_j^{\mathrm{tolerant}} K j tolerant for any j j j , and the other endpoint is not in K v K_v K v , where v ∈ K j t o l e r a n t ( s i n g l e t o n ) v \in K_j^{\mathrm{tolerant}}(\mathrm{singleton}) v ∈ K j tolerant ( singleton ) is the first endpoint.
We use cost ( A L G , E + ( K t o l e r a n t ( s i n g l e t o n ) , K v ) ) \operatorname{cost}(\mathrm{ALG},E^{+}(K^{\mathrm{tolerant}}(\mathrm{singleton}),K_v)) cost ( ALG , E + ( K tolerant ( singleton ) , K v )) and cost ( A L G , E + ( K t o l e r a n t ( s i n g l e t o n ) , d i s a g r e e ) ) \operatorname{cost}(\mathrm{ALG},E^{+}(K^{\mathrm{tolerant}}(\mathrm{singleton}),\mathrm{disagree})) cost ( ALG , E + ( K tolerant ( singleton ) , disagree )) to denote the cost induced by the two parts, respectively. The first cost is straightforwardly charged to the cost of V ~ s i n g l e t o n \widetilde{V}_{\mathrm{singleton}} V singleton as follows.
Lemma 4.8.
cost ( A L G , E + ( K t o l e r a n t ( s i n g l e t o n ) , K v ) ) ≤ O ( 1 ε s 2 ⋅ 1 ε τ ⋅ O P T ) . \operatorname{cost}(\mathrm{ALG},E^{+}(K^{\mathrm{tolerant}}(\mathrm{singleton}),K_v)) \le O\left(\frac{1}{\varepsilon_s^2}\cdot\frac{1}{\varepsilon_\tau}\cdot\mathrm{OPT}\right). cost ( ALG , E + ( K tolerant ( singleton ) , K v )) ≤ O ( ε s 2 1 ⋅ ε τ 1 ⋅ OPT ) .
Proof. We first note
cost ( A L G , E + ( K t o l e r a n t ( s i n g l e t o n ) , K v ) ) ≤ ∣ E + ( K t o l e r a n t ( s i n g l e t o n ) , K v ) ∣ ≤ ∑ j ∑ v ∈ K j t o l e r a n t ( s i n g l e t o n ) ∣ K v ∖ K j t o l e r a n t ∣ ≤ 1 ε τ ⋅ ∣ ⋃ j ⋃ v ∈ K j t o l e r a n t ( s i n g l e t o n ) E + ( v , V ~ s i n g l e t o n ∩ K v ) ∣ ≤ 1 ε τ ⋅ ∣ E + ( V ~ s i n g l e t o n ) ∣ . \begin{aligned}
\operatorname{cost}(\mathrm{ALG},E^{+}(K^{\mathrm{tolerant}}(\mathrm{singleton}),K_v))
&\le\left|E^{+}(K^{\mathrm{tolerant}}(\mathrm{singleton}),K_v)\right|\\
&\le\sum_j\sum_{v\in K_j^{\mathrm{tolerant}}(\mathrm{singleton})}\left|K_v\setminus K_j^{\mathrm{tolerant}}\right|\\
&\le\frac{1}{\varepsilon_\tau}\cdot\left|\bigcup_j\bigcup_{v\in K_j^{\mathrm{tolerant}}(\mathrm{singleton})}E^{+}(v,\widetilde{V}_{\mathrm{singleton}}\cap K_v)\right|\\
&\le\frac{1}{\varepsilon_\tau}\cdot\left|E^{+}(\widetilde{V}_{\mathrm{singleton}})\right|.
\end{aligned} cost ( ALG , E + ( K tolerant ( singleton ) , K v )) ≤ E + ( K tolerant ( singleton ) , K v ) ≤ j ∑ v ∈ K j tolerant ( singleton ) ∑ K v ∖ K j tolerant ≤ ε τ 1 ⋅ j ⋃ v ∈ K j tolerant ( singleton ) ⋃ E + ( v , V singleton ∩ K v ) ≤ ε τ 1 ⋅ E + ( V singleton ) .
The second-last inequality holds since there are at least ε τ \varepsilon_\tau ε τ fraction in V ~ s i n g l e t o n \widetilde{V}_{\mathrm{singleton}} V singleton , and the charged edges are disjoint: each joins a unique vertex v v v in a tolerant cluster to a singleton. Therefore, using Lemma 4.6 , we have
cost ( A L G , E + ( K t o l e r a n t ( s i n g l e t o n ) , K v ) ) ≤ 1 ε τ ⋅ cost ( A L G , V ~ s i n g l e t o n ) ≤ O ( 1 ε s 2 ⋅ 1 ε τ ⋅ O P T ) , \operatorname{cost}(\mathrm{ALG},E^{+}(K^{\mathrm{tolerant}}(\mathrm{singleton}),K_v))\le\frac{1}{\varepsilon_\tau}\cdot\operatorname{cost}(\mathrm{ALG},\widetilde{V}_{\mathrm{singleton}})\le O\left(\frac{1}{\varepsilon_s^2}\cdot\frac{1}{\varepsilon_\tau}\cdot\mathrm{OPT}\right), cost ( ALG , E + ( K tolerant ( singleton ) , K v )) ≤ ε τ 1 ⋅ cost ( ALG , V singleton ) ≤ O ( ε s 2 1 ⋅ ε τ 1 ⋅ OPT ) ,
which is as desired.
We emphasize in that in the proof of Lemma 4.8, we charge the ( + ) (+) ( + ) edge costs to the ( + ) (+) ( + ) edges incident on V ~ s i n g l e t o n \widetilde{V}_{\mathrm{singleton}} V singleton , which is set of the singleton vertices kept by the algorithm. We will later use the cost upper bound for the ( + ) (+) ( + ) edges on V ~ s i n g l e t o n \widetilde{V}_{\mathrm{singleton}} V singleton (Lemma 4.6 ) to transfer the charges. We never rely on any bound for the number of ( + ) (+) ( + ) edges for V s p a r s e V_{\mathrm{sparse}} V sparse (the truly sparse edges) in this proof. Next, we prove that the cost induced by the edges in E + ( K t o l e r a n t ( s i n g l e t o n ) , d i s a g r e e ) E^{+}(K^{\mathrm{tolerant}}(\mathrm{singleton}),\mathrm{disagree}) E + ( K tolerant ( singleton ) , disagree ) can be charged into O ( 1 / ε τ 2 ) ⋅ O P T O(1/\varepsilon_\tau^2)\cdot\mathrm{OPT} O ( 1/ ε τ 2 ) ⋅ OPT of cost.
Lemma 4.9. There exists ChargeSet ( e ) \operatorname{ChargeSet}(e) ChargeSet ( e ) for every ( + ) (+) ( + ) edges in E + ( K t o l e r a n t ( s i n g l e t o n ) , d i s a g r e e ) E^{+}(K^{\mathrm{tolerant}}(\mathrm{singleton}),\mathrm{disagree}) E + ( K tolerant ( singleton ) , disagree ) such that
for all vertex-edge pairs ( z , f ) (z,f) ( z , f ) : outside-clique-charge ( z , f ) ≤ O ( 1 ε τ ) \operatorname{outside\text{-}clique\text{-}charge}(z,f)\le O\left(\frac{1}{\varepsilon_\tau}\right) outside - clique - charge ( z , f ) ≤ O ( ε τ 1 ) .
Therefore, the cost induced by ( + ) (+) ( + ) edges in E + ( K t o l e r a n t ( s i n g l e t o n ) , d i s a g r e e ) E^{+}(K^{\mathrm{tolerant}}(\mathrm{singleton}),\mathrm{disagree}) E + ( K tolerant ( singleton ) , disagree ) is at most O ( 1 ε τ ) ⋅ O P T O\left(\frac{1}{\varepsilon\tau}\right)\cdot\mathrm{OPT} O ( ε τ 1 ) ⋅ OPT , i.e.,
cost ( A L G , E + ( K t o l e r a n t ( s i n g l e t o n ) , d i s a g r e e ) ) ≤ O ( 1 ε τ ) ⋅ O P T . \operatorname{cost}(\mathrm{ALG},E^{+}(K^{\mathrm{tolerant}}(\mathrm{singleton}),\mathrm{disagree}))\le O\left(\frac{1}{\varepsilon\tau}\right)\cdot\mathrm{OPT}. cost ( ALG , E + ( K tolerant ( singleton ) , disagree )) ≤ O ( ε τ 1 ) ⋅ OPT .
Proof. We are talking about edges whose two endpoints are not in C ε τ C_{\varepsilon\tau} C ε τ -agreement. Therefore, the proof is very similar to the original charging argument used for ( + ) (+) ( + ) edges for sparse vertices in [8 , 7 ] . We argue that for any ( + ) (+) ( + ) edges whose endpoints have a high level of disagreement, clustering the endpoints together would cause a sufficiently large amount of costs. To this end, we introduce the following technical claim from [8 , 7 ] .
Claim 4.10 ([8 , 7 ] ). Let θ ∈ ( 0 , 1 ) \theta\in(0,1) θ ∈ ( 0 , 1 ) be a parameter and E ~ \widetilde{E} E be any collection of edges in E + E^{+} E + in the signed complete graph G = ( V , E + ∪ E − ) G=(V,E^{+}\cup E^{-}) G = ( V , E + ∪ E − ) such that for all ξ = ( α , β ) ∈ E ~ \xi=(\alpha,\beta)\in\widetilde{E} ξ = ( α , β ) ∈ E ,
∣ N + [ α ] △ N + [ β ] ∣ ≥ θ ⋅ max { deg + ( α ) + 1 , deg + ( β ) + 1 } . (2) \left|N^{+}[\alpha]\mathbin{\triangle}N^{+}[\beta]\right|\ge\theta\cdot\max\{\deg^{+}(\alpha)+1,\deg^{+}(\beta)+1\}. \tag*{(2)} N + [ α ] △ N + [ β ] ≥ θ ⋅ max { deg + ( α ) + 1 , deg + ( β ) + 1 } . (2) Then, there is a choice of ChargeSet( ξ ) (\xi) ( ξ ) for all ξ ∈ E ~ \xi\in\widetilde{E} ξ ∈ E such that charge ( z , f ) = O ( θ − 1 ) \operatorname{charge}(z,f)=O(\theta^{-1}) charge ( z , f ) = O ( θ − 1 ) for all vertex-edge pairs ( z , f ) (z,f) ( z , f ) in G G G .
For completeness, if OPT separates the endpoints of ξ \xi ξ , charge ξ \xi ξ itself at one endpoint. Otherwise, for each vertex in the closed-neighborhood symmetric difference, choose an incident edge on one of the two endpoints that OPT misclassifies, and use the resulting vertex-edge pairs as the charge set. The endpoints of ξ \xi ξ are not in this symmetric difference, so these are valid third-vertex witnesses. A fixed pair at z z z receives at most 1 / ( θ deg + ( z ) ) 1/(\theta\deg^{+}(z)) 1/ ( θ deg + ( z )) from each incident positive edge, hence at most O ( θ − 1 ) O(\theta^{-1}) O ( θ − 1 ) in total.
For any fixed K j t o l e r a n t K_{j}^{\mathrm{tolerant}} K j tolerant , let ( u , v ) (u,v) ( u , v ) be a ( + ) (+) ( + ) edge such that v ∈ K j t o l e r a n t v\in K_{j}^{\mathrm{tolerant}} v ∈ K j tolerant and u ∈ N + ( v ) ∖ ( K v ∪ K j t o l e r a n t ) u\in N^{+}(v)\setminus(K_{v}\cup K_{j}^{\mathrm{tolerant}}) u ∈ N + ( v ) ∖ ( K v ∪ K j tolerant ) such that u u u and v v v are not in C ε τ C_{\varepsilon\tau} C ε τ -agreement. By definition, edge ( u , v ) (u,v) ( u , v ) satisfies
∣ N + [ u ] △ N + [ v ] ∣ > C ε τ ⋅ max { deg + ( u ) + 1 , deg + ( v ) + 1 } . \left|N^{+}[u]\mathbin{\triangle}N^{+}[v]\right|>C_{\varepsilon\tau}\cdot\max\{\deg^{+}(u)+1,\deg^{+}(v)+1\}. N + [ u ] △ N + [ v ] > C ε τ ⋅ max { deg + ( u ) + 1 , deg + ( v ) + 1 } .
Hence, we could apply Claim 4.10 to show that
for all vertex-edge pairs ( z , f ) : clique-disagreement-charge ( z , f ) ≤ O ( ε τ − 1 ) . \text{for all vertex-edge pairs }(z,f):\quad\text{clique-disagreement-charge}(z,f)\le O(\varepsilon_{\tau}^{-1}). for all vertex-edge pairs ( z , f ) : clique-disagreement-charge ( z , f ) ≤ O ( ε τ − 1 ) .
The “therefore” part then follows from Lemma 4.2.
The ( − ) (-) ( − ) edges inside the clusters. We now deal with the ( − ) (-) ( − ) edges inside the same clusters. We note that the argument is essentially unchanged from the proof for the same lemma in [8 , 7 ] : at a high level, for this part of the argument, we only use the fact that for each pair of vertices u , v ∈ K t o l e r a n t u,v\in K^{\mathrm{tolerant}} u , v ∈ K tolerant , we have ∣ N [ u ] ∩ N [ v ] ∣ ≥ ( 1 − O ( ε ) ) ⋅ ∣ K t o l e r a n t ∣ \lvert N[u]\cap N[v]\rvert\ge(1-O(\varepsilon))\cdot\lvert K^{\mathrm{tolerant}}\rvert ∣ N [ u ] ∩ N [ v ]∣ ≥ ( 1 − O ( ε )) ⋅ ∣ K tolerant ∣ . This property still holds as long as each vertex v v v has at most ε ⋅ ∣ K t o l e r a n t ∣ \varepsilon\cdot\lvert K^{\mathrm{tolerant}}\rvert ε ⋅ ∣ K tolerant ∣ non-neighbors inside K t o l e r a n t K^{\mathrm{tolerant}} K tolerant . We provide the lemma and the proof in what follows for completeness.
Lemma 4.11. There exists ChargeSet( e ) (e) ( e ) for every ( − ) (-) ( − ) -edge inside any single tolerant cluster such that
for all vertex-edge pairs ( z , f ) : inside-clique-charge ( z , f ) ≤ 1. \text{for all vertex-edge pairs }(z,f):\quad\text{inside-clique-charge}(z,f)\le1. for all vertex-edge pairs ( z , f ) : inside-clique-charge ( z , f ) ≤ 1.
Proof. In a nutshell, the lemma states the simple fact that if a collection of vertices K t o l e r a n t K^{\mathrm{tolerant}} K tolerant only has a few ( − ) (-) ( − ) edges in between, then putting them together will not induce too much extra cost. The lemma is a formalization of the intuition. In this proof, we use ε \varepsilon ε as a short-hand notation as ε τ \varepsilon_\tau ε τ since the context is clear.
Let C 1 ∗ , C 2 ∗ , … , C ℓ ∗ C_1^*, C_2^*, \ldots, C_\ell^* C 1 ∗ , C 2 ∗ , … , C ℓ ∗ be the ℓ \ell ℓ clusters in OPT. For ( − ) (-) ( − ) edges that are split by two clusters of the optimal clustering, we analyze the cases as follows.
If for all j ∈ [ ℓ ] j \in[\ell] j ∈ [ ℓ ] , ∣ C j ∗ ∩ K t o l e r a n t ∣ ≤ ( 1 − 4 ε ) ⋅ ∣ K t o l e r a n t ∣ \left|C_j^* \cap K^{\mathrm{tolerant}}\right| \le(1-4\varepsilon)\cdot\left|K^{\mathrm{tolerant}}\right| C j ∗ ∩ K tolerant ≤ ( 1 − 4 ε ) ⋅ K tolerant . In this case, by the requirement of property i ) i) i ) in Definition 6, every v ∈ K t o l e r a n t v \in K^{\mathrm{tolerant}} v ∈ K tolerant has at most ε ∣ K t o l e r a n t ∣ \varepsilon\left|K^{\mathrm{tolerant}}\right| ε K tolerant non-neighbors from the G + G^+ G + subgraph in K t o l e r a n t K^{\mathrm{tolerant}} K tolerant , i.e., at most ε ∣ K t o l e r a n t ∣ \varepsilon\left|K^{\mathrm{tolerant}}\right| ε K tolerant neighbors in K t o l e r a n t K^{\mathrm{tolerant}} K tolerant that connects to v v v by a ( − ) (-) ( − ) edge. As such, the total number of ( − ) (-) ( − ) edges inside K t o l e r a n t K^{\mathrm{tolerant}} K tolerant is at most
1 2 ⋅ ∑ v ∈ K t o l e r a n t ( number of ( − ) edges from v to K t o l e r a n t ) ≤ ε 2 ⋅ ∣ K t o l e r a n t ∣ 2 \frac{1}{2}\cdot\sum_{v\in K^{\mathrm{tolerant}}}\left(\text{number of }(-)\text{ edges from }v\text{ to }K^{\mathrm{tolerant}}\right)\le\frac{\varepsilon}{2}\cdot\left|K^{\mathrm{tolerant}}\right|^2 2 1 ⋅ v ∈ K tolerant ∑ ( number of ( − ) edges from v to K tolerant ) ≤ 2 ε ⋅ K tolerant 2
On the other hand, we define
ChargeSet ( e ) = { ( x , { x , y } ) ∣ { x , y } ∈ E + , x ∈ C j ∗ ∩ K t o l e r a n t , y ∈ C i ∗ ∩ K t o l e r a n t , i ≠ j } , \operatorname{ChargeSet}(e)=\left\{(x,\{x,y\})\mid\{x,y\}\in E^+,\ x\in C_j^*\cap K^{\mathrm{tolerant}},\ y\in C_i^*\cap K^{\mathrm{tolerant}},\ i\ne j\right\}, ChargeSet ( e ) = { ( x , { x , y }) ∣ { x , y } ∈ E + , x ∈ C j ∗ ∩ K tolerant , y ∈ C i ∗ ∩ K tolerant , i = j } ,
and we show that ∣ ChargeSet ( e ) ∣ ≥ ε 2 ⋅ ∣ K t o l e r a n t ∣ 2 \left|\operatorname{ChargeSet}(e)\right|\ge\frac{\varepsilon}{2}\cdot\left|K^{\mathrm{tolerant}}\right|^2 ∣ ChargeSet ( e ) ∣ ≥ 2 ε ⋅ K tolerant 2 . Note that by the constraints on the number of ( − ) (-) ( − ) edges, for each vertex v ∈ C j ∗ ∩ K t o l e r a n t v\in C_j^*\cap K^{\mathrm{tolerant}} v ∈ C j ∗ ∩ K tolerant , the number of edges that cross the clusters is at least
∣ K t o l e r a n t ∣ − ∣ C j ∗ ∩ K t o l e r a n t ∣ − ε ∣ K t o l e r a n t ∣ ≥ ∣ K t o l e r a n t ∣ − ( 1 − 4 ε ) ∣ K t o l e r a n t ∣ − ε ∣ K t o l e r a n t ∣ = 3 ε ∣ K t o l e r a n t ∣ . \begin{aligned}
\left|K^{\mathrm{tolerant}}\right|-\left|C_j^*\cap K^{\mathrm{tolerant}}\right|-\varepsilon\left|K^{\mathrm{tolerant}}\right|
&\ge\left|K^{\mathrm{tolerant}}\right|-(1-4\varepsilon)\left|K^{\mathrm{tolerant}}\right|-\varepsilon\left|K^{\mathrm{tolerant}}\right|\\
&=3\varepsilon\left|K^{\mathrm{tolerant}}\right|.
\end{aligned} K tolerant − C j ∗ ∩ K tolerant − ε K tolerant ≥ K tolerant − ( 1 − 4 ε ) K tolerant − ε K tolerant = 3 ε K tolerant .
There are ∣ K t o l e r a n t ∣ \left|K^{\mathrm{tolerant}}\right| K tolerant vertices in K t o l e r a n t K^{\mathrm{tolerant}} K tolerant ; as such, we conclude that in this case, there is
∣ ChargeSet ( e ) ∣ ≥ 3 ε ⋅ ∣ K t o l e r a n t ∣ 2 . \left|\operatorname{ChargeSet}(e)\right|\ge3\varepsilon\cdot\left|K^{\mathrm{tolerant}}\right|^2. ∣ ChargeSet ( e ) ∣ ≥ 3 ε ⋅ K tolerant 2 .
Therefore, by our charging scheme, the number of charges we can write on any vertex-edge pair is at most 1, as desired.
If there exists a j ∈ [ ℓ ] j\in[\ell] j ∈ [ ℓ ] such that ∣ C j ∗ ∩ K t o l e r a n t ∣ > ( 1 − 4 ε ) ⋅ ∣ K t o l e r a n t ∣ \left|C_j^*\cap K^{\mathrm{tolerant}}\right|>(1-4\varepsilon)\cdot\left|K^{\mathrm{tolerant}}\right| C j ∗ ∩ K tolerant > ( 1 − 4 ε ) ⋅ K tolerant . In this case, we analyze the ( − ) (-) ( − ) edges on each vertex v v v that are split by the optimal clustering. Assign each such edge to one endpoint v v v outside C j ∗ C_j^* C j ∗ . Note that by the guarantee in Definition 6, there are at most ε ∣ K t o l e r a n t ∣ \varepsilon\left|K^{\mathrm{tolerant}}\right| ε K tolerant such ( − ) (-) ( − ) edges for each vertex v v v . We define the ChargeSet ( e ) \operatorname{ChargeSet}(e) ChargeSet ( e ) as
ChargeSet ( e ) = { ( v , { v , x } ) ∣ { v , x } ∈ E + , x ∈ C j ∗ ∩ K t o l e r a n t } \operatorname{ChargeSet}(e)=\left\{(v,\{v,x\})\mid\{v,x\}\in E^+,\ x\in C_j^*\cap K^{\mathrm{tolerant}}\right\} ChargeSet ( e ) = { ( v , { v , x }) ∣ { v , x } ∈ E + , x ∈ C j ∗ ∩ K tolerant }
for all separated ( − ) (-) ( − ) edges e e e assigned to v v v .
We claim that the size of ChargeSet ( e ) \operatorname{ChargeSet}(e) ChargeSet ( e ) is at least ε ∣ K t o l e r a n t ∣ \varepsilon\left|K^{\mathrm{tolerant}}\right| ε K tolerant . To see this, note that the number of ( + ) (+) ( + ) edges that connect v v v and C j ∗ ∩ K t o l e r a n t C_j^*\cap K^{\mathrm{tolerant}} C j ∗ ∩ K tolerant is at least
( total number of edges ) − ( number of ( − ) edge in K t o l e r a n t ) ≥ ( 1 − 4 ε ) ∣ K t o l e r a n t ∣ − ε ∣ K t o l e r a n t ∣ (by the properties prescribed in Definition 6) = ( 1 − 5 ε ) ∣ K t o l e r a n t ∣ ≥ ε ∣ K t o l e r a n t ∣ , \begin{aligned}
&(\text{total number of edges})-(\text{number of }(-)\text{ edge in }K^{\mathrm{tolerant}})\\
&\ge(1-4\varepsilon)\left|K^{\mathrm{tolerant}}\right|-\varepsilon\left|K^{\mathrm{tolerant}}\right| \qquad\text{(by the properties prescribed in Definition 6)}\\
&=(1-5\varepsilon)\left|K^{\mathrm{tolerant}}\right|\\
&\ge\varepsilon\left|K^{\mathrm{tolerant}}\right|,
\end{aligned} ( total number of edges ) − ( number of ( − ) edge in K tolerant ) ≥ ( 1 − 4 ε ) K tolerant − ε K tolerant (by the properties prescribed in Definition 6) = ( 1 − 5 ε ) K tolerant ≥ ε K tolerant ,
where the last inequality holds true for any ε ≤ 1 / 50 \varepsilon\le1/50 ε ≤ 1/50 . Therefore, the charge written on any pair in ChargeSet ( e ) \operatorname{ChargeSet}(e) ChargeSet ( e ) is at most 1. Furthermore, note that the definition of ChargeSet ( e ) \operatorname{ChargeSet}(e) ChargeSet ( e ) is disjoint for different assigned vertices v ∈ K t o l e r a n t v \in K^{\mathrm{tolerant}} v ∈ K tolerant , which concludes the proof of the case.
Finally, note that if the optimal clustering does not split the ( − ) (-) ( − ) edge, we can simply write a charge of 1 on the pair consisting of the edge itself and one endpoint, which also gives us the desired statement as in Lemma 4.11 . These negative-edge pairs are disjoint from the positive-edge pairs above, and different tolerant clusters use disjoint internal edges.
Combining Lemmas 4.7 to 4.9 and Lemma 4.11 leads to the following lemma for the approximation guarantees for the tolerant clusters.
Lemma 4.12. Given the positive subgraph G + = ( V , E + ) G^{+}=(V,E^{+}) G + = ( V , E + ) of a correlation clustering instance, and let S D D G , ε p a r t i a l = { V ~ s i n g l e t o n , ⋃ j K j t o l e r a n t , ⋃ j K j i s o l a t e } SDD_{G,\varepsilon}^{\mathrm{partial}}=\{\widetilde{V}_{\mathrm{singleton}},\bigcup_j K_j^{\mathrm{tolerant}},\bigcup_j K_j^{\mathrm{isolate}}\} S D D G , ε partial = { V singleton , ⋃ j K j tolerant , ⋃ j K j isolate } be a partially correct tolerate ( ε s , ε τ , ε l ) (\varepsilon_s,\varepsilon_\tau,\varepsilon_l) ( ε s , ε τ , ε l ) -sparse-dense decomposition on the positive subgraph G + G^{+} G + . Let cost ( A L G , ⋃ j K j t o l e r a n t ) \operatorname{cost}(\mathrm{ALG},\bigcup_j K_j^{\mathrm{tolerant}}) cost ( ALG , ⋃ j K j tolerant ) be the cost induced by the ( + ) (+) ( + ) edges on going out of the vertices for all ⋃ j K j t o l e r a n t \bigcup_j K_j^{\mathrm{tolerant}} ⋃ j K j tolerant and the ( − ) (-) ( − ) edges inside the ⋃ j K j t o l e r a n t \bigcup_j K_j^{\mathrm{tolerant}} ⋃ j K j tolerant clusters. We have
cost ( A L G , ⋃ j K j t o l e r a n t ) ≤ O ( 1 ε τ 2 + 1 ε s 2 ε τ ) ⋅ O P T . \operatorname{cost}\left(\mathrm{ALG},\bigcup_j K_j^{\mathrm{tolerant}}\right) \le O\left(\frac{1}{\varepsilon_\tau^2}+\frac{1}{\varepsilon_s^2\varepsilon_\tau}\right)\cdot\mathrm{OPT}. cost ( ALG , j ⋃ K j tolerant ) ≤ O ( ε τ 2 1 + ε s 2 ε τ 1 ) ⋅ OPT .
The cost induced by isolated clusters
We now provide an analysis of the cost of the isolated clusters as follows.
Lemma 4.13. Given the positive subgraph G + = ( V , E + ) G^{+}=(V,E^{+}) G + = ( V , E + ) of a correlation clustering instance, and let S D D G , ε p a r t i a l = { V ~ s i n g l e t o n , ⋃ j K j t o l e r a n t , ⋃ j K j i s o l a t e } SDD_{G,\varepsilon}^{\mathrm{partial}}=\{\widetilde{V}_{\mathrm{singleton}},\bigcup_j K_j^{\mathrm{tolerant}},\bigcup_j K_j^{\mathrm{isolate}}\} S D D G , ε partial = { V singleton , ⋃ j K j tolerant , ⋃ j K j isolate } be a partially correct tolerate ( ε s , ε τ , ε l ) (\varepsilon_s,\varepsilon_\tau,\varepsilon_l) ( ε s , ε τ , ε l ) -sparse-dense decomposition on the positive subgraph G + G^{+} G + . Let cost ( A L G , ⋃ j K j i s o l a t e ) \operatorname{cost}(\mathrm{ALG},\bigcup_j K_j^{\mathrm{isolate}}) cost ( ALG , ⋃ j K j isolate ) be the cost induced by the ( + ) (+) ( + ) edges on going out of the vertices for all ⋃ j K j i s o l a t e \bigcup_j K_j^{\mathrm{isolate}} ⋃ j K j isolate and the ( − ) (-) ( − ) edges inside the ⋃ j K j i s o l a t e \bigcup_j K_j^{\mathrm{isolate}} ⋃ j K j isolate clusters. We have
cost ( A L G , ⋃ j K j i s o l a t e ) ≤ O ( 1 ε l 3 + 1 ε l 2 ⋅ ε s 2 ) ⋅ O P T . \operatorname{cost}\left(\mathrm{ALG},\bigcup_j K_j^{\mathrm{isolate}}\right) \le O\left(\frac{1}{\varepsilon_l^3}+\frac{1}{\varepsilon_l^2\cdot\varepsilon_s^2}\right)\cdot\mathrm{OPT}. cost ( ALG , j ⋃ K j isolate ) ≤ O ( ε l 3 1 + ε l 2 ⋅ ε s 2 1 ) ⋅ OPT . Proof. Fix an isolated cluster K j i s o l a t e K_j^{\mathrm{isolate}} K j isolate , by definition, for each v ∈ K j i s o l a t e v \in K_j^{\mathrm{isolate}} v ∈ K j isolate , recall that at least one of the following cases will happen:
Or Case B). at least ε l \varepsilon_l ε l of ∣ K v ∖ K j i s o l a t e ∣ \left|K_v \setminus K_j^{\mathrm{isolate}}\right| K v ∖ K j isolate is in V ~ s i n g l e t o n \widetilde{V}_{\mathrm{singleton}} V singleton , and ∣ K v ∖ K j i s o l a t e ∣ ≥ ε l ⋅ ∣ K j i s o l a t e ∣ \left|K_v \setminus K_j^{\mathrm{isolate}}\right| \ge\varepsilon_l \cdot\left|K_j^{\mathrm{isolate}}\right| K v ∖ K j isolate ≥ ε l ⋅ K j isolate .
Define K j i s o l a t e ( s p a r s e ) K_j^{\mathrm{isolate}}(\mathrm{sparse}) K j isolate ( sparse ) as the vertices satisfying Case A), and K j i s o l a t e ( d i s a g r e e ) K_j^{\mathrm{isolate}}(\mathrm{disagree}) K j isolate ( disagree ) as the remaining vertices in K j i s o l a t e K_j^{\mathrm{isolate}} K j isolate , which satisfy Case B).
Costs induced by the ( + ) (+) ( + ) edges incident on ⋃ j K j i s o l a t e \bigcup_j K_j^{\mathrm{isolate}} ⋃ j K j isolate . Let E + ( K j i s o l a t e ( s p a r s e ) ) E^{+}(K_j^{\mathrm{isolate}}(\mathrm{sparse})) E + ( K j isolate ( sparse )) be the set of positive edges with at least one endpoint in K j i s o l a t e ( s p a r s e ) K_j^{\mathrm{isolate}}(\mathrm{sparse}) K j isolate ( sparse ) , and let cost ( E + ( K j i s o l a t e ( s p a r s e ) ) ) \operatorname{cost}\left(E^{+}(K_j^{\mathrm{isolate}}(\mathrm{sparse}))\right) cost ( E + ( K j isolate ( sparse )) ) be the induced cost using the clustering in Theorem 2. By Lemma 4.3 , we know that the cost induced by the total number of ( + ) (+) ( + ) edges in ⋃ j E + ( K j i s o l a t e ( s p a r s e ) ) \bigcup_j E^{+}(K_j^{\mathrm{isolate}}(\mathrm{sparse})) ⋃ j E + ( K j isolate ( sparse )) induces at most O ( 1 / ε l 2 ) ⋅ O P T O(1/\varepsilon_l^2)\cdot\mathrm{OPT} O ( 1/ ε l 2 ) ⋅ OPT , i.e.,
cost ( ⋃ j E + ( K j i s o l a t e ( s p a r s e ) ) ) ≤ ∣ ⋃ j E + ( K j i s o l a t e ( s p a r s e ) ) ∣ ≤ O ( 1 ε l 2 ) ⋅ O P T . \operatorname{cost}\left(\bigcup_j E^{+}(K_j^{\mathrm{isolate}}(\mathrm{sparse}))\right) \le\left|\bigcup_j E^{+}(K_j^{\mathrm{isolate}}(\mathrm{sparse}))\right| \le O\left(\frac{1}{\varepsilon_l^2}\right)\cdot\mathrm{OPT}. cost ( j ⋃ E + ( K j isolate ( sparse )) ) ≤ j ⋃ E + ( K j isolate ( sparse )) ≤ O ( ε l 2 1 ) ⋅ OPT .
This is an upper bound for the cost of the ( + ) (+) ( + ) edges going out of E + ( K j i s o l a t e ( s p a r s e ) ) E^{+}(K_j^{\mathrm{isolate}}(\mathrm{sparse})) E + ( K j isolate ( sparse )) . For the edges going out of K j i s o l a t e ( d i s a g r e e ) K_j^{\mathrm{isolate}}(\mathrm{disagree}) K j isolate ( disagree ) , we can similarly define E + ( K j i s o l a t e ( d i s a g r e e ) ) E^{+}(K_j^{\mathrm{isolate}}(\mathrm{disagree})) E + ( K j isolate ( disagree )) as the set of ( + ) (+) ( + ) edges with one endpoint in K j i s o l a t e ( d i s a g r e e ) K_j^{\mathrm{isolate}}(\mathrm{disagree}) K j isolate ( disagree ) and the other outside K j i s o l a t e K_j^{\mathrm{isolate}} K j isolate and the induced cost cost ( E + ( K j i s o l a t e ( d i s a g r e e ) ) ) \operatorname{cost}\left(E^{+}(K_j^{\mathrm{isolate}}(\mathrm{disagree}))\right) cost ( E + ( K j isolate ( disagree )) ) . We note that case B) has the same exterior-fraction requirement as the tolerant vertices. Therefore, by Lemma 4.8 and Lemma 4.9, the ( + ) (+) ( + ) edges going out of K j i s o l a t e ( d i s a g r e e ) K_j^{\mathrm{isolate}}(\mathrm{disagree}) K j isolate ( disagree ) account for at most O ( 1 / ε l + 1 / ( ε s 2 ε l ) ) ⋅ O P T O(1/\varepsilon_l+1/(\varepsilon_s^2\varepsilon_l))\cdot\mathrm{OPT} O ( 1/ ε l + 1/ ( ε s 2 ε l )) ⋅ OPT cost, i.e.,
cost ( ⋃ j E + ( K j i s o l a t e ( d i s a g r e e ) ) ) ≤ ∣ ⋃ j E + ( K j i s o l a t e ( d i s a g r e e ) ) ∣ ≤ O ( 1 ε l + 1 ε s 2 ⋅ 1 ε l ) ⋅ O P T . \operatorname{cost}\left(\bigcup_j E^{+}(K_j^{\mathrm{isolate}}(\mathrm{disagree}))\right)\leq\left|\bigcup_j E^{+}(K_j^{\mathrm{isolate}}(\mathrm{disagree}))\right|\leq O\left(\frac{1}{\varepsilon_l}+\frac{1}{\varepsilon_s^2}\cdot\frac{1}{\varepsilon_l}\right)\cdot\mathrm{OPT}. cost ( j ⋃ E + ( K j isolate ( disagree )) ) ≤ j ⋃ E + ( K j isolate ( disagree )) ≤ O ( ε l 1 + ε s 2 1 ⋅ ε l 1 ) ⋅ OPT .
A more concrete analysis can be done by writing the charges as we did in Lemma 4.8 and Lemma 4.9 using parameter ε l \varepsilon_l ε l (as opposed to ε T \varepsilon_T ε T ), and we omit the calculations to avoid repetition. Therefore, the cost induced by ( + ) (+) ( + ) edges going out of clusters can be bounded by
cost ( ⋃ j E + ( K j i s o l a t e ) ) ≤ cost ( ⋃ j E + ( K j i s o l a t e ( s p a r s e ) ) ) + cost ( ⋃ j E + ( K j i s o l a t e ( d i s a g r e e ) ) ) = O ( 1 ε l 2 + 1 ε s 2 ⋅ 1 ε l ) ⋅ O P T . \begin{aligned}
\operatorname{cost}\left(\bigcup_j E^{+}(K_j^{\mathrm{isolate}})\right)\leq\operatorname{cost}\left(\bigcup_j E^{+}(K_j^{\mathrm{isolate}}(\mathrm{sparse}))\right)+\operatorname{cost}\left(\bigcup_j E^{+}(K_j^{\mathrm{isolate}}(\mathrm{disagree}))\right) \\
&=O\left(\frac{1}{\varepsilon_l^2}+\frac{1}{\varepsilon_s^2}\cdot\frac{1}{\varepsilon_l}\right)\cdot\mathrm{OPT}.
\end{aligned} cost ( j ⋃ E + ( K j isolate ) ) ≤ cost ( j ⋃ E + ( K j isolate ( sparse )) ) + cost ( j ⋃ E + ( K j isolate ( disagree )) ) = O ( ε l 2 1 + ε s 2 1 ⋅ ε l 1 ) ⋅ OPT .
Costs induced by the ( − ) (-) ( − ) edges incident on ⋃ j K j i s o l a t e \bigcup_j K_j^{\mathrm{isolate}} ⋃ j K j isolate . We define a set of “charging edge” E K j i s o l a t e , v c h a r g e E_{K_j^{\mathrm{isolate}},v}^{\mathrm{charge}} E K j isolate , v charge , for each K j i s o l a t e ( s p a r s e ) K_j^{\mathrm{isolate}}(\mathrm{sparse}) K j isolate ( sparse ) and K j i s o l a t e ( d i s a g r e e ) K_j^{\mathrm{isolate}}(\mathrm{disagree}) K j isolate ( disagree ) as follows.
For each v ∈ K j i s o l a t e ( s p a r s e ) v\in K_j^{\mathrm{isolate}}(\mathrm{sparse}) v ∈ K j isolate ( sparse ) , E K j i s o l a t e , v c h a r g e E_{K_j^{\mathrm{isolate}},v}^{\mathrm{charge}} E K j isolate , v charge is the edges ( u , v ) (u,v) ( u , v ) for u ∈ N + ( v ) u\in N^{+}(v) u ∈ N + ( v ) ;
For each v ∈ K j i s o l a t e ( d i s a g r e e ) v\in K_j^{\mathrm{isolate}}(\mathrm{disagree}) v ∈ K j isolate ( disagree ) , E K j i s o l a t e , v c h a r g e E_{K_j^{\mathrm{isolate}},v}^{\mathrm{charge}} E K j isolate , v charge is the edges ( u , v ) (u,v) ( u , v ) for u ∈ N + ( v ) ∖ K j i s o l a t e u\in N^{+}(v)\setminus K_j^{\mathrm{isolate}} u ∈ N + ( v ) ∖ K j isolate .
We use E j , v c h a r g e E_{j,v}^{\mathrm{charge}} E j , v charge as a short-handed notation. By our calculations for the cases for the ( + ) (+) ( + ) edge going out of the clusters, we have
∣ ⋃ j , v E j , v c h a r g e ∣ ≤ O ( 1 ε l 2 + 1 ε s 2 ⋅ 1 ε l ) ⋅ O P T . \left|\bigcup_{j,v}E_{j,v}^{\mathrm{charge}}\right|\leq O\left(\frac{1}{\varepsilon_l^2}+\frac{1}{\varepsilon_s^2}\cdot\frac{1}{\varepsilon_l}\right)\cdot\mathrm{OPT}. j , v ⋃ E j , v charge ≤ O ( ε l 2 1 + ε s 2 1 ⋅ ε l 1 ) ⋅ OPT .
For the costs induced by the ( − ) (-) ( − ) edges, let E − ( ⋃ j K j i s o l a t e ) E^{-}(\bigcup_j K_j^{\mathrm{isolate}}) E − ( ⋃ j K j isolate ) be set of ( − ) (-) ( − ) edges with both endpoints in the same K j i s o l a t e K_j^{\mathrm{isolate}} K j isolate , we have
∣ E − ( ⋃ j K j i s o l a t e ) ∣ ≤ ∑ j ∣ K j i s o l a t e ∣ 2 . \left|E^{-}\left(\bigcup_j K_j^{\mathrm{isolate}}\right)\right|\leq\sum_j\left|K_j^{\mathrm{isolate}}\right|^2. E − ( j ⋃ K j isolate ) ≤ j ∑ K j isolate 2 .
We prove that ∑ j ∣ K j i s o l a t e ∣ 2 ≤ O ( 1 / ε l ) ⋅ ∣ ⋃ j , v E j , v c h a r g e ∣ \sum_j\left|K_j^{\mathrm{isolate}}\right|^2\leq O(1/\varepsilon_l)\cdot\left|\bigcup_{j,v}E_{j,v}^{\mathrm{charge}}\right| ∑ j K j isolate 2 ≤ O ( 1/ ε l ) ⋅ ⋃ j , v E j , v charge . To see this, note that for any vertex v ∈ K j i s o l a t e ( s p a r s e ) v\in K_j^{\mathrm{isolate}}(\mathrm{sparse}) v ∈ K j isolate ( sparse ) , since we have ∣ E j , v c h a r g e ∣ = deg + ( v ) ≥ ∣ K j i s o l a t e ∣ / 2 \left|E_{j,v}^{\mathrm{charge}}\right|=\deg^{+}(v)\geq\left|K_j^{\mathrm{isolate}}\right|/2 E j , v charge = deg + ( v ) ≥ K j isolate /2 . On the other hand, for v ∈ K j i s o l a t e ( d i s a g r e e ) v\in K_j^{\mathrm{isolate}}(\mathrm{disagree}) v ∈ K j isolate ( disagree ) , we have ∣ E j , v c h a r g e ∣ ≥ ∣ K v ∖ K j i s o l a t e ∣ ≥ ε l ⋅ ∣ K j i s o l a t e ∣ \left|E_{j,v}^{\mathrm{charge}}\right|\geq\left|K_v\setminus K_j^{\mathrm{isolate}}\right|\geq\varepsilon_l\cdot\left|K_j^{\mathrm{isolate}}\right| E j , v charge ≥ K v ∖ K j isolate ≥ ε l ⋅ K j isolate . Therefore, we have
2 ∣ ⋃ j , v E j , v c h a r g e ∣ ≥ ∑ j ∑ v ∈ K j i s o l a t e ∣ E j , v c h a r g e ∣ (an edge has at most two endpoints) ≥ ε l ⋅ ∑ j ∑ v ∈ K j i s o l a t e ∣ K j i s o l a t e ∣ = ε l ⋅ ∑ j ∣ K j i s o l a t e ∣ 2 . \begin{aligned}
2\left|\bigcup_{j,v}E_{j,v}^{\mathrm{charge}}\right|\geq\sum_j\sum_{v\in K_j^{\mathrm{isolate}}}\left|E_{j,v}^{\mathrm{charge}}\right|
\qquad\text{(an edge has at most two endpoints)} \\
&\geq\varepsilon_l\cdot\sum_j\sum_{v\in K_j^{\mathrm{isolate}}}\left|K_j^{\mathrm{isolate}}\right| \\
&=\varepsilon_l\cdot\sum_j\left|K_j^{\mathrm{isolate}}\right|^2.
\end{aligned} 2 j , v ⋃ E j , v charge ≥ j ∑ v ∈ K j isolate ∑ E j , v charge (an edge has at most two endpoints) ≥ ε l ⋅ j ∑ v ∈ K j isolate ∑ K j isolate = ε l ⋅ j ∑ K j isolate 2 .
Therefore, we have
∣ E − ( ⋃ j K j i s o l a t e ) ∣ ≤ O ( 1 / ε l ) ⋅ ∣ ⋃ j , v E j , v c h a r g e ∣ ≤ O ( 1 ε l 3 + 1 ε s 2 ⋅ 1 ε l 2 ) ⋅ O P T , \left|E-\left(\bigcup_j K_j^{\mathrm{isolate}}\right)\right| \le O(1/\varepsilon_l)\cdot\left|\bigcup_{j,v}E_{j,v}^{\mathrm{charge}}\right| \le O\left(\frac{1}{\varepsilon_l^3}+\frac{1}{\varepsilon_s^2}\cdot\frac{1}{\varepsilon_l^2}\right)\cdot\mathrm{OPT}, E − ( j ⋃ K j isolate ) ≤ O ( 1/ ε l ) ⋅ j , v ⋃ E j , v charge ≤ O ( ε l 3 1 + ε s 2 1 ⋅ ε l 2 1 ) ⋅ OPT ,
as desired. □
Finalizing the proof of Theorem 2. Combining Lemmas 4.6 , 4.12 and 4.13 leads to the approximation guarantees of O ( 1 / poly ( ε s , ε τ , ε l ) ) O(1/\operatorname{poly}(\varepsilon_s,\varepsilon_\tau,\varepsilon_l)) O ( 1/ poly ( ε s , ε τ , ε l )) -approximation using the clustering of Theorem 2. Picking ε s , ε τ , ε l \varepsilon_s,\varepsilon_\tau,\varepsilon_l ε s , ε τ , ε l as sufficiently small constants leads to the desired O ( 1 ) O(1) O ( 1 ) -approximation.
The Algorithm
We present our main algorithm for dynamic correlation clustering in this section. The overall goal is to maintain a partially-correct tolerant SDD as defined in Definition 6. At a very high level, our idea is a generalization of the decomposition-based algorithm in [30 , 14 ] that maintains (various versions of) agreement decomposition. The key differences are: i ) i) i ) . using our relaxed definition of decomposition in § 4 , we are able to make clique refreshment less frequently , which results in better efficiency; and i i ) ii) ii ) . we handle the formation of almost-cliques induced by vertex deletions using a set of entirely novel ideas.
The main algorithm
We present our main algorithm as in Algorithm 1 to Algorithm 7.
Maintaining clusters. To begin with, Algorithm 1 handles vertex updates and maintains the clusters formed by the algorithm. In summary, for each insertion of vertex v v v , it conducts a test to decide whether v v v should join an existing cluster, form a new cluster, or join in V ~ s i n g l e t o n \widetilde{V}_{\mathrm{singleton}} V singleton ; and for each deletion of vertex v v v , it removes v v v from the current cluster or V ~ s i n g l e t o n \widetilde{V}_{\mathrm{singleton}} V singleton list and notifies all cluster that v v v has ever joined. In particular, we apply Lemma 3.1 to test whether v v v is ε / 20 \varepsilon/20 ε /20 -sparse, and if it returns yes, we directly add it to the V ~ s i n g l e t o n \widetilde{V}_{\mathrm{singleton}} V singleton data structure (in the following, ε \varepsilon ε -sparsity test returns yes means Lemma 3.1 reports that the vertex is ε \varepsilon ε -sparse). Otherwise, we first check if there is a cluster with a β ε \beta\varepsilon β ε -dense core (β = 4 \beta=4 β = 4 ) that v v v can merge to, as defined below:
Definition 7 (Dense core). For a graph G = ( V , E ) G=(V,E) G = ( V , E ) , let S ⊆ V S\subseteq V S ⊆ V be a set of vertices. We say that S S S is an ε \varepsilon ε -dense core if it is an ε \varepsilon ε -almost-cliques (see Definition 3). A cluster K K K contains an ε \varepsilon ε -dense core if there exists K ′ ⊆ K K'\subseteq K K ′ ⊆ K such that K ′ K' K ′ is an ε \varepsilon ε -dense core with ∣ K ′ ∣ ≥ ( 1 − O ( ε ) ) ⋅ ∣ K ∣ |K'|\ge(1-O(\varepsilon))\cdot|K| ∣ K ′ ∣ ≥ ( 1 − O ( ε )) ⋅ ∣ K ∣ .
If the test returns no but v v v cannot join any existing cluster, we call Algorithm 2 to form a new ε \varepsilon ε -almost-clique according to Definition 3 that includes all vertices that are in ε / 5 \varepsilon/5 ε /5 -agreement with v v v . Here, this new cluster may take vertices from other existing clusters. We always form a cluster according to the classical SDD definition; however, later on we maintain them according to our partially correct tolerant definition. Note that the constant threshold (β ε \beta\varepsilon β ε ) for a vertex to join an existing cluster is slightly looser than that (ε \varepsilon ε ) for forming a new cluster, i.e., β > 1 \beta>1 β > 1 . This is to prevent edge cases where we are forced to form a new ε \varepsilon ε -almost-clique upon each new insertion, which is prohibitive in time.
To avoid correctness issues due to vertex deletion, we perform a notification procedure (called “identification”) mentioned in § 2 for each newly formed cluster. The cluster discovers all vertices that connect to at least α \alpha α -fraction of its vertices (later we set α = 1 / 2 \alpha=1/2 α = 1/2 ), and adds them to V ~ s i n g l e t o n \widetilde{V}_{\mathrm{singleton}} V singleton . This step is necessary in the following scenario:
Cluster K K K is formed and then blocked by some blocking set.
Cluster K ′ K' K ′ is formed and is densely connected to K K K . However, K K K cannot join K ′ K' K ′ since the vertices in K K K are still sparse due to the blocking set.
The blocking set is deleted, making K K K dense with K ′ K' K ′ .
Since the size of K K K might be negligible compared to the scale of the blocking set, there is no efficient way of notification from the perspective of the blocking set, as mentioned in § 2 . Therefore, we need to inform K K K when K ′ K' K ′ is formed by our identification step, so K K K is moved to V ~ s i n g l e t o n \widetilde{V}_{\mathrm{singleton}} V singleton and captured by other algorithmic steps. Note that we only need to remove a vertex if ∣ K ′ ∣ ≥ 1 2 ∣ K ∣ |K'| \ge\frac{1}{2}|K| ∣ K ′ ∣ ≥ 2 1 ∣ K ∣ , i.e., we do not want to remove a vertex from a massive cluster if it is identified by a O ( 1 ) O(1) O ( 1 ) -size cluster, as doing this would create massive false-negative edges whose costs cannot be charged.
Finally, for each cluster K K K formed by the algorithm, we keep two counters inc ( K ) \operatorname{inc}(K) inc ( K ) and del ( K ) \operatorname{del}(K) del ( K ) to track the additions and removals in a cluster due to vertex insertions and deletions. Whenever these counters reach ε ⋅ c ( K ) \varepsilon\cdot c(K) ε ⋅ c ( K ) , where c ( K ) c(K) c ( K ) is the size of K K K when it is formed, we call Algorithm 3 to refresh the cluster, keeping dense vertices, removing sparse vertices, and detecting vertices that is dense with other group of vertices. To clarify, we use the words insertion and deletion to denote a data stream operation on the graph; and we use the words addition and removal to denote an algorithmic operation with respect to a cluster. Here, inc ( K ) \operatorname{inc}(K) inc ( K ) tracks the number of distinct vertices added to K K K that are inserted to the graph after K K K is formed. This allows us to charge the time easily to those data stream operations while still giving a correct cluster, since we can upper bound the number of added vertices that are inserted to the graph before K K K is formed by O ( ε ) ⋅ c ( K ) O(\varepsilon) \cdot c(K) O ( ε ) ⋅ c ( K ) . In addition, del ( K ) \operatorname{del}(K) del ( K ) tracks the number of vertices deleted from the graph that has ever joined K K K . This step is essential for the correctness of our isolated clusters. For these clusters, a large portion of its (previously) dense vertices are removed but we still keep the cluster since the cost is comparable to that of keeping all the remaining vertices as singleton points. However, when the dense vertices outside K K K are deleted, there are less edges between inside and outside of K K K , so at some point we cannot charge the cost and must dismantle K K K . We cannot track these updates if we only track the deletion of vertices inside K K K . To this end, Algorithm 1 ensures that the clusters maintained by our algorithm satisfy Definition 6. We still need a sub-routine to handle the correctness of V ~ s i n g l e t o n \widetilde{V}_{\mathrm{singleton}} V singleton , which is deferred to Algorithm 4.
Algorithm 1. An algorithm that maintains an O ( 1 ) O(1) O ( 1 ) -approximation for correlation clustering anytime.
Input: A graph G = ( V , E ) G=(V,E) G = ( V , E ) with one vertex update per time.
Initialization for each cluster K K K , we maintain the following counters: (a) c ( K ) c(K) c ( K ) : number of vertices inside K K K when K K K is formed (b) inc ( K ) \operatorname{inc}(K) inc ( K ) : number of distinct vertices added to K K K that are inserted to the graph after K K K is formed (c) del ( K ) \operatorname{del}(K) del ( K ) : number of vertices deleted from the graph that ever join K K K
Updates for each t ∈ [ T ] t \in[T] t ∈ [ T ] : (a) If v v v is an insertion :
i. Do sparsity test on v v v (see Lemma 3.1) and check whether v v v is ε / 20 \varepsilon/20 ε /20 -sparse.
ii. If the test returns yes, add it to V ~ s i n g l e t o n \widetilde{V}_{\mathrm{singleton}} V singleton . Otherwise, do the following: A. Run the algorithm in Lemma 3.2 and check whether v v v could be merged to an existing cluster K ′ K' K ′ with a β ε \beta\varepsilon β ε -dense core. If there is such K ′ K' K ′ , add v v v to K ′ K' K ′ and increase inc ( K ′ ) \operatorname{inc}(K') inc ( K ′ ) by 1. B. Otherwise, form a new ε \varepsilon ε -almost-clique K K K by Algorithm 2.
(b) If v v v is a deletion: i. If v ∈ V ~ s i n g l e t o n ( t ) v \in\widetilde{V}^{(t)}_{\mathrm{singleton}} v ∈ V singleton ( t ) , delete v v v from V ~ s i n g l e t o n \widetilde{V}_{\mathrm{singleton}} V singleton and V ~ l i s t , ( i ) ( t ) \widetilde{V}^{(t)}_{\mathrm{list},(i)} V list , ( i ) ( t ) for every i i i . ii. If v v v is in an cluster K K K , remove v v v from K K K . iii. Let K 1 , … , K L K_1,\ldots,K_L K 1 , … , K L be the clusters maintained at t t t that v v v was in and increase del ( K ) \operatorname{del}(K) del ( K ) by 1 (see the detailed implementation in Lemma 8.1 ).
(c) Maintaining clusters: i. Addition-triggered refreshment: For every cluster K K K , if at any point we have inc ( K ) ≥ ε ⋅ c ( K ) \operatorname{inc}(K) \ge\varepsilon\cdot c(K) inc ( K ) ≥ ε ⋅ c ( K ) , run Algorithm 3 to refresh the cluster. ii. Removal-triggered refreshment: For every cluster K K K , if at any point we have del ( K ) ≥ ε ⋅ c ( K ) \operatorname{del}(K) \ge\varepsilon\cdot c(K) del ( K ) ≥ ε ⋅ c ( K ) , run Algorithm 3 to refresh the cluster.
(d) Handling deletion-induced clique forming: Run Algorithm 4 with ζ = ε 500 \zeta= \frac{\varepsilon}{500} ζ = 500 ε .
Algorithm 2. An algorithm that forms a new cluster.
Input: graph G = ( V , E ) G=(V,E) G = ( V , E ) updated by arbitrary insertions and deletions, a vertex v v v .
(1) Run the algorithm in Lemma 3.2 to form an ε / 2 \varepsilon/2 ε /2 -almost-clique K K K according to Definition 3.
(2) Identification: Run the algorithm of Lemma 3.3 with δ = α \delta=\alpha δ = α and γ = α / 2 \gamma=\alpha/2 γ = α /2 to identify a set S ⊂ N ( K ) ∖ K S \subset N(K)\setminus K S ⊂ N ( K ) ∖ K of vertices, which includes all vertices u u u satisfying ∣ N ( u ) ∩ K ∣ ≥ α ⋅ ∣ K ∣ |N(u)\cap K| \ge\alpha\cdot|K| ∣ N ( u ) ∩ K ∣ ≥ α ⋅ ∣ K ∣ . For each u ∈ S u \in S u ∈ S :
If u u u is in no cluster and not in V ~ s i n g l e t o n \widetilde{V}_{\mathrm{singleton}} V singleton (e.g., it was removed by Algorithm 7), add u u u to V ~ s i n g l e t o n \widetilde{V}_{\mathrm{singleton}} V singleton and V ~ l i s t , ( i ) \widetilde{V}_{\mathrm{list},(i)} V list , ( i ) for every i i i . If u u u is in V ~ s i n g l e t o n \widetilde{V}_{\mathrm{singleton}} V singleton , add u u u to V ~ l i s t , ( i ) \widetilde{V}_{\mathrm{list},(i)} V list , ( i ) for every $i.
If u u u is in some cluster K ′ K' K ′ and ∣ K ∣ ≥ 1 2 c ( K ′ ) |K| \ge\frac{1}{2}c(K') ∣ K ∣ ≥ 2 1 c ( K ′ ) , i.e., c ( K ′ ) c(K') c ( K ′ ) is the size of K ′ K' K ′ when it is formed, remove u u u from K ′ K' K ′ and add u u u to V ~ s i n g l e t o n \widetilde{V}_{\mathrm{singleton}} V singleton and V ~ l i s t , ( i ) \widetilde{V}_{\mathrm{list},(i)} V list , ( i ) for every i i i .
(3) Initiate the counters for K K K : c ( K ) = ∣ K ∣ c(K)=|K| c ( K ) = ∣ K ∣ , inc ( K ) = del ( K ) = 0 \operatorname{inc}(K)=\operatorname{del}(K)=0 inc ( K ) = del ( K ) = 0 .
Algorithm 3. An algorithm that refreshes an cluster.
Input: graph G = ( V , E ) G=(V,E) G = ( V , E ) updated by arbitrary insertions and deletions, an cluster K K K .
(1) Remove the old cluster before processing its remaining vertices.
(2) Do sparsity test on every v ∈ K v \in K v ∈ K (see Lemma 3.1) and check whether v v v is ε / 20 \varepsilon/20 ε /20 -sparse. Repeat the following on a vertex whose test returns no until K K K is empty or there is no such vertex.
(a) Run the algorithm in Lemma 3.2 and check whether v v v could be merged to an existed cluster K ′ K' K ′ with a β ε \beta\varepsilon β ε -dense core. If there is such K ′ K' K ′ , add v v v to K ′ K' K ′ .
(b) Otherwise, form a new ε \varepsilon ε -almost-clique K ~ \widetilde{K} K by Algorithm 2.
(3) For the remaining vertices in K K K , add them to V ~ s i n g l e t o n \widetilde{V}_{\mathrm{singleton}} V singleton and V ~ l i s t , ( i ) \widetilde{V}_{\mathrm{list},(i)} V list , ( i ) for all i ∈ [ L ] i \in[L] i ∈ [ L ] .
Remark 5.1. In the above algorithms, we use the following constant choices: β = 4 \beta= 4 β = 4 , α = 1 2 \alpha= \frac{1}{2} α = 2 1 , and ε \varepsilon ε is a universal constant satisfying ε ≤ 1 19000 \varepsilon\le\frac{1}{19000} ε ≤ 19000 1 .
Remark 5.2. For cluster K K K with initial size c ( K ) c(K) c ( K ) smaller than 1 2 \frac{1}{2} 2 1 , due to the definition of SDD in Definition 3, K K K is an exact clique, and moreover, we refresh it whenever there is an insertion or a deletion to K K K (i.e. i n c ( K ) inc(K) in c ( K ) or d e l ( K ) del(K) d e l ( K ) changes by 1) by Algorithm 3. Algorithmic removals do not trigger refreshment.
Maintaining V ~ s i n g l e t o n \widetilde{V}_{\mathrm{singleton}} V singleton . For those sparse vertices added to V ~ s i n g l e t o n \widetilde{V}_{\mathrm{singleton}} V singleton by Algorithm 1, they could become dense later on, so we need Algorithm 4 to track these changes. A natural start point is to sample from V ~ s i n g l e t o n \widetilde{V}_{\mathrm{singleton}} V singleton to estimate the number of dense vertices in V ~ s i n g l e t o n \widetilde{V}_{\mathrm{singleton}} V singleton that belong to each degree level [ 2 i , 2 i + 1 ) [2^i, 2^{i+1}) [ 2 i , 2 i + 1 ) and form clusters on that degree level whenever it becomes “dangerous”, i.e., dense vertices occupy a large portion of that degree level. However, as we mentioned in § 2 , there could be a vertex of degree Θ ( n ) \Theta(n) Θ ( n ) that should join a cluster and n 0.9 n^{0.9} n 0.9 vertices of degree Θ ( 1 ) \Theta(1) Θ ( 1 ) . Although the cost is essentially higher for the high degree vertex so we should prioritize it, uniformly sampling from V ~ s i n g l e t o n \widetilde{V}_{\mathrm{singleton}} V singleton cannot detect the vertex with high degree. Therefore, we need to maintain a list for each degree level which we can directly scan through. Unfortunately, there is no known efficient method to track the degree bucketing exactly, e.g., a trivial method requires to query the degree of all vertices in level i i i for every 2 i 2^i 2 i updates, giving an n 2 i \frac{n}{2^i} 2 i n amortized time in the worst case.
Instead of exactly tracking the degree, we keep an approximate degree bucketing list V ~ l i s t , ( i ) \widetilde{V}_{\mathrm{list},(i)} V list , ( i ) for each i ∈ [ L ] i \in[L] i ∈ [ L ] , where L = 1 + ⌈ log 2 n ⌉ = O ( log n ) L = 1 + \lceil\log_2 n \rceil= O(\log n) L = 1 + ⌈ log 2 n ⌉ = O ( log n ) , storing the sparse vertices in the i i i -th degree level. We abuse the notation [ L ] [L] [ L ] to denote { 0 , … , L − 1 } \{0,\ldots,L-1\} { 0 , … , L − 1 } in the following. The main challenge is that the degree of a vertex can change drastically after it joins V ~ s i n g l e t o n \widetilde{V}_{\mathrm{singleton}} V singleton , so if we only add a sparse vertex to one list based on its degree when it enters, we may lose track of it later. Thus, we add the vertex to all degree lists, but then the number of low-degree vertices could be significantly larger than that of the vertices with the correct degree in each list, causing efficiency issues. Therefore, we design the sparse-list data structure to prioritize the high-degree vertices and prune the lists in a top-down manner. We implement it as follows:
Low degree: We add all vertices to V ~ l i s t , ( i ) \widetilde{V}_{\mathrm{list},(i)} V list , ( i ) for each i i i when they join V ~ s i n g l e t o n \widetilde{V}_{\mathrm{singleton}} V singleton . When we prune V ~ l i s t , ( i ) \widetilde{V}_{\mathrm{list},(i)} V list , ( i ) , we simply remove all vertices with a low degree without further operation. Note that adding and removing low degree vertices in each level only incurs a log n \log n log n blow-up to the amortized update time as there are log n \log n log n levels. Moreover, this would not incur correctness issues due to degree increments. For instance, a vertex v v v in level j j j may become dense and shift to level i i i for i ≫ j i \gg j i ≫ j , but we deleted v v v from V ~ l i s t , ( i ) \widetilde{V}_{\mathrm{list},(i)} V list , ( i ) earlier as it was a low-degree vertex in
level i i i . In this case, we show that a large portion of the newly-added dense neighbors of v v v , i.e., those that cause the degree of v v v to increase, is added to V ~ l i s t , ( i ) \widetilde{V}_{\mathrm{list},(i)} V list , ( i ) , so we identify v v v via its neighbors, and there is no need to add v v v back to V ~ l i s t , ( i ) \widetilde{V}_{\mathrm{list},(i)} V list , ( i ) .
High degree: When our algorithm determines a level i i i as dangerous, before pruning V ~ l i s t , ( i ) \widetilde{V}_{\mathrm{list},(i)} V list , ( i ) , we first check the size of all higher degree-levels to ensure that there is no level j > i j>i j > i with more sparse vertices, so that we afford the time to check all high degree vertices in V ~ l i s t , ( i ) \widetilde{V}_{\mathrm{list},(i)} V list , ( i ) . Then, the high degree vertices are remained in V ~ l i s t , ( i ) \widetilde{V}_{\mathrm{list},(i)} V list , ( i ) after pruning as long as they cannot form or join any cluster. This top-down construction prioritizes high degree vertices and permits a full scan of V ~ l i s t , ( i ) \widetilde{V}_{\mathrm{list},(i)} V list , ( i ) when no higher degree-level blocks it.
We keep a counter in Algorithm 4 for each level that counts both graph updates by data stream and changes in membership of V ~ s i n g l e t o n \widetilde{V}_{\mathrm{singleton}} V singleton . With the sparse-list data structure, we call Algorithm 6 every Θ ( ε 2 i ) \Theta(\varepsilon2^i) Θ ( ε 2 i ) counts to estimate the size of V ~ s i n g l e t o n , i n c o r r e c t , ( i ) \widetilde{V}_{\mathrm{singleton,incorrect},(i)} V singleton , incorrect , ( i ) and fully scan V ~ l i s t , ( i ) \widetilde{V}_{\mathrm{list},(i)} V list , ( i ) if level i i i satisfies none of the following properties, for which we can tolerate the cost of level i i i .
We emphasize that we estimate the size of the actual degree bucket V ~ s i n g l e t o n , ( i ) \widetilde{V}_{\mathrm{singleton},(i)} V singleton , ( i ) , i.e., vertices in V ~ s i n g l e t o n \widetilde{V}_{\mathrm{singleton}} V singleton with degree [ 2 i , 2 i + 1 ) [2^i,2^{i+1}) [ 2 i , 2 i + 1 ) , to detect the dangerous level, since we can afford this time, but we cannot access the vertices in V ~ s i n g l e t o n , ( i ) \widetilde{V}_{\mathrm{singleton},(i)} V singleton , ( i ) , so we scan V ~ l i s t , ( i ) \widetilde{V}_{\mathrm{list},(i)} V list , ( i ) instead. Once level i i i passes all thresholds, we conduct the “check and form cluster” operation with V ~ l i s t , ( i ) \widetilde{V}_{\mathrm{list},(i)} V list , ( i ) by Algorithm 5, which eliminates all sufficiently dense vertices from level i i i . If a comparison fails, we still attempt the same scan, but stop at 2 i L 2 2^iL^2 2 i L 2 visits of higher-degree vertices who does not depart V ~ s i n g l e t o n \widetilde{V}_{\mathrm{singleton}} V singleton because it is sparse. Thus we can still charge the time to the counts we wait until checking this level even when it does not pass the tests. This step is essential since an “unimportant” level that does not pass the tests may become dominant, dangerous, and non-negligible before the next check is conducted.
We remark that the estimate of a level i i i might not be accurate if the vertices inside keep bouncing between two levels, e.g., at some times their degrees are 2 i + 1 2^i+1 2 i + 1 and at other times their degrees are 2 i − 1 2^i-1 2 i − 1 . To handle these edge cases, we instead use the size of three degree levels as a characterization of level i i i . For an integer i i i and a positive odd number a a a , we define S i ( a ) = { i − k , i − ( k − 1 ) , … , i , … , i + ( k − 1 ) , i + k } S_i(a)=\{i-k,i-(k-1),\ldots,i,\ldots,i+(k-1),i+k\} S i ( a ) = { i − k , i − ( k − 1 ) , … , i , … , i + ( k − 1 ) , i + k } , where a = 2 k + 1 a=2k+1 a = 2 k + 1 . We mainly use this notation in our algorithm to denote the 3-level S i ( 3 ) = { i − 1 , i , i + 1 } S_i(3)=\{i-1,i,i+1\} S i ( 3 ) = { i − 1 , i , i + 1 } , i.e., we estimate the number of dense vertices in degree level [ 2 i − 1 , 2 i + 2 ) [2^{i-1},2^{i+2}) [ 2 i − 1 , 2 i + 2 ) .
Algorithm 4. An algorithm that triggers the construction of clusters.
Input: graph G = ( V , E ) G=(V,E) G = ( V , E ) updated by arbitrary insertions and deletions and a parameter ζ = ε / 500 \zeta=\varepsilon/500 ζ = ε /500 (we use a different notation here for analysis purpose).
Pre-processing: if there are less than 300 log 4 n \log^{4} n log 4 n vertices in the graph (a) Run offline algorithm to obtain an O ( 1 ) O(1) O ( 1 ) -approximation at every time. (b) Query all the degrees in the graph.
Initialization for each level i ∈ [ L ] i \in[L] i ∈ [ L ] , we maintain the following: (a) V ~ l i s t , ( i ) \widetilde{V}_{\mathrm{list},(i)} V list , ( i ) : the list of candidate singleton vertices for level i i i . (b) c i c_i c i : number of graph insertions and deletions, plus actual entries to and departures from V ~ s i n g l e t o n \widetilde{V}_{\mathrm{singleton}} V singleton , since the most recent level-i i i check started.
Counter updates: Increase every c i c_i c i by one for each graph insertion or deletion and for each entry to or departure from V ~ s i n g l e t o n \widetilde{V}_{\mathrm{singleton}} V singleton , including changes during any subroutine.
For each time t ∈ [ T ] t \in[T] t ∈ [ T ] : (a) If a vertex u u u is inserted to V ~ s i n g l e t o n ( t ) \widetilde{V}^{(t)}_{\mathrm{singleton}} V singleton ( t ) , add u u u to V ~ l i s t , ( i ) ( t ) \widetilde{V}^{(t)}_{\mathrm{list},(i)} V list , ( i ) ( t ) for each i ∈ [ L ] i \in[L] i ∈ [ L ] ; and if u u u is included in an cluster, remove it from V ~ s i n g l e t o n ( t ) \widetilde{V}^{(t)}_{\mathrm{singleton}} V singleton ( t ) and V ~ l i s t , ( i ) ( t ) \widetilde{V}^{(t)}_{\mathrm{list},(i)} V list , ( i ) ( t ) for each i ∈ [ L ] i \in[L] i ∈ [ L ] . (b) While c i ≥ h i : = max { 1 , ⌊ ζ 2 i / 10 ⌋ } c_i \ge h_i := \max\{1,\lfloor\zeta2^i/10 \rfloor\} c i ≥ h i := max { 1 , ⌊ ζ 2 i /10 ⌋} for some level i i i , choose such a level and check it as follows: i. Set c i ← 0 c_i \leftarrow0 c i ← 0 . Changes during this check count toward the next check. ii. Run Algorithm 6 with γ = O ( 2 i log 2 n ) \gamma= O(2^i \log^2 n) γ = O ( 2 i log 2 n ) samples and count samples in ⋃ j ∈ S i ( 3 ) V ~ s i n g l e t o n , ( j ) ( t ) \bigcup_{j\in S_i(3)}\widetilde{V}^{(t)}_{\mathrm{singleton},(j)} ⋃ j ∈ S i ( 3 ) V singleton , ( j ) ( t ) for which the 5 ζ 5\zeta 5 ζ -sparsity test returns no. Let u ˉ i \bar{u}_i u ˉ i be the estimate. iii. Initiate a dummy variable F L A G i ← 0 \mathrm{FLAG}_i \leftarrow0 FLAG i ← 0 . iv. Ignore non-dominant level: If u ˉ i < 1 100 ⋅ 2 i L ∣ V ~ s i n g l e t o n ( t ) ∣ \bar{u}_i < \frac{1}{100\cdot2^i L}\left|\widetilde{V}^{(t)}_{\mathrm{singleton}}\right| u ˉ i < 100 ⋅ 2 i L 1 V singleton ( t ) , set F L A G i ← 1 \mathrm{FLAG}_i \leftarrow1 FLAG i ← 1 . v. Ignore non-emergent level: Run Algorithm 6 with γ = O ( 2 i log 2 n ) \gamma= O(2^i \log^2 n) γ = O ( 2 i log 2 n ) samples and count samples in V ~ s i n g l e t o n , ( i ) ( t ) \widetilde{V}^{(t)}_{\mathrm{singleton},(i)} V singleton , ( i ) ( t ) for which the 5 ζ 5\zeta 5 ζ -sparsity test returns yes. Let u ˉ i ′ \bar{u}'_i u ˉ i ′ be the estimate. If u ˉ i < 1 5 u ˉ i ′ \bar{u}_i < \frac{1}{5}\bar{u}'_i u ˉ i < 5 1 u ˉ i ′ , set F L A G i ← 1 \mathrm{FLAG}_i \leftarrow1 FLAG i ← 1 . vi. Ignore negligible level: For each j j j in ordered list { L − 1 , L − 2 , … , max { 0 , i − 4 } } ∖ { i } \{L-1,L-2,\ldots,\max\{0,i-4\}\}\setminus\{i\} { L − 1 , L − 2 , … , max { 0 , i − 4 }} ∖ { i }
Run Algorithm 6 with γ = O ( 2 i log 2 n ) \gamma= O(2^i \log^2 n) γ = O ( 2 i log 2 n ) samples and count samples in V ~ s i n g l e t o n , ( j ) ( t ) \widetilde{V}^{(t)}_{\mathrm{singleton},(j)} V singleton , ( j ) ( t ) for which the 5 ζ 5\zeta 5 ζ -sparsity test returns yes. Let u ˉ j \bar{u}_j u ˉ j be the estimate. If u ˉ j > 100 L ⋅ u ˉ i \bar{u}_j > 100L\cdot\bar{u}_i u ˉ j > 100 L ⋅ u ˉ i , terminate the loop and set F L A G i ← 1 \mathrm{FLAG}_i \leftarrow1 FLAG i ← 1 . vii. Check and form cluster: Run Algorithm 5 with V ~ l i s t , ( i ) \widetilde{V}_{\mathrm{list},(i)} V list , ( i ) and F L A G i \mathrm{FLAG}_i FLAG i . (c) When every c i < h i c_i < h_i c i < h i , run Algorithm 7 before returning the clustering.
Algorithm 5. Check and try cluster.
Input: the list V ~ l i s t , ( i ) \widetilde{V}_{\mathrm{list},(i)} V list , ( i ) and a flag F L A G i ∈ { 0 , 1 } \mathrm{FLAG}_{i} \in\{0,1\} FLAG i ∈ { 0 , 1 } , where 0 specifies a full scan and 1 specifies a partial scan.
(1) Set F A I L i ← 0 \mathrm{FAIL}_{i} \leftarrow0 FAIL i ← 0 .
(2) Scan V ~ l i s t , ( i ) \widetilde{V}_{\mathrm{list},(i)} V list , ( i ) in list order, including entries appended during the scan. Each entry is visited at most once unless it is removed and created again. For each visited vertex u u u , do the following:
(a) If deg ( u ) < 2 i / 10 \deg(u) < 2^{i}/10 deg ( u ) < 2 i /10 , delete u u u from V ~ l i s t , ( i ) \widetilde{V}_{\mathrm{list},(i)} V list , ( i ) and continue to the next entry.
(b) Run the 12 ζ 12\zeta 12 ζ sparsity test of Lemma 3.1 on u u u .
i. If the test returns yes, increase F A I L i \mathrm{FAIL}_{i} FAIL i by one and leave u u u in the list.
ii. If the test returns no:
A. Run the algorithm in Lemma 3.2 to check whether u u u can be merged to an existing cluster K ′ K' K ′ with a β ε \beta\varepsilon β ε -dense core. If there is such K ′ K' K ′ , add u u u to K ′ K' K ′ . In this case, if u u u is inserted by the data stream after K ′ K' K ′ is formed and u u u did not join K ′ K' K ′ before, increase inc ( K ′ ) \operatorname{inc}(K') inc ( K ′ ) by 1.
B. If no such K ′ K' K ′ exists, form a new ε \varepsilon ε -almost-clique K K K by Algorithm 2.
(c) If F L A G i = 1 \mathrm{FLAG}_{i}=1 FLAG i = 1 and F A I L i = 2 i L 2 \mathrm{FAIL}_{i}=2^{i}L^{2} FAIL i = 2 i L 2 , stop and return.
(3) Return when no unvisited entry remains.
Algorithm 6. An algorithm that estimates the size of a subset S S S of V ~ s i n g l e t o n ( t ) \widetilde{V}^{(t)}_{\mathrm{singleton}} V singleton ( t ) .
Input: graph G = ( V , E ) G=(V,E) G = ( V , E ) updated by arbitrary insertions and deletions, number of samples γ \gamma γ , and a set S S S in level i i i to test size (given implicitly).
(1) Sample γ \gamma γ vertices independently and uniformly with replacement from V ~ s i n g l e t o n ( t ) \widetilde{V}^{(t)}_{\mathrm{singleton}} V singleton ( t ) with a sufficiently large constant.
(2) Let γ ^ \widehat{\gamma} γ be the number of samples belonging to S S S , and return s ^ ( t ) = ∣ V ~ s i n g l e t o n ( t ) ∣ γ ⋅ γ ^ \widehat{s}^{(t)}=\frac{\lvert\widetilde{V}^{(t)}_{\mathrm{singleton}}\rvert}{\gamma}\cdot\widehat{\gamma} s ( t ) = γ ∣ V singleton ( t ) ∣ ⋅ γ .
Algorithm 7. An algorithm that removes degree-zero vertices from V ~ s i n g l e t o n ( t ) \widetilde{V}^{(t)}_{\mathrm{singleton}} V singleton ( t ) .
Input: graph G = ( V , E ) G=(V,E) G = ( V , E ) updated by arbitrary insertions and deletions, and V ~ s i n g l e t o n ( t ) \widetilde{V}^{(t)}_{\mathrm{singleton}} V singleton ( t ) .
(1) Run Algorithm 6 with γ = O ( log 2 n ) \gamma=O(\log^{2}n) γ = O ( log 2 n ) samples to estimate the fraction of degree-zero vertices in V ~ s i n g l e t o n \widetilde{V}_{\mathrm{singleton}} V singleton with additive error 1 / 100 1/100 1/100 .
(2) If the estimated fraction is less than 1 / 20 1/20 1/20 , finish the cleanup.
(3) Otherwise:
(a) Traverse V ~ s i n g l e t o n \widetilde{V}_{\mathrm{singleton}} V singleton and remove its degree-zero vertices from the active set and all lists, retaining them as singleton clusters.
(b) Run the checks in Line 4b of Algorithm 4 until every c i < h i c_i < h_i c i < h i .
Remark 5.3. We specify the following implementation orders:
Throughout the algorithms, each merge or formation, including identification and all resulting refreshments, is completed before the calling algorithm continues. In particular, all cluster operations and required refreshments are completed before continuing or finishing a scan, testing the while condition in Algorithm 4, or returning the clustering.
Each level check is completed before starting another, and all operations for the current graph insertion or deletion are completed before processing the next one.
Before any merge or formation, remove all clusters whose insertion or deletion counter has reached its threshold, and set aside their remaining vertices for Algorithm 3. Whenever a vertex is added to a cluster, remove it from any set awaiting refreshment.
Correctness of Each Cluster
In this section, we show that each cluster maintained by our algorithm satisfies Definition 6, as stated in the following theorem statement.
Theorem 3. At any time, let K 1 , … , K L K_1,\ldots,K_L K 1 , … , K L be the clusters maintained by the algorithm, then for each i ∈ [ L ] i \in[L] i ∈ [ L ] , K i K_i K i is either an ε τ \varepsilon_\tau ε τ -tolerant cluster or an ε l \varepsilon_l ε l -isolated cluster for universal constants ε τ \varepsilon_\tau ε τ and ε l \varepsilon_l ε l .
Proof Outline
In this section, we outline the proof for the correctness of each cluster in § 8 and the correctness of V ~ s i n g l e t o n \widetilde{V}_{\mathrm{singleton}} V singleton in § 9 . Essentially, we show that the clusters maintained by Algorithm 1 satisfies Definition 6, so our algorithm gives an O ( 1 ) O(1) O ( 1 ) -approximation for correlation clustering by Theorem 2.
We begin by introducing a group of auxiliary lemmas. Our key technical lemma is Lemma 6.1 , stating that for an ε \varepsilon ε -dense core K K K of size ∣ K ∣ |K| ∣ K ∣ , there could be at most ε ∣ K ∣ α ( 1 − ε ) \frac{\varepsilon|K|}{\alpha(1-\varepsilon)} α ( 1 − ε ) ε ∣ K ∣ vertices that connect to at least α \alpha α -fraction of vertices in K K K . This lemma is heavily used in the following analysis, e.g., we use it to bound the number of additions to a cluster as well as the number of identified vertices when a cluster is formed. Next, consider a cluster K K K , which is formed at time t 0 t_0 t 0 and refreshed at time t ∗ t^* t ∗ . Building on Lemma 6.1 , we show the following lemmas that characterize the dynamic of K K K after its formation:
Lemma 6.5 : there are at most O ( ε ) ∣ K ∣ O(\varepsilon)|K| O ( ε ) ∣ K ∣ additions to K K K during [ t 0 , t ∗ ] [t_0,t^*] [ t 0 , t ∗ ] .
Lemma 6.6 : if K K K is still “active”, i.e., vertices could be merged to its dense core, then its dense core has at most O ( ε ) ∣ K ∣ O(\varepsilon)|K| O ( ε ) ∣ K ∣ changes during [ t 0 , t ∗ ] [t_0,t^*] [ t 0 , t ∗ ] .
Lemma 6.7 : the degree of a vertex added to K K K can decrease by at most O ( ε ) ∣ K ( t 0 ) ∣ O(\varepsilon)|K^{(t_0)}| O ( ε ) ∣ K ( t 0 ) ∣ before K K K is refreshed.
Lemma 6.8 : if a vertex v v v is added to K 1 K_1 K 1 and later to K 2 K_2 K 2 , and both clusters are still maintained, then ∣ K 2 ( t 2 ) ∣ > 3 2 ∣ K 1 ( t 1 ) ∣ \left|K_2^{(t_2)}\right| > \frac{3}{2}\left|K_1^{(t_1)}\right| K 2 ( t 2 ) > 2 3 K 1 ( t 1 ) , where t 1 , t 2 t_1,t_2 t 1 , t 2 are their formation times.
With these auxiliary lemmas, we are able to show the core Theorem 4. Informally, it ensures the validity of V ~ s i n g l e t o n \widetilde{V}_{\mathrm{singleton}} V singleton , stating that for any group of ε \varepsilon ε -dense vertices K K K with size roughly 2 i 2^i 2 i , at least one of the following happens:
There is a cluster K ′ K' K ′ such that at least ( 1 − O ( ε ) ) (1-O(\varepsilon)) ( 1 − O ( ε )) -fraction of vertices in K K K are in K ′ K' K ′ and all vertices in K ∖ K ′ K \setminus K' K ∖ K ′ are in both V ~ s i n g l e t o n \widetilde{V}_{\mathrm{singleton}} V singleton and V ~ l i s t , ( i ) \widetilde{V}_{\mathrm{list},(i)} V list , ( i ) .
At least O ( ε ) O(\varepsilon) O ( ε ) -fraction of K K K is in both V ~ s i n g l e t o n \widetilde{V}_{\mathrm{singleton}} V singleton and V ~ l i s t , ( i ) \widetilde{V}_{\mathrm{list},(i)} V list , ( i ) .
Theorem 4 ensures that when our algorithm determines to scan V ~ l i s t , ( i ) \widetilde{V}_{\mathrm{list},(i)} V list , ( i ) to form clusters, for each ε \varepsilon ε -dense core K K K with size roughly 2 i 2^i 2 i , either it is mostly contained in an existing cluster K ′ K' K ′ and the rest of K K K are in V ~ l i s t , ( i ) \widetilde{V}_{\mathrm{list},(i)} V list , ( i ) , so we merge all vertices to K ′ K' K ′ , or at least O ( ε ) O(\varepsilon) O ( ε ) fraction of K K K is inside V ~ s i n g l e t o n \widetilde{V}_{\mathrm{singleton}} V singleton , so we form a new cluster by Algorithm 2.
We discuss the rough idea to prove Theorem 4. In the first case, since K ′ K' K ′ contains a vertex in dense core K K K , Lemmas 6.6 and 6.7 bound the initial size of K ′ K' K ′ by O ( ∣ K ∣ ) O(|K|) O ( ∣ K ∣ ) . Then if a vertex outside K ′ K' K ′ were in another cluster K ∗ K^* K ∗ , either identification when K ′ K' K ′ is formed would remove it from K ∗ K^* K ∗ , or the two initial clusters K ′ K' K ′ and K ∗ K^* K ∗ would contain almost all of K v K_v K v , so they overlap a lot. The latter contradicts Lemma 6.8 . Thus all vertices of K K K outside K K K are in V ~ s i n g l e t o n \widetilde{V}_{\mathrm{singleton}} V singleton and V ~ l i s t , ( i ) \widetilde{V}_{\mathrm{list},(i)} V list , ( i ) . In the second case, either the last O ( ε ) O(\varepsilon) O ( ε ) -fraction of vertices of K K K inserted into the graph are in V ~ s i n g l e t o n \widetilde{V}_{\mathrm{singleton}} V singleton and V ~ l i s t , ( i ) \widetilde{V}_{\mathrm{list},(i)} V list , ( i ) , or we consider the last addition of a vertex of K K K to its current cluster K + K^+ K + . At that time, almost all of K K K was already present, so K + K^+ K + contained almost all of K K K . Since case (i) does not happen, K + K^+ K + contains less than ( 1 − O ( ε ) ) (1-O(\varepsilon)) ( 1 − O ( ε )) -fraction of K K K now, so O ( ε ) ∣ K ∣ O(\varepsilon)|K| O ( ε ) ∣ K ∣ such vertices have been removed from K + K^+ K + . By the choice of the last addition, these vertices are singletons at the current time. In both cases, their positive degrees remain large enough to keep them in V ~ l i s t , ( i ) \widetilde{V}_{\mathrm{list},(i)} V list , ( i ) .
Correctness of each cluster. We show that after a cluster K K K is formed, if it is not refreshed by our algorithm, then it is either a tolerant cluster or an isolated cluster. By Lemma 6.5 , there are at most O ( ε ) ∣ K ∣ O(\varepsilon)|K| O ( ε ) ∣ K ∣ additions to K K K during [ t 0 , t ∗ ] [t_0,t^*] [ t 0 , t ∗ ] . Thus, the fraction of non-neighbors inside K K K mainly depends on the number of vertices that were once in K K K during [ t 0 , t ∗ ] [t_0,t^*] [ t 0 , t ∗ ] , outside K K K now, and still present in the graph. They are removed from K K K mainly due to algorithmic operations. If this quantity is small, then the cluster remains a tolerant cluster because there can be at most O ( ε ) ∣ K ∣ O(\varepsilon)|K| O ( ε ) ∣ K ∣ non-neighbors for each vertex inside. On the contrary, if there are more than Θ ( ∣ K ∣ ) \Theta(|K|) Θ ( ∣ K ∣ ) such vertices, the size of K K K decreases by a lot, so the ratio of non-neighbors inside could become larger for each vertex, making K K K no longer a tolerant cluster. In this case, many vertices are removed from K K K by our algorithm, but most of them cannot be deleted by the data stream, otherwise it will trigger the refreshment of K K K . Thus, there are many edges between the inside and the outside of K K K , making K K K satisfies the requirement of an isolated cluster. Recall that in Definition 6, we also have some requirements for v ∈ K v \in K v ∈ K if it is instead dense with some other vertices. In particular, if a vertex v v v in K K K is dense with a group of vertices K v K_v K v outside K K K , then at least ε \varepsilon ε -fraction of these vertices should be in V ~ s i n g l e t o n \widetilde{V}_{\mathrm{singleton}} V singleton so that we can charge the cost of keeping v v v in K K K . Fortunately, this is guaranteed by the validity of V ~ s i n g l e t o n \widetilde{V}_{\mathrm{singleton}} V singleton in Theorem 4.
Correctness of V ~ s i n g l e t o n \widetilde{V}_{\mathrm{singleton}} V singleton . For the correctness of V ~ s i n g l e t o n \widetilde{V}_{\mathrm{singleton}} V singleton , whenever a level becomes “dangerous” in the sense that we cannot charge the cost of not forming clusters on that level, either the size comparisons in Algorithm 4 triggered a full scan at its last check, or the partial scan at that check must have eliminated dense vertices. Indeed, in the latter case, the sparse vertices present at the check, together with subsequent entries into V ~ s i n g l e t o n \widetilde{V}_{\mathrm{singleton}} V singleton , account for too few unsuccessful sparsity tests to exhaust the scan’s budget 2 i polylog ( n ) 2^{i}\operatorname{polylog}(n) 2 i polylog ( n ) , so we traverse through all dense vertices. Therefore, in either case we scan and prune the list V ~ l i s t , ( i ) \widetilde{V}_{\mathrm{list},(i)} V list , ( i ) , and, again by Theorem 4, we eliminate all dense vertices from V ~ s i n g l e t o n \widetilde{V}_{\mathrm{singleton}} V singleton in level i i i , so that it is no longer dangerous.
We provide the control flow of the above outline in Figure 3 .
Figure 3. Control flow for the proof outline.
Preliminaries
In this section, we introduce definitions and terminologies used in the proof. Recall that we define an ε \varepsilon ε -dense core to be an ε \varepsilon ε -almost-clique contained by a cluster K K K , we use C ( t ) C^{(t)} C ( t ) to denote the dense core of K K K at time t t t if it exists, and we use N ( t ) ( v ) N^{(t)}(v) N ( t ) ( v ) to denote the neighborhood of vertex v v v at time t t t . We write N ( t ) ( u ) N^{(t)}(u) N ( t ) ( u ) for the positive neighborhood of u u u at time t t t , and N ( t ) [ u ] : = N ( t ) ( u ) ∪ { u } N^{(t)}[u] := N^{(t)}(u) \cup\{u\} N ( t ) [ u ] := N ( t ) ( u ) ∪ { u } for its closed positive neighborhood. We often use t v + t_v^{+} t v + to denote the time when a vertex v v v is added to a specific cluster K K K given by the context. We remark that any cluster formed during refreshment is regarded as a new cluster, and an empty cluster is discarded. We next state a core technical lemma which states that the number of densely-connected neighbors of an ε \varepsilon ε -dense core must be bounded, which is used later to bound the number of additions to a cluster.
Lemma 6.1. We use E ( v , S ) = { ( v , s ) ∈ E + : s ∈ S } E(v,S) = \{(v,s) \in E^{+} : s \in S\} E ( v , S ) = {( v , s ) ∈ E + : s ∈ S } to denote the set of edges between a vertex v v v and a set of vertices S S S . Let S ⊂ V S \subset V S ⊂ V be an ε \varepsilon ε -dense core and let H α = { v ∈ V ∖ S : ∣ E ( v , S ) ∣ ≥ α ∣ S ∣ } H_{\alpha} = \{v \in V \setminus S : |E(v,S)| \ge\alpha|S|\} H α = { v ∈ V ∖ S : ∣ E ( v , S ) ∣ ≥ α ∣ S ∣ } , then we have ∣ H α ∣ ≤ ε α ( 1 − ε ) ⋅ ∣ S ∣ |H_{\alpha}| \le\frac{\varepsilon}{\alpha(1-\varepsilon)} \cdot|S| ∣ H α ∣ ≤ α ( 1 − ε ) ε ⋅ ∣ S ∣ .
Proof. Recall that in Definition 3, each vertex in the dense core S S S has at most ε ∣ S ∣ / ( 1 − ε ) \varepsilon|S|/(1-\varepsilon) ε ∣ S ∣/ ( 1 − ε ) neighbors outside S S S , so S S S has at most ε ∣ S ∣ 2 / ( 1 − ε ) \varepsilon|S|^{2}/(1-\varepsilon) ε ∣ S ∣ 2 / ( 1 − ε ) out-edges. On the other hand, for each vertex in H α H_{\alpha} H α , it is outside of S S S and connects to at least α ∣ S ∣ \alpha|S| α ∣ S ∣ vertices in S S S . Thus, there are at least ∣ H α ∣ ⋅ α ∣ S ∣ |H_{\alpha}| \cdot\alpha|S| ∣ H α ∣ ⋅ α ∣ S ∣ edges between H α H_{\alpha} H α and S S S . Then we have ∣ H α ∣ ⋅ α ∣ S ∣ ≤ ε ∣ S ∣ 2 / ( 1 − ε ) |H_{\alpha}| \cdot\alpha|S| \le\varepsilon|S|^{2}/(1-\varepsilon) ∣ H α ∣ ⋅ α ∣ S ∣ ≤ ε ∣ S ∣ 2 / ( 1 − ε ) , giving us ∣ H α ∣ ≤ ε α ( 1 − ε ) ⋅ ∣ S ∣ |H_{\alpha}| \le\frac{\varepsilon}{\alpha(1-\varepsilon)} \cdot|S| ∣ H α ∣ ≤ α ( 1 − ε ) ε ⋅ ∣ S ∣ .
To begin with, we have the following observations of our algorithm.
Observation 6.2. When a cluster K K K is formed by Algorithm 2, K K K is an ε \varepsilon ε -dense core as defined in Definition 7.
Observation 6.3. Whenever a vertex v v v is added to a cluster K K K , K K K has a β ε \beta\varepsilon β ε -dense core, and moreover, v v v belongs to the dense core.
Next, we fix a time t t t and consider an arbitrary cluster K K K maintained by our algorithm at t t t . We aim to show that K K K satisfies the definition of a tolerant cluster or an isolated cluster in Definition 6 at t t t . Let t 0 t_0 t 0 be the time that K K K is formed by Algorithm 2 and let K ( t 0 ) K^{(t_0)} K ( t 0 ) be the set of vertices that is in K K K at t 0 t_0 t 0 , then by Observation 6.2, we have that K ( t 0 ) K^{(t_0)} K ( t 0 ) is an ε \varepsilon ε -dense core, i.e., C ( t 0 ) = K ( t 0 ) C^{(t_0)} = K^{(t_0)} C ( t 0 ) = K ( t 0 ) . The goal is then to show that K K K satisfies Definition 6 in the following sequence of dynamic inputs. We now define four types of operations on K K K after it is formed.
Definition 8. We define the following operations on a cluster:
We use insertion/deletion to denote a data stream update on the graph; we use addition/removal to denote an algorithmic operation on a vertex with respect to a cluster.
Data stream removal: Vertex v v v is deleted by the data stream, where v v v has been added to K K K at some point at or after t 0 t_0 t 0 (v v v may or may not be in K K K when it is deleted from the graph). Data stream removals are counted by del ( K ) \operatorname{del}(K) del ( K ) in Algorithm 1.
Algorithmic removal: Vertex v v v is removed from cluster K K K by our algorithm, but v v v still exists in the graph.
Data stream addition: Vertex v v v is added to cluster K K K , where v v v is inserted by the data stream after t 0 t_0 t 0 . Data stream additions are counted by inc ( K ) \operatorname{inc}(K) inc ( K ) in Algorithm 1.
Algorithmic addition: Vertex v v v is added to cluster K K K , where v v v was in the graph at t 0 t_0 t 0 .
We first state the following observation, saying that there are at most ε ∣ K ( t 0 ) ∣ \varepsilon\lvert K^{(t_0)}\rvert ε ∣ K ( t 0 ) ∣ data stream operations before K K K is refreshed. The proof of the observation is straightforward as we keep two counters inc ( K ) \operatorname{inc}(K) inc ( K ) and del ( K ) \operatorname{del}(K) del ( K ) in Algorithm 1 for these two kinds of operation, respectively; and when inc ( K ) ≥ ε ∣ K ( t 0 ) ∣ \operatorname{inc}(K) \ge\varepsilon\lvert K^{(t_0)}\rvert inc ( K ) ≥ ε ∣ K ( t 0 ) ∣ or del ( K ) ≥ ε ∣ K ( t 0 ) ∣ \operatorname{del}(K) \ge\varepsilon\lvert K^{(t_0)}\rvert del ( K ) ≥ ε ∣ K ( t 0 ) ∣ , we refresh K K K (see Line 2(c)i and Line 2(c)ii).
Observation 6.4. There are at most ε ∣ K ( t 0 ) ∣ \varepsilon\lvert K^{(t_0)}\rvert ε ∣ K ( t 0 ) ∣ data stream removals and data stream additions to K K K before K K K is refreshed.
Core Technical Lemmas
We write N ( t ) ( u ) N^{(t)}(u) N ( t ) ( u ) for the positive neighborhood of u u u at time t t t , and N ( t ) [ u ] : = N ( t ) ( u ) ∪ { u } N^{(t)}[u] := N^{(t)}(u) \cup\{u\} N ( t ) [ u ] := N ( t ) ( u ) ∪ { u } for its closed positive neighborhood. Throughout, β = 4 \beta= 4 β = 4 , α = 1 / 2 \alpha= 1/2 α = 1/2 , and ε ≤ 1 / 19000 \varepsilon\le1/19000 ε ≤ 1/19000 , as in Remark 5.1.
We first bound the number of vertices added to a cluster before it is refreshed. Intuitively, every vertex added algorithmically already exists when the cluster is formed and must have many positive neighbors in the initial cluster. Lemma 6.1 then bounds the number of such vertices.
Lemma 6.5. Suppose that K K K is formed at t 0 t_0 t 0 and is not refreshed before t t t . At most 2 ε ∣ K ( t 0 ) ∣ 2\varepsilon\lvert K^{(t_0)}\rvert 2 ε ∣ K ( t 0 ) ∣ distinct vertices outside K ( t 0 ) K^{(t_0)} K ( t 0 ) are added to K K K by algorithmic additions, and at most 3 ε ∣ K ( t 0 ) ∣ 3\varepsilon\lvert K^{(t_0)}\rvert 3 ε ∣ K ( t 0 ) ∣ such vertices are added in total.
Proof. By Observation 6.2 , K ( t 0 ) K^{(t_0)} K ( t 0 ) is an ε \varepsilon ε -dense core. By Lemma 6.1 , fewer than 2 ε ∣ K ( t 0 ) ∣ 2\varepsilon\lvert K^{(t_0)}\rvert 2 ε ∣ K ( t 0 ) ∣ vertices outside K ( t 0 ) K^{(t_0)} K ( t 0 ) have at least 2 ∣ K ( t 0 ) ∣ / 3 2\lvert K^{(t_0)}\rvert/3 2 ∣ K ( t 0 ) ∣ /3 positive neighbors in it at t 0 t_0 t 0 . Thus it suffices to show that every algorithmic addition is one of these vertices: Observation 6.4 allows at most ε ∣ K ( t 0 ) ∣ \varepsilon\lvert K^{(t_0)}\rvert ε ∣ K ( t 0 ) ∣ further vertices from data stream additions.
First suppose that ∣ K ( t 0 ) ∣ ≥ ( 1 − ε ) / ε \lvert K^{(t_0)}\rvert\ge(1-\varepsilon)/\varepsilon ∣ K ( t 0 ) ∣ ≥ ( 1 − ε ) / ε . We prove the stronger auxiliary fact that every surviving vertex that has belonged to K K K retains at least ( 1 − 12 ε ) ∣ K ( t 0 ) ∣ (1-12\varepsilon)\lvert K^{(t_0)}\rvert ( 1 − 12 ε ) ∣ K ( t 0 ) ∣ positive neighbors in K ( t 0 ) K^{(t_0)} K ( t 0 ) until refreshment. For vertices of K ( t 0 ) K^{(t_0)} K ( t 0 ) , this follows directly from Definition 3 and Observation 6.4 (the missing self-neighbor is absorbed using 1 ≤ ε ∣ K ( t 0 ) ∣ / ( 1 − ε ) 1 \le\varepsilon\lvert K^{(t_0)}\rvert/(1-\varepsilon) 1 ≤ ε ∣ K ( t 0 ) ∣ / ( 1 − ε ) ).
We consider the distinct vertices outside K ( t 0 ) K^{(t_0)} K ( t 0 ) in the order in which each is first added to K K K , including both algorithmic and data stream additions. A vertex removed from K K K and later added back is not counted again. We prove the above claim by induction in this order. Suppose the bound holds for all vertices preceding the next vertex v v v . Then every earlier vertex added algorithmically belongs to the set counted above, so there are at most 2 ε ∣ K ( t 0 ) ∣ 2\varepsilon\lvert K^{(t_0)}\rvert 2 ε ∣ K ( t 0 ) ∣ such vertices. Together with the at most ε ∣ K ( t 0 ) ∣ \varepsilon\lvert K^{(t_0)}\rvert ε ∣ K ( t 0 ) ∣ vertices added by data stream additions, this gives at most 3 ε ∣ K ( t 0 ) ∣ 3\varepsilon\lvert K^{(t_0)}\rvert 3 ε ∣ K ( t 0 ) ∣ distinct outside vertices added before v v v . Immediately after adding v v v , their number is at most 3 ε ∣ K ( t 0 ) ∣ + 1 ≤ 5 ε ∣ K ( t 0 ) ∣ 3\varepsilon\lvert K^{(t_0)}\rvert+1\le5\varepsilon\lvert K^{(t_0)}\rvert 3 ε ∣ K ( t 0 ) ∣ + 1 ≤ 5 ε ∣ K ( t 0 ) ∣ .
Let C C C be the dense core after this addition, we show C ∩ K ( t 0 ) ≠ ∅ C\cap K^{(t_0)}\ne\varnothing C ∩ K ( t 0 ) = ∅ . By Observation 6.3 and Lemma 3.2, C C C contains v v v and more than half of the resulting cluster. The cluster was nonempty before the addition, so C C C contains another vertex already in K K K . Moreover, ∣ C ∣ ≤ ( 1 + 5 ε ) ∣ K ( t 0 ) ∣ \lvert C\rvert\le(1+5\varepsilon)\lvert K^{(t_0)}\rvert ∣ C ∣ ≤ ( 1 + 5 ε ) ∣ K ( t 0 ) ∣ . By Definition 7, each vertex of C C C has at most
β ε 1 − β ε ∣ C ∣ = 4 ε 1 − 4 ε ∣ C ∣ ≤ 9 2 ε ∣ K ( t 0 ) ∣ \frac{\beta\varepsilon}{1-\beta\varepsilon}\lvert C\rvert=\frac{4\varepsilon}{1-4\varepsilon}\lvert C\rvert\le\frac{9}{2}\varepsilon\lvert K^{(t_0)}\rvert 1 − β ε β ε ∣ C ∣ = 1 − 4 ε 4 ε ∣ C ∣ ≤ 2 9 ε ∣ K ( t 0 ) ∣
positive neighbors outside C C C , and at most the same number of non-neighbors inside C C C . If C C C contained no vertex of K ( t 0 ) K^{(t_0)} K ( t 0 ) , that other vertex would have at least ( 1 − 12 ε ) ∣ K ( t 0 ) ∣ (1-12\varepsilon)\lvert K^{(t_0)}\rvert ( 1 − 12 ε ) ∣ K ( t 0 ) ∣ positive neighbors outside C C C by induction, which contradicts with it is in C C C . Then choose an arbitrary w ∈ C ∩ K ( t 0 ) w\in C\cap K^{(t_0)} w ∈ C ∩ K ( t 0 ) .
Consider any later time τ \tau τ when v v v survives and K K K has not been refreshed. A vertex of K ( t 0 ) K^{(t_0)} K ( t 0 ) missing from N ( τ ) ( v ) N^{(\tau)}(v) N ( τ ) ( v ) belongs to at least one of four sets:
(i) the initial non-neighbors of w w w , excluding w w w itself: at most 2 ε ∣ K ( t 0 ) ∣ 2\varepsilon\lvert K^{(t_0)}\rvert 2 ε ∣ K ( t 0 ) ∣ by Definition 3;
(ii) the positive neighbors of w w w outside C C C when v v v was added: at most 9 2 ε ∣ K ( t 0 ) ∣ \frac{9}{2}\varepsilon\lvert K^{(t_0)}\rvert 2 9 ε ∣ K ( t 0 ) ∣ ;
(iii) the non-neighbors of v v v inside C C C when v v v was added: at most 9 2 ε ∣ K ( t 0 ) ∣ \frac{9}{2}\varepsilon\lvert K^{(t_0)}\rvert 2 9 ε ∣ K ( t 0 ) ∣ ;
(iv) the initial vertices deleted by time τ \tau τ : at most ε ∣ K ( t 0 ) ∣ \varepsilon\lvert K^{(t_0)}\rvert ε ∣ K ( t 0 ) ∣ by Observation 6.4 .
Consequently,
∣ N ( τ ) ( v ) ∩ K ( t 0 ) ∣ ≥ ( 1 − ( 2 + 9 2 + 9 2 + 1 ) ε ) ∣ K ( t 0 ) ∣ = ( 1 − 12 ε ) ∣ K ( t 0 ) ∣ . \left\lvert N^{(\tau)}(v)\cap K^{(t_0)}\right\rvert\ge\left(1-\left(2+\frac{9}{2}+\frac{9}{2}+1\right)\varepsilon\right)\lvert K^{(t_0)}\rvert=(1-12\varepsilon)\lvert K^{(t_0)}\rvert. N ( τ ) ( v ) ∩ K ( t 0 ) ≥ ( 1 − ( 2 + 2 9 + 2 9 + 1 ) ε ) ∣ K ( t 0 ) ∣ = ( 1 − 12 ε ) ∣ K ( t 0 ) ∣ .
For an algorithmic addition, v v v already existed at t 0 t_0 t 0 , so these surviving positive edges also existed then. Thus v v v had more than 2 ∣ K ( t 0 ) ∣ / 3 2\lvert K^{(t_0)}\rvert/3 2 ∣ K ( t 0 ) ∣ /3 initial positive neighbors, proving the induction step and all relevant size bounds. Repeated additions do not change the number of distinct vertices counted.
Finally, suppose that ∣ K ( t 0 ) ∣ < ( 1 − ε ) / ε \lvert K^{(t_0)}\rvert<(1-\varepsilon)/\varepsilon ∣ K ( t 0 ) ∣ < ( 1 − ε ) / ε . By Definition 3 and integrality, K ( t 0 ) K^{(t_0)} K ( t 0 ) is a clique with no positive edges leaving it at t 0 t_0 t 0 . Since ε ∣ K ( t 0 ) ∣ < 1 \varepsilon\lvert K^{(t_0)}\rvert<1 ε ∣ K ( t 0 ) ∣ < 1 , Observation 6.4 permits no data stream addition or removal before refreshment. A first algorithmic addition from outside K ( t 0 ) K^{(t_0)} K ( t 0 ) would have no positive edge to any other vertex of K K K . Its dense core would contain it and another vertex, giving it at least half the core as non-neighbors, contrary to Definition 7. Hence no outside vertex is added and no initial vertex is deleted before refreshment. In this case, every vertex that has belonged to K K K has a closed neighborhood containing K ( t 0 ) K^{(t_0)} K ( t 0 ) .
We next show that a dense core must retain almost all of K ( t 0 ) K^{(t_0)} K ( t 0 ) . This is because a vertex shared by the dense core and K ( t 0 ) K^{(t_0)} K ( t 0 ) still has many initial positive neighbors by Lemma 6.5 , and only a small number of them can lie outside the core. This also means that if the cluster is “active” in the sense that it admits new additions, its dense core cannot change too much.
Lemma 6.6. Suppose that K K K is formed at t 0 t_0 t 0 , is not refreshed before t t t , and has a β ε \beta\varepsilon β ε -dense core at t t t . For every τ ∈ [ t 0 , t ] \tau\in[t_0,t] τ ∈ [ t 0 , t ] ,
∣ K ( t 0 ) ∖ K ( τ ) ∣ ≤ 7 ε ∣ K ( t 0 ) ∣ , ∣ K ( τ ) ∖ K ( t 0 ) ∣ ≤ 3 ε ∣ K ( t 0 ) ∣ . \left|K^{(t_0)} \setminus K^{(\tau)}\right| \le7\varepsilon\left|K^{(t_0)}\right|,\qquad\left|K^{(\tau)} \setminus K^{(t_0)}\right| \le3\varepsilon\left|K^{(t_0)}\right|. K ( t 0 ) ∖ K ( τ ) ≤ 7 ε K ( t 0 ) , K ( τ ) ∖ K ( t 0 ) ≤ 3 ε K ( t 0 ) . Whenever a β ε \beta\varepsilon β ε -dense core C ( τ ) C^{(\tau)} C ( τ ) exists, these bounds also hold with C ( τ ) C^{(\tau)} C ( τ ) in place of K ( τ ) K^{(\tau)} K ( τ ) , and ∣ K ( τ ) ∖ C ( τ ) ∣ ≤ 10 ε ∣ K ( t 0 ) ∣ \left|K^{(\tau)} \setminus C^{(\tau)}\right| \le10\varepsilon\left|K^{(t_0)}\right| K ( τ ) ∖ C ( τ ) ≤ 10 ε K ( t 0 ) .
Proof. By Lemma 6.5 , at most 3 ε ∣ K ( t 0 ) ∣ 3\varepsilon\left|K^{(t_0)}\right| 3 ε K ( t 0 ) vertices outside K ( t 0 ) K^{(t_0)} K ( t 0 ) have been added to K K K . This proves the second bound and gives ∣ K ( τ ) ∣ ≤ ( 1 + 3 ε ) ∣ K ( t 0 ) ∣ \left|K^{(\tau)}\right| \le(1+3\varepsilon)\left|K^{(t_0)}\right| K ( τ ) ≤ ( 1 + 3 ε ) K ( t 0 ) at every time τ \tau τ .
First consider a time τ \tau τ when a dense core C ( τ ) C^{(\tau)} C ( τ ) exists. This core contains an initial vertex: otherwise, it has at most 3 ε ∣ K ( t 0 ) ∣ 3\varepsilon\left|K^{(t_0)}\right| 3 ε K ( t 0 ) vertices, whereas the auxiliary bound in the proof of Lemma 6.5 gives every vertex of the core at least ( 1 − 12 ε ) ∣ K ( t 0 ) ∣ (1-12\varepsilon)\left|K^{(t_0)}\right| ( 1 − 12 ε ) K ( t 0 ) positive neighbors outside it, contradicting Definition 7. Choose u ∈ C ( τ ) ∩ K ( t 0 ) u \in C^{(\tau)} \cap K^{(t_0)} u ∈ C ( τ ) ∩ K ( t 0 ) . Every vertex of K ( t 0 ) ∖ C ( τ ) K^{(t_0)} \setminus C^{(\tau)} K ( t 0 ) ∖ C ( τ ) is an initial non-neighbor of u u u , a deleted vertex, or a positive neighbor of u u u outside C ( τ ) C^{(\tau)} C ( τ ) . These three sets have size at most 3 2 ε ∣ K ( t 0 ) ∣ \frac{3}{2}\varepsilon\left|K^{(t_0)}\right| 2 3 ε K ( t 0 ) , ε ∣ K ( t 0 ) ∣ \varepsilon\left|K^{(t_0)}\right| ε K ( t 0 ) , and 9 2 ε ∣ K ( t 0 ) ∣ \frac{9}{2}\varepsilon\left|K^{(t_0)}\right| 2 9 ε K ( t 0 ) , respectively, by Definition 3, Observation 6.4 , and Definition 7. Here we use ε / ( 1 − ε ) ≤ 3 ε / 2 \varepsilon/(1-\varepsilon) \le3\varepsilon/2 ε / ( 1 − ε ) ≤ 3 ε /2 and 4 ε ( 1 + 3 ε ) / ( 1 − 4 ε ) ≤ 9 ε / 2 4\varepsilon(1+3\varepsilon)/(1-4\varepsilon) \le9\varepsilon/2 4 ε ( 1 + 3 ε ) / ( 1 − 4 ε ) ≤ 9 ε /2 . Consequently,
∣ K ( t 0 ) ∖ C ( τ ) ∣ ≤ ( 3 2 + 1 + 9 2 ) ε ∣ K ( t 0 ) ∣ = 7 ε ∣ K ( t 0 ) ∣ . \left|K^{(t_0)} \setminus C^{(\tau)}\right| \le\left(\frac{3}{2}+1+\frac{9}{2}\right)\varepsilon\left|K^{(t_0)}\right|=7\varepsilon\left|K^{(t_0)}\right|. K ( t 0 ) ∖ C ( τ ) ≤ ( 2 3 + 1 + 2 9 ) ε K ( t 0 ) = 7 ε K ( t 0 ) .
Together with the addition bound, this proves all assertions about C ( τ ) C^{(\tau)} C ( τ ) , including ∣ K ( τ ) ∖ C ( τ ) ∣ ≤ 10 ε ∣ K ( t 0 ) ∣ \left|K^{(\tau)} \setminus C^{(\tau)}\right| \le10\varepsilon\left|K^{(t_0)}\right| K ( τ ) ∖ C ( τ ) ≤ 10 ε K ( t 0 ) .
Finally, suppose that more than 7 ε ∣ K ( t 0 ) ∣ 7\varepsilon\left|K^{(t_0)}\right| 7 ε K ( t 0 ) initial vertices are outside K K K at some earlier time. If there is no later addition, they remain outside through t t t , and there could not be a dense core at t t t , which is a contradiction. Otherwise, immediately before the next addition, the same vertices are still outside K K K . The merge guarantee in Lemma 3.2 requires a dense core before this addition, contradicting the bound just proved. Thus the first bound also holds at times when no dense core exists.
The next lemma states that the degree of a dense vertex cannot decrease too much before its cluster is refreshed. A vertex in a dense core has few positive neighbors outside it. Thus, a large decrease in its degree must delete many vertices that have belonged to the cluster, triggering refreshment even if they were removed from the cluster earlier.
Lemma 6.7. Suppose that v v v belongs to a λ ε \lambda\varepsilon λ ε -dense core of K K K at time t 1 ≥ t 0 t_1 \ge t_0 t 1 ≥ t 0 , where λ ∈ { 1 , β } \lambda\in\{1,\beta\} λ ∈ { 1 , β } . If v v v has not been deleted and K K K is not refreshed before t ≥ t 1 t \ge t_1 t ≥ t 1 , then
deg ( t ) ( v ) ≥ deg ( t 1 ) ( v ) − ( λ + 2 ) ε ∣ K ( t 0 ) ∣ . \deg^{(t)}(v) \ge\deg^{(t_1)}(v)-(\lambda+2)\varepsilon\left|K^{(t_0)}\right|. deg ( t ) ( v ) ≥ deg ( t 1 ) ( v ) − ( λ + 2 ) ε K ( t 0 ) .
Proof. Let C ( t 1 ) C^{(t_1)} C ( t 1 ) be the dense core containing v v v at time t 1 t_1 t 1 . By Definition 7 and lemma 6.5, the number of positive neighbors of v v v outside C ( t 1 ) C^{(t_1)} C ( t 1 ) at that time is at most
λ ε 1 − λ ε ∣ C ( t 1 ) ∣ ≤ λ ε ( 1 + 3 ε ) 1 − λ ε ∣ K ( t 0 ) ∣ ≤ ( λ + 1 ) ε ∣ K ( t 0 ) ∣ . \frac{\lambda\varepsilon}{1-\lambda\varepsilon}\left|C^{(t_1)}\right| \le\frac{\lambda\varepsilon(1+3\varepsilon)}{1-\lambda\varepsilon}\left|K^{(t_0)}\right| \le(\lambda+1)\varepsilon\left|K^{(t_0)}\right|. 1 − λ ε λ ε C ( t 1 ) ≤ 1 − λ ε λ ε ( 1 + 3 ε ) K ( t 0 ) ≤ ( λ + 1 ) ε K ( t 0 ) .
Suppose the claimed degree bound fails. Then more than ( λ + 2 ) ε ∣ K ( t 0 ) ∣ (\lambda+2)\varepsilon\left|K^{(t_0)}\right| ( λ + 2 ) ε K ( t 0 ) positive neighbors of v v v at time t 1 t_1 t 1 have been deleted by time t t t . At most ( λ + 1 ) ε ∣ K ( t 0 ) ∣ (\lambda+1)\varepsilon\left|K^{(t_0)}\right| ( λ + 1 ) ε K ( t 0 ) of them lie outside C ( t 1 ) C^{(t_1)} C ( t 1 ) , so more than ε ∣ K ( t 0 ) ∣ \varepsilon\left|K^{(t_0)}\right| ε K ( t 0 ) lie inside it. All these vertices have belonged to K K K , and their deletions are counted by del ( K ) \operatorname{del}(K) del ( K ) even if they were removed from K K K earlier. This contradicts Observation 6.4 , since K K K has not been refreshed. □ \square □
Finally, we show that if a vertex is added to two clusters consecutively, then the second one must have a substantially larger size. Since if not, a vertex is added to two clusters of comparable initial size, then the two initial clusters must overlap substantially: the vertex has many neighbors in the first and few neighbors outside the dense core of the second. Identification when the more recently formed cluster is formed would then remove every remaining vertex from the earlier cluster, so both clusters cannot remain maintained.
Lemma 6.8. Suppose that v v v is added to K 1 K_1 K 1 and later to a distinct cluster K 2 K_2 K 2 , formed at times t 1 , t 2 t_1,t_2 t 1 , t 2 , respectively. If both clusters are still maintained after all cluster operations and refreshments are complete, then
∣ K 2 ( t 2 ) ∣ > 3 2 ∣ K 1 ( t 1 ) ∣ . \left|K_2^{(t_2)}\right| > \frac{3}{2}\left|K_1^{(t_1)}\right|. K 2 ( t 2 ) > 2 3 K 1 ( t 1 ) .
Proof. Suppose for contradiction that ∣ K 2 ( t 2 ) ∣ ≤ 3 ∣ K 1 ( t 1 ) ∣ / 2 \left|K_2^{(t_2)}\right| \le3\left|K_1^{(t_1)}\right|/2 K 2 ( t 2 ) ≤ 3 K 1 ( t 1 ) /2 .
First we show that the initial clusters overlap substantially. Let τ \tau τ be the time when v v v is added to K 2 K_2 K 2 , and let C C C be its dense core immediately afterward. The neighborhood bound in the proof of Lemma 6.5 gives ∣ N ( τ ) [ v ] ∩ K 1 ( t 1 ) ∣ ≥ ( 1 − 12 ε ) ∣ K 1 ( t 1 ) ∣ \left|N^{(\tau)}[v] \cap K_1^{(t_1)}\right| \ge(1-12\varepsilon)\left|K_1^{(t_1)}\right| N ( τ ) [ v ] ∩ K 1 ( t 1 ) ≥ ( 1 − 12 ε ) K 1 ( t 1 ) . Of these vertices, those outside K 2 ( t 2 ) K_2^{(t_2)} K 2 ( t 2 ) either lie outside C C C or belong to C ∖ K 2 ( t 2 ) C \setminus K_2^{(t_2)} C ∖ K 2 ( t 2 ) . By Definition 7 and lemma 6.5, the two sets have size at most 4 ε ( 1 + 3 ε ) ∣ K 2 ( t 2 ) ∣ / ( 1 − 4 ε ) 4\varepsilon(1+3\varepsilon)\left|K_2^{(t_2)}\right|/(1-4\varepsilon) 4 ε ( 1 + 3 ε ) K 2 ( t 2 ) / ( 1 − 4 ε ) and 3 ε ∣ K 2 ( t 2 ) ∣ 3\varepsilon\left|K_2^{(t_2)}\right| 3 ε K 2 ( t 2 ) , respectively. Thus
∣ K 1 ( t 1 ) ∩ K 2 ( t 2 ) ∣ ≥ ( 1 − 12 ε ) ∣ K 1 ( t 1 ) ∣ − ( 4 ε ( 1 + 3 ε ) 1 − 4 ε + 3 ε ) ∣ K 2 ( t 2 ) ∣ > ( 1 − 23 ε ) ∣ K 1 ( t 1 ) ∣ . \begin{aligned}
\left|K_1^{(t_1)} \cap K_2^{(t_2)}\right|
&\ge(1-12\varepsilon)\left|K_1^{(t_1)}\right|-\left(\frac{4\varepsilon(1+3\varepsilon)}{1-4\varepsilon}+3\varepsilon\right)\left|K_2^{(t_2)}\right|\\
&> (1-23\varepsilon)\left|K_1^{(t_1)}\right|.
\end{aligned} K 1 ( t 1 ) ∩ K 2 ( t 2 ) ≥ ( 1 − 12 ε ) K 1 ( t 1 ) − ( 1 − 4 ε 4 ε ( 1 + 3 ε ) + 3 ε ) K 2 ( t 2 ) > ( 1 − 23 ε ) K 1 ( t 1 ) .
We next show that identification removes the earlier cluster. Let K , K ′ K,K' K , K ′ be the earlier and later clusters, formed at t 0 , t 0 ′ t_0,t'_0 t 0 , t 0 ′ , respectively. Every vertex in the displayed intersection is present when K ′ K' K ′ is formed. Consider any vertex u u u remaining in K K K after the vertices of K ′ K' K ′ have been added. Since u ∉ ( K ′ ) ( t 0 ′ ) u \notin(K')^{(t'_0)} u ∈ / ( K ′ ) ( t 0 ′ ) , the neighborhood bound in the proof of Lemma 6.5 , applied at this time, gives
∣ N ( u ) ∩ ( K ′ ) ( t 0 ′ ) ∣ ≥ ∣ K 1 ( t 1 ) ∩ K 2 ( t 2 ) ∣ − 12 ε ∣ K ( t 0 ) ∣ > ( 1 − 41 ε ) ∣ K 1 ( t 1 ) ∣ > 1 2 ∣ ( K ′ ) ( t 0 ′ ) ∣ . \begin{aligned}
\left|N(u) \cap(K')^{(t'_0)}\right|
&\ge\left|K_1^{(t_1)} \cap K_2^{(t_2)}\right|-12\varepsilon\left|K^{(t_0)}\right|\\
&> (1-41\varepsilon)\left|K_1^{(t_1)}\right| > \frac{1}{2}\left|(K')^{(t'_0)}\right|.
\end{aligned} N ( u ) ∩ ( K ′ ) ( t 0 ′ ) ≥ K 1 ( t 1 ) ∩ K 2 ( t 2 ) − 12 ε K ( t 0 ) > ( 1 − 41 ε ) K 1 ( t 1 ) > 2 1 ( K ′ ) ( t 0 ′ ) .
Here both initial cluster sizes are at most 3 ∣ K 1 ( t 1 ) ∣ / 2 3\left|K_1^{(t_1)}\right|/2 3 K 1 ( t 1 ) /2 . Moreover,
∣ ( K ′ ) ( t 0 ′ ) ∣ > ( 1 − 23 ε ) ∣ K 1 ( t 1 ) ∣ > 1 2 ∣ K ( t 0 ) ∣ . \left|(K')^{(t_0')}\right|>(1-23\varepsilon)\left|K_1^{(t_1)}\right|>\frac{1}{2}\left|K^{(t_0)}\right|. ( K ′ ) ( t 0 ′ ) > ( 1 − 23 ε ) K 1 ( t 1 ) > 2 1 K ( t 0 ) .
Thus u u u is identified and passes the size comparison in Line 2 of Algorithm 2. Every remaining vertex of K K K is consequently removed. The empty cluster is discarded, contradicting that both clusters are still maintained.
Validity of V ~ s i n g l e t o n \widetilde{V}_{\mathrm{singleton}} V singleton and V ~ l i s t , ( i ) \widetilde{V}_{\mathrm{list},(i)} V list , ( i )
We now present our core theorem on the validity of V ~ s i n g l e t o n \widetilde{V}_{\mathrm{singleton}} V singleton and V ~ l i s t , ( i ) \widetilde{V}_{\mathrm{list},(i)} V list , ( i ) in Theorem 4.
Theorem 4. Fix a time t t t after all cluster operations and refreshments are complete. For any ε \varepsilon ε -dense vertex v v v , let K v K_v K v be the set of vertices in N ( t ) [ v ] N^{(t)}[v] N ( t ) [ v ] that are in ε \varepsilon ε -agreement with v v v , and suppose that ∣ K v ∣ ∈ [ 2 i , 2 i + 1 ) |K_v|\in[2^i,2^{i+1}) ∣ K v ∣ ∈ [ 2 i , 2 i + 1 ) . At least one of the following happens:
(1) There exists a cluster K K K at t t t such that at least a ( 1 − 91 ε ) (1-91\varepsilon) ( 1 − 91 ε ) -fraction of K v K_v K v is in K ( t ) K^{(t)} K ( t ) , and all vertices in K v ∖ K ( t ) K_v\setminus K^{(t)} K v ∖ K ( t ) are in both V ~ s i n g l e t o n ( t ) \widetilde{V}_{\mathrm{singleton}}^{(t)} V singleton ( t ) and V ~ l i s t , ( j ) ( t ) \widetilde{V}_{\mathrm{list},(j)}^{(t)} V list , ( j ) ( t ) for every j ∈ S i ( 5 ) j\in S_i(5) j ∈ S i ( 5 ) .
(2) At least a 40 ε 40\varepsilon 40 ε -fraction of K v K_v K v is in both V ~ s i n g l e t o n ( t ) \widetilde{V}_{\mathrm{singleton}}^{(t)} V singleton ( t ) and V ~ l i s t , ( j ) ( t ) \widetilde{V}_{\mathrm{list},(j)}^{(t)} V list , ( j ) ( t ) for every j ∈ S i ( 5 ) j\in S_i(5) j ∈ S i ( 5 ) .
Proof. Note that ∣ K v ∣ ≥ 2 |K_v|\ge2 ∣ K v ∣ ≥ 2 . All numerical inequalities below use β = 4 \beta=4 β = 4 and ε < 1 / 19000 \varepsilon<1/19000 ε < 1/19000 , as in Remark 5.1. Density and agreement (Definitions 4 and 5) give, for every u ∈ K v u\in K_v u ∈ K v ,
deg ( t ) ( u ) + 1 ≤ ∣ K v ∣ ( 1 − ε ) 2 ≤ 1.02 ∣ K v ∣ , \deg^{(t)}(u)+1\le\frac{|K_v|}{(1-\varepsilon)^2}\le1.02|K_v|, deg ( t ) ( u ) + 1 ≤ ( 1 − ε ) 2 ∣ K v ∣ ≤ 1.02∣ K v ∣ ,
∣ K v ∖ N ( t ) [ u ] ∣ ≤ ε ( 1 − ε ) 2 ∣ K v ∣ ≤ 1.02 ε ∣ K v ∣ . \left|K_v\setminus N^{(t)}[u]\right|\le\frac{\varepsilon}{(1-\varepsilon)^2}|K_v|\le1.02\varepsilon|K_v|. K v ∖ N ( t ) [ u ] ≤ ( 1 − ε ) 2 ε ∣ K v ∣ ≤ 1.02 ε ∣ K v ∣.
Consider any maintained cluster K ′ K' K ′ formed at t 0 ′ t_0' t 0 ′ and a vertex w ∈ ( K ′ ) ( t ) ∩ K v w\in(K')^{(t)}\cap K_v w ∈ ( K ′ ) ( t ) ∩ K v . By the neighbourhood bound in the proof of Lemma 6.5 ,
( 1 − 12 ε ) ∣ ( K ′ ) ( t 0 ′ ) ∣ ≤ deg ( t ) ( w ) + 1 ≤ 1.02 ∣ K v ∣ , (1-12\varepsilon)\left|(K')^{(t_0')}\right|\le\deg^{(t)}(w)+1\le1.02|K_v|, ( 1 − 12 ε ) ( K ′ ) ( t 0 ′ ) ≤ deg ( t ) ( w ) + 1 ≤ 1.02∣ K v ∣ ,
and hence
∣ ( K ′ ) ( t 0 ′ ) ∣ ≤ 1.02 1 − 12 ε ∣ K v ∣ ≤ 1.11 ∣ K v ∣ . \left|(K')^{(t_0')}\right|\le\frac{1.02}{1-12\varepsilon}|K_v|\le1.11|K_v|. ( K ′ ) ( t 0 ′ ) ≤ 1 − 12 ε 1.02 ∣ K v ∣ ≤ 1.11∣ K v ∣.
Whenever u ∈ K v u\in K_v u ∈ K v is added to such a cluster, its dense core contains u u u and has at most ( 1 + 3 ε ) ∣ ( K ′ ) ( t 0 ′ ) ∣ (1+3\varepsilon)\left|(K')^{(t_0')}\right| ( 1 + 3 ε ) ( K ′ ) ( t 0 ′ ) vertices, by Observation 6.3 and Lemma 6.5 . Therefore, by Definition 7, u u u has at most
4 ε 1 − 4 ε ( 1 + 3 ε ) ∣ ( K ′ ) ( t 0 ′ ) ∣ ≤ 4 ⋅ 1.11 ( 1 + 3 ε ) 1 − 4 ε ε ∣ K v ∣ ≤ 4.60 ε ∣ K v ∣ \frac{4\varepsilon}{1-4\varepsilon}(1+3\varepsilon)\left|(K')^{(t_0')}\right|\le\frac{4\cdot1.11(1+3\varepsilon)}{1-4\varepsilon}\varepsilon|K_v|\le4.60\varepsilon|K_v| 1 − 4 ε 4 ε ( 1 + 3 ε ) ( K ′ ) ( t 0 ′ ) ≤ 1 − 4 ε 4 ⋅ 1.11 ( 1 + 3 ε ) ε ∣ K v ∣ ≤ 4.60 ε ∣ K v ∣
positive neighbors outside that core. If a subset A ⊂ K v A\subset K_v A ⊂ K v is already present at this addition time s ≤ t s\le t s ≤ t , the preceding non-neighbor bound and Lemma 6.5 imply
∣ ( K ′ ) ( s ) ∩ K v ∣ ≥ ∣ A ∣ − ( 1.02 + 4.60 ) ε ∣ K v ∣ = ∣ A ∣ − 5.62 ε ∣ K v ∣ , \begin{aligned}
\left|(K')^{(s)}\cap K_v\right|\ge|A|-(1.02+4.60)\varepsilon|K_v| \\
&=|A|-5.62\varepsilon|K_v|,
\end{aligned} ( K ′ ) ( s ) ∩ K v ≥ ∣ A ∣ − ( 1.02 + 4.60 ) ε ∣ K v ∣ = ∣ A ∣ − 5.62 ε ∣ K v ∣ ,
∣ ( K ′ ) ( t 0 ′ ) ∩ K v ∣ ≥ ∣ A ∣ − ( 5.62 + 3 ⋅ 1.11 ) ε ∣ K v ∣ = ∣ A ∣ − 8.95 ε ∣ K v ∣ . \begin{aligned}
\left|(K')^{(t_0')}\cap K_v\right|\ge|A|-(5.62+3\cdot1.11)\varepsilon|K_v| \\
&=|A|-8.95\varepsilon|K_v|.
\end{aligned} ( K ′ ) ( t 0 ′ ) ∩ K v ≥ ∣ A ∣ − ( 5.62 + 3 ⋅ 1.11 ) ε ∣ K v ∣ = ∣ A ∣ − 8.95 ε ∣ K v ∣.
Proof of statement (1). Suppose that ∣ K ( t ) ∩ K v ∣ ≥ ( 1 − 91 ε ) ∣ K v ∣ |K^{(t)} \cap K_v| \ge(1 - 91\varepsilon)|K_v| ∣ K ( t ) ∩ K v ∣ ≥ ( 1 − 91 ε ) ∣ K v ∣ , and let A = K ( t 0 ) ∩ K v A = K^{(t_0)} \cap K_v A = K ( t 0 ) ∩ K v . By Lemma 6.5 and the size bound above,
∣ A ∣ ≥ ( 1 − ( 91 + 3 ⋅ 1.11 ) ε ) ∣ K v ∣ = ( 1 − 94.33 ε ) ∣ K v ∣ > 3 ∣ K v ∣ / 4. |A| \ge(1 - (91 + 3 \cdot1.11)\varepsilon)|K_v|
= (1 - 94.33\varepsilon)|K_v| > 3|K_v|/4. ∣ A ∣ ≥ ( 1 − ( 91 + 3 ⋅ 1.11 ) ε ) ∣ K v ∣ = ( 1 − 94.33 ε ) ∣ K v ∣ > 3∣ K v ∣/4.
Suppose that u ∈ K v ∖ K ( t ) u \in K_v \setminus K^{(t)} u ∈ K v ∖ K ( t ) is in another cluster K ′ K' K ′ at t t t , and let s s s be the time of its last addition to K ′ K' K ′ . If s < t 0 s < t_0 s < t 0 , then u u u remains in K ′ K' K ′ from s s s through t t t , and hence u ∉ K ( t 0 ) u \notin K^{(t_0)} u ∈ / K ( t 0 ) . It has at least
∣ A ∣ − 1.02 ε ∣ K v ∣ ≥ ( 1 − ( 94.33 + 1.02 ) ε ) ∣ K v ∣ = ( 1 − 95.35 ε ) ∣ K v ∣ > 1.11 2 ∣ K v ∣ ≥ ∣ K ( t 0 ) ∣ / 2 |A| - 1.02\varepsilon|K_v| \ge(1 - (94.33 + 1.02)\varepsilon)|K_v|
= (1 - 95.35\varepsilon)|K_v|
> \frac{1.11}{2}|K_v| \ge|K^{(t_0)}|/2 ∣ A ∣ − 1.02 ε ∣ K v ∣ ≥ ( 1 − ( 94.33 + 1.02 ) ε ) ∣ K v ∣ = ( 1 − 95.35 ε ) ∣ K v ∣ > 2 1.11 ∣ K v ∣ ≥ ∣ K ( t 0 ) ∣/2
positive neighbors in K ( t 0 ) K^{(t_0)} K ( t 0 ) , and
∣ K ( t 0 ) ∣ > 3 4 ∣ K v ∣ > 1.11 2 ∣ K v ∣ ≥ ∣ ( K ′ ) ( t 0 ′ ) ∣ / 2. |K^{(t_0)}| > \frac{3}{4}|K_v| > \frac{1.11}{2}|K_v| \ge|(K')^{(t'_0)}|/2. ∣ K ( t 0 ) ∣ > 4 3 ∣ K v ∣ > 2 1.11 ∣ K v ∣ ≥ ∣ ( K ′ ) ( t 0 ′ ) ∣/2.
Identification in Line 2 of Algorithm 2 therefore removes u u u , contradicting the choice of s s s . If s > t 0 s > t_0 s > t 0 , all vertices of A A A are present at s s s , so
∣ ( K ′ ) ( t 0 ′ ) ∩ K v ∣ ≥ ∣ A ∣ − 8.95 ε ∣ K v ∣ ≥ ( 1 − ( 94.33 + 8.95 ) ε ) ∣ K v ∣ = ( 1 − 103.28 ε ) ∣ K v ∣ > 3 ∣ K v ∣ / 4. |(K')^{(t'_0)} \cap K_v| \ge|A| - 8.95\varepsilon|K_v|
\ge(1 - (94.33 + 8.95)\varepsilon)|K_v|
= (1 - 103.28\varepsilon)|K_v| > 3|K_v|/4. ∣ ( K ′ ) ( t 0 ′ ) ∩ K v ∣ ≥ ∣ A ∣ − 8.95 ε ∣ K v ∣ ≥ ( 1 − ( 94.33 + 8.95 ) ε ) ∣ K v ∣ = ( 1 − 103.28 ε ) ∣ K v ∣ > 3∣ K v ∣/4.
The two initial clusters share a vertex of K v K_v K v and both have sizes in ( 3 ∣ K v ∣ / 4 , 1.11 ∣ K v ∣ ] (3|K_v|/4, 1.11|K_v|] ( 3∣ K v ∣/4 , 1.11∣ K v ∣ ] , contradicting Lemma 6.8 , since 1.11 < ( 3 / 2 ) ( 3 / 4 ) = 1.125 1.11 < (3/2)(3/4) = 1.125 1.11 < ( 3/2 ) ( 3/4 ) = 1.125 . These are the only possibilities, since additions to distinct clusters occur at different steps. Thus every vertex of K v ∖ K ( t ) K_v \setminus K^{(t)} K v ∖ K ( t ) is a singleton.
Proof of statement (2). Suppose that no cluster contains ( 1 − 91 ε ) ∣ K v ∣ (1 - 91\varepsilon)|K_v| ( 1 − 91 ε ) ∣ K v ∣ vertices of K v K_v K v at t t t . Let K v , 40 ε K_{v,40\varepsilon} K v , 40 ε contain the last ⌈ 40 ε ∣ K v ∣ ⌉ \lceil40\varepsilon|K_v|\rceil ⌈ 40 ε ∣ K v ∣ ⌉ vertices of K v K_v K v inserted into the graph. If all are singletons, they suffice. Otherwise, among all vertices of K v K_v K v currently in clusters, choose a vertex w w w whose last addition to its current cluster is latest. Let s s s be that time and K K K that cluster. Note that more than ( 1 − 40 ε ) ∣ K v ∣ (1 - 40\varepsilon)|K_v| ( 1 − 40 ε ) ∣ K v ∣ current vertices of K v K_v K v (at least all vertices in K v ∖ K v , 40 ε K_v \setminus K_{v,40\varepsilon} K v ∖ K v , 40 ε ) are already present at s s s . The bound above gives
∣ K ( s ) ∩ K v ∣ > ( 1 − ( 40 + 5.62 ) ε ) ∣ K v ∣ = ( 1 − 45.62 ε ) ∣ K v ∣ . |K^{(s)} \cap K_v| > (1 - (40 + 5.62)\varepsilon)|K_v| = (1 - 45.62\varepsilon)|K_v|. ∣ K ( s ) ∩ K v ∣ > ( 1 − ( 40 + 5.62 ) ε ) ∣ K v ∣ = ( 1 − 45.62 ε ) ∣ K v ∣.
Every vertex of ( K ( s ) ∩ K v ) ∖ K ( t ) (K^{(s)} \cap K_v) \setminus K^{(t)} ( K ( s ) ∩ K v ) ∖ K ( t ) is now a singleton: it was in K K K at s s s , so if it were now in another cluster, its last addition would be after s s s , contradicting the choice of w w w . Recall that we assume no cluster contains ( 1 − 91 ε ) ∣ K v ∣ (1 - 91\varepsilon)|K_v| ( 1 − 91 ε ) ∣ K v ∣ vertices of K v K_v K v at t t t , so there are more than
( 91 − 45.62 ) ε ∣ K v ∣ = 45.38 ε ∣ K v ∣ > 40 ε ∣ K v ∣ (91 - 45.62)\varepsilon|K_v| = 45.38\varepsilon|K_v| > 40\varepsilon|K_v| ( 91 − 45.62 ) ε ∣ K v ∣ = 45.38 ε ∣ K v ∣ > 40 ε ∣ K v ∣
such vertices.
Validity of V ~ l i s t , ( i ) \widetilde{V}_{\mathrm{list},(i)} V list , ( i ) . Finally, consider any singleton u u u found above. We prove that it is never removed from the list V ~ l i s t , ( i ) \widetilde{V}_{\mathrm{list},(i)} V list , ( i ) due to low degree. In statement (1), use its last removal from a cluster at or after t 0 t_0 t 0 , if there is one; otherwise, use identification at t 0 t_0 t 0 or its later insertion. In statement (2), use its insertion if it was never in a cluster, and its last removal otherwise; for vertices removed from K ( s ) K^{(s)} K ( s ) , this removal occurs after s s s . After the corresponding operations are complete, u u u is added to V ~ s i n g l e t o n \widetilde{V}_{\mathrm{singleton}} V singleton and all degree lists and remains a singleton through t t t . At least ( 1 − 94.33 ε ) ∣ K v ∣ (1 - 94.33\varepsilon)|K_v| ( 1 − 94.33 ε ) ∣ K v ∣ current vertices of K v K_v K v are already present then: use A A A in statement (1), and the more than ( 1 − 40 ε ) ∣ K v ∣ (1 - 40\varepsilon)|K_v| ( 1 − 40 ε ) ∣ K v ∣ vertices present at insertion or at s s s in statement (2). These vertices survive through t t t , so throughout this interval,
deg ( u ) ≥ ( 1 − ( 94.33 + 1.02 ) ε ) ∣ K v ∣ − 1 = ( 1 − 95.35 ε ) ∣ K v ∣ − 1 > ∣ K v ∣ / 2 − 1. \begin{aligned}
\deg(u) \ge(1 - (94.33 + 1.02)\varepsilon)|K_v| - 1 \\
&= (1 - 95.35\varepsilon)|K_v| - 1 > |K_v|/2 - 1.
\end{aligned} deg ( u ) ≥ ( 1 − ( 94.33 + 1.02 ) ε ) ∣ K v ∣ − 1 = ( 1 − 95.35 ε ) ∣ K v ∣ − 1 > ∣ K v ∣/2 − 1.
Since degrees are integers, deg ( u ) ≥ ⌊ ∣ K v ∣ / 2 ⌋ ≥ 2 i − 1 \deg(u) \ge\lfloor|K_v|/2 \rfloor\ge2^{i-1} deg ( u ) ≥ ⌊ ∣ K v ∣/2 ⌋ ≥ 2 i − 1 . For every j ∈ S i ( 5 ) j \in S_i(5) j ∈ S i ( 5 ) , we have j ≤ i + 2 j \le i + 2 j ≤ i + 2 , so
2 j 10 ≤ 2 i + 2 10 = 4 5 2 i − 1 < 2 i − 1 . \frac{2^j}{10} \le\frac{2^{i+2}}{10} = \frac{4}{5}2^{i-1} < 2^{i-1}. 10 2 j ≤ 10 2 i + 2 = 5 4 2 i − 1 < 2 i − 1 .
Thus the degree check in Algorithm 5 and Algorithm 7 cannot remove u u u from the required lists. □
Correctness of High Degree Clusters
Note that by Observation 6.4 and Lemma 6.5 , we bound the number of data stream removals, data stream additions, and algorithmic additions. Then intuitively, the cluster still satisfies the requirements of an O ( ε ) O(\varepsilon) O ( ε ) -tolerant cluster for a sufficiently large constant if we only have these three types of operation. However, vertices in a cluster could be largely removed due to algorithmic removals, which does not recognize by our counters in Algorithm 1. Thus we count the distinct vertices that have belonged to K K K during [ t 0 , t ] [t_0,t] [ t 0 , t ] , remain in the graph at t t t , and lie outside K ( t ) K^{(t)} K ( t ) , each counted once. Now, we categorize into two cases based on this number: I. there are at most ( 2 β + 13 ) ε ∣ K ( t 0 ) ∣ (2\beta+ 13)\varepsilon|K^{(t_0)}| ( 2 β + 13 ) ε ∣ K ( t 0 ) ∣ such vertices; and II. there are more than ( 2 β + 13 ) ε ∣ K ( t 0 ) ∣ (2\beta+ 13)\varepsilon|K^{(t_0)}| ( 2 β + 13 ) ε ∣ K ( t 0 ) ∣ such vertices. Throughout this subsection, ∣ K ( t 0 ) ∣ ≥ ( 1 − ε ) / ε |K^{(t_0)}| \ge(1 - \varepsilon)/\varepsilon ∣ K ( t 0 ) ∣ ≥ ( 1 − ε ) / ε .
Case I: at most ( 2 β + 13 ) ε ∣ K ( t 0 ) ∣ (2\beta+ 13)\varepsilon|K^{(t_0)}| ( 2 β + 13 ) ε ∣ K ( t 0 ) ∣ such vertices
We first show that if this number is at most ( 2 β + 13 ) ε ∣ K ( t 0 ) ∣ = 21 ε ∣ K ( t 0 ) ∣ (2\beta+ 13)\varepsilon|K^{(t_0)}| = 21\varepsilon|K^{(t_0)}| ( 2 β + 13 ) ε ∣ K ( t 0 ) ∣ = 21 ε ∣ K ( t 0 ) ∣ , then the number of non-neighbors inside K K K is also bounded, satisfying the requirement of a tolerant cluster.
Lemma 6.9. Suppose that there are at most 21 ε ∣ K ( t 0 ) ∣ 21\varepsilon|K^{(t_0)}| 21 ε ∣ K ( t 0 ) ∣ surviving vertices that have belonged to K K K during [ t 0 , t ] [t_0,t] [ t 0 , t ] and lie outside K ( t ) K^{(t)} K ( t ) . Then each vertex v ∈ K v \in K v ∈ K has at most ( 4 β + 22 ) ε ∣ K ( t ) ∣ (4\beta+22)\varepsilon|K^{(t)}| ( 4 β + 22 ) ε ∣ K ( t ) ∣ non-neighbors inside K K K , i.e., K K K satisfies the first property of a tolerant cluster (see Definition 6).
Proof. By Lemma 6.5 , each v ∈ K ( t ) v \in K^{(t)} v ∈ K ( t ) has at most 12 ε ∣ K ( t 0 ) ∣ 12\varepsilon|K^{(t_0)}| 12 ε ∣ K ( t 0 ) ∣ non-neighbors in K ( t 0 ) K^{(t_0)} K ( t 0 ) , and at most 3 ε ∣ K ( t 0 ) ∣ 3\varepsilon|K^{(t_0)}| 3 ε ∣ K ( t 0 ) ∣ vertices of K ( t ) K^{(t)} K ( t ) lie outside K ( t 0 ) K^{(t_0)} K ( t 0 ) . Thus v v v has at most 15 ε ∣ K ( t 0 ) ∣ 15\varepsilon|K^{(t_0)}| 15 ε ∣ K ( t 0 ) ∣ non-neighbors in K ( t ) K^{(t)} K ( t ) . The assumption in Case I and Observation 6.4 give ∣ K ( t ) ∣ ≥ ( 1 − 22 ε ) ∣ K ( t 0 ) ∣ |K^{(t)}| \ge(1 - 22\varepsilon)|K^{(t_0)}| ∣ K ( t ) ∣ ≥ ( 1 − 22 ε ) ∣ K ( t 0 ) ∣ , then we have 15 ε ∣ K ( t 0 ) ∣ ≤ ( 4 β + 22 ) ε ∣ K ( t ) ∣ 15\varepsilon|K^{(t_0)}| \le(4\beta+ 22)\varepsilon|K^{(t)}| 15 ε ∣ K ( t 0 ) ∣ ≤ ( 4 β + 22 ) ε ∣ K ( t ) ∣ . This proves the statement. □
The bound of 15 ε ∣ K ( t 0 ) ∣ 15\varepsilon|K^{(t_0)}| 15 ε ∣ K ( t 0 ) ∣ non-neighbors does not use the assumption of Case I and also holds for smaller clusters, by the closed-neighborhood bound in Lemma 6.5 . We remark that the above analysis also shows that Lemma 6.9 is satisfied at any time during [ t 0 , t ] [t_0,t] [ t 0 , t ] at which the hypothesis of Case I holds. Next, we show that for dense vertices with a large number of neighbors outside, at least a portion of these neighbors are inside V ~ s i n g l e t o n \widetilde{V}_{\mathrm{singleton}} V singleton , such that the second requirement of a tolerant cluster is also satisfied and we can charge the cost.
Lemma 6.10. Suppose that v v v belongs to K K K and is ε \varepsilon ε -dense at time t t t , let K v K_v K v be the set of vertices in N [ v ] N[v] N [ v ] that are in ε \varepsilon ε -agreement with v v v , then at least 40 ε 40\varepsilon 40 ε -fraction of K v ∖ K K_v \setminus K K v ∖ K is in V ~ s i n g l e t o n \widetilde{V}_{\mathrm{singleton}} V singleton , i.e., K K K satisfies the second property of a tolerant cluster (see Definition 6).
Proof. The proof directly follows from Theorem 4. Its first statement cannot hold for a cluster K ′ ≠ K K' \ne K K ′ = K , since then v ∈ K v ∖ K ′ v \in K_v \setminus K' v ∈ K v ∖ K ′ would belong to V ~ s i n g l e t o n \widetilde{V}_{\mathrm{singleton}} V singleton , contradicting v ∈ K v \in K v ∈ K . If it holds for K K K , all of K v ∖ K K_v \setminus K K v ∖ K belongs to V ~ s i n g l e t o n \widetilde{V}_{\mathrm{singleton}} V singleton . Otherwise, the second statement places at least 40 ε ∣ K v ∣ ≥ 40 ε ∣ K v ∖ K ∣ 40\varepsilon|K_v| \ge40\varepsilon|K_v \setminus K| 40 ε ∣ K v ∣ ≥ 40 ε ∣ K v ∖ K ∣ vertices in V ~ s i n g l e t o n \widetilde{V}_{\mathrm{singleton}} V singleton , and all are outside K K K .
Set ε τ = ( 4 β + 22 ) ε = 38 ε \varepsilon_{\tau}=(4\beta+22)\varepsilon=38\varepsilon ε τ = ( 4 β + 22 ) ε = 38 ε , ε l = ε \varepsilon_l=\varepsilon ε l = ε , η d = 1 / 38 \eta_d=1/38 η d = 1/38 , and η l = 1 \eta_l=1 η l = 1 . The agreement constants in Definition 6 are C t = 1 / 38 C_t=1/38 C t = 1/38 and C l = 1 C_l=1 C l = 1 , respectively, so both use agreement parameter ε \varepsilon ε . Combining Lemma 6.9 and Lemma 6.10 , we have the following main result for Case I .
Lemma 6.11 (Case I: tolerant clusters). K K K is a ( 4 β + 22 ) ε (4\beta+22)\varepsilon ( 4 β + 22 ) ε -tolerant cluster at time t t t .
Case II: more than ( 2 β + 13 ) ε ∣ K ( t 0 ) ∣ (2\beta+13)\varepsilon|K^{(t_0)}| ( 2 β + 13 ) ε ∣ K ( t 0 ) ∣ such vertices
If this number is large, the size of K K K decreases a lot, so the analysis in Lemma 6.9 would not go through in general. We remark that this does not necessarily mean that K K K is an isolated cluster, e.g., an exact clique will not become an isolated cluster due to algorithmic removals since there is no non-neighbor inside. For this case, Lemma 6.9 is automatically true and Lemma 6.10 is true given Theorem 4, therefore K K K is still a tolerant cluster. In the following, we suppose that K K K is not a ( 4 β + 22 ) ε (4\beta+22)\varepsilon ( 4 β + 22 ) ε -tolerant cluster, which requires more than ( 2 β + 13 ) ε ∣ K ( t 0 ) ∣ (2\beta+13)\varepsilon|K^{(t_0)}| ( 2 β + 13 ) ε ∣ K ( t 0 ) ∣ such vertices by Lemma 6.11 . We next show that, under this assumption, K K K satisfies the property of an isolated cluster.
Lemma 6.12. For any vertex v ∈ K v \in K v ∈ K and time t t t , suppose that there are more than 21 ε ∣ K ( t 0 ) ∣ 21\varepsilon|K^{(t_0)}| 21 ε ∣ K ( t 0 ) ∣ surviving vertices that have belonged to K K K during [ t 0 , t ] [t_0,t] [ t 0 , t ] and lie outside K ( t ) K^{(t)} K ( t ) , then at least one of the following holds
Proof. By neighborhood bound in the proof of Lemma 6.5 , every current vertex has at least ( 1 − 12 ε ) ∣ K ( t 0 ) ∣ (1-12\varepsilon)|K^{(t_0)}| ( 1 − 12 ε ) ∣ K ( t 0 ) ∣ positive neighbors in K ( t 0 ) K^{(t_0)} K ( t 0 ) that survive at t t t . Since ∣ K ( t ) ∣ ≤ ( 1 + 3 ε ) ∣ K ( t 0 ) ∣ |K^{(t)}| \le(1+3\varepsilon)|K^{(t_0)}| ∣ K ( t ) ∣ ≤ ( 1 + 3 ε ) ∣ K ( t 0 ) ∣ , we have deg ( t ) ( v ) ≥ ∣ K ( t ) ∣ / 2 \deg^{(t)}(v) \ge|K^{(t)}|/2 deg ( t ) ( v ) ≥ ∣ K ( t ) ∣/2 . Therefore, it suffices to assume that v v v is ε \varepsilon ε -dense and prove the second statement, i.e., ∣ K v ∖ K ( t ) ∣ ≥ ε ⋅ ∣ K ( t ) ∣ |K_v \setminus K^{(t)}| \ge\varepsilon\cdot|K^{(t)}| ∣ K v ∖ K ( t ) ∣ ≥ ε ⋅ ∣ K ( t ) ∣ . We next divide into two cases: Case (a): deg ( t ) ( v ) ≥ 2 ∣ K ( t 0 ) ∣ \deg^{(t)}(v) \ge2|K^{(t_0)}| deg ( t ) ( v ) ≥ 2∣ K ( t 0 ) ∣ ; and Case (b): deg ( t ) ( v ) < 2 ∣ K ( t 0 ) ∣ \deg^{(t)}(v) < 2|K^{(t_0)}| deg ( t ) ( v ) < 2∣ K ( t 0 ) ∣ .
For Case (a) , by the ε \varepsilon ε -density of v v v , by Lemma 6.5 we have
∣ K v ∣ ≥ ( 1 − ε ) ⋅ deg ( t ) ( v ) ≥ 2 ( 1 − ε ) ⋅ ∣ K ( t 0 ) ∣ ≥ 2 ( 1 − 4 ε ) ⋅ ∣ K ( t ) ∣ . |K_v| \ge(1-\varepsilon)\cdot\deg^{(t)}(v) \ge2(1-\varepsilon)\cdot|K^{(t_0)}| \ge2(1-4\varepsilon)\cdot|K^{(t)}|. ∣ K v ∣ ≥ ( 1 − ε ) ⋅ deg ( t ) ( v ) ≥ 2 ( 1 − ε ) ⋅ ∣ K ( t 0 ) ∣ ≥ 2 ( 1 − 4 ε ) ⋅ ∣ K ( t ) ∣.
Therefore, K v K_v K v must have at least 1 2 ∣ K ( t ) ∣ \frac{1}{2}|K^{(t)}| 2 1 ∣ K ( t ) ∣ vertices outside K ( t ) K^{(t)} K ( t ) , which completes the proof.
For Case (b) , more than 21 ε ∣ K ( t 0 ) ∣ 21\varepsilon|K^{(t_0)}| 21 ε ∣ K ( t 0 ) ∣ surviving vertices that have belonged to K K K lie outside K K K , and by Lemma 6.5 at most 3 ε ∣ K ( t 0 ) ∣ 3\varepsilon|K^{(t_0)}| 3 ε ∣ K ( t 0 ) ∣ of them are outside K ( t 0 ) K^{(t_0)} K ( t 0 ) . So more than 18 ε ∣ K ( t 0 ) ∣ 18\varepsilon|K^{(t_0)}| 18 ε ∣ K ( t 0 ) ∣ surviving vertices of K ( t 0 ) K^{(t_0)} K ( t 0 ) lie outside K K K . At most 12 ε ∣ K ( t 0 ) ∣ 12\varepsilon|K^{(t_0)}| 12 ε ∣ K ( t 0 ) ∣ fail to be positive neighbors of v v v , and fewer than ε deg ( t ) ( v ) < 2 ε ∣ K ( t 0 ) ∣ \varepsilon\deg^{(t)}(v) < 2\varepsilon|K^{(t_0)}| ε deg ( t ) ( v ) < 2 ε ∣ K ( t 0 ) ∣ neighbors fail agreement with v v v . Hence
∣ K v ∖ K ( t ) ∣ > 4 ε ∣ K ( t 0 ) ∣ > ε ∣ K ( t ) ∣ . (3) |K_v \setminus K^{(t)}| > 4\varepsilon|K^{(t_0)}| > \varepsilon|K^{(t)}|. \tag*{(3)} ∣ K v ∖ K ( t ) ∣ > 4 ε ∣ K ( t 0 ) ∣ > ε ∣ K ( t ) ∣. (3)
We remark that Lemma 6.10 still holds due to the validity of V ~ s i n g l e t o n \widetilde{V}_{\mathrm{singleton}} V singleton shown by Theorem 4. Therefore, K K K satisfies all the requirements for an isolated cluster in Definition 6. We have the following main result for Case II .
Lemma 6.13. K K K is an ε \varepsilon ε -isolated cluster at time t t t .
Correctness of Low Degree Clusters
In the previous subsections, we establish correctness for clusters that accumulate up to ε ∣ K ( t 0 ) ∣ \varepsilon|K^{(t_0)}| ε ∣ K ( t 0 ) ∣ data stream updates before being refreshed. Those estimates assumed ∣ K ( t 0 ) ∣ ≥ ( 1 − ε ) / ε |K^{(t_0)}| \ge(1-\varepsilon)/\varepsilon ∣ K ( t 0 ) ∣ ≥ ( 1 − ε ) / ε . For ∣ K ( t 0 ) ∣ < ( 1 − ε ) / ε |K^{(t_0)}| < (1-\varepsilon)/\varepsilon ∣ K ( t 0 ) ∣ < ( 1 − ε ) / ε , Lemma 6.5 shows that every vertex that has belonged to K K K lies in K ( t 0 ) K^{(t_0)} K ( t 0 ) and none has been deleted. Algorithmic removals and re-entries therefore preserve an internally exact clique. We now prove that such clusters trivially satisfy the properties of the tolerant clusters. The crucial observation here is that if ∣ K ( t 0 ) ∣ < 1 − ε ε |K^{(t_0)}| < \frac{1-\varepsilon}{\varepsilon} ∣ K ( t 0 ) ∣ < ε 1 − ε , then K ( t 0 ) K^{(t_0)} K ( t 0 ) can only be an exact clique due to Definition 3, since we allow at most ε ∣ K ( t 0 ) ∣ / ( 1 − ε ) < 1 \varepsilon|K^{(t_0)}|/(1-\varepsilon)<1 ε ∣ K ( t 0 ) ∣/ ( 1 − ε ) < 1 out-neighbors.
Lemma 6.14 (Correctness of Low Degree Clusters). ** Let K K K be a cluster maintained by the algorithm at time t t t such that ∣ K t 0 ∣ < 1 − ε ε |K^{t_0}| < \frac{1-\varepsilon}{\varepsilon} ∣ K t 0 ∣ < ε 1 − ε . Then K K K satisfies the properties of an ε τ \varepsilon_{\tau} ε τ -tolerant cluster at time t t t .
Proof. By Lemma 6.5 , K ( t ) ⊆ K ( t 0 ) K^{(t)} \subseteq K^{(t_0)} K ( t ) ⊆ K ( t 0 ) and K ( t 0 ) K^{(t_0)} K ( t 0 ) is a clique, so there are no internal non-neighbors. For each vertex, the second tolerant-cluster condition follows either from its ε \varepsilon ε -sparsity or from Lemma 6.10 .
An output singleton omitted from V ~ s i n g l e t o n \widetilde{V}_{\mathrm{singleton}} V singleton by Algorithm 7 also has no internal non-neighbors. If its vertex is ε \varepsilon ε -sparse, it satisfies the tolerant-cluster condition directly. Otherwise, the first statement of Theorem 4 is impossible because the vertex belongs to neither V ~ s i n g l e t o n \widetilde{V}_{\mathrm{singleton}} V singleton nor a maintained cluster. The second statement supplies the required fraction of K v K_v K v in V ~ s i n g l e t o n \widetilde{V}_{\mathrm{singleton}} V singleton .
Combining Lemma 6.11 , Lemma 6.13 , and Lemma 6.14 , we complete the proof of Theorem 3 for the correctness of each cluster.
Correctness of V ~ s i n g l e t o n \widetilde{V}_{\mathrm{singleton}} V singleton
In this section, we show that V ~ s i n g l e t o n \widetilde{V}_{\mathrm{singleton}} V singleton satisfies the requirements in Definition 6, which completes the proof of the correctness. We note that we use a different accuracy parameter ζ \zeta ζ for the sparsity to distinguish from previous sections, but it is within a constant-fraction of ε \varepsilon ε , e.g., ζ = ε 500 \zeta=\frac{\varepsilon}{500} ζ = 500 ε as stated in Algorithm 1. To begin with, we state the definition of important levels as mentioned in § 7 .
Definition 9 (Important levels). Let V ~ s i n g l e t o n , ( i ) ( 2 ζ ) \widetilde{V}_{\mathrm{singleton},(i)}(2\zeta) V singleton , ( i ) ( 2 ζ ) be the set of vertices in V ~ s i n g l e t o n , ( i ) \widetilde{V}_{\mathrm{singleton},(i)} V singleton , ( i ) that are 2 ζ 2\zeta 2 ζ -dense, and let V ~ s i n g l e t o n , c o r r e c t , ( i ) \widetilde{V}_{\mathrm{singleton,correct},(i)} V singleton , correct , ( i ) be the set of vertices in V ~ s i n g l e t o n , ( i ) \widetilde{V}_{\mathrm{singleton},(i)} V singleton , ( i ) that are ζ \zeta ζ -sparse. For each level i i i , we have the following definitions
Level i i i is dominant if ∣ V ~ s i n g l e t o n , ( i ) ( 2 ζ ) ∣ > 1 10 ⋅ 2 i log n ∣ V ~ s i n g l e t o n ∣ |\widetilde{V}_{\mathrm{singleton},(i)}(2\zeta)| > \frac{1}{10\cdot2^i\log n}|\widetilde{V}_{\mathrm{singleton}}| ∣ V singleton , ( i ) ( 2 ζ ) ∣ > 10 ⋅ 2 i l o g n 1 ∣ V singleton ∣ ;
Level i i i is emergent if ∣ V ~ s i n g l e t o n , ( i ) ( 2 ζ ) ∣ > 10 ∣ ⋃ j ∈ S i ( 3 ) V ~ s i n g l e t o n , c o r r e c t , ( j ) ∣ |\widetilde{V}_{\mathrm{singleton},(i)}(2\zeta)| > 10\left|\bigcup_{j\in S_i(3)}\widetilde{V}_{\mathrm{singleton,correct},(j)}\right| ∣ V singleton , ( i ) ( 2 ζ ) ∣ > 10 ⋃ j ∈ S i ( 3 ) V singleton , correct , ( j ) ;
Level i i i is non-negligible if ∣ V ~ s i n g l e t o n , ( i ) ( 2 ζ ) ∣ > 1 10 log n ∣ ⋃ j ∈ S j ( 3 ) V ~ s i n g l e t o n , c o r r e c t , ( j ′ ) ∣ |\widetilde{V}_{\mathrm{singleton},(i)}(2\zeta)| > \frac{1}{10\log n}\left|\bigcup_{j\in S_j(3)}\widetilde{V}_{\mathrm{singleton,correct},(j')}\right| ∣ V singleton , ( i ) ( 2 ζ ) ∣ > 10 l o g n 1 ⋃ j ∈ S j ( 3 ) V singleton , correct , ( j ′ ) for all j ∈ [ L ] j\in[L] j ∈ [ L ] with j ≥ i − 4 j\ge i-4 j ≥ i − 4 .
The central goal is to demonstrate lemma 7.3, which states that each level i i i is either non-dominant , or non-emergent, or negligible, otherwise it will be captured by our size check and form cluster operation in Algorithm 4. Therefore, the number of “incorrect vertices”, i.e., the vertices being ε C \frac{\varepsilon}{C} C ε -dense for some universal constant C C C , in each level is strictly upper bounded so that it satisfies Definition 6.
We begin our analysis by showing the correctness of the size estimation subroutine Algorithm 6. This lemma is crucially used afterwards to show that it passes the threshold to trigger cluster formation when a level i i i is dominant, emergent, and non-negligible.
Lemma 7.1. With high probability, the estimate of the size of a fixed subset S S S given by Algorithm 6 satisfies: (1). if ∣ S ∣ ≥ ∣ V ~ s i n g l e t o n ∣ 10 ⋅ 2 i log n |S| \ge\frac{|\widetilde{V}_{\mathrm{singleton}}|}{10\cdot2^i \log n} ∣ S ∣ ≥ 10 ⋅ 2 i l o g n ∣ V singleton ∣ , it gives a 1.1-approximation to ∣ S ∣ |S| ∣ S ∣ ; and (2). if ∣ S ∣ < ∣ V ~ s i n g l e t o n ∣ 10 ⋅ 2 i log n |S| < \frac{|\widetilde{V}_{\mathrm{singleton}}|}{10\cdot2^i \log n} ∣ S ∣ < 10 ⋅ 2 i l o g n ∣ V singleton ∣ it has an additive error of at most ∣ V ~ s i n g l e t o n ( t ) ∣ 100 ⋅ 2 i log n \frac{|\widetilde{V}^{(t)}_{\mathrm{singleton}}|}{100\cdot2^i \log n} 100 ⋅ 2 i l o g n ∣ V singleton ( t ) ∣ .
Proof. Recall that in Algorithm 6, we uniformly sample γ = O ( 2 i log 2 n ) \gamma= O(2^i \log^2 n) γ = O ( 2 i log 2 n ) vertices from V ~ s i n g l e t o n ( t ) \widetilde{V}^{(t)}_{\mathrm{singleton}} V singleton ( t ) and return s ~ ( t ) = ∣ V ~ s i n g l e t o n ( t ) ∣ γ ⋅ γ ^ \widetilde{s}^{(t)} = \frac{|\widetilde{V}^{(t)}_{\mathrm{singleton}}|}{\gamma}\cdot\widehat{\gamma} s ( t ) = γ ∣ V singleton ( t ) ∣ ⋅ γ , where γ ^ \widehat{\gamma} γ is the number of samples belonging to S S S at time t t t . For each sample, the indicator that denotes a sample is in S S S has expectation ∣ S ∣ ∣ V ~ s i n g l e t o n ( t ) ∣ \frac{|S|}{|\widetilde{V}^{(t)}_{\mathrm{singleton}}|} ∣ V singleton ( t ) ∣ ∣ S ∣ . Put ξ = ∣ V ~ s i n g l e t o n ( t ) ∣ 1000 ⋅ 2 i L \xi= \frac{|\widetilde{V}^{(t)}_{\mathrm{singleton}}|}{1000\cdot2^i L} ξ = 1000 ⋅ 2 i L ∣ V singleton ( t ) ∣ . By Proposition 3.1 , with high probability,
∣ s ~ ( t ) − ∣ S ∣ ∣ ≤ .08 ∣ S ∣ + ξ , |\widetilde{s}^{(t)}-|S||\le.08|S|+\xi, ∣ s ( t ) − ∣ S ∣∣ ≤ .08∣ S ∣ + ξ ,
which implies both stated bounds.
Note that in the usage of Algorithm 6, we do sparsity tests on the samples. For the actual tests, a successful 5 ζ 5\zeta 5 ζ -sparsity test returns no on every 4.5 ζ 4.5\zeta 4.5 ζ -dense vertex and only on 5 ζ 5\zeta 5 ζ -dense vertices. Apply the same concentration bound to these two fixed sets and to their complements to obtain
0.9 ∣ ⋃ j ∈ S i ( 3 ) V ~ s i n g l e t o n , ( j ) ( t ) ( 4.5 ζ ) ∣ − ξ ≤ u ˉ i ≤ 1.1 ∣ ⋃ j ∈ S i ( 3 ) V ~ s i n g l e t o n , ( j ) ( t ) ( 5 ζ ) ∣ + ξ , 0.9\left|\bigcup_{j\in S_i(3)}\widetilde{V}^{(t)}_{\mathrm{singleton},(j)}(4.5\zeta)\right|-\xi\le\bar{u}_i\le1.1\left|\bigcup_{j\in S_i(3)}\widetilde{V}^{(t)}_{\mathrm{singleton},(j)}(5\zeta)\right|+\xi, 0.9 j ∈ S i ( 3 ) ⋃ V singleton , ( j ) ( t ) ( 4.5 ζ ) − ξ ≤ u ˉ i ≤ 1.1 j ∈ S i ( 3 ) ⋃ V singleton , ( j ) ( t ) ( 5 ζ ) + ξ ,
0.9 ∣ V ~ s i n g l e t o n , ( j ) ( t ) ∖ V ~ s i n g l e t o n , ( j ) ( t ) ( 5 ζ ) ∣ − ξ ≤ u ˉ j ≤ 1.1 ∣ V ~ s i n g l e t o n , ( j ) ( t ) ∖ V ~ s i n g l e t o n , ( j ) ( t ) ( 4.5 ζ ) ∣ + ξ . 0.9\left|\widetilde{V}^{(t)}_{\mathrm{singleton},(j)}\setminus\widetilde{V}^{(t)}_{\mathrm{singleton},(j)}(5\zeta)\right|-\xi\le\bar{u}_j\le1.1\left|\widetilde{V}^{(t)}_{\mathrm{singleton},(j)}\setminus\widetilde{V}^{(t)}_{\mathrm{singleton},(j)}(4.5\zeta)\right|+\xi. 0.9 V singleton , ( j ) ( t ) ∖ V singleton , ( j ) ( t ) ( 5 ζ ) − ξ ≤ u ˉ j ≤ 1.1 V singleton , ( j ) ( t ) ∖ V singleton , ( j ) ( t ) ( 4.5 ζ ) + ξ .
Here u ˉ j \bar{u}_j u ˉ j is the estimate in Line 4 ( b ) 4(b) 4 ( b ) vi when j ≠ i j\ne i j = i . These inequalities hold for every set of successful test answers, since the tested counts lie between the corresponding fixed-set counts. □
We next show that when our algorithm decides to form cluster on a level i i i , it eliminates all dense vertices in that level (and also all levels in S i ( 3 ) S_i(3) S i ( 3 ) ). Note that although we estimate the size of V ~ s i n g l e t o n , ( i ) ( 5 ζ ) \widetilde{V}_{\mathrm{singleton},(i)}(5\zeta) V singleton , ( i ) ( 5 ζ ) for every h i h_i h i counted changes, we do not afford to maintain the exact degree bucketing list that contains all vertices in V ~ s i n g l e t o n , ( i ) ( 5 ζ ) \widetilde{V}_{\mathrm{singleton},(i)}(5\zeta) V singleton , ( i ) ( 5 ζ ) as mentioned earlier. Fortunately, due to the validity of V ~ l i s t , ( i ) \widetilde{V}_{\mathrm{list},(i)} V list , ( i ) in Theorem 4, we form clusters on all vertices in V ~ s i n g l e t o n , ( i ) ( 5 ζ ) \widetilde{V}_{\mathrm{singleton},(i)}(5\zeta) V singleton , ( i ) ( 5 ζ ) .
Lemma 7.2. After a full scan of V ~ l i s t , ( i ) \widetilde{V}_{\mathrm{list},(i)} V list , ( i ) , including newly appended entries, by Algorithm 5, we have V ~ s i n g l e t o n , ( j ) ( t ) ( 5 ζ ) = ∅ \widetilde{V}^{(t)}_{\mathrm{singleton},(j)}(5\zeta)=\varnothing V singleton , ( j ) ( t ) ( 5 ζ ) = ∅ for every j ∈ S i ( 3 ) j\in S_i(3) j ∈ S i ( 3 ) . Every 5 ζ 5\zeta 5 ζ -dense vertex v v v in these levels belongs to a cluster. If fewer than h i h_i h i changes counted by c i c_i c i have occurred since the start of this completed scan, a vertex that is now 2 ζ 2\zeta 2 ζ -dense with degree in [ 2 i , 2 i + 1 ) [2^i,2^{i+1}) [ 2 i , 2 i + 1 ) cannot be in V ~ s i n g l e t o n \widetilde{V}_{\mathrm{singleton}} V singleton .
Proof. Consider a 5 ζ 5\zeta 5 ζ -dense vertex v v v with degree in [ 2 i − 1 , 2 i + 2 ) [2^{i-1},2^{i+2}) [ 2 i − 1 , 2 i + 2 ) at the end of the completed scan. By Definitions 3 and 5, its positive 5 ζ 5\zeta 5 ζ -agreeing neighbors are 10.1 ζ 10.1\zeta 10.1 ζ -dense. Indeed, their pairwise agreement tolerance is 10 ζ / ( 1 − 5 ζ ) 10\zeta/(1-5\zeta) 10 ζ / ( 1 − 5 ζ ) , their degrees are at least ( 1 − 5 ζ ) ( deg ( v ) + 1 ) − 1 (1-5\zeta)(\deg(v)+1)-1 ( 1 − 5 ζ ) ( deg ( v ) + 1 ) − 1 , and each has at most ( 5 ζ + 5 ζ 1 − 5 ζ ) ( deg ( v ) + 1 ) \left(5\zeta+\frac{5\zeta}{1-5\zeta}\right)(\deg(v)+1) ( 5 ζ + 1 − 5 ζ 5 ζ ) ( deg ( v ) + 1 ) neighbors outside this agreeing set. For deg ( v ) < 10 / ε \deg(v)<10/\varepsilon deg ( v ) < 10/ ε , integrality instead makes N [ v ] N[v] N [ v ] an isolated exact clique. These vertices pass the 12 ζ 12\zeta 12 ζ test and lie above the degree threshold. Apply Theorem 4, whose required lists include V ~ l i s t , ( i ) \widetilde{V}_{\mathrm{list},(i)} V list , ( i ) because the size bucket of K v K_v K v differs from i i i by at most two.
Suppose the second statement of Theorem 4 holds. Then at least 40 ε ∣ K v ∣ 40\varepsilon|K_v| 40 ε ∣ K v ∣ vertices of K v K_v K v are singletons in V ~ l i s t , ( i ) \widetilde{V}_{\mathrm{list},(i)} V list , ( i ) at the end of the scan. Since v v v is 5 ζ 5\zeta 5 ζ -dense, fewer than 5 ζ deg ( v ) < 40 ε ∣ K v ∣ 5\zeta\deg(v)<40\varepsilon|K_v| 5 ζ deg ( v ) < 40 ε ∣ K v ∣ vertices of K v K_v K v fail 5 ζ 5\zeta 5 ζ -agreement with v v v . Thus at least one of these listed singletons, say u u u , is in 5 ζ 5\zeta 5 ζ -agreement with v v v . By the preceding argument, u u u is 10.1 ζ 10.1\zeta 10.1 ζ -dense and lies above the degree threshold, so the scan adds u u u to a cluster. If u u u later returns to the list, its new entry is also scanned. Since the graph is fixed during the scan, the same argument applies at every visit. Hence u u u cannot remain a singleton at the end of the full scan, which is a contradiction. Therefore, the first statement of Theorem 4 holds: some cluster K K K contains at least ( 1 − 91 ε ) ∣ K v ∣ (1-91\varepsilon)|K_v| ( 1 − 91 ε ) ∣ K v ∣ vertices of K v K_v K v . If v ∉ K v\notin K v ∈ / K , then v ∈ K v ∖ K v\in K_v\setminus K v ∈ K v ∖ K , so this statement places v v v itself in V ~ l i s t , ( i ) \widetilde{V}_{\mathrm{list},(i)} V list , ( i ) . Since v v v is 5 ζ 5\zeta 5 ζ -dense and lies above the degree threshold, the same scan argument gives a contradiction. Thus v ∈ K v\in K v ∈ K , proving the assertions at the end of the scan.
After at most b b b graph updates, a vertex that is θ \theta θ -dense at an endpoint of degree d > b d>b d > b is
( θ + ( 1 + θ ) b d − b ) -dense \left(\theta+\frac{(1+\theta)b}{d-b}\right)\text{-dense} ( θ + d − b ( 1 + θ ) b ) -dense
throughout its lifetime in the interval, since degrees and neighborhood differences change by at most b b b , and at most b b b neighbors appear. Under the assumed bound of fewer than h i h_i h i counted changes, either b = 0 b=0 b = 0 or b < ζ 2 i / 10 b<\zeta2^i/10 b < ζ 2 i /10 . Hence a current 2 ζ 2\zeta 2 ζ -dense vertex of degree at least 2 i 2^i 2 i was 3 ζ 3\zeta 3 ζ -dense throughout the interval and, if present during the scan, belonged to the scanned degree window. It is added to a cluster by the scan or its later insertion, and any refreshment processes it again.
It remains to exclude a later removal by identification. The scan conclusion and Definition 7 and lemma 6.5 give ∣ K ( t 0 ) ∣ ≥ ( 1 − 91 ε ) ( 1 − ε ) deg ( v ) / ( 1 + 3 ε ) |K^{(t_0)}|\ge(1-91\varepsilon)(1-\varepsilon)\deg(v)/(1+3\varepsilon) ∣ K ( t 0 ) ∣ ≥ ( 1 − 91 ε ) ( 1 − ε ) deg ( v ) / ( 1 + 3 ε ) for the containing cluster, while later additions satisfy the same bound by their dense-core guarantee. Since degrees change by at most b b b , at a first such removal we have ∣ K ( t 0 ) ∣ > deg ( v ) / 2 |K^{(t_0)}|>\deg(v)/2 ∣ K ( t 0 ) ∣ > deg ( v ) /2 . If a new cluster K ′ K' K ′ formed from w w w , identifies v v v , then ∣ K ′ ∣ ≥ deg ( v ) / 4 |K'|\ge\deg(v)/4 ∣ K ′ ∣ ≥ deg ( v ) /4 and ∣ N ( v ) ∩ K ′ ∣ > ∣ K ′ ∣ / 4 |N(v)\cap K'|>|K'|/4 ∣ N ( v ) ∩ K ′ ∣ > ∣ K ′ ∣/4 . Among these neighbors, the number failing agreement with v v v or w w w , or lying outside N [ w ] N[w] N [ w ] , is at most
3 ζ deg ( v ) + ε 20 deg ( w ) + ε 1 − ε ∣ K ′ ∣ < 2 ε ∣ K ′ ∣ < ∣ K ′ ∣ / 4 , 3\zeta\deg(v)+\frac{\varepsilon}{20}\deg(w)+\frac{\varepsilon}{1-\varepsilon}|K'|<2\varepsilon|K'|<|K'|/4, 3 ζ deg ( v ) + 20 ε deg ( w ) + 1 − ε ε ∣ K ′ ∣ < 2 ε ∣ K ′ ∣ < ∣ K ′ ∣/4 ,
where deg ( w ) ≤ ∣ K ′ ∣ / ( 1 − ε ) \deg(w)\le|K'|/(1-\varepsilon) deg ( w ) ≤ ∣ K ′ ∣/ ( 1 − ε ) by Lemma 3.2. A common agreeing neighbor therefore exists, so v , w v,w v , w agree at tolerance ( 3 ζ + ε / 20 ) / ( 1 − ε / 20 ) < ε / 5 (3\zeta+\varepsilon/20)/(1-\varepsilon/20)<\varepsilon/5 ( 3 ζ + ε /20 ) / ( 1 − ε /20 ) < ε /5 . The formation guarantee already includes v v v in K ′ K' K ′ , contradicting its removal into V ~ s i n g l e t o n \widetilde{V}_{\mathrm{singleton}} V singleton . Thus v v v is not in V ~ s i n g l e t o n \widetilde{V}_{\mathrm{singleton}} V singleton after the scan completes. □ \square □
Given the above lemma, we now show that at each time t t t , each level i i i is either non-dominant, or non-emergent, or negligible. Let level i i i be dominant, emergent, and non-negligible at time t t t , let a a a be the size of the dense part of level i i i , and let b b b be the current value of its counter c i c_i c i . If a > 2 b a>2b a > 2 b , level i i i should already pass the tests in the last check and be eliminated. Otherwise, if a ≤ 2 b a \le2b a ≤ 2 b , level i i i may fail the tests, but we still do a partial scan. Then since level i i i is important now, the number of higher-degree vertices in its list during the last check is less than our budget O ~ ( 2 i ) \widetilde{O}(2^i) O ( 2 i ) , and all dense vertices in level i i i are captured by the partial scan. In the following, we use the notion of “returned time t ~ \tilde{t} t ~ ”, which denotes the time at which the algorithm has finished processing the t t t -th update.
Lemma 7.3. For each returned time t ∈ [ T ] t \in[T] t ∈ [ T ] and level i ∈ [ L ] i \in[L] i ∈ [ L ] , with high probability, at least one of the following holds.
Non-dominant: ∣ V ~ s i n g l e t o n , ( i ) ( t ) ( 2 ζ ) ∣ ≤ 1 10 ⋅ 2 i log n ∣ V ~ s i n g l e t o n ( t ) ∣ \left|\widetilde{V}^{(t)}_{\mathrm{singleton},(i)}(2\zeta)\right| \le\frac{1}{10\cdot2^i\log n}\left|\widetilde{V}^{(t)}_{\mathrm{singleton}}\right| V singleton , ( i ) ( t ) ( 2 ζ ) ≤ 10 ⋅ 2 i l o g n 1 V singleton ( t ) ;
Non-emergent: ∣ V ~ s i n g l e t o n , ( i ) ( t ) ( 2 ζ ) ∣ ≤ 10 ∣ ⋃ j ∈ S i ( 3 ) V ~ s i n g l e t o n , c o r r e c t , ( j ) ( t ) ∣ \left|\widetilde{V}^{(t)}_{\mathrm{singleton},(i)}(2\zeta)\right| \le10\left|\bigcup_{j\in S_i(3)}\widetilde{V}^{(t)}_{\mathrm{singleton,correct},(j)}\right| V singleton , ( i ) ( t ) ( 2 ζ ) ≤ 10 ⋃ j ∈ S i ( 3 ) V singleton , correct , ( j ) ( t ) ;
Negligible: ∣ V ~ s i n g l e t o n , ( i ) ( t ) ( 2 ζ ) ∣ ≤ 1 10 log n ∣ ⋃ j ′ ∈ S j ( 3 ) V ~ s i n g l e t o n , c o r r e c t , ( j ′ ) ( t ) ∣ \left|\widetilde{V}^{(t)}_{\mathrm{singleton},(i)}(2\zeta)\right| \le\frac{1}{10\log n}\left|\bigcup_{j'\in S_j(3)}\widetilde{V}^{(t)}_{\mathrm{singleton,correct},(j')}\right| V singleton , ( i ) ( t ) ( 2 ζ ) ≤ 10 l o g n 1 ⋃ j ′ ∈ S j ( 3 ) V singleton , correct , ( j ′ ) ( t ) for some j ∈ [ L ] j \in[L] j ∈ [ L ] with j ≥ i − 4 j \ge i-4 j ≥ i − 4 .
Proof. We assume for contradiction that at some returned time t t t , all the three conditions above are not matched. Let t ˉ \bar{t} t ˉ be the start of the most recent completed level-i i i check, put a = ∣ V ~ s i n g l e t o n , ( i ) ( t ) ( 2 ζ ) ∣ > 0 a=\left|\widetilde{V}^{(t)}_{\mathrm{singleton},(i)}(2\zeta)\right|>0 a = V singleton , ( i ) ( t ) ( 2 ζ ) > 0 , and let b b b be the current value of c i c_i c i . By Lines 3 and 4(bi) of Algorithm 4, b b b counts all graph updates and changes in membership of V ~ s i n g l e t o n \widetilde{V}_{\mathrm{singleton}} V singleton since t ˉ \bar{t} t ˉ , including those during the check. Such a check exists, since otherwise fewer than h i ≤ 2 i h_i\le2^i h i ≤ 2 i insertions have occurred and no vertex has degree at least 2 i 2^i 2 i . We have b < h i b<h_i b < h i , and if b > 0 b>0 b > 0 , then b < ζ 2 / 10 b<\zeta^2/10 b < ζ 2 /10 .
By Lemma 7.2 , all but at most b b b vertices of V ~ s i n g l e t o n , ( i ) ( t ) ( 2 ζ ) \widetilde{V}^{(t)}_{\mathrm{singleton},(i)}(2\zeta) V singleton , ( i ) ( t ) ( 2 ζ ) belonged to the 4.5 ζ 4.5\zeta 4.5 ζ -dense set in S i ( 3 ) S_i(3) S i ( 3 ) at t ˉ \bar{t} t ˉ . Moreover, at most b b b vertices have left V ~ s i n g l e t o n \widetilde{V}_{\mathrm{singleton}} V singleton since t ˉ \bar{t} t ˉ . Since we assume that level i i i is dominant, emergent, and non-negligible at time t t t , these observations give
∣ V ~ s i n g l e t o n ( t ) ∣ < 10 ⋅ 2 i L a + b , ∣ ⋃ j ∈ S i ( 3 ) V ~ s i n g l e t o n , ( j ) ( t ) ( 4.5 ζ ) ∣ ≥ a − b . \left|\widetilde{V}^{(t)}_{\mathrm{singleton}}\right| < 10\cdot2^iLa+b,\qquad
\left|\bigcup_{j\in S_i(3)}\widetilde{V}^{(t)}_{\mathrm{singleton},(j)}(4.5\zeta)\right| \ge a-b. V singleton ( t ) < 10 ⋅ 2 i L a + b , j ∈ S i ( 3 ) ⋃ V singleton , ( j ) ( t ) ( 4.5 ζ ) ≥ a − b .
We also need bounds on the vertices that were 4.5 ζ 4.5\zeta 4.5 ζ -sparse at t ˉ \bar{t} t ˉ . Call these the “old sparse vertices”, with their bucket indices taken at t ˉ \bar{t} t ˉ . Again by Lemma 7.2 , an old sparse vertex in bucket j ≥ i − 4 j\ge i-4 j ≥ i − 4 remains ζ \zeta ζ -sparse in S j ( 3 ) S_j(3) S j ( 3 ) unless it leaves V ~ s i n g l e t o n \widetilde{V}_{\mathrm{singleton}} V singleton . Thus each such vertex is either counted in the corresponding sparse population at time t t t or is among the at most b b b departing vertices. Our assumptions on level i i i therefore bound the number of old sparse vertices by less than a / 10 + b a/10+b a /10 + b in bucket i i i , less than 10 L a + b 10La+b 10 L a + b in each bucket j ≥ i − 4 j\ge i-4 j ≥ i − 4 , and less than 10 L 2 a + b 10L^2a+b 10 L 2 a + b in their union. The last bound has only one additive b b b , since each departing vertex is counted once across the union.
Case 1: a ≥ 2 b a\ge2b a ≥ 2 b . By Lemma 7.1 and these bounds,
u ˉ i ≥ 0.4 a , ∣ V ~ s i n g l e t o n ( t ˉ ) ∣ 100 ⋅ 2 i L < 0.11 a , u ˉ i ′ < 0.7 a , u ˉ j ′ < 12 L a . \bar{u}_i\ge0.4a,\qquad
\frac{\left|\widetilde{V}^{(\bar{t})}_{\mathrm{singleton}}\right|}{100\cdot2^iL}<0.11a,\qquad
\bar{u}'_i<0.7a,\qquad
\bar{u}'_j<12La. u ˉ i ≥ 0.4 a , 100 ⋅ 2 i L V singleton ( t ˉ ) < 0.11 a , u ˉ i ′ < 0.7 a , u ˉ j ′ < 12 L a .
All three comparisons pass, so Algorithm 5 runs with F L A G i = 0 \mathrm{FLAG}_i=0 FLAG i = 0 and the full scan is complete.
Case 2: a < 2 b a < 2b a < 2 b . Algorithm 5 attempts the partial scan even if a comparison fails. We bound the number of unsuccessful visits by separating entries already present at t ˉ \bar{t} t ˉ from entries added later. An unsuccessful visit to an entry present at t ˉ \bar{t} t ˉ must concern an old sparse vertex in a bucket j ≥ i − 4 j \ge i - 4 j ≥ i − 4 . There are fewer than 10 L 2 a + b 10L^2a+b 10 L 2 a + b such vertices. Each list entry contributes at most one unsuccessful visit: during this fixed-graph scan, an unsuccessfully visited entry stays in the list without being visited again, and adding an existing entry has no effect. Every remaining unsuccessful visit is therefore charged to a distinct entry into V ~ s i n g l e t o n \widetilde{V}_{\mathrm{singleton}} V singleton after t ˉ \bar{t} t ˉ , including any reentry of a vertex present at t ˉ \bar{t} t ˉ . There are at most b b b such entries, because b b b counts all changes in membership since t ˉ \bar{t} t ˉ . Hence the total number of unsuccessful visits is less than
( 10 L 2 a + b ) + b = 10 L 2 a + 2 b < 22 L 2 b < 2.2 ζ i 2 L 2 < 2 i L 2 . (10L^2a+b)+b=10L^2a+2b<22L^2b<2.2\zeta^2_iL^2<2^iL^2. ( 10 L 2 a + b ) + b = 10 L 2 a + 2 b < 22 L 2 b < 2.2 ζ i 2 L 2 < 2 i L 2 .
The partial scan therefore completes before exhausting its allowance.
In both cases, Lemma 7.2 gives V ~ s i n g l e t o n , ( i ) ( t ) ( 2 ζ ) = ∅ \widetilde{V}^{(t)}_{\mathrm{singleton},(i)}(2\zeta)=\varnothing V singleton , ( i ) ( t ) ( 2 ζ ) = ∅ , which is a contradiction.
Before proving our main result, we bound the number of degree-zero vertices in V ~ s i n g l e t o n \widetilde{V}_{\mathrm{singleton}} V singleton .
Lemma 7.4. With high probability, at every returned time t ∈ [ T ] t\in[T] t ∈ [ T ] , at most ∣ V ~ s i n g l e t o n ( t ) ∣ / 10 |\widetilde{V}^{(t)}_{\mathrm{singleton}}|/10 ∣ V singleton ( t ) ∣/10 vertices in V ~ s i n g l e t o n ( t ) \widetilde{V}^{(t)}_{\mathrm{singleton}} V singleton ( t ) have degree zero. Moreover, each traversal in Algorithm 7 removes at least a 1 / 40 1/40 1/40 fraction of the vertices in V ~ s i n g l e t o n \widetilde{V}_{\mathrm{singleton}} V singleton present at its start.
Proof. When V ~ s i n g l e t o n \widetilde{V}_{\mathrm{singleton}} V singleton is nonempty, apply Algorithm 6 to its subset of degree-zero vertices with fresh C log n C\log n C log n samples, and divide the output by ∣ V ~ s i n g l e t o n ∣ |\widetilde{V}_{\mathrm{singleton}}| ∣ V singleton ∣ . By the concentration argument in the proof of Lemma 7.1 , for sufficiently large C C C , this estimates the fraction of degree-zero vertices to additive error 1 / 100 1/100 1/100 with high probability. Condition on these estimates being accurate.
Whenever Algorithm 7 starts a traversal, the estimated fraction is at least 1 / 20 1/20 1/20 , so the true fraction is at least 1 / 20 − 1 / 100 = 1 / 25 > 1 / 40 1/20-1/100=1/25>1/40 1/20 − 1/100 = 1/25 > 1/40 . The graph does not change during the traversal, and all these degree-zero vertices are removed from V ~ s i n g l e t o n \widetilde{V}_{\mathrm{singleton}} V singleton .
When the algorithm returns, either V ~ s i n g l e t o n \widetilde{V}_{\mathrm{singleton}} V singleton is empty or the estimated fraction is less than 1 / 20 1/20 1/20 . In the latter case, the true fraction is less than 1 / 20 + 1 / 100 = 3 / 50 < 1 / 10 1/20+1/100=3/50<1/10 1/20 + 1/100 = 3/50 < 1/10 . After a traversal no degree-zero vertex remains, and the level checks that follow do not change the graph and add only vertices of positive degree.
Finally, we are able to show our main theorem for the correctness of V ~ s i n g l e t o n \widetilde{V}_{\mathrm{singleton}} V singleton :
Theorem 5. For each returned time t ∈ [ T ] t\in[T] t ∈ [ T ] and each level i ∈ [ L ] i\in[L] i ∈ [ L ] , Algorithm 4 ensures that
either ∣ V ~ s i n g l e t o n , i n c o r r e c t , ( i ) ∣ ≤ 10 ∣ ⋃ j ∈ S i ( 3 ) V ~ s i n g l e t o n , c o r r e c t , ( j ) ( t ) ∣ |\widetilde{V}_{\mathrm{singleton,incorrect},(i)}| \le10\left|\bigcup_{j\in\mathcal{S}_i(3)}\widetilde{V}^{(t)}_{\mathrm{singleton,correct},(j)}\right| ∣ V singleton , incorrect , ( i ) ∣ ≤ 10 ⋃ j ∈ S i ( 3 ) V singleton , correct , ( j ) ( t ) .
or ∑ v ∈ V ~ s i n g l e t o n , i n c o r r e c t , ( i ) deg ( v ) ≤ 1 C 0 log n ⋅ ∑ j ∈ [ L ] ∑ v ∈ V ~ s i n g l e t o n , c o r r e c t , ( j ) deg ( v ) \sum_{v\in\widetilde{V}_{\mathrm{singleton,incorrect},(i)}}\deg(v)\le\frac{1}{C_0\log n}\cdot\sum_{j\in[L]}\sum_{v\in\widetilde{V}_{\mathrm{singleton,correct},(j)}}\deg(v) ∑ v ∈ V singleton , incorrect , ( i ) deg ( v ) ≤ C 0 l o g n 1 ⋅ ∑ j ∈ [ L ] ∑ v ∈ V singleton , correct , ( j ) deg ( v ) for some absolute constant C 0 C_0 C 0 , which may be chosen as 1 / 20 1/20 1/20 .
In other words, Algorithm 4 ensures the same guarantees on V ~ s i n g l e t o n \widetilde{V}_{\mathrm{singleton}} V singleton as prescribed by Definition 6.
Proof. Every vertex in V ~ s i n g l e t o n , i n c o r r e c t , ( i ) ( t ) \widetilde{V}^{(t)}_{\mathrm{singleton,incorrect},(i)} V singleton , incorrect , ( i ) ( t ) is ζ \zeta ζ -dense and hence 2 ζ 2\zeta 2 ζ -dense, so Lemma 7.3 applies. Note that if level i i i is non-emergent, it directly satisfies the first condition in Theorem 5. Since
∣ V ~ s i n g l e t o n , ( i ) ∣ = ∣ V ~ s i n g l e t o n , i n c o r r e c t , ( i ) ∣ + ∣ V ~ s i n g l e t o n , c o r r e c t , ( i ) ∣ \left|\widetilde{V}_{\mathrm{singleton},(i)}\right|=\left|\widetilde{V}_{\mathrm{singleton,incorrect},(i)}\right|+\left|\widetilde{V}_{\mathrm{singleton,correct},(i)}\right| V singleton , ( i ) = V singleton , incorrect , ( i ) + V singleton , correct , ( i ) , the correct vertices in S i ( 3 ) S_i(3) S i ( 3 ) then constitute at least 1 / 11 1/11 1/11 of V ~ s i n g l e t o n , ( i ) \widetilde{V}_{\mathrm{singleton},(i)} V singleton , ( i ) , as required in Definition 6.
For a negligible level, choose j ≥ i − 4 j\ge i-4 j ≥ i − 4 from Lemma 7.3 . Vertices in S j ( 3 ) S_j(3) S j ( 3 ) have degree at least 2 j − 1 2^{j-1} 2 j − 1 , giving
∑ v ∈ V ~ s i n g l e t o n , i n c o r r e c t , ( i ) deg ( v ) ≤ 2 i + 1 10 log n ∣ ⋃ j ′ ∈ S j ( 3 ) V ~ s i n g l e t o n , c o r r e c t , ( j ′ ) ∣ ≤ 6.4 log n ∑ v ∈ V ~ s i n g l e t o n , c o r r e c t deg ( v ) . \sum_{v\in\widetilde{V}_{\mathrm{singleton,incorrect},(i)}}\deg(v)\le\frac{2^{i+1}}{10\log n}\left|\bigcup_{j'\in S_j(3)}\widetilde{V}_{\mathrm{singleton,correct},(j')}\right|\le\frac{6.4}{\log n}\sum_{v\in\widetilde{V}_{\mathrm{singleton,correct}}}\deg(v). v ∈ V singleton , incorrect , ( i ) ∑ deg ( v ) ≤ 10 log n 2 i + 1 j ′ ∈ S j ( 3 ) ⋃ V singleton , correct , ( j ′ ) ≤ log n 6.4 v ∈ V singleton , correct ∑ deg ( v ) .
For a non-dominant level,
∑ v ∈ V ~ s i n g l e t o n , i n c o r r e c t , ( i ) deg ( v ) ≤ ∣ V ~ s i n g l e t o n ∣ 5 log n . \sum_{v\in\widetilde{V}_{\mathrm{singleton,incorrect},(i)}}\deg(v)\le\frac{\left|\widetilde{V}_{\mathrm{singleton}}\right|}{5\log n}. v ∈ V singleton , incorrect , ( i ) ∑ deg ( v ) ≤ 5 log n V singleton .
It remains to bound ∣ V ~ s i n g l e t o n ∣ \left|\widetilde{V}_{\mathrm{singleton}}\right| V singleton by the number of correct vertices.
Finally, let S D S_D S D , S E S_E S E , S N S_N S N be non-dominant levels , non-emergent levels , and negligible levels , respectively. Without loss of generality, we assume they are disjoint sets since otherwise we can assign a level to any of them. Summing the three bounds in Lemma 7.3 , using ∑ i 2 − i ≤ 2 \sum_i2^{-i}\le2 ∑ i 2 − i ≤ 2 and the fact that a bucket occurs in at most three sets S i ( 3 ) S_i(3) S i ( 3 ) , gives
∑ i ∈ S D ∣ V ~ s i n g l e t o n , i n c o r r e c t , ( i ) ∣ ≤ ∣ V ~ s i n g l e t o n ∣ 5 log n , \sum_{i\in S_D}\left|\widetilde{V}_{\mathrm{singleton,incorrect},(i)}\right|\le\frac{\left|\widetilde{V}_{\mathrm{singleton}}\right|}{5\log n}, i ∈ S D ∑ V singleton , incorrect , ( i ) ≤ 5 log n V singleton ,
∑ i ∈ S E ∣ V ~ s i n g l e t o n , i n c o r r e c t , ( i ) ∣ ≤ 30 ∣ V ~ s i n g l e t o n , c o r r e c t ∣ , ∑ i ∈ S N ∣ V ~ s i n g l e t o n , i n c o r r e c t , ( i ) ∣ ≤ ∣ V ~ s i n g l e t o n , c o r r e c t ∣ . \sum_{i\in S_E}\left|\widetilde{V}_{\mathrm{singleton,incorrect},(i)}\right|\le30\left|\widetilde{V}_{\mathrm{singleton,correct}}\right|,\qquad
\sum_{i\in S_N}\left|\widetilde{V}_{\mathrm{singleton,incorrect},(i)}\right|\le\left|\widetilde{V}_{\mathrm{singleton,correct}}\right|. i ∈ S E ∑ V singleton , incorrect , ( i ) ≤ 30 V singleton , correct , i ∈ S N ∑ V singleton , incorrect , ( i ) ≤ V singleton , correct .
By Lemma 7.4 , at most ∣ V ~ s i n g l e t o n ∣ / 10 \left|\widetilde{V}_{\mathrm{singleton}}\right|/10 V singleton /10 additional vertices have degree zero. Therefore,
∣ V ~ s i n g l e t o n ∣ ≤ ∣ V ~ s i n g l e t o n ∣ 5 log n + 32 ∣ V ~ s i n g l e t o n , c o r r e c t ∣ + ∣ V ~ s i n g l e t o n ∣ 10 . \left|\widetilde{V}_{\mathrm{singleton}}\right|\le\frac{\left|\widetilde{V}_{\mathrm{singleton}}\right|}{5\log n}+32\left|\widetilde{V}_{\mathrm{singleton,correct}}\right|+\frac{\left|\widetilde{V}_{\mathrm{singleton}}\right|}{10}. V singleton ≤ 5 log n V singleton + 32 V singleton , correct + 10 V singleton .
and hence ∣ V ~ s i n g l e t o n ∣ ≤ 60 ∣ V ~ s i n g l e t o n , c o r r e c t ∣ \left|\widetilde{V}_{\mathrm{singleton}}\right|\le60\left|\widetilde{V}_{\mathrm{singleton,correct}}\right| V singleton ≤ 60 V singleton , correct . All vertices in V ~ s i n g l e t o n , c o r r e c t \widetilde{V}_{\mathrm{singleton,correct}} V singleton , correct have positive degree, so the non-dominant bound is at most 12 ∑ v ∈ V ~ s i n g l e t o n , c o r r e c t deg ( v ) / log n 12\sum_{v\in\widetilde{V}_{\mathrm{singleton,correct}}}\deg(v)/\log n 12 ∑ v ∈ V singleton , correct deg ( v ) / log n . Both cases satisfy the second condition with C 0 = 1 / 20 C_0=1/20 C 0 = 1/20 . □ \square □
Combining Theorem 3 (correctness of each cluster) and Theorem 5 (correctness of V ~ s i n g l e t o n \widetilde{V}_{\mathrm{singleton}} V singleton ), we complete the proof of correctness and show that our maintained partition satisfies Definition 6. If the small-graph offline solution is reported instead, its own approximation guarantee applies.
Analysis of Time Efficiency
In this section, we analyze the amortized update time of our overall algorithms. We gradually build the time efficiency proof with the following steps.
We then compute the time needed for each call of the subroutine. Essentially, the average time to conduct operations on each vertex is polylog ( n ) \operatorname{polylog}(n) polylog ( n ) , for instance, for a cluster K K K of size ∣ K ∣ |K| ∣ K ∣ , it takes ∣ K ∣ polylog ( n ) |K|\operatorname{polylog}(n) ∣ K ∣ polylog ( n ) time for it to form.
The main challenge is the charging argument for cluster formations. When a new cluster K K K is formed, we must charge the time for its formation to a sufficiently large group of data stream updates such that the amortized time is polylog ( n ) \operatorname{polylog}(n) polylog ( n ) . For example, suppose that there is a cluster K ′ K' K ′ and ε ∣ K ′ ∣ \varepsilon|K'| ε ∣ K ′ ∣ data stream additions occur in K ′ K' K ′ , so our algorithm refreshes K ′ K' K ′ and forms K K K , then we can charge the time to form K K K to the ε ∣ K ′ ∣ \varepsilon|K'| ε ∣ K ′ ∣ data stream updates that trigger the refreshment. However, the algorithmic dynamic might be substantially more complicated, since vertices in K K K may have been previously removed from an older cluster due to the identification step in our algorithm. Charging may be problematic in this case, since we cannot directly find ε ∣ K ∣ \varepsilon|K| ε ∣ K ∣ data stream updates to charge to, and if we trace back to the clusters that previously identified the vertices in K K K , it could lead to an infinite charging chain or double-charging.
To resolve this issue, we design a forward-charging budgeting scheme. We add a budget for each data stream update and transfer the budget to the clusters with which it is associated, e.g., we transfer the budget of v v v to K K K if v v v is considered as a data stream addition to K K K . Then during each cluster formation, the budgets are passed on to the vertices the cluster identifies, so we avoid dating back to historical events via this forward-charging method. We establish an essential technical lemma, called the “minted budget inequality”, which states that whenever a cluster is formed, its vertices have a enough total budget to pay for its own formation and pass on to the identified vertices (with size O ( ε ∣ K ∣ ) O(\varepsilon|K|) O ( ε ∣ K ∣ ) ). This directly implies the correctness of our budgeting and charging method. Please refer to the detailed explanation in § 10.3 .
Amortizing the time efficiency for auxiliary control flows in Algorithm 1
Apart from the calls for Algorithm 2 and Algorithm 3, Algorithm 1 tracks several statistics, including c ( K ) c(K) c ( K ) , inc ( K ) \operatorname{inc}(K) inc ( K ) , and del ( K ) \operatorname{del}(K) del ( K ) . By Proposition 3.2, the tracking of c ( K ) c(K) c ( K ) and inc ( K ) \operatorname{inc}(K) inc ( K ) can be accomplished in O ( log n ) O(\log n) O ( log n ) (worst-case) time per counter change. We need to argue about del ( K ) \operatorname{del}(K) del ( K ) since it needs to track the number of vertices every joined the cluster. The implementation is as follows.
Table 1 (PDF p. 55).
We remark that the approach is general and applies to all formed clusters, i.e., we also track the cluster formed by Algorithm 4. The efficiency for tracking del ( K ) \operatorname{del}(K) del ( K ) is given as follows.
Lemma 8.1. With high probability, for any vertex v ∈ V v \in V v ∈ V , ∣ K v ∣ = O ( log n ) |K_v| = O(\log n) ∣ K v ∣ = O ( log n ) . Thus when a vertex is deleted from the graph, all corresponding del ( K ) \operatorname{del}(K) del ( K ) counters can be updated in O ( log 2 n ) O(\log^2 n) O ( log 2 n ) time.
Proof. This is a direct application of Lemma 6.8: list the distinct clusters in K v K_v K v in the order in which v v v was first added to them. The initial size of each cluster is more than 3 / 2 3/2 3/2 times the initial size of the preceding cluster. Adding v v v to the same cluster again creates no new record, and refreshing a cluster removes its record. Therefore, since no cluster can be larger than n n n size, the vertex can stay in the counters of at most O ( log n ) O(\log n) O ( log n ) clusters simultaneously. Combining this with Proposition 3.2 leads to the desired statement.
We can then conclude the time complexity to maintain the counters in Algorithm 1.
Lemma 8.2. With high probability, Algorithm 1 maintains the counters c ( K ) c(K) c ( K ) , inc ( K ) \operatorname{inc}(K) inc ( K ) , and del ( K ) \operatorname{del}(K) del ( K ) in O ( log 2 n ) O(\log^2 n) O ( log 2 n ) time per direct stream update; counter changes caused by internal operations take O ( log 2 n ) O(\log^2 n) O ( log 2 n ) time each and are charged to those operations.
Time complexity of each subroutine in algorithm
We first establish the time complexity of each subroutine before charging the running time to the respective vertex insertion and deletions induced by the data stream.
Subroutines for cluster formation and refreshment. We provide running time bounds for the algorithms Algorithm 2 (cluster formation) and Algorithm 3 (cluster refreshment) as follows.
Lemma 8.3. Let K K K be the cluster formed by a single run of Algorithm 2. The time complexity for this single run of Algorithm 2 is O ( ∣ K ∣ log 3 n ) O(|K|\log^3 n) O ( ∣ K ∣ log 3 n ) for constant ε \varepsilon ε .
Proof. By the guarantee in Lemma 3.2, the formation of the cluster takes O ( ∣ K ∣ ⋅ log 3 n ε 2 ) O\left(\frac{|K|\cdot\log^3 n}{\varepsilon^2}\right) O ( ε 2 ∣ K ∣ ⋅ l o g 3 n ) time, which is O ( ∣ K ∣ log 3 n ) O(|K|\log^3 n) O ( ∣ K ∣ log 3 n ) for choice of constant ε \varepsilon ε . After K K K is formed, we obtain the identification set S S S with time O ( ∣ K ∣ log 2 n ) O(|K|\log^2 n) O ( ∣ K ∣ log 2 n ) (by Lemma 3.3 and the choice of δ = 1 / 2 \delta= 1/2 δ = 1/2 ), and processing the identified vertices and their membership records takes O ( ∣ K ∣ log n ⋅ log 2 ( n ) ε 2 ) O\left(|K|\log n\cdot\frac{\log^2(n)}{\varepsilon^2}\right) O ( ∣ K ∣ log n ⋅ ε 2 l o g 2 ( n ) ) time (Proposition 3.2 and lemma 8.1), which is again O ( ∣ K ∣ log 3 n ) O(|K|\log^3 n) O ( ∣ K ∣ log 3 n ) for constant ε \varepsilon ε .
Lemma 8.4. Let K K K be the cluster that triggers Algorithm 3. Apart from new cluster formations, merges, and removal of records charged to earlier operations, the time complexity for this single run of Algorithm 3 is O ( ∣ K ∣ log 3 n ) O(|K|\log^3 n) O ( ∣ K ∣ log 3 n ) for constant ε \varepsilon ε .
Proof. By Lemma 3.1, line 2 takes O ( ∣ K ∣ log 3 n ε 2 ) O\left(|K|\frac{\log^3 n}{\varepsilon^2}\right) O ( ∣ K ∣ ε 2 l o g 3 n ) time to check the sparsity for each vertex. We do not count the time for new cluster formation and merging vertices to clusters here (see Section 8.3). Finally, the addition of the vertices to V ~ s i n g l e t o n \widetilde{V}_{\mathrm{singleton}} V singleton and V ~ l i s t , ( i ) \widetilde{V}_{\mathrm{list},(i)} V list , ( i ) takes O ( ∣ K ∣ log 2 n ) O(|K|\log^2 n) O ( ∣ K ∣ log 2 n ) time.
Subroutines used by Algorithm 4. We similarly provide the relatively straightforward analysis for the time complexity needed for Algorithm 6 (size estimation) and Algorithm 7 (removing zero-degree vertices).
Lemma 8.5. A single call on Algorithm 6 runs in O ( γ log 3 n ) O(\gamma\log^3 n) O ( γ log 3 n ) time for constant choices of ε \varepsilon ε . Here, γ \gamma γ is the parameter used in Algorithm 6.
Proof. We only sample γ \gamma γ vertices from the set V ~ s i n g l e t o n \widetilde{V}_{\mathrm{singleton}} V singleton , and we use Algorithm 6 in two ways: checking whether the vertex belongs to a degree bucket and checking whether the vertex is at least 5 ζ 5\zeta 5 ζ sparse. Both operations can be accomplished in O ( log 3 ( n ) ) O(\log^{3}(n)) O ( log 3 ( n )) time for each vertex for constant choice of ε \varepsilon ε due to Lemma 3.1, which leads to the desired time complexity.
Lemma 8.6. Each degree-zero sampling test in Algorithm 7 takes polylog ( n ) \operatorname{polylog}(n) polylog ( n ) time, and each traversal at step t t t takes ∣ V ~ s i n g l e t o n ( t ) ∣ polylog ( n ) \left|\widetilde{V}_{\mathrm{singleton}}^{(t)}\right|\operatorname{polylog}(n) V singleton ( t ) polylog ( n ) time, excluding the level checks required by the counters.
Proof. The test uses O ( log n ) O(\log n) O ( log n ) samples and degree queries. Each traversal checks every vertex in V ~ s i n g l e t o n \widetilde{V}_{\mathrm{singleton}} V singleton and removes each degree-zero vertex from V ~ s i n g l e t o n \widetilde{V}_{\mathrm{singleton}} V singleton and all L L L lists, taking polylog ( n ) \operatorname{polylog}(n) polylog ( n ) time per vertex. The level checks required by the counters are charged separately in Lemma 8.14 .
Amortizing the time efficiency for cluster formation and refreshment
We amortize the time complexity for cluster formation and refreshment to past updates in the graph , including insertion and deletion of the vertices of the graph. At a high level, every time a new cluster K K K is formed we must find a sufficiently large group of data stream updates (e.g., Ω ( ∣ K ∣ ) \Omega(|K|) Ω ( ∣ K ∣ ) updates) to charge for its computational cost. The easy case occurs when K K K is formed or refreshed due to the accumulation of data stream additions or removals (e.g., inc ( K ) \operatorname{inc}(K) inc ( K ) or del ( K ) \operatorname{del}(K) del ( K ) reaching the ε ∣ K ∣ \varepsilon|K| ε ∣ K ∣ threshold), or when a large portion of the vertices in K K K never joins a cluster before, allowing us to cleanly charge the work directly to the corresponding data stream updates.
However, a fundamental challenge arises with algorithmic cascades: vertices forming K K K may have been previously removed from an older cluster due to algorithmic identification, meaning that no new data stream updates with respect to vertices in K K K are available to charge. We could attempt to trace these algorithmically removed vertices back to the original insertions that are responsible for their removal, e.g., if vertices in K K K were previously identified and moved to V ~ s i n g l e t o n \widetilde{V}_{\mathrm{singleton}} V singleton by K ′ K' K ′ , then we charge the time of forming K K K to that of forming K ′ K' K ′ . However, it is hard to construct a well-defined charging mapping, e.g., it could happen that vertices in K K K were previously moved to V ~ s i n g l e t o n \widetilde{V}_{\mathrm{singleton}} V singleton by K ′ K' K ′ , while vertices in K ′ K' K ′ were previously moved to V ~ s i n g l e t o n \widetilde{V}_{\mathrm{singleton}} V singleton by an earlier cluster K ′ ′ K'' K ′′ , and we risk double-charging the same data stream updates across an infinite chain of cluster fragmentations.
Our budgeting method. To resolve this issue without tracking complex historical lineages, we design a forward-charging budgeting scheme. We add a budget Ψ \Psi Ψ for each data stream update and transfer the budget to the clusters with which it is associated, e.g., we transfer a part of Ψ \Psi Ψ to K K K if a vertex is a data stream addition to K K K . Then we show that every newly-formed cluster has a total budget of at least Ω ( ε ∣ K ∣ Φ ) \Omega(\varepsilon|K|\Phi) Ω ( ε ∣ K ∣Φ ) . Therefore, it pools the budget to pay for its own formation work, while using the leftover budget to mint new Φ \Phi Φ budgets for the vertices it removes during the identification step. The key observation is that a cluster at most identifies O ( ε ∣ K ∣ ) O(\varepsilon|K|) O ( ε ∣ K ∣ ) vertices due to Lemma 6.1 , so the cost is safely charged as long as we find a larger total budget. This process is captured by the following minted budget inequality:
C 1 ε ∣ K ∣ Φ ⏟ Unused Budgets ≥ ∣ K ∣ ⋅ polylog ( n ) poly ( ε ) ⏟ Time for algorithmic operations + C 2 ε ∣ K ∣ Φ ⏟ Budgets being passed on . \underbrace{C_{1}\varepsilon|K|\Phi}_{\text{Unused Budgets}}
\ge
|K|\cdot\underbrace{\frac{\operatorname{polylog}(n)}{\operatorname{poly}(\varepsilon)}}_{\text{Time for algorithmic operations}}
+
\underbrace{C_{2}\varepsilon|K|\Phi}_{\text{Budgets being passed on}}. Unused Budgets C 1 ε ∣ K ∣Φ ≥ ∣ K ∣ ⋅ Time for algorithmic operations poly ( ε ) polylog ( n ) + Budgets being passed on C 2 ε ∣ K ∣Φ .
Then the inequality holds if C 1 > C 2 C_{1}>C_{2} C 1 > C 2 and Φ > polylog ( n ) ( C 1 − C 2 ) poly ( ε ) \Phi>\frac{\operatorname{polylog}(n)}{(C_{1}-C_{2})\operatorname{poly}(\varepsilon)} Φ > ( C 1 − C 2 ) poly ( ε ) polylog ( n ) . In the following analysis, we show that when a cluster is formed, a large portion of its vertices comes from V ~ s i n g l e t o n \widetilde{V}_{\mathrm{singleton}} V singleton , so they receive a budget Φ \Phi Φ from previous data stream updates, either due to identification or a refreshment of an old cluster. The charging scheme is summarized as follows:
If both invariants hold, it is instant that we have enough budget during each formation to pay for the algorithmic operations and the budgets that pass on to others. Therefore, the charging framework implies a Ψ \Psi Ψ amortized time, as we add a budget Ψ \Psi Ψ on each data stream update:
Lemma 8.7. Suppose that the invariants hold in the algorithm, then the amortized time for forming and refreshing clusters is at most Ψ \Psi Ψ .
Proof. All work of formations and refreshments is paid from budgets. New budget is created only at stream updates, Ψ \Psi Ψ per update, and every other step only moves existing budget as follows. Transfers move part of an update’s budget to a cluster and when a cluster is refreshed, its transferred budget is handed to its remaining vertices (see Observation 8.8). During formation, the budget Φ \Phi Φ given to each of the fewer than 2.01 ε ∣ K ∣ 2.01\varepsilon|K| 2.01 ε ∣ K ∣ identified vertices comes from the at least 2.5 ε Φ ∣ K ∣ 2.5\varepsilon\Phi|K| 2.5 ε Φ∣ K ∣ collected from vertices of K K K (see Lemmas 8.10 and 8.11), a merge spends the added vertex’s budget, and a formation from a vertex of degree below 10 / ε 10/\varepsilon 10/ ε spends that vertex’s budget. By the two invariants no budget becomes negative, so after m m m updates the total time of formations and refreshments is at most Ψ m \Psi m Ψ m .
Given Lemma 8.7, our goal is to show that Ψ = O ( polylog ( n ) poly ( ε ) ) \Psi= O\left(\frac{\operatorname{polylog}(n)}{\operatorname{poly}(\varepsilon)}\right) Ψ = O ( poly ( ε ) polylog ( n ) ) , so that we achieve the efficient update time as desired. We next formalize the budgeting and charging scheme.
Initialization: When the data stream inserts or deletes a vertex v v v , we add a budget Ψ \Psi Ψ on v v v . For an insertion, Φ \Phi Φ is the spendable budget of v v v , while the remaining Ψ − Φ \Psi- \Phi Ψ − Φ is reserved for transfers to a cluster K K K whenever v v v joins K K K and increases inc ( K ) \operatorname{inc}(K) inc ( K ) . Spending the vertex budget does not reduce this reserve.
Budget transferring: Transfer the budget on v v v to a cluster K K K under the following cases:
total budget of 2 Φ ε \frac{2\Phi}{\varepsilon} ε 2Φ to K K K from the insertion reserve. Note that this event could happen after v v v is inserted, e.g., v v v joins V ~ s i n g l e t o n \widetilde{V}_{\mathrm{singleton}} V singleton or some other cluster K ′ K' K ′ at first and then joins K K K later. Adding the same vertex to the same cluster again does not increment inc ( K ) \operatorname{inc}(K) inc ( K ) again.
Budget passing on: When a cluster K K K is formed or refreshed, use its available budgets to charge the operations (see Lemma 8.10 and Observation 8.8), and pass on the budget of a cluster K K K under the following cases:
If K K K is refreshed, add a budget Φ \Phi Φ on each v ∈ K v \in K v ∈ K when the old cluster is removed, before processing its vertices, i.e., v v v moves to V ~ s i n g l e t o n \widetilde{V}_{\mathrm{singleton}} V singleton or a new cluster.
Finally, zero-out the spendable budget for each vertex in K K K . A merge consumes the added vertex’s budget in the same way.
We first show that when a cluster is refreshed, it obtains Φ ∣ K ∣ \Phi|K| Φ∣ K ∣ budgets since it is associated with enough data stream updates.
Observation 8.8. During the refreshment of a cluster K K K , it has a total budget of at least Φ ∣ K ∣ \Phi|K| Φ∣ K ∣ , i.e., each remaining vertex gets a budget Φ \Phi Φ .
Proof. At least ε ∣ K ( t 0 ) ∣ \varepsilon|K^{(t_0)}| ε ∣ K ( t 0 ) ∣ counted data stream additions or removals trigger the refreshment. Their transfers contribute at least 2 Φ ∣ K ( t 0 ) ∣ 2\Phi|K^{(t_0)}| 2Φ∣ K ( t 0 ) ∣ . By Lemma 6.5 , the remaining cluster has size at most 2 ∣ K ( t 0 ) ∣ 2|K^{(t_0)}| 2∣ K ( t 0 ) ∣ , so there is budget Φ \Phi Φ for every remaining vertex. A one-vertex cluster cannot receive a merge by Lemma 3.2.
We next show that any vertex in V ~ s i n g l e t o n \widetilde{V}_{\mathrm{singleton}} V singleton has a budget Φ \Phi Φ , so it suffices to prove that a large fraction of vertices in a newly-formed cluster come from V ~ s i n g l e t o n \widetilde{V}_{\mathrm{singleton}} V singleton .
Observation 8.9. All vertices in V ~ s i n g l e t o n \widetilde{V}_{\mathrm{singleton}} V singleton have an unused budget of Φ \Phi Φ .
Proof. A vertex that has never joined a cluster retains the budget Φ \Phi Φ assigned at insertion. A vertex removed from a cluster receives Φ \Phi Φ either from refreshment, by Observation 8.8, or from the cluster that identifies it. Removing a degree-zero vertex from V ~ s i n g l e t o n \widetilde{V}_{\mathrm{singleton}} V singleton , or restoring it to the lists, does not spend this budget.
Corollary 6. Immediately before a new cluster is formed, let K K K be any ϵ \epsilon ϵ -almost-clique of size at least two. At least one of the following holds:
There is a maintained cluster K ′ K' K ′ containing at least a ( 1 − 91 ϵ ) (1-91\epsilon) ( 1 − 91 ϵ ) -fraction of K K K , and every vertex in K ∖ K ′ K \setminus K' K ∖ K ′ lies outside all maintained clusters.
At least a 40 ϵ 40\epsilon 40 ϵ -fraction of K K K lies outside all maintained clusters.
Proof. For an ϵ \epsilon ϵ -almost-clique K K K , Definition 3 gives ∣ N [ u ] ∣ ≤ ∣ K ∣ / ( 1 − ϵ ) |N[u]| \le|K|/(1-\epsilon) ∣ N [ u ] ∣ ≤ ∣ K ∣/ ( 1 − ϵ ) and at most ϵ ∣ K ∣ / ( 1 − ϵ ) \epsilon|K|/(1-\epsilon) ϵ ∣ K ∣/ ( 1 − ϵ ) non-neighbors per vertex. These are stronger than the bounds used in Theorem 4, so the part of its proof establishing the two alternatives applies to K K K . Immediately before formation, all clusters whose counters reached a refreshment threshold have been removed, and previous formations and identifications are complete. The same argument therefore shows that the relevant vertices lie outside all maintained clusters; we do not need the final part of that proof establishing list membership. In particular, these vertices may include the vertex being inserted or vertices awaiting processing during refreshment, even if they have not yet been added to V ~ s i n g l e t o n \widetilde{V}_{\mathrm{singleton}} V singleton . □ \square □
With Observation 8.8 and Observation 8.9, we are able to show the first invariant. The proof is based on Corollary 6: either enough vertices of the new cluster have unused budgets, or almost all of it lies in an existing cluster. In the latter case, we show that the vertex from which the new cluster is formed should instead merge into the existing cluster.
Lemma 8.10 (Invariant I). When a cluster K K K is formed in our algorithm from a vertex of degree at least 10 / ϵ 10/\epsilon 10/ ϵ , at least 2.5 ϵ ∣ K ∣ 2.5\epsilon|K| 2.5 ϵ ∣ K ∣ vertices in K K K have an unused budget Φ \Phi Φ . For a smaller-degree vertex, its budget instead pays for the formation.
Proof. Note that any newly-formed cluster K K K in our algorithm is an ϵ \epsilon ϵ -almost-clique. Let v v v be the vertex from which K K K is formed, and first suppose that deg ( v ) ≥ 10 / ϵ \deg(v) \ge10/\epsilon deg ( v ) ≥ 10/ ϵ . It suffices to show that, immediately before K K K is formed, at least 2.5 ϵ ∣ K ∣ 2.5\epsilon|K| 2.5 ϵ ∣ K ∣ of its vertices lie outside all maintained clusters. Indeed, each such vertex has an unused budget Φ \Phi Φ by Observation 8.8 and Observation 8.9, including v v v and vertices awaiting processing during refreshment.
If the second conclusion of Corollary 6 holds, our proof is done. For the first conclusion, if ∣ K ∖ K ′ ∣ ≥ 2.5 ϵ ∣ K ∣ |K \setminus K'| \ge2.5\epsilon|K| ∣ K ∖ K ′ ∣ ≥ 2.5 ϵ ∣ K ∣ , then all these vertices lie outside all maintained clusters and have unused budgets. Thus, it suffices to consider the case where ∣ K ∖ K ′ ∣ < 2.5 ϵ ∣ K ∣ |K \setminus K'| < 2.5\epsilon|K| ∣ K ∖ K ′ ∣ < 2.5 ϵ ∣ K ∣ , so K ′ K' K ′ contains more than ( 1 − 2.5 ϵ ) ∣ K ∣ (1-2.5\epsilon)|K| ( 1 − 2.5 ϵ ) ∣ K ∣ vertices of K K K . The vertex v v v lies outside K ′ K' K ′ . We show that v v v should have been merged into K ′ K' K ′ , contradicting the formation of K K K .
Let t 0 t_0 t 0 be the time when K ′ K' K ′ was formed. We first bound its size at formation, using the same analysis as in Theorem 4. For any u ∈ K ∩ K ′ u \in K \cap K' u ∈ K ∩ K ′ , Definition 3 and Lemma 6.5 give
( 1 − 12 ϵ ) ∣ ( K ′ ) ( t 0 ) ∣ ≤ ∣ N [ u ] ∣ ≤ ∣ K ∣ 1 − ϵ , (1-12\epsilon)\left|(K')^{(t_0)}\right| \le|N[u]| \le\frac{|K|}{1-\epsilon}, ( 1 − 12 ϵ ) ( K ′ ) ( t 0 ) ≤ ∣ N [ u ] ∣ ≤ 1 − ϵ ∣ K ∣ ,
and hence ∣ ( K ′ ) ( t 0 ) ∣ ≤ 1.11 ∣ K ∣ \left|(K')^{(t_0)}\right| \le1.11|K| ( K ′ ) ( t 0 ) ≤ 1.11∣ K ∣ . Write S = K ∩ K ′ S=K \cap K' S = K ∩ K ′ . The bound from the proof of Lemma 6.9 , which does not require Case I, shows that every x ∈ K ′ ∖ K x \in K' \setminus K x ∈ K ′ ∖ K has at most 15 ϵ ∣ ( K ′ ) ( t 0 ) ∣ 15\epsilon\left|(K')^{(t_0)}\right| 15 ϵ ( K ′ ) ( t 0 ) non-neighbors in K ′ K' K ′ . Consequently,
∣ N ( x ) ∩ S ∣ ≥ ∣ S ∣ − 15 ϵ ∣ ( K ′ ) ( t 0 ) ∣ > ( 1 − 19.15 ϵ ) ∣ K ∣ > ∣ K ∣ / 2. |N(x) \cap S| \ge|S|-15\epsilon\left|(K')^{(t_0)}\right| > (1-19.15\epsilon)|K| > |K|/2. ∣ N ( x ) ∩ S ∣ ≥ ∣ S ∣ − 15 ϵ ( K ′ ) ( t 0 ) > ( 1 − 19.15 ϵ ) ∣ K ∣ > ∣ K ∣/2.
Since K K K is an ε \varepsilon ε -almost-clique, the total number of positive edges leaving K K K is at most ε ∣ K ∣ 2 / ( 1 − ε ) \varepsilon|K|^2/(1-\varepsilon) ε ∣ K ∣ 2 / ( 1 − ε ) . Counting the edges from K ′ ∖ K K' \setminus K K ′ ∖ K to S S S therefore gives
∣ K ′ ∖ K ∣ ≤ 2 ε 1 − ε ∣ K ∣ . |K' \setminus K| \le\frac{2\varepsilon}{1-\varepsilon}|K|. ∣ K ′ ∖ K ∣ ≤ 1 − ε 2 ε ∣ K ∣.
We can now verify the merge conditions for v v v . By Lemma 3.2, ∣ N ( v ) ∖ K ∣ < ε deg ( v ) / 20 |N(v) \setminus K| < \varepsilon\deg(v)/20 ∣ N ( v ) ∖ K ∣ < ε deg ( v ) /20 and ∣ K ∣ ≤ ( 1 + 0.152 ε ) deg ( v ) |K| \le(1+0.152\varepsilon)\deg(v) ∣ K ∣ ≤ ( 1 + 0.152 ε ) deg ( v ) . Together with the bounds on K ∖ K ′ K \setminus K' K ∖ K ′ and K ′ ∖ K K' \setminus K K ′ ∖ K , this gives
∣ N ( v ) ∖ K ′ ∣ deg ( v ) < ε / 20 + 2.5 ε ( 1 + 0.152 ε ) < 3 ε , \frac{|N(v) \setminus K'|}{\deg(v)} < \varepsilon/20+2.5\varepsilon(1+0.152\varepsilon)<3\varepsilon, deg ( v ) ∣ N ( v ) ∖ K ′ ∣ < ε /20 + 2.5 ε ( 1 + 0.152 ε ) < 3 ε ,
∣ K ′ ∣ deg ( v ) ≤ ( 1 + 2 ε 1 − ε ) ( 1 + 0.152 ε ) < 1 + 4 ε . \frac{|K'|}{\deg(v)} \le\left(1+\frac{2\varepsilon}{1-\varepsilon}\right)(1+0.152\varepsilon)<1+4\varepsilon. deg ( v ) ∣ K ′ ∣ ≤ ( 1 + 1 − ε 2 ε ) ( 1 + 0.152 ε ) < 1 + 4 ε .
Thus, Lemma 3.2 would merge v v v into K ′ K' K ′ instead of forming a new cluster, a contradiction. For deg ( v ) < 10 / ε \deg(v)<10/\varepsilon deg ( v ) < 10/ ε , the same subroutine forms an isolated exact clique of size at most 10 / ε + 1 10/\varepsilon+1 10/ ε + 1 and identifies no outside vertex, so v v v 's budget suffices.
Now, we establish the second invariant by carefully choosing the value of Φ \Phi Φ .
Lemma 8.11 (Invariant II). Let Φ = O ( log 3 n / ε 3 ) \Phi=O(\log^3 n/\varepsilon^3) Φ = O ( log 3 n / ε 3 ) , with a sufficiently large constant. Then the total budget of K K K (2.5 ε Φ ∣ K ∣ 2.5\varepsilon\Phi|K| 2.5 ε Φ∣ K ∣ when formation starts from a vertex of degree at least 10 / ε 10/\varepsilon 10/ ε ) pays for the algorithmic operations and the budgets passed on to other vertices.
Proof. We begin by computing the total number of algorithmic operations charged to a cluster K K K . Throughout this proof, ∣ K ∣ |K| ∣ K ∣ denotes its size at formation. By Lemma 8.3 , the time complexity for cluster formation, including the identification step, is O ( ∣ K ∣ log 3 n / ε 2 ) O(|K|\log^3 n/\varepsilon^2) O ( ∣ K ∣ log 3 n / ε 2 ) . By Lemma 6.5 , at most 3 ε ∣ K ∣ 3\varepsilon|K| 3 ε ∣ K ∣ vertices outside K K K at its formation are first added to K K K before its refreshment. These additions, together with the creation and eventual removal of their membership records, can be charged to the time of cluster formation. Here, we note that a vertex might leave and re-enter K K K several times, which is not counted as a new addition in the preceding bound. However, we do not need to charge all these operations to K K K . A repeated addition of a vertex outside all maintained clusters uses the budget Φ \Phi Φ supplied by its preceding removal from a cluster; an addition during the formation of another cluster is charged to that formation. Finally, by Lemma 8.4 , refreshing K K K takes O ( ∣ K ∣ log 3 n / ε 2 ) O(|K|\log^3 n/\varepsilon^2) O ( ∣ K ∣ log 3 n / ε 2 ) time. Thus, the average charge on each vertex of the initial cluster is O ( log 3 n / ε 2 ) O(\log^3 n/\varepsilon^2) O ( log 3 n / ε 2 ) .
In addition, when K K K is formed, it identifies all vertices outside K K K that connect to at least an α = 1 / 2 \alpha=1/2 α = 1/2 fraction of its vertices, and it may also report vertices with more than ∣ K ∣ / 4 |K|/4 ∣ K ∣/4 neighbors in K K K . Since K K K is an ( ε / 2 ) (\varepsilon/2) ( ε /2 ) -almost-clique, Lemma 6.1 bounds the number of all reported vertices by
2 ε 1 − ε / 2 ∣ K ∣ < 2.01 ε ∣ K ∣ . \frac{2\varepsilon}{1-\varepsilon/2}|K|<2.01\varepsilon|K|. 1 − ε /2 2 ε ∣ K ∣ < 2.01 ε ∣ K ∣.
Thus, we only need to pass on a budget Φ \Phi Φ to at most 2.01 ε ∣ K ∣ 2.01\varepsilon|K| 2.01 ε ∣ K ∣ vertices. By Lemma 8.10 , when formation starts from a vertex of degree at least 10 / ε 10/\varepsilon 10/ ε , at least 2.5 ε ∣ K ∣ 2.5\varepsilon|K| 2.5 ε ∣ K ∣ vertices have an unused budget Φ \Phi Φ . Therefore,
2.5 ε Φ ∣ K ∣ ≥ O ( ∣ K ∣ log 3 n ε 2 ) + 2.01 ε Φ ∣ K ∣ 2.5\varepsilon\Phi|K| \ge O\left(\frac{|K|\log^3 n}{\varepsilon^2}\right)+2.01\varepsilon\Phi|K| 2.5 ε Φ∣ K ∣ ≥ O ( ε 2 ∣ K ∣ log 3 n ) + 2.01 ε Φ∣ K ∣
for Φ = O ( log 3 n / ε 3 ) \Phi=O(\log^3 n/\varepsilon^3) Φ = O ( log 3 n / ε 3 ) with a sufficiently large constant. For a smaller-degree vertex, the new cluster is an isolated exact clique of size at most 10 / ε + 1 10/\varepsilon+1 10/ ε + 1 and identifies no outside vertex, so that vertex's single budget Φ \Phi Φ pays for the same operations.
Lemma 8.12. Ψ = O ( log 4 n ε 4 ) \Psi= O\left(\frac{\log^{4} n}{\varepsilon^{4}}\right) Ψ = O ( ε 4 l o g 4 n ) is sufficient for the budget transferring step in Line 8.3.
Proof. A deletion transfers budget to at most O ( log n ) O(\log n) O ( log n ) clusters by Lemma 8.1 . For insertions, fix a vertex v v v and list the distinct clusters K 1 , … , K d K_1,\ldots,K_d K 1 , … , K d whose insertion counters increase when v v v is first added, in that order. Let t i t_i t i be the formation time of K i K_i K i ; each K i K_i K i was formed before v v v was inserted.
At its addition to K i + 1 K_{i+1} K i + 1 , v v v has at least ( 1 − 12 ε ) ∣ K i + 1 ( t i + 1 ) ∣ (1-12\varepsilon)\left|K_{i+1}^{(t_{i+1})}\right| ( 1 − 12 ε ) K i + 1 ( t i + 1 ) positive neighbors in K i + 1 ( t i + 1 ) K_{i+1}^{(t_{i+1})} K i + 1 ( t i + 1 ) by the proof of Lemma 6.5 . These vertices and their edges to v v v already existed when v v v was added to K i K_i K i . At that earlier time, at most 7 ε ∣ K i + 1 ( t i + 1 ) ∣ 7\varepsilon\left|K_{i+1}^{(t_{i+1})}\right| 7 ε K i + 1 ( t i + 1 ) of them were outside K i + 1 K_{i+1} K i + 1 , by Lemma 6.6 applied immediately before the later addition. The others lie outside the dense core containing v v v in K i K_i K i , so
( 1 − 19 ε ) ∣ K i + 1 ( t i + 1 ) ∣ ≤ 4 ε ( 1 + 4 ε ) 1 − 4 ε ∣ K i ( t i ) ∣ < 1 − 19 ε 2 ∣ K i ( t i ) ∣ . (1-19\varepsilon)\left|K_{i+1}^{(t_{i+1})}\right| \le\frac{4\varepsilon(1+4\varepsilon)}{1-4\varepsilon}\left|K_i^{(t_i)}\right| < \frac{1-19\varepsilon}{2}\left|K_i^{(t_i)}\right|. ( 1 − 19 ε ) K i + 1 ( t i + 1 ) ≤ 1 − 4 ε 4 ε ( 1 + 4 ε ) K i ( t i ) < 2 1 − 19 ε K i ( t i ) .
Here the factor 1 + 4 ε 1+4\varepsilon 1 + 4 ε also covers an addition triggering immediate refreshment. Such a merge has degree at least 10 / ε 10/\varepsilon 10/ ε , and its dense core and Lemma 6.5 imply ∣ K i ( t i ) ∣ > 1 / ε \left|K_i^{(t_i)}\right|>1/\varepsilon K i ( t i ) > 1/ ε . Thus the extra vertex changes the size bound from 1 + 3 ε 1+3\varepsilon 1 + 3 ε to 1 + 4 ε 1+4\varepsilon 1 + 4 ε ; the proof of Lemma 6.5 retains its 12 ε 12\varepsilon 12 ε bound.
The initial cluster sizes therefore decrease by a factor greater than two, so d = O ( log n ) d=O(\log n) d = O ( log n ) . Adding v v v to the same cluster again does not increase its insertion counter. Each update consequently needs O ( log n ) ⋅ 2 Φ / ε O(\log n)\cdot2\Phi/\varepsilon O ( log n ) ⋅ 2Φ/ ε , in addition to its initial vertex budget, which is the stated bound on Ψ \Psi Ψ .
As a corollary of Lemma 8.7, we have the following result.
Lemma 8.13. The amortized time for cluster formation and refreshment in Algorithm 1 and Algorithm 4 is O ( polylog ( n ) ) O(\operatorname{polylog}(n)) O ( polylog ( n )) for a constant ε \varepsilon ε .
The same budgeting argument holds for every finite prefix of internal operations, since all charged budgets come from past updates. If ℓ \ell ℓ counts all additions to clusters, including formation and repeated additions, then after m m m stream updates we have ℓ ≤ m polylog ( n ) \ell\le m\operatorname{polylog}(n) ℓ ≤ m polylog ( n ) whenever the local subroutine guarantees hold. This bound does not depend on the number of level checks.
Amortizing the time efficiency for Algorithm 4
In this section, we show that the time required to maintain V ~ s i n g l e t o n \widetilde{V}_{\mathrm{singleton}} V singleton and V ~ l i s t , ( i ) \widetilde{V}_{\mathrm{list},(i)} V list , ( i ) in Algorithm 4 is upper bounded by the number of operations that add a vertex to a cluster up to polylog ( n ) \operatorname{polylog}(n) polylog ( n ) factors. Therefore, since we showed that such operations can be charged to the data stream inputs, the amortized update time of Algorithm 4 is also polylog ( n ) \operatorname{polylog}(n) polylog ( n ) .
Lemma 8.14. Let ℓ \ell ℓ be the total number of operations that we add a vertex to a cluster (including forming new clusters and repeated additions) and let m m m be the total number of data stream updates, then the total update time of Algorithm 4 is ( ℓ + m ) ⋅ polylog ( n ) (\ell+m)\cdot\operatorname{polylog}(n) ( ℓ + m ) ⋅ polylog ( n ) . As a result, the amortized update time of Algorithm 4 is polylog ( n ) \operatorname{polylog}(n) polylog ( n ) .
Proof. **Time for adding and removing vertices from V ~ s i n g l e t o n \widetilde{V}_{\mathrm{singleton}} V singleton : ** An entry is caused by a data stream insertion, removal from a cluster, or identification of a singleton previously removed by Algorithm 7. Charge the first two to the insertion or preceding addition to a cluster. Charge the last to the identifying cluster, which identifies only O ( ε ∣ K ∣ ) O(\varepsilon\lvert K\rvert) O ( ε ∣ K ∣) vertices by Lemma 6.1 . Repeated identification of a vertex already in V ~ s i n g l e t o n \widetilde{V}_{\mathrm{singleton}} V singleton creates no entry. A departure is caused by an addition to a cluster, a deletion, or removal of a degree-zero vertex; the last is charged to its preceding entry. Hence there are O ( m + ℓ ) O(m+\ell) O ( m + ℓ ) changes counted by each c i c_i c i in Algorithm 4. Updating all L L L counters takes O ( L ) O(L) O ( L ) time per counted change.
Time for running Algorithm 7: By Lemma 7.4 , every traversal removes at least a 1 / 40 1/40 1/40 fraction of the vertices present at its start, so its work is charged to their preceding entries. The tests cost polylog ( n ) \operatorname{polylog}(n) polylog ( n ) per output or traversal.
Time for checking sizes: The counter c i c_i c i is reset at the start of each check and counts changes during that check toward the next one. Thus each level-i i i check requires at least h i h_i h i new counted changes, giving O ( ( m + ℓ ) / h i ) O((m+\ell)/h_i) O (( m + ℓ ) / h i ) checks. Each uses 2 i polylog ( n ) 2^i\operatorname{polylog}(n) 2 i polylog ( n ) work for estimation and at most 2 i L 2 2^iL^2 2 i L 2 unsuccessful visits in a partial scan of Algorithm 5. Since 2 i / h i = O ( 1 / ζ ) 2^i/h_i=O(1/\zeta) 2 i / h i = O ( 1/ ζ ) , this totals ( m + ℓ ) polylog ( n ) (m+\ell)\operatorname{polylog}(n) ( m + ℓ ) polylog ( n ) over all levels.
Time for maintaining vertices with lower degrees: Each removal below the threshold 2 i / 10 2^i/10 2 i /10 is charged to the creation of that list entry. Entries arise when a vertex enters V ~ s i n g l e t o n \widetilde{V}_{\mathrm{singleton}} V singleton or is identified by a new cluster, and both were charged above. By Algorithm 5, a scan visits each entry at most once unless it is removed and created again, and it does not copy the entire list before starting.
Time for maintaining vertices with higher degrees: Consider a full scan of Algorithm 5 whose comparisons pass, and let D D D count the 5 ζ 5\zeta 5 ζ -dense vertices initially in the three buckets S i ( 3 ) S_i(3) S i ( 3 ) . With ξ = ∣ V ~ s i n g l e t o n ∣ / ( 1000 ⋅ 2 i L ) \xi=|\widetilde{V}_{\mathrm{singleton}}|/(1000\cdot2^iL) ξ = ∣ V singleton ∣/ ( 1000 ⋅ 2 i L ) , Lemma 7.1 and the dominance comparison give
u ˉ i ≤ 1.1 D + ξ , ξ ≤ 0.1 u ˉ i , u ˉ i ≤ ( 11 / 9 ) D . \bar{u}_i\le1.1D+\xi,\qquad\xi\le0.1\bar{u}_i,\qquad\bar{u}_i\le(11/9)D. u ˉ i ≤ 1.1 D + ξ , ξ ≤ 0.1 u ˉ i , u ˉ i ≤ ( 11/9 ) D .
If bucket j ≥ i − 4 j\ge i-4 j ≥ i − 4 initially contains P P P vertices that are 5 ζ 5\zeta 5 ζ -sparse, the other two comparisons give
0.9 P − ξ ≤ u ˉ j ′ ≤ 100 L u ˉ i , P = O ( L D ) . 0.9P-\xi\le\bar{u}'_j\le100L\bar{u}_i,\qquad P=O(LD). 0.9 P − ξ ≤ u ˉ j ′ ≤ 100 L u ˉ i , P = O ( L D ) .
Every unsuccessful visit to an initial vertex above the threshold belongs to one of these sparse sets, because a 5 ζ 5\zeta 5 ζ -dense vertex passes the 12 ζ 12\zeta 12 ζ test. There are at most L L L such buckets, hence O ( L 2 D ) O(L^2D) O ( L 2 D ) such visits. By Lemma 7.2 , at least D D D vertices are added to clusters during the scan, paying for this work. Successful visits in either kind of scan are charged to additions to clusters, and visits to newly created entries are charged to their creation. By Lemma 8.13 , ℓ ≤ m polylog ( n ) \ell\le m\operatorname{polylog}(n) ℓ ≤ m polylog ( n ) independently of how often checks run, so the total time is m polylog ( n ) m\operatorname{polylog}(n) m polylog ( n ) .
Combining Lemma 8.13 and Lemma 8.14 , we have our main theorem for update time.
Theorem 7. The entire algorithm runs in polylog ( n ) \operatorname{polylog}(n) polylog ( n ) amortized time.
Assume m = poly ( n ) m=\operatorname{poly}(n) m = poly ( n ) . By the preceding time analysis, there are at most poly ( n ) \operatorname{poly}(n) poly ( n ) randomized subroutine calls before the first failure or termination. Using fresh randomness with sufficiently small inverse-polynomial failure probability for each call, a union bound over the possible positions of the first failure shows that all calls succeed with high probability. Hence the correctness and time guarantees hold throughout the update sequence, proving Theorem 1.
AI Disclosure
The initial draft of this paper was finished before July 2026. AI is not used in discovering the research direction, constructing the algorithms, and forming the analysis. Later, the authors used GPT Astra and Claude Opus 5.5 to check the initial draft, simplify proofs, and assist in improving the presentation. GPT Astra was used to assist in the proof of the adversarially robust result. All mathematical results and proofs were independently verified by human authors. The manuscript was written entirely by the authors, who take complete responsibility for the correctness of this work.
A Lower Bound for Maintaining the Strict Sparse-dense Decomposition
In this section, we prove a lower bound showing that no dynamic algorithm can maintain the sparse-dense decomposition structure as in Definition 3 with o ( n ) o(\sqrt{n}) o ( n ) amortized update time. This highlights the difficulty for algorithms to efficiently maintain decompositions, which justifies the necessity to separate “decomposition” from “clustering” to use the more relaxed notion as in Definition 6.
Lemma A.1. For any constant ε ∈ ( 0 , 1 / 4 ) \varepsilon\in(0,1/4) ε ∈ ( 0 , 1/4 ) and the corresponding constant η 0 \eta_0 η 0 as defined in Definition 3, there exists a dynamically changing graph with at most n n n vertices and a polynomial-length sequence of vertex updates, such that any dynamic algorithm must suffer an expected amortized update time of Ω ( n ) \Omega(\sqrt{n}) Ω ( n ) per vertex update if it explicitly maintains a valid standard ε \varepsilon ε -sparse-dense decomposition (as in Definition 3) at all time steps with probability at least 99 / 100 99/100 99/100 .
Proof. Let k k k be a parameter such that k = ⌊ n / 2 ⌋ k = \lfloor\sqrt{n/2}\rfloor k = ⌊ n /2 ⌋ . We will consider a “dense set” of vertices V 0 V_0 V 0 of size N = k 2 N = k^2 N = k 2 . We construct a fixed worst-case sequence consisting of an initialization phase followed by an alternating update cycle repeated M = n M = n M = n times. At a high level, we will use the insertion and deletion of a set of at most k k k vertices to force updates on all vertices in the dense set of k 2 k^2 k 2 size, which will lead to the lower bound. The formal argument is given as follows.
Initialization Phase (Construction of a graph G 0 G_0 G 0 ): We sequentially insert N N N vertices partitioned into k k k disjoint cliques C 1 , C 2 , … , C k C_1, C_2, \ldots, C_k C 1 , C 2 , … , C k , each of size exactly k k k . A vertex insertion arrives with all its edges connecting to previously inserted vertices in its respective clique. This requires N = Θ ( n ) N = \Theta(n) N = Θ ( n ) vertex insertions. Let the resulting graph be G 0 = ( V 0 , E 0 ) G_0 = (V_0, E_0) G 0 = ( V 0 , E 0 ) .
Note that in the state of G 0 G_0 G 0 , all vertices in C 1 , C 2 , … , C k C_1, C_2, \ldots, C_k C 1 , C 2 , … , C k should be categorized as almost-cliques . Indeed, for any vertex v ∈ C i v \in C_i v ∈ C i , we have degree deg G 0 ( v ) = k − 1 \deg_{G_0}(v) = k-1 deg G 0 ( v ) = k − 1 . For any neighbor u ∈ C i u \in C_i u ∈ C i , their closed neighborhoods satisfy N [ v ] Δ N [ u ] = ∅ N[v] \mathbin{\Delta} N[u] = \varnothing N [ v ] Δ N [ u ] = ∅ , meaning ∣ N [ v ] Δ N [ u ] ∣ = 0 < η 0 ε ⋅ max { deg ( v ) + 1 , deg ( u ) + 1 } |N[v] \mathbin{\Delta} N[u]| = 0 < \eta_0\varepsilon\cdot\max\{\deg(v)+1,\deg(u)+1\} ∣ N [ v ] Δ N [ u ] ∣ = 0 < η 0 ε ⋅ max { deg ( v ) + 1 , deg ( u ) + 1 } for sufficiently large n n n . As such, v v v has no neighbor that disagrees with v v v , which means v v v cannot be in V s p a r s e V_{\mathrm{sparse}} V sparse .
Alternating Phases: For M M M iterations, the data stream alternates between the following two steps. In what follows, we let ε ~ = η 0 ⋅ ε \widetilde{\varepsilon} = \eta_0 \cdot\varepsilon ε = η 0 ⋅ ε for the concise of the notation.
Insertion Step (Transition to G 1 G_1 G 1 ): We sequentially insert a set S S S of s = ⌈ 4 ε k ⌉ s = \lceil4\varepsilon k\rceil s = ⌈ 4 ε k ⌉ vertices. Each vertex x ∈ S x \in S x ∈ S is inserted with edges connecting to all N = k 2 N = k^2 N = k 2 vertices in V 0 V_0 V 0 , but no edges to other vertices in S S S . This requires Θ ( n ) \Theta(\sqrt{n}) Θ ( n ) vertex insertions. Let the resulting graph be G 1 G_1 G 1 .
Deletion Step (Transition to G 0 G_0 G 0 ): We sequentially delete all s s s vertices in S S S . This requires s s s vertex deletions and reverts the graph to G 0 G_0 G 0 .
Analysis of State G 1 G_1 G 1 : In G 1 G_1 G 1 , the degree of any v ∈ V 0 v \in V_0 v ∈ V 0 is deg G 1 ( v ) = k − 1 + s \deg_{G_1}(v) = k-1+s deg G 1 ( v ) = k − 1 + s , and the degree of any x ∈ S x \in S x ∈ S is deg G 1 ( x ) = N = k 2 \deg_{G_1}(x) = N = k^2 deg G 1 ( x ) = N = k 2 . We claim that all vertices in V 0 V_0 V 0 are sparse in G 1 G_1 G 1 . Suppose an ε \varepsilon ε -almost-clique K K K contains a vertex v ∈ V 0 v \in V_0 v ∈ V 0 . If K K K also contains a vertex in S S S , then Δ ( K ) ≥ k 2 + 1 \Delta(K) \ge k^2+1 Δ ( K ) ≥ k 2 + 1 , so v v v must have at least ( 1 − 2 ε ) ( k 2 + 1 ) − 1 (1-2\varepsilon)(k^2+1)-1 ( 1 − 2 ε ) ( k 2 + 1 ) − 1 neighbors in K K K , contradicting deg ( v ) = k − 1 + s = O ( k ) \deg(v) = k-1+s = O(k) deg ( v ) = k − 1 + s = O ( k ) for sufficiently large k k k . Otherwise K ⊆ V 0 K \subseteq V_0 K ⊆ V 0 , so Δ ( K ) = k + s \Delta(K) = k+s Δ ( K ) = k + s , whereas v v v has at least s s s neighbors outside K K K . Since s ≥ 4 ε k > ε ( k + s ) s \ge4\varepsilon k > \varepsilon(k+s) s ≥ 4 ε k > ε ( k + s ) for sufficiently large k k k and ε < 1 / 4 \varepsilon< 1/4 ε < 1/4 , this contradicts the exterior-degree condition. Therefore, no vertex of V 0 V_0 V 0 can belong to an almost-clique. Moreover, putting every vertex of G 1 G_1 G 1 into V s p a r s e V_{\mathrm{sparse}} V sparse gives a valid standard ε \varepsilon ε -sparse-dense decomposition. Every v ∈ V 0 v \in V_0 v ∈ V 0 has the s s s neighbors x ∈ S x \in S x ∈ S , and ∣ N [ v ] Δ N [ x ] ∣ = k 2 − k + s − 1 > ε ~ max { ∣ N [ v ] ∣ , ∣ N [ x ] ∣ } = ε ~ ( k 2 + 1 ) |N[v] \mathbin{\Delta} N[x]| = k^2-k+s-1 > \widetilde{\varepsilon}\max\{|N[v]|,|N[x]|\} = \widetilde{\varepsilon}(k^2+1) ∣ N [ v ] Δ N [ x ] ∣ = k 2 − k + s − 1 > ε max { ∣ N [ v ] ∣ , ∣ N [ x ] ∣ } = ε ( k 2 + 1 ) . Since ε ~ ≤ ε \tilde{\varepsilon} \le\varepsilon ε ~ ≤ ε and s ≤ 4 ε k + 1 s \le4\varepsilon k + 1 s ≤ 4 ε k + 1 , we have ε ~ deg ( v ) = ε ~ ( k − 1 + s ) ≤ ε k ( 1 + 4 ε ) < 4 ε k ≤ s \tilde{\varepsilon}\deg(v) = \tilde{\varepsilon}(k - 1 + s) \le\varepsilon k(1 + 4\varepsilon) < 4\varepsilon k \le s ε ~ deg ( v ) = ε ~ ( k − 1 + s ) ≤ ε k ( 1 + 4 ε ) < 4 ε k ≤ s , so v v v is ε ~ \tilde{\varepsilon} ε ~ -sparse. Every x ∈ S x \in S x ∈ S has only such neighbors, so x x x is ε ~ \tilde{\varepsilon} ε ~ -sparse too. This gives us the following observations:
when the graph is G 0 G_0 G 0 , no v ∈ V 0 v \in V_0 v ∈ V 0 should be in V s p a r s e V_{\mathrm{sparse}} V sparse ;
when the graph is G 1 G_1 G 1 , all vertices v ∈ V 0 v \in V_0 v ∈ V 0 should be in V s p a r s e V_{\mathrm{sparse}} V sparse .
Expected Amortized Update Time: During each of the M M M alternating phases, the data stream makes exactly 2 s = Θ ( n ) 2s = \Theta(\sqrt{n}) 2 s = Θ ( n ) vertex updates. Let E t E_t E t be the event that the algorithm maintains a valid standard ε \varepsilon ε -SDD at time step t t t , and the algorithm ensures Pr [ E t ] ≥ 0.99 \Pr[E_t] \ge0.99 Pr [ E t ] ≥ 0.99 . Let t 1 t_1 t 1 be the end of the Insertion Step (State G 1 G_1 G 1 ) and t 2 t_2 t 2 be the end of the Deletion Step (State G 0 G_0 G 0 ). By the union bound, Pr [ E t 1 ∩ E t 2 ] ≥ 1 − ( 0.01 + 0.01 ) = 0.98 \Pr[E_{t_1} \cap E_{t_2}] \ge1 - (0.01 + 0.01) = 0.98 Pr [ E t 1 ∩ E t 2 ] ≥ 1 − ( 0.01 + 0.01 ) = 0.98 . Conditioned on this event occurring, the explicit decomposition must transition from placing all N N N vertices of V 0 V_0 V 0 in V s p a r s e V_{\mathrm{sparse}} V sparse at t 1 t_1 t 1 to placing them in dense clusters at t 2 t_2 t 2 . Thus, the algorithm is forced to explicitly reassign the state of at least N = Θ ( n ) N = \Theta(n) N = Θ ( n ) vertices. Therefore, the expected computation time the algorithm spends explicitly updating the assignments per phase is at least 0.98 × Ω ( n ) = Ω ( n ) 0.98 \times\Omega(n) = \Omega(n) 0.98 × Ω ( n ) = Ω ( n ) .
Repeating the above process for M = n M = n M = n times, the total expected number of operations is at least Ω ( n 2 ) \Omega(n^2) Ω ( n 2 ) . On the other hand, the total number of data stream update is at most
n + n ⋅ ( 2 n ) = O ( n 1.5 ) . n + n \cdot(2\sqrt{n}) = O(n^{1.5}). n + n ⋅ ( 2 n ) = O ( n 1.5 ) .
Therefore, the amortized running time has to be at least Ω ( n ) \Omega(\sqrt{n}) Ω ( n ) , as desired. □
A conceptual picture of the above proof is shown as in Figure 4 .
Figure 4. The picture for the proof in Lemma A.1. ε n \varepsilon\sqrt{n} ε n vertices are inserted and removed from the graph, which makes the n \sqrt{n} n cliques switching from forming and dismantling, forcing high time complexity.
Robustness against a white-box adversary
In this section, we prove that our algorithm is robust against a white-box adversary, who is allowed to inspect the entire maintained state and all random coins drawn so far before choosing the next vertex insertion or deletion, including its incident edges. Each update is fully processed before the next update is given. Random coins are drawn independently when needed and may be revealed to the adversary immediately afterward. Coins not yet drawn are not revealed.
Lemma B.1. Consider a call to a randomized subroutine of Lemmas 3.1 to 3.3 and 7.1, including the degree-zero estimate in Algorithm 7. If the hypotheses of its lemma hold for the current graph and input, then the call fails with at most its stated probability, even conditioned on all coins drawn before it.
Proof. Once the earlier coins are fixed, the current graph and the input to the call are fixed. The call draws fresh independent coins, so the proof of its lemma applies unchanged. □ \square □
Theorem 8 (White-box robustness). For the correlation clustering problem on a signed complete graph G = ( V , E + ∪ E − ) G = (V, E^{+} \cup E^{-}) G = ( V , E + ∪ E − ) , there exists a randomized fully dynamic vertex-update algorithm that, given the positive subgraph G + = ( V , E + ) G^{+} = (V, E^{+}) G + = ( V , E + ) and a sequence of at most T = poly ( n ) T = \operatorname{poly}(n) T = poly ( n ) vertex insertions and deletions chosen by any white-box adversary, together with all incident positive edges, maintains an O ( 1 ) O(1) O ( 1 ) -approximation to the optimal correlation clustering with high probability in polylog ( n ) \operatorname{polylog}(n) polylog ( n ) amortized update time. Both guarantees hold on the same event throughout the update sequence.
Proof. Use the algorithm of Theorem 1 with fresh randomness in every call. Future insertions and deletions may depend on all previously revealed coins, but they never need to view these coins as random during that time. In other words, let t t t be the time where the randomized guarantee concerns the arguments in arguments in § 8 to § 10 happens, any subsequent arguments in § 8 to § 10 for ≥ ( t + 1 ) \ge(t + 1) ≥ ( t + 1 ) time never need to reuse randomness of time t t t (although they will reply on the high-probability conditioning at time t t t ). In particular, degree-change bounds and refreshment rules hold regardless of how updates are chosen, and no earlier sample must remain representative of a later graph.
Fix an adversary and the polynomial upper bound T T T on the number of updates. The bound for every execution prefix without a failure in § 10 gives a fixed polynomial M M M bounding the number of randomized calls up to and including the first failure. Set each call’s failure probability to at most n − c / M n^{-c/M} n − c / M , for any fixed constant c > 0 c > 0 c > 0 . Let H j H_j H j be the entire history before call j j j draws its fresh coins. For every such history h h h with no earlier failure, the input satisfies the required conditions and Lemma B.1 gives
Pr ( call j fails ∣ H j = h ) ≤ n − c / M . \Pr(\text{call }j\text{ fails}\mid H_j=h)\le n^{-c/M}. Pr ( call j fails ∣ H j = h ) ≤ n − c / M .
Consequently,
Pr ( some call fails ) ≤ ∑ j = 1 M Pr ( call j is the first failure ) ≤ n − c . \Pr(\text{some call fails})\le\sum_{j=1}^{M}\Pr(\text{call }j\text{ is the first failure})\le n^{-c}. Pr ( some call fails ) ≤ j = 1 ∑ M Pr ( call j is the first failure ) ≤ n − c .
On the complementary event, induction over the updates gives correctness and the amortized time bound throughout the execution.
For the small-graph offline algorithm, amplify its constant success probability by fresh independent runs and return the least-cost clustering, and it still preserves the polylogarithmic time bound. In all procedures, sample sizes and corresponding count thresholds are amplified together, including both 500 log n 500\log n 500 log n and 400 log n 400\log n 400 log n in Lemma 3.3. Since M M M is polynomial in n n n and T = poly ( n ) T = \operatorname{poly}(n) T = poly ( n ) , the amplification preserves all polylogarithmic time bounds. □ \square □