Abstract 1 Introduction 2 Overview 3 The Sparser-Denser Decomposition 4 The Dynamic Algorithm 5 Computing a Fresh Coloring References Appendix A Concentration Inequalities

Faster Dynamic (Δ+1)-Coloring Against Adaptive Adversaries

Maxime Flin ORCID Reykjavik University, Iceland Magnús M. Halldórsson ORCID Reykjavik University, Iceland
Abstract

We consider the problem of maintaining a proper (Δ+1)-vertex coloring in a graph on n-vertices and maximum degree Δ undergoing edge insertions and deletions. We give a randomized algorithm with amortized update time O~(n2/3) against adaptive adversaries, meaning that updates may depend on past decisions by the algorithm. This improves on the very recent O~(n8/9)-update-time algorithm by Behnezhad, Rajaraman, and Wasim (SODA 2025) and matches a natural barrier for dynamic (Δ+1)-coloring algorithms. The main improvements are on the densest regions of the graph, where we use structural hints from the study of distributed graph algorithms.

Keywords and phrases:
Dynamic Graph Algorithms, Coloring
Category:
Track A: Algorithms, Complexity and Games
Funding:
Maxime Flin: Supported by the Icelandic Research Fund Grant No. 2310015-053.
Magnús M. Halldórsson: Supported by the Icelandic Research Fund Grant No. 2511609.
Copyright and License:
[Uncaptioned image] © Maxime Flin and Magnús M. Halldórsson; licensed under Creative Commons License CC-BY 4.0
2012 ACM Subject Classification:
Theory of computation Dynamic graph algorithms
Related Version:
Full Version: https://arxiv.org/abs/2504.19729
Acknowledgements:
Discussions with participants of Dagstuhl Seminar 24471, Graph Algorithms: Distributed Meets Dynamic, served as a key motivation for this work.
Editors:
Keren Censor-Hillel, Fabrizio Grandoni, Joël Ouaknine, and Gabriele Puppis

1 Introduction

In the (Δ+1)-coloring problem, we are given a graph with maximum degree Δ and must assign to each vertex v a color φ(v){1,2,,Δ+1} such that adjacent vertices receive different colors. Despite its simplicity in the classical RAM model, this problem is surprisingly challenging in more constrained models such as distributed graphs [22, 3, 19, 8], sublinear models [1, 7, 10, 2], dynamic graphs [5, 20, 6, 4] and even recently communication complexity [16, 9].

This paper presents a fully dynamic algorithm for the (Δ+1)-coloring problem. The vertex set is fixed of size n, while edges can be inserted or deleted as long as the maximum degree remains at most Δ at all times. We assume Δ is known in advance. As the graph changes, our algorithm must maintain a (Δ+1)-coloring. The time the algorithm takes to process an edge insertion or deletion is called the update time and our aim is to minimize it.

The study of dynamic algorithms for (Δ+1)-coloring was initiated by [5], which provided a randomized algorithm with O(logn) amortized update time. Independently, the authors of [6] and [20] provided randomized algorithms with O(1) amortized update time. The caveat with those algorithms is that they assume updates are oblivious: all edge insertions and deletions are fixed in advance and may not adapt to the colors chosen by the algorithm.

Maintaining a coloring against an adaptive adversary – that may base the updates on past decisions by the algorithm – is significantly harder, as the adversary can force the algorithm to recolor vertices at every update by connecting same-colored vertices. Until very recently, no o(n) update time algorithm was known for (Δ+1)-coloring against adaptive adversaries. In a recent breakthrough, Behnezhad, Rajaraman, and Wasim [4] presented a randomized algorithm with O~(n8/9) amortized update time against adaptive adversaries111In this paper, we use O~(f(n)):=O(f(n)poly(logn)) to hide polylogarithmic factors.. In this paper, we significantly improve the runtime, obtaining the following result.

Theorem 1.

There exists a randomized fully dynamic algorithm maintaining a (Δ+1)-coloring against adaptive adversaries in O~(n2/3) amortized update time with high probability.

At its core, our algorithm is based on a structural decomposition of the vertices into four layers so that vertices of the bottom layer can be colored efficiently by maintaining and searching small sets. Vertices of higher layers are colored by random color trials enhanced with a color stealing mechanism. Specifically, when a vertex cannot use a color due to a lower-level neighbor, our algorithm steals the color and recolors the lower-level vertex instead. Interestingly, the layers correspond to the order in which streaming and distributed algorithms build their colorings.

In addition to the runtime improvement, our algorithm approaches a natural barrier for dynamic coloring algorithms against adaptive adversaries. The algorithm of [4] was primarily limited by the challenge of efficiently recoloring dense regions of the graph. In contrast, our algorithm shifts this bottleneck to the recoloring of sparser vertices and the handling of random color trials in general. We elaborate on this in the following discussion.

1.1 Discussion & Open Problems

Before we explain why n2/3 is a natural barrier, we first establish why n1/2 poses a fundamental limit for dynamic algorithms based on random color trials. Observe that this limitation extends to simpler problems, such as 2Δ-coloring.

The bottleneck for recoloring a vertex lies in efficiently verifying whether a color is available. One possibility is to iterate through all neighbors in O(Δ) time; another is to iterate through color classes (i.e., the set of vertices with a given color). At best, all color classes contain O(n/Δ) vertices each. So, any algorithm that checks arbitrary or random colors using the former method when Δ is small and the latter when Δ is large therefore has O(n1/2) update time at best. Recall that an adaptive adversary can trigger recoloring at every update, preventing any opportunity for amortization.

To reduce the number of colors to Δ+1, the approach of [13, 19, 1, 8, 4] and ours is to compute a partial coloring in which (sparse) vertices have many pairs of neighbors colored the same. The randomized argument underlying this approach is fragile, requiring a complete rerun every Θ(Δ) update. Since it is based on random color trials at every vertex, it runs in O(n2/Δ) time. Amortized and balanced with the O(Δ) update time for small Δ, we obtain the n2/3 update time.

Problem 1.

Does there exist a fully dynamic (Δ+1)-coloring with o(n2/3) update time that remains robust against adaptive adversaries?

1.2 Organization of the Paper

In Section 2, we provide a high-level overview of our algorithm and compare it with [4]. Section 3 introduces the sparser-denser decomposition that forms the foundation of our approach. The core of our dynamic algorithm, along with the proof of Theorem 1, is presented in Section 4. Finally, we defer the least novel part of our algorithm – the periodic recomputation of a fresh coloring of the whole graph – to Section 5.

2 Overview

We present the key concepts underlying Theorem 1, deliberately simplifying certain technical details for the sake of intuition. We focus on the case where Δn2/3, as an update time of O(Δ) is straightforward to achieve by examining the adjacency list of the vertices.

The Sparser-Denser Decomposition.

We employ a modified version of the structural decomposition introduced by Reed [24], and further explored in [19, 1], which partitions the vertices into sparse vertices and dense clusters. We classify vertices into clusters based on their average density. Vertices in clusters with low average density are designated as sparser, while those in clusters with higher average density are considered denser (see Definition 4). This method is based on structural observations about the mean local density within a cluster (see Lemma 7), and provides a significant efficiency gain compared to the specific form of decomposition used in [4].

Coloring the Sparser Vertices.

The strategy for coloring sparser vertices is essentially the same as in [4]. Updates are performed in phases of length t=Θ(n2/3), with each phase beginning by computing a fresh coloring of the graph. This ensures that the adversary cannot decrease the number of available colors below t because each sparser vertex starts with 2t available colors (see Proposition 11) and the algorithm recolors at most one vertex per update. As the adversary updates the graph, we use the observation from [1, 4] that a vertex with t available colors can be recolored in O~(n2/3) time by random color trials. Note that the cost of computing a fresh coloring, amortized over updates of the following phase, is O~(n2/3).

Coloring the Denser Vertices.

We treat two types of vertices differently in each dense cluster. We exploit the fact that most vertices have sparsity not much greater than the average sparsity of their cluster. These vertices – the inliers – have O(n2/3) neighbors outside their cluster and O(n2/3) anti-neighbors within their cluster. This allows for a compact representation of the colors available to inliers, and a simple deterministic search suffices to recolor them. The remaining vertices – the outliers – are recolored using random color trials, similar to the strategy for sparser vertices. The key idea is that outliers may steal a color from an inlier neighbor, causing the inlier to be recolored as described above. Since most colors are available for stealing, only a few random trials are required. (See Lemma 15 for details.)

Maintaining the Color Balance.

To guarantee efficient color trials, we ensure that each color class contains O~(n1/3) vertices. This condition holds for the sparser vertices by an adaptation of [4] (see Lemma 19). For the denser vertices, we maintain a Dense Balance Invariant: each cluster contains at most two vertices of each color. To ensure that enough colors are available for inliers, we maintain a second invariant.

The Matching Invariant ensures that enough colors are repeated within each cluster. These repeated colors form a colorful matching [1], which can be maintained efficiently (again) using random color trials. With the Matching Invariant in place, we can ensure that inliers receive a color that is unique within their cluster, thereby preserving the Dense Balance Invariant.

It is noteworthy how extensively our algorithm employs color stealing: sparser vertices can steal colors from matched vertices, which can steal from outliers, and outliers can steal from inliers.

Comparison with [4].

The parameter used in [4] to distinguish between sparser and denser vertices is the ε of the structural decomposition [24, 19], ultimately set to ε=Δ1/5n2/5. While this choice allows for a uniform treatment of dense vertices, it is costly due to its quadratic dependence on (local) sparsity. Specifically, sparse vertices have Ω(ε2Δ) available colors, which limits the length of each phase and increases the amortized cost of recomputing fresh colorings. Additionally, maintaining the decomposition itself incurs an update time of O~(ε4). In contrast, we keep ε constant and instead use the average sparsity of dense clusters directly as a parameter to classify vertices as sparser or denser. Our method employs a two-pronged approach to recoloring denser vertices (inliers vs. outliers), with both steps relatively simple. While [4] reasons about dense vertices through perfect matchings in the palette graph of [1], we work directly with vertices and colors. The augmenting paths in their palette graph are similar to our color-stealing mechanism.

A notable technical difference concerns the colorful matching: while [4] maintains a maximal matching, we find that a sufficiently large matching suffices, allowing for simpler updates.

Recent years have seen a number of exciting results on (Δ+1)-coloring across models, all made possible by the power of random color trials and, in most cases, with the help of Reed’s structural decomposition [24]. We find particularly interesting that analyzing the average sparsity/density of its clusters (inspired by [18, 14]) enabled us to improve on [4] down to a natural barrier. In particular, the inliers/outliers dichotomy for balancing the cost of coloring dense and sparse vertices may be of independent interest.

2.1 Notation

For an integer k1, we write [k]={1,2,,k}. Throughout the paper, the input graph has a fixed vertex set V=[n]. The neighborhood of v is N(v) and we write deg(v)=|N(v)| its degree. For a set SV, let NS(v)=N(v)S be the set of neighbors in the set. We assume that Δ is known in advance and that, at all time, every vertex has degree at most Δ. A non-adjacent pair of nodes u,v is said to be an anti-edge.

A partial coloring is a function φ:V[Δ+1]{}, where φ(v)= indicates that v is not colored. For a set S of nodes, let φ(S)={φ(v):vS}. A coloring is total when all vertices are colored, i.e., when φ(V). The coloring is proper if, for every edge {u,v}, either φ(u)φ(v) or {φ(u),φ(v)}. In this paper, all colorings are implicitly proper. The palette of v is L(v)=[Δ+1]φ(N(v)), i.e., the set of colors not used by neighbors of v. The colors of the palette are also said to be available (for v).

We say that an event holds “with high probability” – often abridged to “w.h.p.” – when it holds with probability at least 1nc for a desirably large constant c>0.

The algorithm frequently uses classic sets and operations that can be implemented efficiently using, say, a red-black tree. They support insertions, deletions, and uniform sampling in O(logn) worst-case update time.

3 The Sparser-Denser Decomposition

Our algorithm uses a modified version of the sparse-dense decomposition introduced by [24] and further extended in [19, 1] for (Δ+1)-coloring in distributed and streaming models. For some small ε(0,1), these decompositions partition the vertices into a set of Ω(ε2Δ)-sparse vertices and a number of dense clusters called ε-almost-cliques. We introduce now the key definitions of sparsity and almost-cliques.

Definition 2.

Vertex v is ζ-sparse if G[N(v)] contains at most (Δ2)ζΔ edges.

Definition 3.

A set DV of vertices is an ε-almost-clique if

  1. 1.

    |D|(1+ε)Δ, and

  2. 2.

    every vD has |N(v)D|(1ε)Δ.

For a vertex v in an almost-clique D, the set of its neighbors outside D and the set of its non-neighbors inside D play a key role in our algorithm. We denote E(v)=N(v)D and A(v)=D(N(v){v}) the sets of external- and anti-neighbors, respectively. We use ev=|E(v)| and av=|A(v)| to denote their size.

As explained earlier, we differentiate between sparse and dense vertices differently from [24, 19, 1, 4]. Namely, it suffices for us that an almost-cliques is dense on average. To make this precise, let eD=vDev/|D| and aD=vDav/|D| be the average external- and anti-degree in D, respectively. We can now state the definition of our sparser-denser decomposition.

Definition 4.

Let ε(0,1), ζ[1,Δ] and G a graph with maximum degree Δ. An (ε,ζ)-sparser-denser decomposition of G is a partition of its vertices into sets S,D1,,Dr such that

  1. 1.

    every vS is ζ-sparse, and

  2. 2.

    every D=Di is an ε-almost-clique such that aD+eDO(ζ/ε2).

To compare our decomposition to that of [24, 19, 1], we use their core decomposition with a constant ε but choose a sparsity parameter ζ and let S be the Ω(ε2Δ)-sparse vertices along with the almost-cliques for which aD+eDεζ. This results only in ζ-sparse vertices due to a structural results on the sparsity of dense vertices (see Lemma 7). Henceforth, we refer to vertices of S as to the sparser vertices and vertices of D as the denser vertices.

As explained in Section 2, we wish to color most of the denser vertices by iterating over their external- and anti-neighbors. The vertices for which this is feasible are called inliers:

Definition 5.

For each D=Di in an (ε,ζ)-sparser-denser decomposition, define

ID={vD:ev8eD and av8aD}andOD=DID.

where vertices of ID (resp. OD) are called inliers (resp. outliers).

Note that by Markov’s inequality, at least three quarters of each Di are inliers.

3.1 Maintaining the Decomposition

In this section, we explain how the fully dynamic algorithm of [4] for maintaining Reed’s decomposition against an adaptive adversary can be adapted to our needs:

Lemma 6.

There exists a universal constant δ(0,1) for which the following holds. Let ε(0,1/6) and 1ζε2δΔ. There exists a randomized fully dynamic algorithm that maintains array part[1n] that induces a partition of the vertices into sets S={v:part[v]=} and Di={v:part[v]=i} such that, w.h.p.,

  • (S,D1,,Dr) is an (ε,ζ)-refined partition,

  • for each Di, it maintains the set FDi of anti-edges in G[Di], and

  • for each vDi, it maintains the sets A(v) and E(v).

The amortized update time against an adaptive adversary is O(ε4logn) with high probability.

Our algorithm builds on an ε-almost-clique decomposition, as defined by [1]: a vertex partition Vsp,C1,C2, where the nodes in Vsp have Ω(ε2Δ)-sparsity and the Ci’s are Θ(ε)-almost-cliques. We filter out the Ci’s with sparsity more than ζ and add them into Vsp to obtain the set S. The key structural result for our partition is the following lemma:

Lemma 7.

Let ε(0,1/75) and δ(0,1). Suppose Vsp,C1,C2,,Cr is a vertex partition such that every vertex in Vsp is (ε2δΔ)-sparse and each Ci is an ε-almost-clique. Then, every vCi such that eCi+aCi16/(δε2) is δε250(aCi+eCi)-sparse.

Proof.

Let vC=Ci and s:=eC+aC such that s16/(δε2). First, we argue that every v with ev2/(δε2) is max{δε2/4ev,(13ε)/2av}-sparse. In particular, if evs/8 or avs/24, then v is at least (δε250s)-sparse.

It was already proven in [17, Lemma 6.2] that v is at least (13ε)/2av-sparse. Our definition of external degree, counting both sparse and dense neighbors outside C, differs from [17] so we222A proof of this fact has already appeared in a technical report by Halldórsson, Nolin and Tonoyan [18, Lemma 3]. Since it is a short and important proof, we include it here for completeness. prove that v is at least δε2/4ev-sparse. We may assume that G[N(v)] contains at least (Δ2)δε2/2evΔ edges, for the claim otherwise trivially holds. By handshaking lemma, the number of edges in G[N(v)] is

12uN(v)|N(u)N(v)|12uN(v)Δ|N(v)N(u)|(Δ2)+Δ2uN(u)|N(v)N(u)|. (1)

So we lower bound |N(v)N(u)| for each uE(v). If uCjC, then it has at most εΔ shared neighbors with v, so |N(v)N(u)|(1ε)Δ. If uVsp, then G[N(u)] contains at most (Δ2)δε2Δ many edges by definition. On the other hand, of the edges in G[N(v)], at most |N(v)N(u)|Δ are not in G[N(u)]. Using our assumption on the number of edges in G[N(v)], this means that (Δ2)δε2/2evΔ(Δ2)δε2Δ2+|N(v)N(u)|Δ, so that |N(v)N(u)|δε2/2Δ. Since all external neighbors contribute at least δε2/2Δ to the sum in Eq 1, the number of edges in G[N(v)] is at most (Δ2)(δε2/2ev1/2)Δ. If ev2/(δε2), this implies that v is (δε2/4ev)-sparse.

We henceforth assume that evs/8 and avs/24. Now, there are two cases, depending on which of eC or aC dominates.

If eC2aC, then evs/8eC/4. Since deg(v)+1=|C|+evav holds for all vertices in C, it also holds on average and we get that Δ+1|C|+eCaC|C|+eC/2. Using deg(v)+1=|C|+evav again, we get deg(v)|C|1+evΔ(eC/2ev)ΔeC/4. Since a vertex with degree at most Δx is (x/2)-sparse, v is eC/8-sparse, which is s/16-sparse.

If eC2aC, then avs/24aC/8. Observe that C contains aC|C|/2 anti-edges, of which at most av2εΔ may have an endpoint out of N(v)C. So G[N(v)C] contains at least aC|C|/22avεΔaCΔ/8 anti-edges for ε<1/2. So v is aC/8-sparse which is s/24-sparse.

To maintain our sparse-denser decomposition, we use the algorithm of [4] for the almost-clique decomposition.

Proposition 8 ([4, Theorem 4.1]).

For every n1 and η(0,3/50), there exists a fully dynamic randomized algorithm that maintains a vertex partition Vsp,C1,,Cr of any n-vertex graph with maximum degree Δ such that, w.h.p.,

  1. 1.

    vertices of Vsp are Ω(η2Δ)-sparse,

  2. 2.

    each Ci is a (10η)-almost-clique,

  3. 3.

    for every vertex it maintains the sets N(v)Vsp and N(v)(C1Cr), and

  4. 4.

    for every almost-clique Ci, it maintains the set Fi of anti-edges in Ci.

The amortized update time against an adaptive adversary is O(η4logn) with high probability.

We can now prove that a sparser-denser decomposition can indeed be maintained.

Proof of Lemma 6.

Define η=ε/10 and let δ be the universal constant such that vertices of Vsp are (ε2δΔ)-sparse in Proposition 8. We use the algorithm of Proposition 8 with η=ε/10 and define S as the set containing all vertices of Vsp and the vertices from almost-cliques C=Ci with aC+eC50δε2ζ. Since we assume in Lemma 6 that ζε2δΔ, every vertex of Vsp is ζ-sparse. Every vertex of SVsp is ζ-sparse by Lemma 7. The remaining ε=(10η)-almost-cliques are renamed Di and verify that aDi+eDi50δε2ζ=O(ζ/ε2) by construction. So the resulting decomposition is indeed an (ε,ζ)-sparser-denser decomposition.

The algorithm of Proposition 8 already maintains the set of anti-edges in each Di, so it only remains to explain how we maintain sets of external- and anti-neighbors for each denser vertex. Every time the algorithm of Proposition 8 modifies an element in N(v)Vsp or N(v)(C1Cr), we inspect the change and modify E(v) accordingly. Similarly, when the algorithm modifies a set of anti-edges Fi by inserting or deleting some anti-edges {u,v}, we modify the sets A(v) and A(u) accordingly. Since each inspection (and possible modification) takes O(logn) time, it does not affect the complexity of the algorithm by more than a constant factor.

3.2 Clique Palette, Colorful Matching & Accounting Lemma

Similarly to [1, 15], we wish to assign dense vertices colors that are unused by vertices of their almost-clique. Together these form the clique palette.

Definition 9.

For any (possibly partial) coloring φ of G, and almost-clique D, the clique palette L(D) is the set of colors unused by vertices of D. More formally, L(D)=[Δ+1]φ(D).

To ensure the clique palette always contains colors, we give the same color to a pair of vertices in the almost-clique. We say a color is repeated or redundant in DV when at least two vertices of D hold it. Assadi, Chen, and Khanna [1] introduced the notion of a colorful matching: if M colors are repeated in D, there exists an M-sized anti-matching in G[D] where the endpoints of a matched anti-edge have the same color.

Each redundant color in D gives its vertices some slack, while using the clique palette forbids at most one color for each anti-neighbor. Accounting for both, we obtain the following bound on the number of colors in the clique palette available for each vertex:

Lemma 10 (Accounting Lemma).

Let φ be a (possibly partial) coloring and D an almost-clique with a colorful matching of size M. For every vD, the number of colors available for v in the clique palette is at least

|L(D)L(v)|Δdeg(v)+Mav+[#uncolored vertices in DE(v)].

Proof.

For succinctness, let k denote the number of uncolored vertices in DE(v). Observe how the number of vertices in DE(v) relates to the size of the colorful matching by partitioning vertices according to their colors:

|DE(v)|=k+χ[Δ+1]|{vDE(v):φ(v)=χ}|k+|φ(DE(v))|+M, (2)

where the last inequality comes from the fact that at least M colors are used by at least two vertices in D. Comparing the number of colors in the clique palette available to v to the size of D shows the contribution of redundant colors and uncolored vertices:

|L(D)L(v)|=Δ+1|φ(DE(v))| =Δ+1(|D|+ev)+|DE(v)||φ(DE(v))|
Δ+1|D|ev+k+M. (by Eq 2)

To complete the proof, observe that deg(v)+1=|D|+evav, so that Δ+1|D|ev simplifies to (Δdeg(v))av. Hence, the lemma.

4 The Dynamic Algorithm

In this section, we prove Theorem 1. We begin with the definition of phases and describe the properties of the coloring at the beginning of each phase. We then explain how the algorithm maintains a proper coloring over one phase. The analysis has three parts: first, we show that the algorithm maintains some invariants throughout the phase (Section 4.1); second, we prove that recoloring denser vertices is efficient (Section 4.2); finally, we analyze the re-coloring of sparser vertices (Section 4.3). Together, they imply Theorem 1 (Section 4.4).

When ΔO(n2/3), the naive deterministic algorithm that scans the entire neighborhood of vertices before recoloring them (when necessary) has worst-case update time O(Δ)O(n2/3). We henceforth assume that ΔΩ(ζ/ε2)=Ω(n2/3), for a sufficiently large constant where ε:=1/110 and ζ:=n2/3 are the parameters of the sparser-denser decomposition.

Phases & Fresh Coloring.

We divide updates into phases of t insertions and deletions and analyse the algorithm phase by phase. At the beginning of each phase, we compute a fresh coloring of the graph.

A phase is t:=γζ updates long, where γ is the constant from Proposition 11.

The algorithm recolors at most one vertex in S per update, so the adversary can only remove one color per update from LS(v):=[Δ+1]φ[NS(v)]. By recomputing a fresh coloring every t updates, we ensure that sparser vertices always have t=γζ colors available, as they start the phase with more than 3t available colors.

Proposition 11.

There exists a universal constant γ(0,1) such that the following holds. For ζΩ(logn) for some large hidden constant, let S,D1,,Dr be a (ε,ζ)-decomposition of an n-vertex graph with maximum degree Δ. W.h.p., RefreshColoring runs in O~(n+n2/ζ) time, producing a total coloring φ such that

  • (Sparse Slack) every sparse vertex v has |LS(v)|3γζ,

  • (Sparse Balance) |Φ[χ]S|=O(n/ζ+logn) for every χ[Δ+1],

  • (Dense Balance) in each Di, every color is used at most twice, and

  • (Matching) each Di has at least 8aDi redundant colors.

The description of RefreshColoring and the proof of Proposition 11 are deferred to Section 5 to preserve the flow of the paper. Henceforth, we say that “RefreshColoring succeeded” if it ends and the coloring it produces has all the aforementioned properties. Throughout each phase, we maintain the Dense Balance and Matching properties given by RefreshColoring as invariants – and refer to them as the Dense Balance Invariant and Matching Invariant.

During a phase, it helps to keep the sparser-denser partition fixed. A simple adaptation of the algorithm from Lemma 6 allows us to make this assumption. We emphasize that during a phase, the adversary may increase or decrease external- and anti-degrees of vertices and their averages. However, given the phase length, it does not materially affect the decomposition.

Lemma 12.

Let δ, ε and ζ be as in Lemma 6. There is an algorithm with O(ε4logn) amortized update time that maintains a vertex partition such that

  • at the beginning each phase, the partition is an (ε,ζ)-decomposition,

  • the vertex partition does not change during phases,

  • at all times, denser vertices have ev2εΔ and av3εΔ, and

  • for each D=Di, the values of aD and eD increase or decrease by at most one within a phase.

Proof.

Use Lemma 6 to maintain a sparser-denser decomposition with O(ε4logn) update time except that, during phases, instead of processing updates, we store them in a stash. When a new phase begins, we process all updates stored in the stash and obtain an (ε,ζ)-refined partition of the graph at that time. Clearly the vertex partition is fixed during phases. Now, observe that at the beginning of a phase, since every D=Di is an ε-almost-clique, the denser vertices have evεΔ and av2εΔ. Since the adversary can insert/delete at most tζεΔ edges per phase, we always have that evεΔ+t2εΔ and av2εΔ+t3εΔ. Similarly, the adversary may increase/decrease the sums of external- and anti-degrees by at most tεΔ, hence the values of aD and eD increase/decrease by up to an additive t/|D|2ε term over the course of each phase.

The Dynamic Algorithm.

Updates are triggered by calls to Insert and Delete. They maintain the sparser-denser partition as described in Lemma 12 and, when a new phase begins, recompute a coloring from scratch using RefreshColoring. During phases, Insert and Delete update the data-structures and respectively call RecolorInsert and RecolorDelete to handle color conflicts.

Upon insertion of {u,v}, RecolorInsert verifies if it creates a color conflict (line 4), in which case it uncolors u. In most cases, it suffices to recolor u using RecolorSparse or RecolorDense depending on whether vS or not (lines 10 to 13). The one exception to this concerns matched vertices. A denser vertex is matched if and only if its color is repeated by another vertex of its almost-clique. Maintaining sufficiently many matched vertices in each almost-clique (see Matching Invariant) is necessary for RecolorDense. If, after an update, there are not enough matched vertices – either because the almost-clique lost an anti-edge (line 6) or because aD increased (line 2) – we call IncrMatching(D), which creates a new redundant color in D. To same-color pairs of (non-adjacent) vertices in D, we use RecolorMatching. It proceeds similarly in recoloring sparse vertices and outliers: random color trials in [Δ+1] and possibly stealing a color from an inlier in D.

Algorithm 1 Updates handlers during a phase, when ΔΩ(n2/3).

Let us list the data-structures we use. The coloring is stored as an array φ[1n] such that φ[v] is the color of v. We also maintain the color class Φ[χ]={vV:φ[v]=χ} for each χ[Δ+1]. When we change the color of a vertex, we use the function Color(v, χ) that sets φ[v] to χ and updates color classes accordingly. To keep track of redundant colors, we maintain:

  • an array matched[1n] such that matched[u]=v if u and v are in the same almost-clique and colored the same, otherwise matched[u]=;

  • for each almost-clique Di, the set MDi of repeated colors in Di.

We now explain how the recoloring procedures used in Algorithm 1 work for sparser, denser and matched vertices.

Sparser Vertices.

For recoloring a vertex in S, we sample random colors in [Δ+1] and recolor the vertex with the first color that is not used by neighbors of S and used by at most one denser neighbor. As we shall see, there are at least γζ such colors with high probability333For convenience, if no available color exist, the algorithm loops forever. As we explain later, this occurs with probability 1/poly(n). If one wishes the algorithm to have finite expected update time, the algorithm can be modified to restart a phase if no available color was found after O~(n1/3) samples., so O~(Δ/ζ) color tries suffice with high probability. To verify if a color is available, the algorithm loops through its color class (line 4). Finally, if the color was used by a unique denser neighbor w (line 6), we steal the color from w and recolor the denser vertex using RecolorDense.

Algorithm 2 For a sparse vertex v.

Denser Vertices.

We now explain how we recolor denser unmatched vertices. Recall that inliers are such that av8aC and ev8eC (Definition 5). Note that the algorithm does not maintain those sets explicitly, as it can simply test for those inequalities. Importantly, inliers always have colors available in the clique palette by the Accounting Lemma (Lemma 10). We therefore color them by computing the set of colors used by external neighbors and searching for an available color in L(D) (line 8).

We color outliers like the sparser vertices (lines 2 to 7): by sampling colors in [Δ+1]. We allow outliers to steal the color of an unmatched inlier and then recolor the inlier instead (line 6).

Algorithm 3 For a denser vD (which needs recoloring) and is unmatched.

To implement RecolorDense efficiently, for each almost-clique D, we maintain

  • the set of unused colors L(D)=[Δ+1]φ[D], a.k.a. the clique palette,

  • the set of vertices ΦD[χ] in D with color χ.

Those data-structures are easy to maintain with O(logn) worst-case update time because each update affects at most two vertices – thus at most two almost-cliques – and each set changes by at most one element.

Recoloring a Matched Anti-Edge.

For a pair u,vD, RecolorMatching(u,v) colors – or recolors – u and v the same. As we cannot ensure they share many available colors in the clique palette, we allow u and v to pick any color that is used by neither a matched vertex (line 4) nor external neighbors (line 5). Since we only need few repeated colors, they always have Ω(Δ) colors to choose from and we can find one using O(logn) random samples. However, when doing so, we might have to – in fact, most likely will – recolor an unmatched vertex (line 8).

RecolorMatching is used whenever matched vertices need to get recolored (line 12 in Algorithm 1) or when the matching size needs to be increased (line 12 in Algorithm 4). To increase the size of the matching, IncrMatching needs to find a pairs {u,v} of unmatched anti-neighbors to same-color. Since we maintain a matching of size Θ(aD) while D contains Θ(aDΔ) and anti-degrees are at most O(εΔ), a random anti-edge in FD has both endpoints unmatched with constant probability.

Algorithm 4 Same-colors a pair u,vD.

4.1 Dense Invariants

We begin by showing that our recoloring algorithm maintains the dense invariants (Lemma 13). More interestingly, we show in Lemma 14 that when the Matching Invariant is broken by an update, one call to IncrMatching suffices to fix it.

Lemma 13.

Suppose the invariants hold before a call to RecolorDense(v) with matched[v]= or RecolorMatching(u,v) or RecolorSparse(v). If the call ends, it maintains the invariants.

Proof.

First, consider a call to RecolorDense(v). If vID, since v is unmatched, recoloring v does not affect the Matching Invariant; it maintains the Dense Balance Invariant because v gets a color from L(D), i.e., a color that is unused in D. If vID, again since v is unmatched it maintains the Matching Invariant. RecolorDense(v) colors v with a color which is either unused in D or used by an unmatched inlier (lines 4-5). If the color is free, the Dense Balance is maintained; if the color is used by an unmatched inlier w, we uncolor w and call RecolorDense(w) (line 6). As we explained before, recoloring an unmatched inlier preserves invariants.

Consider now a call to RecolorMatching(u,v). Observe that it can only increase the number of matched vertices, so it maintains the Matching Invariant. It colors u and v with some χMD. So χ is either free or used by a unique vertex in D. If a vertex w uses χ, the algorithm uncolors w and calls RecolorDense(w) (line 6), which maintains the invariants as we previously explained.

Finally, a call to RecolorSparse(v) where vS recolors v, which does not affect the invariants. It may steal a color to one denser neighbor w. If w is unmatched RecolorDense(w) maintains the invariant. If w is matched, the algorithm calls RecolorMatching(w, matched[w]) which can only end if w and its matched vertex are same-colored. So the call to RecolorSparse maintains the invariants.

Lemma 13 shows that RecolorInsert and RecolorDelete maintain the Dense Balance Invariant since it is only affected when vertices are recolored. On the other hand, the Matching Invariant depends on the values of |MD| and aD, which are affected by insertions or deletions of edges.

Lemma 14.

Consider a fixed update RecolorInsert(u,v) or RecolorDelete(u,v) before which the invariant holds. When RecolorDelete(u,v) ends or when RecolorInsert(u,v) reaches line 10, the invariants holds.

Proof.

Assume that |MD|<8aD when the algorithm reaches line 2 of RecolorDelete or line 9 of RecolorInsert. It must be that |MD|=8aD1 because the invariant held before the update and

  • inserting an edge cannot increase aD and may decrease MD by one if the edge inserted was between matched vertices (line 6);

  • deleting an edge may increase aD by 2/|D|, which means 8aD increases by at most one, while MD does not change.

In either case IncrMatching is called before RecolorDelete ends or RecolorInsert reaches line 10. In order to end, IncrMatching matches a new pair {u,v} of previously unmatched vertices and calls RecolorMatching(u,v) (line 12 in Algorithm 4). Then RecolorMatching(u,v) ends only after same-coloring u and v (line 8 in Algorithm 4), so the updated matching has size 8aD. The Dense Balance Invariant holds when the algorithms call IncrMatching (because it held before the update and uncoloring vertices does not affect it) and calls to RecolorMatching and RecolorDense preserve it (Lemma 13).

4.2 Complexity of Recoloring the Denser Vertices

We investigate the time complexity of our recoloring procedures for dense vertices and express it in terms of the maximal size of a color class at the time of the update and the sparsity parameter ζ. Observe that the probabilistic statements of Lemmas 15, 16, and 17 are only over the randomness sampled by the algorithm during the corresponding calls to RecolorDense, RecolorMatching and IncrMatching.

Lemma 15.

Suppose that the invariants hold before a call to RecolorDense(v) where vD, φ[v]= and matched[v]=. W.h.p. over the random colors it samples, the call ends in

O(maxχ|Φ[χ]|log2n+ζlogn)

time.

Proof.

Suppose first that v is an inlier, i.e., such that av8aD and ev8eD. We claim that every inlier has an available color in L(D)φ[E(v)]. Observe that this set is exactly L(D)L(v). Under the Matching Invariant, at least |MD|8aD colors are repeated in D and since v is uncolored, the accounting lemma (Lemma 10) implies that

|L(D)L(v)||MD|av+1|MD|8aD+11,

where the second inequality uses the assumption that av8aD and av is an integer. To find this color, the algorithm loops over vertices of E(v) and constructs the set φ[E(v)] in O(evlogn)O(ζlogn) time. Then it loops over L(D) and stops when it finds a color that is not in φ[E(v)]. If L(D) contains more than 8eDev colors, the algorithm finds a color after O(eDlogn)O(ζlogn) time. Otherwise, the algorithm goes over at most 8eDO(ζ) colors; hence ends in O(ζlogn) time.

Suppose now that v is an outlier. The algorithm samples colors in [Δ+1] until it finds one that is not used by (1) a matched vertex, (2) an external neighbor, or (3) an outlier. That is a color not in MDφ[E(v)OD] (lines 4-5). We claim that this set contains at most Δ/2 colors. At most 2εΔ colors are used by an external neighbors of v. By Markov’s inequality, the number of vertices with av>8aD or ev>8eD is at most |C|/4(1/4+ε)Δ. Finally, observe that we always have |MD|83εΔ. Indeed, RecolorInsert and RecolorDelete call IncrMatching only when |MD|<8aD24εΔ because aD3εΔ. Calls to RecolorMatching(u,v) where u and v are already matched do not increase the matching size. Adding these up, at most (1/4+27ε)ΔΔ/2 colors are blocked by MDφ(E(v)OD) for ε1/108. A random color in [Δ+1] therefore works w.p. 1/2, so the probability that the algorithm tries more than clogn random colors is nc. To verify if a random color works, the algorithm iterates through its color class in O(maxχ|Φ[χ]|logn) time. Then, there might be a additional call to RecolorDense(u) where uID, which results in the claimed runtime.

RecolorMatching colors u and v the same way RecolorDense colors an outlier. The complexity of recoloring an unmatched denser vertex (line 8) is upper bounded by Lemma 15. So we obtain the following lemma:

Lemma 16.

Suppose all invariants hold before a call to RecolorMatching(u,v). W.h.p., the call ends after O(maxχ|Φ[χ]|log2n+ζlogn) time.

It remains to bound the time spent on fixing the matching size with IncrMatching.

Lemma 17.

Consider a call to IncrMatching(D) before which the Dense Balance Invariants holds but not the Matching Invariant. W.h.p., it ends in O(maxχ|Φ[χ]|log2n+ζlogn) time and |MD| has increased by one.

Proof.

We may assume that aD>1/8 since otherwise the Matching Invariant holds even with an empty matching. In particular, FD is not empty. If |MD|<8aD, at least |FD|/2 anti-edges of FD have both endpoints unmatched because FD contains aD|D|/2 anti-edges while the current colorful matching is incident to at most |MD|6εΔ<48εaD|D|<|FD|/2 of them for, say, ε1/100. The probability that IncrMatching samples clogn anti-edges in FD without finding any with both endpoints available is thus nc. Lemma 16 then implies the result.

4.3 Recoloring the Sparser Vertices

RefreshColoring ensures vertices of S have sufficiently many colors in their palette at the beginning of the phase to maintain large palettes over entire phases. Importantly, vertices in S conflict only with neighbors in S. Recall that LS(v)=[Δ+1]φ[NS(v)] is the palette of colors vS can adopt with respect to φ.

Lemma 18.

Suppose RefreshColoring succeeded. A call to RecolorSparse(v) where φ[v]= and vS ends in

O(Δ/ζmaxχ|Φ[χ]|log2n+ζlogn)

time with high probability over the random colors it samples.

Proof.

Call R the set of colors used by at least two denser neighbors of v. The algorithm samples colors in [Δ+1] until it finds one in LS(v)R and we claim that this set contains at least t colors at all time. It is easy to verify that |R||L(v)|, where L(v):=[Δ+1]φ(N(v)) is the set of available colors, hence that |LS(v)R||R| because L(v)LS(v)R. So we may assume that |R|t. Now, since RefreshColoring succeeded (Proposition 11), we have |LS(v)|3t when the phase begins. As each update recolors at most one sparser vertex, after it updates, we have that |LS(v)R|3ti|R|t.

Each random color trial (line 2 in Algorithm 2) recolors v with probability at least

|LS(v)R|Δ+1tΔ+1=γζΔ+1.

Hence, w.h.p., the algorithm samples O(Δlogn/ζ) colors before finding one that fits. To verify if a color χ is suitable for recoloring v, the algorithm iterates through vertices of Φ[χ] and checks if they belong to NS(v) or NVS(v) in O(logn) time. Overall, finding a suitable χ takes O(Δ/ζmaxχ|Φ[χ]|log2n) time. Then, if there is a wNVS(v) with color χ, RecolorSparse makes one call to RecolorDense(w) or RecolorMatching(w, matched[w]) which recolors w in O(ζlogn+maxχ|Φ[χ]|log2n) time by Lemmas 15 and 16.

Overall, our algorithm is efficient only if we can maintain small enough color classes. The Dense Balance property ensures that denser vertices contribute O(n/Δ) to each color class. The contribution of vertices in S is accounted for separately, using an argument over the randomness of the entire phase:

Lemma 19.

Suppose that RefreshColoring succeeded. With high probability over the randomness of the whole phase, for every χ[Δ+1], its color class contains

|Φ[χ]S|O(nζ+tζ+logn) (3)

sparser vertices before every update of the phase.

Proof.

Fix it. We show that Eq 3 holds before the i-th update of this phase with high probability. Fix χ[Δ+1] and count the number of sparser vertices to join Φ[χ] during this phase. Define Xj to indicate if, during the j-th update, a sparser vertex joins Φ[χ]. Observe that, by the success of RefreshColoring, RecolorSparse colors v with a uniform color from a set of at least γζ colors, regardless of the recolorings that occurred earlier in the phase. Hence, the probability that it recolors v with χ is 𝔼[Xj|X1,,Xj1]O(1/ζ). By the Chernoff bound with stochastic domination (Lemma 24), we have j[i]XjO(i/ζ)+O(logn) with high probability. So before the i-th update, the set Φ[χ] contains the O(n/ζ) vertices initially present after RefreshColoring (Sparse Balance property in Proposition 11) and at most O(i/ζ+logn) new ones. This holds for all i[t] by union bound and thus implies the lemma.

4.4 Proof of Theorem 1

Let δ be the universal constant from Lemma 6 and define ε=1/110 and ζ=n2/3. When Δ<n2/3/(ε2δ), we use the naive algorithm that scans the neighborhood of the vertices after each update. When Δn2/3/(ε2δ), we use Algorithms 1 and 1. We consider a fixed phase and show that the amortized update time is O~(n2/3) with high probability. Recall that a phase is a sequence of t=γζ updates, where γ is the universal constant described in Proposition 11. Moreover, one should bear in mind that the algorithm of Lemma 6 maintains an (ε,ζ)-sparser-denser decomposition with O(logn) update time such that the vertex partition is fixed throughout the phase.

Correctness & Invariants. RefreshColoring gives a total and proper (Δ+1)-coloring and neither RecolorInsert or RecolorDelete introduce color conflicts. By induction, the invariants hold w.h.p. before every update of the phase. Indeed, by Proposition 11, if RefreshColoring ends, w.h.p., the invariants hold before the first update of the phase. By Lemmas 13 and 14, invariants are maintained by RecolorDense, RecolorMatching and RecolorSparse, and thus are preserved after each update.

Efficiency. By Proposition 11, computing the fresh coloring takes O~(n+n2/ζ) time. With high probability, RefreshColoring succeeds and henceforth we condition on its success. By Lemmas 18, 15, and 16, w.h.p., each update ends in O~(Δζmaxχ|Φ[χ]|+ζ) time. On the other hand, w.h.p., before every update and for every χ[Δ+1], we have that,

|Φ[χ]|=|Φ[χ]S|+i=1r|DiΦ[χ]||Φ[χ]S|+4nΔO(nζ+logn)

because, by the Dense Balance Invariant, each of the at most 2n/Δ almost-cliques contributes at most two to Φ[χ], and by Lemma 19 for the sparse vertices. With the union bound, the bounds on the update time and the color class sizes hold with high probability. Overall, w.h.p., the amortized update time during this phase is

O~(n+n2/ζt+nΔζ2+ζ)=O~(n2ζ2+ζ)=O~(n2/3)

for ζ=n2/3O(Δ)O(n) and t=γζ. ∎

5 Computing a Fresh Coloring

Recall that every t updates, the algorithm recomputes a fresh coloring with nice properties. In this section, we provide and analyse this algorithm, thus prove the following proposition.

See 11

RefreshColoring begins by uncoloring every vertex to start from a fresh state. It then uses a procedure called OneShotColoring in which every vertex of S tries a random color. It is a well-known fact that the remaining uncolored vertices have “slack” (Proposition 20). The algorithm colors the remaining vertices in S in a random order, which ensures that the total number of color trials is O~(n) [4]. Denser vertices do not participate in OneShotColoring to ensure that the partial coloring it produced does not hinder the construction of a colorful matching. This is why the Sparse Slack guarantee is only in terms of LS(v) rather than L(v)=[Δ+1]φ[N(v)]. RefreshColoring colors almost-cliques sequentially, using the coloring primitives devised in Section 4.

Algorithm 5 Computing a Fresh Coloring.

Generating Slack.

To analyse the slack produced by OneShotColoring, we use the following well-known results in the distributed graph literature (e.g., [8, Lemma 3.3] or [17, Lemma 6.1] or even [23]). Authors of [1, Lemma A.1] and [4] use a version of this result for ζΩ(ε2Δ).

Proposition 20.

Suppose G is a graph of maximal degree Δ1. If φ is the coloring at the end of OneShotColoring, then a ζ-sparse vertex v with ζ1 has that444we did not attempt to optimize this constant

|L(v)|[#uncolored vertices in N(v)]+222ζ

with probability at least 1exp(Ω(ζ)).

Through Proposition 20, OneShotColoring ensures the Sparse Slack property.

Lemma 21.

Let ζ and S,D1,,Dr be as described by Proposition 11. With high probability, we have that

  • if RefreshColoring reaches line 6, every vertex in S is colored, the Sparse Slack and Sparse Balance properties hold; and

  • before every call to RecolorSparse (line 5), the Sparse Balance property holds.

Proof.

RecolorSparse(v) ends only after properly coloring v, so if the algorithm reaches line 6, all vertices of S must be properly colored. We first prove that the Sparse Slack properly holds w.h.p. after OneShotColoring, then the claim about the Sparse Balance. Both hold simultaneously w.h.p. by union bound.

We claim that when OneShotColoring ends, w.h.p., every vertex vS has

|LS(v)|[#uncolored vertices in NS(v) ]+4γζwhereγ=225. (4)

Indeed, consider a fixed vertex vS. By definition of S, the vertex v is ζ-sparse in G. Since we run OneShotColoring in G[S], let us argue that v is (ζ/4)-sparse in G[S]. We may assume that v has degree at least Δζ, since it otherwise always have ζ available colors. If v has at least ζ/4 neighbors in VS, then Eq 4 holds since LS ignores colors of neighbors in VS. Otherwise, G[N(v)] contains at least (ζ/2)Δ anti-edges, of which at most (ζ/4)Δ are incident to VS, so v is at least (ζ/4)-sparse in G[S]. Since we assume that ζΩ(logn) for some large enough hidden constant, Proposition 20 applies to v and, with probability at least 1exp(Ω(ζ))11/poly(n), we obtain that |L(v)|[#uncolored vertices in NS(v)]+4γζ for v. This holds w.h.p. for every vertex in S by union bound over its vertices. This implies Eq 4 because after OneShotColoring, only vertices of S are colored, thus L(v)=LS(v). Calls to RecolorSparse colors extends the coloring; thus, when the algorithm reaches line 6, the Sparse Slack property holds.

Denote by v1,,vk the uncolored vertices of S after OneShotColoring in the order by which they are colored by RefreshColoring. Consider a fixed χ[Δ+1] and let us now prove that before the i-th call to RecolorSparse for fixed a i[k], w.h.p. over the randomness of sampled so far, we have |Φ[χ]|O(n/ζ+logn). During OneShotColoring, a vertex may adopt the color it sampled and, by the classic Chernoff Bound, w.h.p., every color is sampled by at most O(n/Δ+logn) vertices. Define Xj the random variable indicating if vj is colored with χ by RecolorSparse. Eq 4 implies RecolorSparse colors v with a color uniformly distributed in a set of size at least 4γζ. More formally, we have that 𝔼[Xj|X1,,Xj1]1/(4γζ). So, we expect O(i/ζ)O(n/ζ) vertices to be colored with χ over the first i calls to RecolorSparse. The Chernoff Bound (Lemma 24) shows that, w.h.p., when the algorithm makes its i-th call to RecolorSparse, the color class contains O(n/Δ+n/ζ+logn)=O(n/ζ+logn) vertices. This holds w.h.p. for every χ[Δ+1] and i[k] by union bound.

As [4, Appendix A.1] showed, this algorithm makes O~(n) color trials (executions of line 2 in RecolorSparse) with high probability. We obtain the following corollary by union bound: OneShotColoring runs in O(n+Δmaxχ|Φ[χ]|2)=O~(n+n2/Δ) and each of the O~(n) color trials takes O(n/ζ+logn) time by Lemma 21.

Corollary 22.

W.h.p., RefreshColoring reaches line 6 in O~(n+n2/ζ) time, every vertex in S is colored, the Sparse Slack and Sparse Balance properties hold.

Coloring Denser Vertices.

Random color trials in [Δ+1] according to a random ordering could also be used for dense vertices, but as we need to ensure the Matching and Dense Balance invariants, we use a more tailord approach albeit similar.

Lemma 23.

Let ζ, S,D1,,Dr be as described by Proposition 11. For any partial coloring outside of D=Di such that the Sparse Slack, Sparse Balance and Dense Balance hold, w.h.p., RefreshColoring extends the coloring to D (lines 7 to 9) in O~(n+nΔ/ζ) time and such that D contains a colorful matching of size 8aD and the Dense Balance holds.

Proof.

Since we begin with all vertices uncolored, IncrMatching never makes a call to RecolorDense. Using the same argument as Lemma 17, it samples at most O(logn) anti-edges before finding one with both endpoints unmatched and tries O(logn) colors before finding one available for both endpoints. The algorithm therefore spends

O(aD)×O(maxχ|Φ[χ]|log2n)=O~(nΔζ)

time computing a colorful matching (line 7) because 8aDO(Δ). Each call to IncrMatching increases the size of the colorful matching by one, so the matching and Dense Balance invariants hold when RefreshColoring reaches line 8.

By Markov’s inequality, D contains at most |D|/4 outliers. Since all inliers 3|D|/4Δ/2 of D are uncolored, the accounting lemma (Lemma 10) shows that at least Δ/2avΔ/3 colors of the clique palette are available for each outlier v. Hence, ColorDense(v) where vOD ends in O(maxχ|Φ[χ]|log2n)=O~(n/ζ) time with high probability. So the coloring of outliers in D takes up to O~(nΔ/ζ) time.

Suppose inliers are colored in the order v1,v2,,vk. When the algorithm calls ColorDense(vi), at least ki+1 remain uncolored in D. In particular, a random color is suitable to color vi with probability at least (ki+1)/(16cζ) where c=Θ(1/ε2) is a constant. Indeed, recall that an inlier has av8aD and ev8eD while D has that aD+eDcζ for some constant c (Definition 4). If |L(D)|>16cζ, then |L(D)L(v)|=|L(D)|ev|L(D)|/2 and a random color in L(D) belongs to L(v) with probability at least 1/2. Otherwise, the accounting lemma (Lemma 10) implies that |L(D)L(v)|ki+1, which means that a random color in L(D) is available to v with probability at least (ki+1)/|L(D)|(ki+1)/(16cζ). In any case, after O(ζlognki+1) color tries, ColorDense finds a color for v with high probability. Searching the color class for each color trial, the total time necessary to color inliers of D is

i=1kO(ζlognki+1)×O(maxχ|Φ[χ]|logn)=O(nlog3n)

because maxχ|Φ[χ]|O(n/ζ) from the sparse and Dense Balance and k2Δ. So the time needed to color D is O~(n+nΔ/ζ) as it takes O~(nΔ/ζ) time to color the matching and outliers and O~(n) time to color inliers.

Proposition 11 follows trivially from combining Corollaries 22 and 23 for all O(n/Δ) almost-cliques.

References

  • [1] Sepehr Assadi, Yu Chen, and Sanjeev Khanna. Sublinear algorithms for (Δ+1) vertex coloring. In the Proceedings of the ACM-SIAM Symposium on Discrete Algorithms (SODA), pages 767–786, 2019. doi:10.1137/1.9781611975482.48.
  • [2] Sepehr Assadi and Helia Yazdanyar. Simple sublinear algorithms for (Δ + 1) vertex coloring via asymmetric palette sparsification. In Ioana Oriana Bercea and Rasmus Pagh, editors, 2025 Symposium on Simplicity in Algorithms, SOSA 2025, New Orleans, LA, USA, January 13-15, 2025, pages 1–8. SIAM, 2025. doi:10.1137/1.9781611978315.1.
  • [3] Leonid Barenboim, Michael Elkin, Seth Pettie, and Johannes Schneider. The locality of distributed symmetry breaking. J. ACM, 63(3):20:1–20:45, 2016. doi:10.1145/2903137.
  • [4] Soheil Behnezhad, Rajmohan Rajaraman, and Omer Wasim. Fully dynamic (Δ + 1)-coloring against adaptive adversaries. In Yossi Azar and Debmalya Panigrahi, editors, Proceedings of the 2025 Annual ACM-SIAM Symposium on Discrete Algorithms, SODA 2025, New Orleans, LA, USA, January 12-15, 2025, pages 4983–5026. SIAM, 2025. doi:10.1137/1.9781611978322.169.
  • [5] Sayan Bhattacharya, Deeparnab Chakrabarty, Monika Henzinger, and Danupon Nanongkai. Dynamic algorithms for graph coloring. In Artur Czumaj, editor, Proceedings of the Twenty-Ninth Annual ACM-SIAM Symposium on Discrete Algorithms, SODA 2018, New Orleans, LA, USA, January 7-10, 2018, pages 1–20. SIAM, 2018. doi:10.1137/1.9781611975031.1.
  • [6] Sayan Bhattacharya, Fabrizio Grandoni, Janardhan Kulkarni, Quanquan C. Liu, and Shay Solomon. Fully dynamic (Δ +1)-coloring in O(1) update time. ACM Trans. Algorithms, 18(2):10:1–10:25, 2022. doi:10.1145/3494539.
  • [7] Yi-Jun Chang, Manuela Fischer, Mohsen Ghaffari, Jara Uitto, and Yufan Zheng. The complexity of (Δ+1) coloring in congested clique, massively parallel computation, and centralized local computation. In Peter Robinson and Faith Ellen, editors, Proceedings of the 2019 ACM Symposium on Principles of Distributed Computing, PODC 2019, Toronto, ON, Canada, July 29 - August 2, 2019, pages 471–480. ACM, 2019. doi:10.1145/3293611.3331607.
  • [8] Yi-Jun Chang, Wenzheng Li, and Seth Pettie. Distributed (Δ+1)-coloring via ultrafast graph shattering. SIAM J. Comput., 49(3):497–539, 2020. doi:10.1137/19M1249527.
  • [9] Yi-Jun Chang, Gopinath Mishra, Hung Thuan Nguyen, and Farrel D. Salim. Round and communication efficient graph coloring. CoRR, abs/2412.12589, 2024. doi:10.48550/arXiv.2412.12589.
  • [10] Artur Czumaj, Peter Davies, and Merav Parter. Simple, deterministic, constant-round coloring in congested clique and MPC. SIAM J. Comput., 50(5):1603–1626, 2021. doi:10.1137/20M1366502.
  • [11] Benjamin Doerr. Probabilistic tools for the analysis of randomized optimization heuristics. In Benjamin Doerr and Frank Neumann, editors, Theory of Evolutionary Computation - Recent Developments in Discrete Optimization, Natural Computing Series, pages 1–87. Springer, 2020. doi:10.1007/978-3-030-29414-4_1.
  • [12] Devdatt P. Dubhashi and Alessandro Panconesi. Concentration of measure for the analysis of randomized algorithms. Cambridge University Press, Cambridge, 2009. doi:10.1017/CBO9780511581274.
  • [13] Michael Elkin, Seth Pettie, and Hsin-Hao Su. (2Δ - l)-edge-coloring is much easier than maximal matching in the distributed setting. In Piotr Indyk, editor, Proceedings of the Twenty-Sixth Annual ACM-SIAM Symposium on Discrete Algorithms, SODA 2015, San Diego, CA, USA, January 4-6, 2015, pages 355–370. SIAM, 2015. doi:10.1137/1.9781611973730.26.
  • [14] Maxime Flin, Mohsen Ghaffari, Magnús M. Halldórsson, Fabian Kuhn, and Alexandre Nolin. Coloring fast with broadcasts. In Proceedings of the 35th ACM Symposium on Parallelism in Algorithms and Architectures, SPAA 2023, Orlando, FL, USA, June 17-19, 2023, pages 455–465. ACM, 2023. doi:10.1145/3558481.3591095.
  • [15] Maxime Flin, Mohsen Ghaffari, Magnús M. Halldórsson, Fabian Kuhn, and Alexandre Nolin. A distributed palette sparsification theorem. In Proceedings of the 2024 ACM-SIAM Symposium on Discrete Algorithms, SODA 2024, Alexandria, VA, USA, January 7-10, 2024. SIAM, 2024. doi:10.1137/1.9781611977912.142.
  • [16] Maxime Flin and Parth Mittal. (Δ+1) vertex coloring in O(n) communication. In Proceedings of the 43rd ACM Symposium on Principles of Distributed Computing, PODC 2024, Nantes, France, June 17-21, 2024, pages 416–424. ACM, 2024. doi:10.1145/3662158.3662796.
  • [17] Magnús M. Halldórsson, Fabian Kuhn, Yannic Maus, and Tigran Tonoyan. Efficient randomized distributed coloring in CONGEST. In Samir Khuller and Virginia Vassilevska Williams, editors, STOC ’21: 53rd Annual ACM SIGACT Symposium on Theory of Computing, Virtual Event, Italy, June 21-25, 2021, pages 1180–1193. ACM, 2021. doi:10.1145/3406325.3451089.
  • [18] Magnús M. Halldórsson, Alexandre Nolin, and Tigran Tonoyan. Ultrafast distributed coloring of high degree graphs. CoRR, abs/2105.04700, 2021. arXiv:2105.04700.
  • [19] David G. Harris, Johannes Schneider, and Hsin-Hao Su. Distributed (Δ +1)-coloring in sublogarithmic rounds. J. ACM, 65(4):19:1–19:21, 2018. doi:10.1145/3178120.
  • [20] Monika Henzinger and Pan Peng. Constant-time dynamic (Δ +1)-coloring. ACM Trans. Algorithms, 18(2):16:1–16:21, 2022. doi:10.1145/3501403.
  • [21] William Kuszmaul and Qi Qi. The multiplicative version of azuma’s inequality, with an application to contention analysis. CoRR, abs/2102.05077, 2021. arXiv:2102.05077.
  • [22] Nathan Linial. Locality in distributed graph algorithms. SIAM J. Comput., 21(1):193–201, 1992. doi:10.1137/0221015.
  • [23] Michael Molloy and Bruce Reed. Graph colouring and the probabilistic method, volume 23. Springer Science & Business Media, 2002. doi:10.1007/978-3-642-04016-0.
  • [24] Bruce A. Reed. ω, Δ, and χ. J. Graph Theory, 27(4):177–212, 1998. doi:10.1002/(SICI)1097-0118(199804)27:4\%3C177::AID-JGT1\%3E3.0.CO;2-K.

Appendix A Concentration Inequalities

We use the Chernoff Bound to prove concentration of random variables around their expected values. To comply with dependencies between our random variables, we use a stronger form than the classic variant of the bound. We refer readers to [12] or [11, Section 1.10] or [21, Corollaries 6 and 14].

Lemma 24 (Chernoff bounds with stochastic domination).

Let X1,,Xn be random variables and Yi be any function of the first i variables with value in [0,1]. Consider Y=i=1nYi. If there exists q1,,qn[0,1] such that 𝔼[Yi|X1,,Xi1]qi for every i[n], then for any δ>0,

[Y(1+δ)μ]exp(δ22+δμ)whereμi=1nqi. (5)
Conversely, if there exists q1,,qn[0,1] such that 𝔼[Yi|X1,,Xi1]qi for every i[n], then for any δ(0,1),
[Y(1δ)μ]exp(δ22μ)whereμi=1nqi. (6)