Manuscript Offprint
arXiv:2610.38787Dynamic Vertex Coloring with Adaptive Adversaries: Entropy Compression to the Rescue
Dynamic () Vertex Coloring with Adaptive Adversaries: Entropy Compression to the Rescue*
Sepehr Assadi†
University of Waterloo
Helia Yazdanyar‡
University of Waterloo
Abstract
We present a randomized algorithm for maintaining a () vertex coloring of a fully dynamic graph against an adaptive adversary with amortized update time.
Our algorithm improves upon the recent randomized algorithms of Behnezhad, Rajaraman, and Wasim (SODA 2025) with and Flin and Halldórsson (ICALP 2025) with amortized update time. Our result (nearly) matches a “fundamental limit” of update time identified by Flin and Halldórsson and settles their main open question.
The previous algorithms’ main improvement came from efficient coloring of the dense parts of the graph. Our approach complements these prior work by handling the sparse parts more efficiently, using ideas inspired by the recently developed dynamic entropy compression method. A key new aspect of our work is to tailor this method specifically to dynamic algorithms—as opposed to original local search algorithms—and achieve update times that can be sublinear in the number of involved constraints per update.
*A preliminary version of this paper appears in the ACM-SIAM Symposium on Discrete Algorithms, SODA 2027. †(sepehr@assadi.info) School of Computer Science, University of Waterloo. Supported in part by an NSERC Discovery Grant and a Faculty of Math Research Chair grant. ‡(hyazdanyar@uwaterloo.ca) School of Computer Science, University of Waterloo. Supported in part by a Cheriton Scholarship from School of Computer Science, Cotton Family Women in Mathematics Graduate Scholarship, Barbara Hayes-Roth Award for Women in Math and Computer Science, and SA’s NSERC Discovery Grant.
ii
1 Introduction
A -coloring of a graph is an assignment of colors from to vertices so no edge is monochromatic. One of the most basic graph coloring problems is that of finding a coloring in graphs with maximum degree . Every graph admits such a coloring that can be found easily using a naive greedy algorithm. There is also a large body of work on coloring across various computational models including distributed [Lin92,BEPS15,HSS16,CLP20,GK21], sublinear time and streaming [ACK19,AY25], parallel [CFG+19,CDP21,GK21,GK25], communication complexity [FM24,CMNS25], and dynamic graphs [BCHN18,HP22,BGK+22,BRW25,FH25]. This last line of work, namely, dynamic algorithms for coloring, is the focus of our paper.
A (fully) dynamic algorithm for the coloring problem is given a graph that undergoes edge insertions and deletions and its goal is to maintain a coloring after each update quickly. It is easy to obtain a dynamic algorithm with update time: if an update makes an edge monochromatic, scan the neighbors of one of its endpoints and find a color missing from them to assign to the endpoint. This basic bound was significantly improved in the pioneering work of [BCHN18] to a randomized algorithm with update time, and was further improved by [BGK+22,HP22] to an update time algorithm.
While remarkably fast, there is a caveat to the results in [BCHN18,BGK+22,HP22]: they only work against an oblivious adversary meaning that the edge updates need to be fixed in advance and cannot adapt to the algorithm's output. This is problematic for many applications of dynamic algorithms wherein the output of the algorithm can indeed influence its future updates. As a result, there has been a significant interest in the literature in obtaining dynamic algorithms against adaptive adversaries that provide the next update based on prior outputs of the algorithm; see, e.g. [BKM+22,BBF+26] and references therein for more on this general topic. For some time after [BCHN18], the best known dynamic algorithm for coloring against adaptive adversaries remained the naive update time deterministic algorithm, which can be as slow as update time. This is until the breakthrough of [BRW25] who presented an update time randomized algorithm. This was then improved by [FH25] to an update time randomized algorithm which constitutes the state-of-the-art. The authors in [FH25] identified two natural bounds for the update time to target: (1) as a “fundamental limit” and (2) as a “natural barrier” of existing techniques; we will discuss the rationale behind these bounds in Section 1.1. The algorithm of [FH25] matches this second bound, leading the authors to ask:
[FH25, Problem 1]: “Does there exist a fully dynamic -coloring [algorithm] with update time that remains robust against adaptive adversaries?”
We settle this question in the affirmative in this paper.
Result 1. There is a randomized algorithm that maintains a coloring of any -vertex fully dynamic graph with maximum degree against an adaptive adversary in amortized update time with high probability.
Result 1 answers the open question of [FH25] and improves the update time all the way to the fundamental limit identified in their work.
It is also worth drawing a parallel between Result 1 and the closely related maximal matching problem (see [BRW25] for references to these connections). Maximal matchings also admit update time dynamic algorithms against oblivious adversaries [Sol16] (see also [BGS11]). But, the first update time algorithm against adaptive adversaries appears much later and is due to the recent breakthrough of [BBKS25] who obtained amortized update time randomized algorithms and time deterministic ones. This result was very recently improved to amortized update time [CKS26]. While achieving similar numerical bounds, the techniques behind these work and ours as well as [BRW25,FH25] are entirely disjoint.
Finally, very recently [AY26] (see also [HMR 26]) presented an algorithm for coloring of triangle-free graphs in update time against adaptive adversaries. That problem is fundamentally different from coloring on general graphs that have a “rigid” constraint of only having a single slack color per vertex (the result of [AY26] is best compared to the prior algorithm of [BCHN18] for coloring general graphs with polylog() update time). A related corollary of our work is for coloring -sparse graphs wherein neighborhood of any vertex has at most edges (triangle-free graphs are 1-sparse with this definition).
Corollary 1.1. There is a randomized algorithm that given any on any -vertex dynamic -sparse graph with maximum degree (sufficiently large w.r.t. ) maintains a -coloring against an adaptive adversary in amortized update time with high probability.
Corollary 1.1 gives a dynamic algorithm for the classical result of [MR97] on coloring -sparse graphs with less than colors. Coloring sparse vertices is also often used as subroutines in other coloring problems (including Result 1 and [BRW25,FH25]), and thus Corollary 1.1 can be its own independent interest.
1.1 Our Techniques
We give a detailed overview of our approach in Section 3, and stick to high level bits here.
Our algorithm, similar to [BRW25,FH25], uses sparse-dense decompositions [Ree98] that have found numerous applications in distributed and sublinear algorithms [HSS16, ACK19, CLP20]. Both [BRW25, FH25] spent bulk of their efforts in coloring the dense parts of the graph and primarily relied on existing ideas—the one-shot coloring technique [MR02, HSS16, ACK19, CLP20] and sublinear time algorithms for coloring [ACK19, AY25]—for coloring the sparse parts.
As pointed out by [FH25], “the randomized argument underlying this approach [of one-shot coloring for sparse vertices] is fragile, requiring a complete rerun every update”. Since each run of coloring sparse vertices requires nearly time (see [ACK19] for both upper and lower bounds), even just this step leads to a amortized update time. Therefore, at best, these algorithms can have update time which can be in the worst case. This is the “natural barrier” identified by [FH25], who optimized the arguments in [BRW25] using structural insights on dense parts of the graph, to reduce the update time to this threshold.
Our work complements the approaches in [BRW25,FH25] by replacing the “fragile” arguments for sparse vertices. Instead of restarting with a sublinear time algorithm at intervals, we design a dynamic algorithm that continuously maintains a coloring of sparse vertices with no restarts. The key to our algorithm is the dynamic entropy compression method—a dynamic version of the celebrated technique of [Mos09, MT10] for algorithmic Lovasz Local Lemma (LLL)—that was discovered very recently and independently in [AY26, HMR 26]. A main technical contribution of our work is to use this technique beyond local search to analyze an inherently dynamic process, which in turn allows us to obtain update times that can be sublinear in the number of involved constraints (as opposed to [AY26, HMR 26]; see Section 3 for more details).
The minimum is because one can always run the naive deterministic update time algorithm instead.
The remainder of our algorithm mostly follows prior work in [BRW25,FH25] with three crucial differences: (1) we need a new classification of dense parts and a new algorithm for handling a certain family of dense vertices missing from [BRW25,FH25], and (2) we no longer have any notion of restarts and phases that was used in [FH25,BRW25] even when coloring dense vertices; and (3) we obtain our “high probability guarantees” in an amortized way that relies on some less standard techniques. We discuss our algorithm and its similarities and differences with [FH25,BRW25] as well as its connections to dynamic entropy compression [AY26,HMR 26] in Section 3.
Finally, we note that, as pointed out by [FH25], forms a “fundamental limit” of current techniques: finding an available color for recoloring a vertex is primarily done by either (1) iterating over all its neighbors or (2) picking a random color and going over all vertices with that color to check if any are neighbor to . The former strategy requires time and the latter (expected) time (given a random color is used by vertices in expectation), leading to time for recoloring a vertex in the worst-case (of course, assuming a random color even works for coloring the vertex with “good enough” probability, which involves the bulk of the effort in algorithms using this subroutine such as [ACK19,AY25,BRW25,FH25]).
Independent and concurrent work. Parallel to us, Gil and Halldorsson [GH27] obtained a fully dynamic -coloring algorithm with worst case update time against an adaptive adversary. The two works use entirely disjoint techniques. Our approach combines dynamic entropy compression with sparse-dense decomposition. In contrast, they entirely forego the use of sparse-dense decomposition and instead employ a phased-based algorithm that uses global sampling to maintain a set of core vertices whose coloring can be updated in time, and extends this coloring to the remaining vertices through random color trials.
2 Preliminaries
Notation. For any integer , define . For a graph , we use to denote the neighbors of , and to denote the degree of . For a set , we further use and to denote the neighbors and degree of to . We say is an anti-edge in if and are not neighbor in .
A partial coloring of a graph is a function , where is a set of colors and denotes an uncolored vertex, also referred to as a blank vertex. A partial coloring is said to be proper if no edge is monochromatic, however vertices assigned color are exempt, i.e., are allowed to be adjacent to each other. For a color , we call the set of all vertices with color under the coloring the color class of and use to denote it.
For a vertex , the set denotes the colors available to under , namely, colors whose assignments to keeps proper. Moreover, denotes the neighbors of that are blank and to be neighbors that are colored, both under . We further define
Notice that measures the number of “extra colors” available to v under the coloring , and that always (for any coloring ).
We emphasize that this is not a formal lower bound, but rather the “limit” of current coloring algorithms using random trial arguments which is currently the only known method for dynamic and sublinear-time algorithms. But, it is also worth mentioning that in case of sublinear-time algorithms, is a formal lower bound on the time needed to color a graph [ACK19], implying that we cannot hope for a faster subroutine for coloring a single vertex statically better than time in the worst case.
Dynamic graphs. We denote the static vertex set of the underlying -vertex graph by . Let be the sequence of dynamic graphs presented to the algorithm: the initial graph is empty and each graph is obtained from the previous graph by inserting or deleting a single edge . We use to denote the graph at the -th step; and for any and are defined analogously with respect to .
As is common in this context, we assume is known a priori and every vertex has degree at most throughout the updates.
An oblivious adversary fixes the choices of graphs in before presenting them to the algorithm whereas an adaptive adversary can choose each graph based on the output of the algorithm on prior graphs (in our case, we can even assume the prior random coin tosses of the algorithm are available to the adversary; this is often called a clairvoyant adversary in the literature; see., e.g., [HMR+26]).
Finally, the recourse of a dynamic coloring algorithm is the number of changes to the output of the algorithm after each single update.
Concentration Inequalities. We use the following standard version of Chernoff bound.
Proposition 2.1 (Chernoff-Hoeffding bound; cf. [MR02]). Let be independent random variables where each . Define . Then, for any ,
Moreover, for any , and :
We will also be using some more specialized concentration inequalities in certain parts of the proofs such as Talagrand's inequality [Tal95, MR02] or an adaptive form of Chernoff bound [Fre75, KQ25] but postpone stating them to when we need them.
Random Color Trials. The following is a standard subroutines used by our algorithm and various prior work [AY25, BRW25, FH25].
RandomColorTrial(v): Sample a color for vertex and if color by and terminate, otherwise repeat.
Proposition 2.2. Given a vertex and partial coloring , the subroutine RandomColorTrial(v) finds an available color for in expected time.
Proof. First note that as there are vertices and colors, for a uniformly at randomly sampled color , we have
Let be the first random color sampled by RandomColorTrial(v). We can expand the expected runtime by going over the cases where the first sampled color is available to or not as below
this is because if is not available, we are going to run the same exact process again. Finally, the equation solves to
concluding the proof.
3 Technical Overview
We now give a streamlined overview of our proof of Result 1 and a comparison with prior work in [BRW25, FH25] as well as [AY26, HMR 26]. Moreover, given the importance of the dynamic entropy compression technique in our work—and our hope that it can be a general technique of its own independent interest for designing randomized dynamic algorithms against adaptive adversaries—we attempt to give a full account of this technique in our overview. This section oversimplifies many details and the discussions will be informal for the sake of intuition.
3.1 Prior Approaches and Challenges
Background: Sparse-Dense Decompositions and One-Shot Coloring
We start with the general paradigm of graph coloring via sparse-dense decompositions. At a high level, a sparse-dense decomposition partitions the vertices of the graph into two separate parts:
-
sparse vertices: vertices with edges missing from their neighborhoods, that is their neighborhoods are “far from” being a -clique;
-
dense vertices: remaining vertices, clustered into almost-cliques , each of which can be turned a -clique by adding or removing fraction of their vertices and edges.
See Section 4.1 for the formal definition and Figure 1 for an illustration.
The appeal of this decomposition across various scenarios is as follows. Coloring sparse vertices can effectively be reduced to an coloring problem, that is, with a non-trivial slack compared to the “rigid” coloring. On the other hand, almost-cliques have a lot more structure than arbitrary graphs that one can exploit to obtain a coloring. We refer the interested reader to [MR10, ACK19, CLP20] for quite different instantiations of this general paradigm.
The reduction for sparse vertices is often obtained via the so-called one-shot coloring technique: suppose we independently sample a color from for each vertex and assign it if none of its neighbors have sampled the same color. It is not hard to argue that each vertex has an probability of being colored in this process. What is more interesting—and

Figure 1: An illustration of a sparse-dense decomposition on a graph with (each box is an almost-clique and remaining vertices are sparse).
quite harder to prove—is that in fact, in the neighborhood of each sparse vertex, there will be
anti-edges whose both endpoints retain the same color (see [MR02, HSS16, CLP20] for various proofs of this). Hence, from hereon, each sparse vertex has a slack of colors and one can exploit this slack effectively as if the goal was an coloring instead.
Finally, coloring the dense parts of the graph often involves the bulk of the efforts and are done using a wide range of techniques that are quite tailored to specific setting at hand.
Sparse-Dense Decompositions and One-Shot Coloring in [BRW25, FH25]
The work of [BRW25] is the first to use this paradigm for designing dynamic algorithms, followed by [FH25] who further optimized this approach, especially in terms of handling dense vertices.
Specifically, [BRW25] developed an algorithm for maintaining a sparse-dense decomposition of a fully dynamic graph at all time steps. This algorithm is randomized and its update time depends on the sparsity parameter of the decomposition ( in Section 4.1). The sparsity parameter is (substantially) sub-constant in [BRW25] but it is a small constant in [FH25] as well as ours and thus the decomposition can be maintained in amortized update time for [FH25] and us. Hence, for the rest of this discussion we assume having access to this decomposition for free.
Both [BRW25, FH25] color the sparse vertices in phases as follows. Each phase consists of updates of the adversary. At the beginning of each phase, they uncolor all vertices and run the one-shot coloring algorithm described earlier to create slack for sparse vertices. This step can be implemented in time using the sublinear time () coloring algorithms of [ACK19, AY25]. Each update can reduce the slack of any fixed vertex by only one. As such, throughout the entire updates of the phase, the sparse vertices still maintain an slack.
Given the maintained slack, dynamic coloring of sparse vertices can be done using random color trials in expected time (by Proposition 2.2 and the RandomColorTrial subroutine). Of course, we also have to maintain this slack which requires restarting the entire process for each phase and spending time to run one-shot coloring via [ACK19, AY25] (given the sublinear time lower bound of [ACK19], we also cannot hope to run this step faster). Amortized over the updates of the phase, this leads to an amortized time which is the dominating term in the algorithm. As we can balance this update time against the trivial update time algorithm, this leads to an amortized update time algorithm for coloring sparse vertices.
Of course, [BRW25, FH25] also need to handle dense vertices which have their own unique challenges. But as is clear from the above discussion, the bottleneck in the update time already applies to coloring sparse vertices and a faster algorithm needs to handle these parts differently. We can thus already switch to discussing how to handle this challenge.
Coloring Sparse Vertices without Phases and Restarts?
A natural goal is to let go of phases and restarts, while still maintaining the invariant that for output coloring and every sparse vertex at all times. Assuming we maintain this, the same random trial approaches of [BRW25, FH25] ensures that we can recolor any vertex made blank by the adversary in expected time, which balanced out with the time algorithm leads to an update time algorithm as desired. The challenge is clearly in maintaining this invariant as there are various ways for the adversary to force our coloring it to violate it across many vertices, e.g., by replacing a same-colored anti-edge with an edge, that can affect slack of vertices in one go.
A natural approach—especially in light of the recent successes in [AY26, HMR ]—is to “locally” fix any vertex when it violates the invariant. This means resampling the colors in the two-hop neighborhood of to ensure the distribution of color assignments in itself follows that of one-shot coloring. Recoloring fixes the invariant for the vertex with high probability (by same one-shot coloring arguments as before) but it has the potential to violate it for vertices in the three-hop neighborhood of . We can then just continue this fixing for other violated vertices recursively.

Figure 2: Resampling random colors in two-hop neighborhood of ensures neighbors of have the same distribution as one-shot coloring. This is not true for all resampled vertices given the colors blocked by their own neighbors that are not resampled.
At first glance, it may not be clear why such an approach would terminate even on a static graph as there is no clear notion of “progress” in these local fixes. This question however has been answered by an elegant line of work on algorithmic Lovasz Local Lemma (LLL) and the entropy compression technique of [Mos09, MT10] provides the analytical tools for measuring such a progress. Very recently, [AY26, HMR ] developed a dynamic entropy compression as well that is tailored to analyzing dynamic algorithms of the type we described. In particular, [HMR ] provides a general framework that allows one to dynamically maintain almost any assignment guaranteed to exist by LLL. Thus, the framework of [HMR ] directly guarantees the convergence of the dynamic algorithm we described after each update.
The caveat is in the rate of convergence: the update time this way will have some poly() term dependence (it will be or at best depending on which implementation from [AY26, HMR ] is used but certainly it cannot be time). This entirely defeats the purpose for coloring as we could have just run the trivial update time algorithm instead.
Nevertheless, a simple observation is that the problem we need to solve is not a local problem—in the sense of requiring any LLL argument to begin with if we were considering it in the static setting—and thus we can deviate from the specific frameworks of [Mos09, MT10] and other LLL approaches and focus on the problem in an inherently dynamic way. Our approach exploits this.
3.2 Our Approach for Sparse Vertices
Our Algorithm for Coloring Sparse Vertices
The goal in our algorithm is to have a partial coloring which can generate slack for sparse vertices, and then further extend it by coloring its blank vertices in the output coloring (by definition, any slack generated by will also be inherited by ). Using a similar language as in the LLL literature, we say a vertex has a iff . While the typical goal, e.g., in [HMR ], would be to maintain a flawless coloring, this is not what we will do. Instead, we will only fix this flaw on a need-based basis. Specifically, we first have the following subroutine (for now, let us assume we only have sparse vertices; we will come back to dense vertices later):
As stated earlier [AY26] does in fact achieve an update time for coloring of triangle-free graphs. But, this is done in two steps: (1) designing an update time algorithm using dynamic entropy compression, and, then (2) using this as a black-box in a reduction inspired by [BCHN18] to reduce the update time to while losing a constant factor in the number of colors used. Such an “approximate” reduction is inherently not suitable for coloring so this two-step approach is not applicable for us (in fact, the reduction does not even work in this context for -sparse graphs in Corollary 1.1 for , even ignoring the approximation aspect).
AttemptColor(v): attempts to color in by sampling random colors for it and returns Fail if it could not find an available color for among any of them.
Similar to random color trials (Proposition 2.2), AttemptColor only requires expected time for coloring assuming , i.e., is flawless.
Of course, there will be time steps wherein AttemptColor(v) returns Fail (essentially) when has a flaw. In that case, we will try to just fix by recoloring its neighbors (as opposed to two-hop neighborhoods required by “LLL approaches” as in [HMR+26]). For this resampling to be successful, we need the list of available colors for vertices to be large enough to ensure the probabilistic guarantees needed for creating enough slack for hold. We also need the distribution of resamplings here to be oblivious to the current state of the graph and underlying colorings and Given these, we have the following resampling subroutine:
Resample(v): for in lexicographic order, run the following sampling process:
-
with a small constant probability, sample a color and otherwise let ;
-
if (after updating for prior vertices in the loop), let .
We emphasize that Resample only looks at the colors in and not the entire . So, it is possible for it to assign a color to a vertex that also appears in under (but not ). Thus, after running Resample, we also need a clean up step.
CleanUp(v): after calling Resample(v):
-
for any with a new color in , and uncolor vertices in (w.r.t. );
-
for any uncolored in Resample or in the previous line, run AttemptColor(u).
We can now put these together with one additional component (whose role become clear in the analysis): whenever an edge is inserted or deleted, we recolor both and (in and by extension also) using the same sampling process defined in Resample and do the same clean up for them (if needed). The whole dynamic algorithms is then as follows: update the edge as above, color any blank vertex by AttemptColor and if it returns Fail, run Resample followed by CleanUp.
At this point, it is not even clear that Resample(v) is able to fix the flaw of the vertex ; for instance, if is small for all , this subroutine may end up instead just uncoloring all neighbors of . So, there is no hope in that case. We can however prove the following result. The statement of this lemma may sound rather cryptic/over-generalized at first but this is precisely what is needed to make the magic of entropy compression work (we will discuss this later).
Lemma 3.1 (Formalized in Lemma 5.2). Fix any ordered set of vertices with anti-edges between them. Each vertex is associated with a blocked set of size at most . Suppose for every , with a small constant probability, we sample a color and
We will discuss this in more details later but roughly speaking this is because while we are doing the resampling at some time , we will be analyzing its effect at another time and need the distributions to match.
assign it iff: (1) the color , and (2) no neighbor of with have also sampled this color. All other vertices are marked blank. Then,
One way of interpreting Lemma 3.1 is this: fix a time and a vertex in the current graph with coloring and let be ; define . Lemma 3.1 says that as long as all , fixes the flaw of with high probability. The proof of this lemma uses this interpretation and that the assumption of for all means for each anti-edge inside , , which is enough to prove this lemma similar to one-shot coloring proofs in [MR02,HSS16,CLP20].
Nevertheless, this interpretation is not what we will be using this lemma for, as it will become clear in the analysis sketch later.
We have still not addressed how is helpful when is small for some . This is precisely the reason that our sampling process only even considers coloring a vertex in with a small constant probability. Intuitively, this means most vertices of the graph are blank and so -sets should be large. More specifically, suppose before calling , we first call for every neighbor where (without caring about whether had a flaw to begin with). It is easy to see that this uncolors most neighbors of and leads to with high probability; we can then go back to and apply Lemma 3.1 to ensure we fixed the flaw of (again, this is not what we really need and that interpretation is only for the intuition).
Formalizing this step requires additional care by introducing this as yet another flaw and then running a “lazy check” in the background (see Section 5.2). We shall ignore this step in this high-level overview and in the following just for all vertices at all times. We can now get to the analysis of the algorithm.
The Analysis of Our Algorithm for Coloring Sparse Vertices
We already argued that the calls to AttemptColor take expected time. So, analyzing our algorithm boils down to understanding the following two parts for Resample: (1) how much time a Resample call takes and how many vertices it uncolors (to account for time of the call to AttemptColor for them inside CleanUp), and (2) how often we have to call Resample. Among these the second one is the main part of the analysis, but let us start with the first part first.
Runtime and recourse of Resample. The runtime of Resample involves going over all neighbors of in time to sample colors, and then for each sampled color checking its color class (to ensure it is available to the vertex that sampled it). Given the expected size of a color class for a random color is , the entire runtime of Resample will be time in expectation.
As for the number of vertices Resample uncolors, it may uncolor all neighbors of and in addition, for any vertex that it colors, it needs to uncolor its neighbors with the same color. One can see that the expected number of neighbors of a vertex that have the same color as the vertex itself, for a randomly chosen color, is , and thus, the total number of vertices uncolored by a call to Resample is in expectation.
All in all, a call to Resample requires expected time to handle through subsequent calls to CleanUp and AttemptColor ignoring the potential other calls made to Resample.
Number of times Resample is called. The heart of our analysis is the following lemma (this lemma needs to be proven in a more general form in the main body of the proof and is captured in the proofs of Lemmas 4.15 and 4.16; the following lemma however is correct and its proof sketch below can be fully formalized).
Lemma 3.2. Over a sequence of updates, the total number of times Resample is called in our dynamic algorithm is with high probability.
Combined with the bounds of on the runtime of AttemptColor (as well as the extra color samplings done per edge insertions and deletions) and the time spent per each Resample call, Lemma 3.2 implies an bound on the amortized update time of our algorithm. Again, balancing this out against the time will give us the desired update time. Ensuring this bound holds with high probability rather than in expectation requires another argument which we will touch upon at the end of our overview discussion.
Our proof of Lemma 3.2 is where we use a dynamic entropy compression argument. Firstly, suppose we maintain a table
for the randomness used by the algorithm during calls to Resample (see Figure 3).
| (0, 4) | (1, 3) | (1, 2) | (1, 5) | (1, 4) | ... | |
|---|---|---|---|---|---|---|
| (1, 3) | (1, 2) | (0, 2) | (0, 4) | (1, 4) | ... | |
| (1, 2) | (0, 1) | (0, 3) | (1, 3) | (1, 2) | ... | |
| (0, 5) | (1, 5) | (1, 4) | (0, 2) | (0, 3) | ... | |
| (0, 2) | (0, 3) | (0, 1) | (1, 2) | (1, 5) | ... |
(a) Before calling Resample().
| (0, 4) | (1, 3) | (1, 2) | (1, 5) | (1, 4) | ... | |
|---|---|---|---|---|---|---|
| (1, 3) | (1, 2) | (0, 2) | (0, 4) | (1, 4) | ... | |
| (1, 2) | (0, 1) | (0, 3) | (1, 3) | (1, 2) | ... | |
| (0, 5) | (1, 5) | (1, 4) | (0, 2) | (0, 3) | ... | |
| (0, 2) | (0, 3) | (0, 1) | (1, 2) | (1, 5) | ... |
(b) After calling Resample().

(c) The Graph
Figure 3: The table show the random table of assignments for the graph in Figure 3c and the bold boxes show the “Index” of each vertex at the current state.
Specifically, whenever we call Resample and need to pick a random color for a vertex , we look at entry of where is the number of times we have used randomness for (namely, number of times has been part of some sampling process either by an update or a Resample call); the first entry tells us whether gets to sample a color in Resample (with a small constant probability), and the second one tells us which color is going to be. We pick so each entry independently matches the distribution we use in our sampling.
At the same time, when running the algorithm, we can also maintain a log of the behavior of the adversary and the algorithm, just for the purpose of the analysis. Specifically, we write down a sequence of the form:
which allows one to keep track of the updates by the adversary at any point in time and the Resample calls that happened between them. A crucial point here is this log only maintains the information about (and not ) and for that we needed our sampling process to entirely ignore while AttemptColor is not allowed to change (only ). Specifically, given a log and its corresponding table , we can reconstruct all colors in sampled by our algorithm throughout. In the following, we exclusively refer to the coloring unless stated otherwise.
We say a log is consistent with a table if running the algorithm using the randomness of the table results in the given log. Our goal is to say that “long” logs cannot be consistent with the randomness of the table used by the algorithm with high probability and use it to bound the number of Resample calls. This is done in two steps as follows.
Step 1: number of logs. Consider any log consisting of updates and resample calls. We can bound the total number of such logs by given there are choices for ordering the different types of instructions in the log and that each instruction can have possibilities.
Step 2: probability for a fixed log. Fix any possible log . For to be consistent with a random , we check if each Resample call is consistent with , as in, at that time step, has a flaw in the graph under the coloring (determined by using the table and log until this step).
Consider a time when a Resample call is logged and consider the graph which is fully determined by the log . Let form . For any , let denotes the last time step sampled a color and let that color be . Order in the increasing order of 's and break the ties in lexicographic order of vertex names (as is done in Resample). Define at the time .
We have a couple of key observations:
-
Consider any pair of and let be the last time step before when was changed, namely, inserted or deleted. Then, both since we always sample a new color in for endpoints of any updated edge;
-
The color of at time is either or and moreover, this decision was already fixed at the time depending on whether or not (and if and , whichever of appears lexicographically first): the color of a vertex only changes as part of a sampling process and was the last time we sampled a color for .
The samplings of colors (but not necessarily their eventual assignment) is done independently and thus each of 's is sampled independently. Equipped with the observations above, and even though the samplings are done at different time steps, we can apply Lemma 3.1 with the parameters above to say that the probability of having same-colored anti-edges between at the time step is only . Put differently, the probability has a flaw at time and thus Resample is consistent with the table is .
In addition, the probability that each Resample call is consistent with is independent of the rest; this is because for each call, we are looking at the different series of entries in (as after a Resample happens, we move to the next entry for each vertex) and all entries of the table are independent. This implies that for a fixed log with Resample calls:
Conclude the proof sketch of Lemma 3.2. By a union bound,
which for is negligibly small (assuming which holds since we can assume w.l.o.g. when running this algorithm). This concludes the proof sketch of Lemma 3.2.
At this point, we have stated an update time dynamic algorithm and its analysis for coloring sparse vertices in the decomposition. This algorithm, almost verbatim, is enough to establish Corollary 1.1 (as we actually never needed to use colors here) but to prove Result 1, we need more work to handle dense vertices as well.
Remark 3.3. Before moving on, we note that this particular idea of analyzing of flaws in Resample calls (as opposed to the more natural way of analyzing probability of a Resample call fixing a flaw) is a core idea in the original Moser-Tardos framework [Mos09, MT10]. Those work however require quite a lot more different machineries—e.g., witness tree and their Galton-Watson sampling—that are crucial for LLL applications, but are not needed for our dynamic applications. Thus, stripping away those machinery, allows us to analyze dynamic algorithms directly and focus on their unique intricacies, e.g., role of updates and changes to the underlying graph in the middle of Resample calls. This has allowed us to provide a dynamic-specific approach (e.g., the generality of Lemma 3.1 and time-obliviousness of our sampling) that bypasses the poly( ) update time barriers in the original applications of dynamic entropy compression [AY26, HMR 26].
We suspect dynamic entropy compression in general will find a place in the standard toolkit of dynamic algorithms, given it provides a rather unique way to analyze randomized algorithms against adaptive adversaries. See [AY26, HMR 26] for further justifications and discussions.
3.3 Handling Dense Vertices
Up until now, including in the discussion of prior work, we have entirely ignored the dense vertices, even though virtually in all scenarios, those are the technically more challenging parts to handle. This continues to be the case in our algorithm as well, but these challenges are for the most part technical and follow the prior work in [BRW25, FH25] as well as [ACK19, AY25]; at the conceptual level, the main novelty of our work lies in its handling of the sparse vertices. In the following, we briefly describe our approach on how to handle dense vertices especially as how they relate to our earlier treatment of sparse vertices. We start with a quick review of [FH25] which we follow more closely (although several techniques in both [FH25] and ours are also borrowed from [BRW25]).
Prior Approach of [FH25] for Dense Vertices
Recall that dense vertices are partitioned into almost-cliques. For any almost-clique and a vertex , define as the degree of outside and as the anti-edge degree of inside .
A simple yet brilliant idea in [FH25] is to handle certain almost-cliques also as sparse vertices: almost-cliques wherein average out or anti of vertices is at least for some chosen later. Specifically, they prove that such vertices are -sparse for , which means one-shot coloring generates slack for these vertices as well. For [FH25], handling these vertices effectively only requires two changes: (1) reducing phase lengths to instead of earlier, and (2) spending time instead of to color these vertices using their slack throughout the phase. This means the update time of their algorithm on this part will be by amortizing the time of one-shot coloring over the updates of a phase.
For the remaining almost-cliques, they use an idea called inlier-outlier partitioning with the essential effect of allowing one to assume out and anti of every vertex in the almost-clique is almost the same as the average values of these quantities, and thus is upper bounded by that are remained to be handled. Yet another technique called anti-edge matching, introduced in [ACK19] for design of sublinear time algorithms for coloring, and subsequently used in [BRW25] for dynamic algorithms reduces the problem to the following: whenever we need to color a vertex v in a remaining almost-clique K, we only need to go over out(v) vertices of to find a color available to v. But then this step takes time leading to the final update time of this algorithm for coloring dense vertices to be:
for . Balancing this with the time algorithm gives their time algorithm.
A Challenge for Improving Update Time on Dense Vertices?
While we have come up with a way to speed up coloring sparse vertices by removing phases and global restarts, there is another challenge to handle dense vertices when following [FH25] by delegating some almost-cliques to be handled as sparse vertices. This is because the sparsity parameter of these vertices is which can be (polynomially) sub-constant, which our algorithm cannot handle without extra cost directly (see the statement of Corollary 1.1 also).
This bottleneck is quite fundamental for our earlier approach: for -sparse vertices, Lemma 3.1 (provably) can only obtain a probability, while we still need time to run Resample which problematicly uncolors vertices that need to be handled. Going through the entropy compression arguments using these bounds then gives an
Given , we get an update time for Resample calls (which is perfectly fine) but also have to color new vertices per update. Since the time needed for coloring these vertices by color trials is (given they have slack), the time needed to color the remaining vertices becomes time. This means the update time of the algorithm is
which unfortunately, balanced out against time algorithm, still does not get a better than time algorithm.
A crucial observation to our rescue is that the almost-cliques we are delegating here are not arbitrary -sparse vertices, and we can further exploit their almost-clique properties. With this in mind, we are ready to describe our approach for dense vertices.
Our Approach for Dense Vertices
In our algorithm, we further partition the delegated almost-cliques based on whether average anti was higher than or just the average out. It turns out the former ones can be handled using the dense vertices approaches of [FH25] with an update time of with no particular difficulty. This basically means not delegating those almost-cliques to sparse vertices and handling them as dense ones. But, the latter almost-cliques do need to be delegated to sparse vertices and we shall handle them using our dynamic entropy compression arguments. Remaining almost-cliques can be handled similar to [FH25] in update time.
The only remaining case is then almost-cliques with average out of vertices larger than , which we call out-heavy almost-cliques. Recall that the challenge with these almost-cliques is that the recourse of the Resample subroutine will be prohibitively large to handle the uncolored vertices individually using existing subroutines. Here, we can show that calling Resample(v) for v in an out-heavy almost-clique only leads to expected uncolored vertices outside the almost-clique and the remaining uncolored are all inside . We then design a new sublinear time algorithm—inspired by [AY25]—for coloring all but vertices in out-heavy almost-cliques
As a general rule, if the flaw probability under resampling can be bounded by (and everything aligns well for the argument), then entropy compression allows us to bound the number of resamples by over updates.
Even when is as large as but , the first term will also be now.
in time only (instead of time of coloring vertices one by one). This means that effectively we can think of this call as spending time and generating uncolored vertices instead of uncolored ones.
The final part of the argument is to prove we actually do have the budget to color the remaining vertices using the update time for each one. This involves proving that (1) the sparsity of a vertex in an almost-heavy almost-clique is proportional to both and simultaneously; and, (2) number of calls on vertices of such sparsity over updates is essentially (recall Footnote 5). This means the amortized runtime of handling these vertices is which is within our budget.
All in all, putting everything together, the above arguments give an amortized update time of
for coloring dense vertices. Picking and balancing out against the time algorithm gives an update time algorithm for coloring dense vertices as well.
Oversimplified Details and High Probability Guarantees
We now briefly touch upon some oversimplified details in the previous discussions and point out how the high probability guarantee of our algorithm is proven.
Firstly, when handling delegated almost-cliques as sparse vertices, we need to handle a spectrum of sparsities (given appearance of -term in the bounds), which requires a more nuanced arguments in the entropy compression part. Specifically, we now associate a cost with the logs we maintain (analytically) that is a proxy to the time/recourse needed to handle them and bound the probability of “high” cost logs.
Secondly, we described our algorithms as if the decomposition was fixed and that sparse and dense vertices had no interaction with each other (not even being neighbor). In actuality, we need to handle vertices moving between different parts of the decomposition, as well as making sure handling of vertices in some parts do not violate invariants of the other; the most important part to maintain for entropy compression is to ensure that colorings of all vertices in are always done through a consistent and graph-oblivious sampling. These all lead to further technical challenges in the algorithm as which vertices are allowed to participate in these sampling steps and how to prioritize their colorings over the rest.
Finally, the high probability guarantees of prior work in [BRW25,FH25] was obtained per update (despite still being amortized) by maintaining invariants such as ensuring size of all color classes are fixed to (instead of in expectation for a random color that always holds) or only uncoloring vertices in the worst case. However, our dynamic entropy compression argument relies on taking expected time and recourse (due to the obliviousness of the distribution it crucially uses), and thus we cannot prove a high probability guarantee per update. Instead, we use a less standard concentration inequality due to [KQ25] (Proposition 4.17) to bound the runtime of the entire algorithm over an adaptive sequence of updates, which as a by-product gives us higher exponential probability of success for this part.
Our algorithm still only succeeds with high polynomial probability and not exponential, because it uses subroutines like the decomposition by [BRW25] whose (existing) proof only implies a high probability bound. We have not explored improving the probability bound of our overall algorithm given it is a secondary consideration.
4 A Fully Dynamic Algorithm for Coloring
We present our fully dynamic algorithm for coloring and its key subroutines and lemmas in this section. We postpone the analysis of the key subroutines to the subsequent sections.
Theorem 1. There exists a randomized fully dynamic algorithm for maintaining a coloring against adaptive adversaries with amortized update time with high probability.
Theorem 1 formalized Result 1. When proving Theorem 1, we assume as otherwise the proof follows trivially from the naive update time algorithm.
4.1 The Sparse-Dense Decomposition
Our algorithm uses the sparse-dense decomposition that was introduced by [Ree98] and extended in [HSS16,ACK19] (we will also use an idea due to [FH25] in their refinement of this definition called “sparser-denser decomposition” but not as a black-box). We first need the following definitions for any graph and parameter :
-
A vertex is -sparse iff contains at most edges;
-
A set of vertices is an -almost-clique iff
(i) ; and,
(ii) every has .
A sparse-dense decomposition is then defined as follows.
Definition 4.1 (Sparse-dense Decomposition [Ree98,HSS16,ACK19]). Let be a graph with maximum degree and be a parameter. A sparse-dense decomposition of with parameter is a partition of vertices of into sets such that
-
every vertex is -sparse (for some hidden absolute constant), and
-
for every , is an -almost-clique.
For any -almost-clique and a vertex , define:
-
: the set of neighbors of outside , i.e., ;
-
: the set of vertices of that are not neighbor to , i.e., .
We further set
Notice that and for every . Finally, we define the averaged versions of these quantities in the almost-clique as
A fully dynamic algorithm for maintaining a sparse-dense decomposition was presented in [BRW25] and further refined in [FH25].
Proposition 4.2 ([BRW25, Theorem 2]). Let be sufficiently small. There is a fully dynamic algorithm with amortized update time that with high probability maintains a sparse-dense decomposition of with parameter . Specifically, the algorithm maintains:
-
an array that for every indicates if is in and if not, stores which is the index of the almost-clique belongs to;
-
for each almost-clique for and , two separate lists that contain and ; the algorithm also stores , for .
The total number of changes to , across all is amortized per update.
[BRW25, Theorem 2] only proves the upper bound of on changes to but their same exact analysis (Lemma 39 and Corollary 5) also imply the desired bound on as well.
Classification of Almost-Cliques
For our purpose, we need to further classify the almost-cliques in the decomposition (similar ideas are used frequently in the literature, e.g. in [AKM22, FHM23, FH25]).
Definition 4.3. Let be a graph with maximum degree and and be parameters. Suppose is a sparse-dense decomposition of with parameter . We further define a for each almost-clique in this decomposition:
-
is iff ;
-
is iff it and ;
-
is iff .
We say a partition of almost-cliques is an -classification iff every is anti-heavy, is out-heavy, and is out-light.
It is possible for an almost-clique to belong to more than one class but it will belong to at least one class.
As stated in Definition 4.3, an almost-clique can belong to more than one class by definition; this (small) degree of overlap in the definitions is required for the dynamic handling of almost-cliques when they transition between these different classes. However, inside a fixed -classification, each almost-clique belongs to exactly one of the three sets.
[FH25] proves that an out-heavy almost-clique is -sparse for some proportional to . We show a slight generalization to also include dependence on separately. The following lemma is a simple corollary of [FH25, Lemma 3.6] and its proof is postponed to Section A.2.
Lemma 4.4. Fix any sparse-dense decomposition and its classification. Any vertex in an out-heavy almost-clique is -sparse for
If the almost-cliques do not change after an update, then clearly, at most two changes across all OUT-sets can happen (for the endpoints of the updated edge). However, it is also possible that a vertex joins or leaves an almost-clique (leading to changes) or an entire almost-clique forms or collapses (leading to changes); [BRW25] bounds the number of these changes as well in their analysis to bound the update time and the same analysis also applies verbatim to changes to OUT-sets.
We have the following simple corollary of Proposition 4.2 and Definition 4.3 that allows us to maintain an -classification of almost-cliques as well.
Lemma 4.5. Let be small and . There is a fully dynamic algorithm that with high probability maintains a sparse-dense decomposition of for together with its -classification. The algorithm provides all guarantees of Proposition 4.2 and additionally the number of almost-cliques that change from one set of the -classification to another set is amortized per update.
We emphasize that in Lemma 4.5, the amortized number of times per update that almost-cliques change a class is (considerably) sub-constant and that is needed in our analysis (although, we only need this bound to be for the rest of the analysis). We prove this lemma in Section A.3.
4.2 Setup and Invariants
Throughout the algorithm, we use the following parameters:
(1)
The goal is to maintain a proper coloring of the graph at each time step . For simplicity, we let to use , namely, uncolor a vertex, at intermediate states but will ensure it does not have blank vertices before the next update. Moreover, the algorithm maintains a sparse-dense decomposition of plus an -classification of its almost-cliques using Lemma 4.5. We refer to this subroutine as Decomposition for ease of reference.
Throughout, we use to denote the vertices in the almost-cliques of the class (similarly and for and ). Our algorithm treats different types of vertices differently: vertices in in one category, and in another. Following [FH25], we refer to former vertices as vertices, denoted by , and to later vertices as vertices, denoted by . We now go over the setup for each of sparser and denser vertices separately.
Sparser Vertices
The algorithm maintains a proper partial coloring that forms the backbone of our approach. We maintain the following two invariants for this coloring.
Invariant 1. For any , .
Invariant 2. For any with , we have .
The more important aspect of is the notion of a for vertices. We define the following flaws for vertices under the coloring ; a vertex is said to have a specific flaw if the condition of the flaw is satisfied for the vertex.
Technically speaking, [FH25] considers as sparser vertices but for us they are denser.
We should right away note that our algorithm does not aim to keep the coloring flawless: it is entirely possible that throughout the algorithm, many vertices have one or more of the flaws during a long sequence of updates. Instead, our algorithm fixes these flaws on a need-based basis as will become clear later. Thus, it is best to see flaws (or rather their absence) separate from the invariants that are maintained at all times.
Another remark about these flaws is that some of the conditions in them are “out of our hand”, e.g., whether or not is dictated by the graph and not what our algorithm does; these conditions say which vertices are relevant for the flaw to begin with. But, the final condition of each flaw is a function of the coloring which we can control.
Vertices in
We also recall the notion of colorful anti-matchings defined by [ACK19] and used in many graph coloring algorithms that rely on sparse-dense decompositions, e.g., in [FGH+24,BRW25,FH25].
Definition 4.6. Given an almost-clique and a coloring , a colorful anti-matching is a matching over anti-edges inside such that for each anti-edge , both and are colored the same and this color does not appear on any other vertex of .

Figure 4: An illustration of a colorful anti-matching inside an almost-clique . Colors in cannot be used by other vertices in .
Colorful anti-matchings allow the algorithm to save extra colors on almost-cliques—at a rate that is proportional to their number of anti-edges—which will be crucial for coloring the rest of the almost-clique. The next invariant we maintain is regarding the size of colorful anti-matchings in each almost-clique in . Similar invariants have been maintained in [BRW25,FH25].
Invariant 3. For any almost-clique , the algorithm maintains a colorful anti-matching of size using the output coloring .
We list our key notation and parameters used in our algorithm for ease of reference in Table 1.
4.3 Key Subroutines
We now list our key subroutines and their objectives. Their implementation and analysis will appear in subsequent sections. Recall that the algorithm will be maintaining a sparse-dense decomposition and its classification using Decomposition (Lemma 4.5) in the background and the subroutines below may use this decomposition explicitly or implicitly.
| Symbol | Description |
|---|---|
| Sets | |
| set of -sparse vertices | |
| set of anti-heavy almost-cliques | |
| set of out-heavy almost-cliques | |
| set of out-light almost-cliques | |
| set of sparser vertices i.e. | |
| set of denser vertices i.e. | |
| the colorful anti-matching maintained for almost-clique | |
| the main partial coloring maintained in the algorithm | |
| Parameters | |
| a small constant used throughout the proof | |
| a small constant () used for as the parameter of decomposition | |
| an integer in used to define the classification | |
Table 1: A summary of notation and parameters used in our algorithm.
We partition the subroutines into “old” ones that are closely related to or borrowed from [BRW25, FH25] and the “new” ones that entirely deviate from those work and are new to our work.
Old Subroutines
Our first subroutine is for maintaining Invariant 3 after updates to the decomposition.
ExpandAntiMatching(): Given an almost-clique that violates Invariant 3, increases size of the colorful anti-matching until respects Invariant 3 again. The subroutine may recolor or uncolor some vertices of in coloring and will return a (possibly empty) list of vertices in which are now uncolored.
Lemma 4.7. Let be an almost-clique in the decomposition violating Invariant 3. The subroutine ExpandAntiMatching() increases size of until it again satisfies Invariant 3 in expected time where is the number of anti-edges added to . This subroutine may recolor vertices of in , while ensuring properness of the (partial) coloring , and creates new uncolored vertices in which it also returns.
The next subroutine is for coloring denser vertices.
ColorDenser(): Given a denser vertex with in some almost-clique , assuming Invariant 3 holds for , it will color by recoloring some vertices of in (without uncoloring any vertex at the end).
Lemma 4.8. Let be a denser vertex with such that Invariant 3 holds for the almost-clique that belongs to. The subroutine ColorDenser() extends the coloring to color as well in expected time by recoloring vertices inside , while ensuring properness of the (partial) coloring , without creating new uncolored vertices.
We also have a subroutine for coloring sparser vertices, which is allowed to fail in certain cases.
AttemptColorSparser(v): Given a sparser vertex with , it either colors in (not ) by potentially uncoloring some denser vertices, or outputs Fail.
Lemma 4.9. For a sparser vertex , subroutine AttemptColorSparser(v) takes time in expectation. If does not have any of Flaw 1 and Flaw 2 under , AttemptColorSparser(v) with high probability colors successfully in without returning Fail. Moreover, this subroutine uncolors at most many denser vertices in expectation.
As stated earlier, subroutines ExpandAntiMatching, ColorDenser, and AttemptColorSparser and their corresponding lemmas are closely related to the work of [FH25] (as well as [BRW25]) and almost (but not entirely) follow from the results there. Since we will be applying them with different guarantees and parameters, we provide their proofs in Sections 6 and 7 for completeness.
New Subroutines
The first new subroutine we need is a way to rather quickly color most uncolored vertices in an almost-clique . This is one of the parts that we deviate from the previous work in [BRW25, FH25] as there is no analogue of this algorithm in those work.
PartialColorOH(K): Given a partially colored almost-clique , it will color all but uncolored vertices of in without recoloring or uncoloring any vertex.
Lemma 4.10. Let be any out-heavy almost-clique in the decomposition with at least uncolored vertices in . Calling PartialColorOH(K) extends the coloring to color all but vertices of in expected time without recoloring or uncoloring any vertex.
Up until now, all subroutines we have are more sublinear time algorithms than dynamic ones in that they do not need to maintain any explicit state and we can analyze their runtime for each invocation directly (although their input is updated dynamically by our main algorithm and their outputs will be used dynamically by other subroutines).
We now get to our final subroutine which is the heart of our new algorithm. This subroutine is called to color sparser vertices when AttemptColorSparser fails to do so. This part entirely departs from prior work in [BRW25, FH25] that relied on execution of sublinear time algorithms such as [ACK19, AY25] and instead handles this part dynamically.
UpdateSparserColor(v): Given a sparser vertex with , it updates the coloring in by recoloring and uncoloring some vertices in and returns the uncolored vertices.
We will not provide a standalone lemma for update time and recourse of UpdateSparserColor as it is closely intertwined with the overall performance of the entire dynamic algorithm. However, the following lemma captures the correctness guarantees we need from this subroutine.
Lemma 4.11. Let with . If UpdateSparserColor(v) terminates, it has recolored or uncolored some vertices in and additionally uncolored some vertices in that it will return, while ensuring properness of the partial colorings and . This subroutine does not color denser vertices in and ensures and agree on recolored vertices (maintains Invariants 1 and 2).
We mention one last subroutine used in UpdateSparserColor and our dynamic algorithm.
SampleColor(v): Given a sparser vertex , it will sample a color from a to-be-determined distribution and set if possible and otherwise . This subroutine might also uncolor some vertices in and returns them.
Lemma 4.12. For any vertex , the subroutine SampleColor(v) takes expected time to sample a color for and it uncolors vertices in expectation.
The last comment is a deterministic upper bound on the worst-case runtime of these subroutines. We need this worst-case runtime bound to prove the high probability argument of Theorem 1.
Lemma 4.13. The worst-case runtime of each subroutine ExpandAntiMatching, ColorDenser, AttemptColorSparser, and PartialColorOH is , where is the number of edges in the graph at the time the subroutine is called.
4.4 The Dynamic Algorithm
We can now present our dynamic algorithm. Note that at the beginning the graph is empty and thus, any coloring is proper. We use the following initialization to simplify the exposition.
Initialization phase: For all , sample and let . Also, with probability , let ; otherwise let .
We can now describe the algorithm (without getting too much into implementation details).
Algorithm 1. Called when is updated in to obtain .
-
Let be the set of blank vertices, initialized to . In lexicographical order of and , call SampleColor for each one that is in . If is inserted, , and set . Add all uncolored vertices to .
-
Update the decomposition and classification by calling Decomposition and do:
(a) For any previously in that now joins , set and add to .
(b) For any previously in that now joins , call SampleColor(v) and if it gets color add it to .
-
While there is a sparser vertex : run AttemptColorSparser(v); if it returns Fail, run UpdateSparserColor(v); add all uncolored vertices to .
-
For any almost-clique violating Invariant 3: run ExpandAntiMatching() and add uncolored vertices to .
-
While there is a denser vertex : run ColorDenser(v).
The following lemma ensures the correctness of Algorithm 1.
Lemma 4.14. Assuming that Algorithm 1 terminates, then with high probability, every update, it maintains a proper -coloring of the underlying graph.
Proof. After Line (1), is a proper partial coloring of and all blank vertices are in . In Line (2), Decomposition correctly updates the sparser-denser decomposition and its classification with high probability by Lemma 4.5 and also, it ensures Invariant 1 is not violated. Line (3) maintains properness of the coloring by Lemma 4.9 and Lemma 4.11 and only finishes when there are no sparser blank vertices left while maintaining Invariants 1 and 2.
Then, running Line (4), by Lemma 4.7, ensures that Invariant 3 holds for all almost-cliques; this is because once an almost-clique has Invariant 3 satisfied it will remain so in this for-loop as ExpandAntiMatching() does not modify vertices outside for each almost-clique . Moreover, by Lemma 4.7 we know this step does not uncolor sparser vertices.
Finally, moving into Line (5) knowing Invariant 3 is maintained, all denser vertices get properly colored by Lemma 4.8. Note that ColorDenser does not uncolor any vertex. Therefore, by the time the algorithm finishes, all vertices are colored and the coloring is proper.
The main part of the analysis is to bound the update time of Algorithm 1 and in particular UpdateSparserColor in the following two lemmas. The proofs appear in the next section.
Lemma 4.15. The total number of uncolored vertices caused by subroutine UpdateSparserColor over updates is at most with high probability.
Lemma 4.16. Throughout running Algorithm 1 over updates, with high probability the time spent on subroutine UpdateSparserColor is time.
4.5 Proof of Theorem 1
We need the following concentration inequality which generalizes Chernoff bound by allowing the distribution in one time step to depend on the outcomes of previous steps (see Section A.4).
Proposition 4.17 ([KQ25, Corollary 11]). Suppose Alice constructs a sequence of random variables , with using the following iterative process. For each , once the outcome of are determined, Alice then selects the probability distribution —as a function of the outcomes of —and is drawn from . The only constraint on Alice is that if we define and , then, for some and , ; that is, the sum of the means of the probability distributions must be at most with probability . If , then for any , we have
In the following lemma we bound the runtime of the remaining subroutines over all updates.
Lemma 4.18. Throughout running Algorithm 1 over updates, with high probability, the time spent and number of uncolored vertices generated by subroutine:
-
AttemptColorSparser is time and vertices;
-
SampleColor is time and vertices;
-
ExpandAntiMatching is time and vertices;
-
ColorDenser is time and zero vertices.
Proof. Proof of all the listed claims follows from similar structure and arguments. We present the proof of (1) completely and postpone proof sketches of the remaining ones to Section A.5 to avoid repetition. Also, as a notation, we let denote the largest number of edges at any point during the updates. Clearly, we have .
Proof of (1): Let be the number of times AttemptColorSparser has been called in updates. For each , let be the random variable showing the time spent on the -th call to AttemptColorSparser and let be the random variable showing the number of uncolored vertices caused by the -th call to AttemptColorSparser.
By Lemma 4.9 we know that and for each . By Lemma 4.13 we know . Also, the number of uncolored vertices is bounded by , that is . Let and . By linearity of expectation, we have
AttemptColorSparser is invoked for a new uncolored sparser vertex. An uncolored sparser vertex is caused either by SampleColor after an update (bounded by ) or by UpdateSparserColor (bounded by by Lemma 4.15). Thus, with high probability .
For each define as the distribution from which is drawn from. We know that this distribution depends on the output of the algorithm at that point as the updates are given by an adaptive adversary. Thus, depends on the value of .
These random variables follow the structure of Proposition 4.17 with parameters and , and, . Therefore, by Proposition 4.17 we get
(by Lemma 4.15 we have )
(as and )
Thus, the total time spent on this subroutine is with high probability. Similarly, we can use the same analysis to bound the number of uncolored vertices by Proposition 4.17 with parameters , , and . We get
(by Lemma 4.15 we have )
Thus, with high probability the total number of uncolored vertices caused by AttemptColorSparser over updates is , concluding the proof of this part.
Proof of Theorem 1. If we run the greedy update time algorithm. For , we set and run Algorithm 1.
By Lemma 4.5, maintaining the decomposition has amortized update time with high probability. By Lemmas 4.16 and 4.18, the time spent on remaining subroutines over updates is
time with high probability, concluding the proof.
5 Update Time Analysis of our Dynamic Algorithm
We now get to the main part of the proof where we use dynamic entropy compression for handling the update time over sparser vertices. In the following, we describe UpdateSparserColor in detail and then move to proving its overall recourse and runtime.
5.1 The UpdateSparserColor Subroutine
The subroutine SampleColor is used to color a single sparser vertex in . Here we present the details of subroutine SampleColor and prove Lemma 4.12.
Algorithm 2. SampleColor(v): With probability sample and go over color class in , and if there is no neighbor of in set (and ) and go over color class in now and uncolor (in ) . In all other cases, let .
Lemma (Restatement of Lemma 4.12). For any vertex , the subroutine SampleColor(v) takes expected time to sample a color for and it uncolors many vertices in expectation.
Proof. Runtime of SampleColor depends only on the size of the color classes it searches. As is sampled uniformly at random, then in either of and , and therefore the expected runtime of SampleColor is . Moreover, SampleColor might only uncolor vertex and if not, it might uncolor neighbors of in in . As there are at most neighbors in and is uniformly sampled from , then the expected number of vertices that might get uncolored in is , concluding the proof.
Since existence of any of Flaw 1, 2 for a vertex is a function of the coloring of its neighbors, to fix these flaws, we need to recolor the neighbors of . This is the role of the following subroutine which is the key subroutine in UpdateSparserColor.
Algorithm 3. Resample(v): For (in lexicographical order), call SampleColor(u).
The following lemmas capture the main probabilistic guarantees when we sample colors for vertices using SampleColor. The first lemma is a generalized version of bounding the probability of Flaw 3 remaining to hold for a vertex after a call to Resample. The proof is a simple application of Chernoff bound and is postponed to Section A.6.
Lemma 5.1. Fix a vertex along with a set and a time associated to each vertex . Suppose for every , with probability , we sample a color and assign it to iff: (1) the color , and (2) no neighbor with or with lower lexicographical order when has also sampled this color. All other vertices are marked blank. Let be the partial coloring function obtained this way. Then,
The second lemma applies to vertices that have enough available colors (we will come back to this condition soon when defining Flaw 3). We prove that when vertices in a neighborhood of a vertex do not have many blocked colors, sampling their colors according to SampleColor can ensure does not satisfy Flaw 1 or Flaw 2 with high probability.
Lemma 5.2. Let be sufficiently small. Fix a -sparse vertex with along with a set and a time associated to each vertex such that . Suppose for every , with probability , we sample a color and assign it to iff: (1) the color , and (2) no neighbor with or with lower lexicographical order when has sampled this color. Let be the partial coloring obtained this way. Then,
The proof of this lemma is detailed and technical, and is closely related to the proofs of similar results in prior work [MR97,MR02,ACK19]; to avoid distracting from the main argument, we defer the proof of Lemma 5.2 to Section A.7.
We are now ready to describe the UpdateSparserColor algorithm itself. Recall that the goal of this algorithm is to ensure a given sparser vertex v does not have Flaw 1 or Flaw 2.
Algorithm 4. UpdateSparserColor(v): Run AttemptColorSparser(v), if it returns Fail run Resample(v) and in case call PartialColor0H(v); otherwise terminate and return all uncolored vertices.
Lemma (Restatement of Lemma 4.11). Let with . If UpdateSparserColor(v) terminates, it has recolored or uncolored some vertices in and additionally uncolored some vertices in that it will also return, while ensuring properness of the partial colorings and . Moreover, this subroutine does not color denser vertices in and ensures and agree on recolored vertices (maintains Invariants 1 and 2).
Proof. The algorithm returns all vertices that receive a new color or get uncolored in during UpdateSparserColor and ensures for each , maintaining Invariant 2.
By construction, the subroutines Resample only colors the sparser vertices, and the subroutines PartialColor0H assigns colors to vertices only in , consequently maintaining Invariant 1.
Moreover, whenever a vertex is colored in in a call to Resample, the color is from . By construction, all neighbors of that have the same color under are subsequently uncolored, thereby preserving the properness of both and . The subroutines AttemptColorSparser and PartialColor0H only recolor vertices in . Since and agree on all vertices colored under and each subroutine either assigns an available color to a vertex or uncolor one endpoint of new monochromatic edges, these subroutines also preserve the properness of both colorings.
The subroutines Resample and PartialColor0H are always invoked consecutively. Therefore, we analyze them jointly. We first prove that if then Resample(v) result in most vertices of to get uncolored.
Claim 5.3. For after Resample(v) at least vertices of are uncolored in .
Proof. When Resample(v) is called, every vertex receives the color with probability at least , independently of the others.
By properties of almost-cliques, has at least neighbors in . For , let be the indicator random variable that the -th neighbor of in becomes blank during Resample(v), and let
We have
Since and are sufficiently small and we get . By Chernoff bound (Proposition 2.1), we obtain
Therefore, as without loss of generality we assumed (see after Theorem 1), with high probability , concluding the proof.
The following lemma allows us to bound the runtime of UpdateParserColor based on the number of times it invokes the subroutine Resample.
Lemma 5.4. A call to Resample(v) for , together with a subsequent call to the subroutine PartialColorOH() when , has expected running time .
Proof. Each call to Resample samples a color for at most neighbors. To determine whether a sampled color is available, the algorithm searches the corresponding color class. Since the expected size of a color class is , a call to Resample takes expected time .
By Claim 5.3, contains at least uncolored vertices after the call to Resample(v) with high probability. Therefore, the assumptions of Lemma 4.10 are satisfied, and the subsequent call to PartialColorOH() has expected running time .
Combining the above two yields a total expected runtime.
It is not enough to bound the runtime of Resample and PartialColorOH given that they uncolor vertices which need to be handled later. In order to account for these uncolored vertices, we need the following definition which we then show is a proxy to the number of vertices they uncolor.
Definition 5.5. For each , define function as below
The following lemma allows us to bound the total number of uncolored vertices caused by UpdateParserColor based on the number of times it invokes the subroutine Resample.
Lemma 5.6. A call to Resample(v) for , together with a subsequent call to the subroutine PartialColorOH() when , uncolors vertices in expectation.
Proof. If , then Resample(v) may modify the colors of all neighbors of . By Lemma 4.12, for each , the call to SampleColor(u) inside Resample(v) might cause only additional vertices to become uncolored in expectation. In addition, vertices in may become uncolored directly by Resample. Since , the number of vertices that can become uncolored is at most in expectation.

Figure 5: For an out-heavy vertex , after running and then the possible uncolored vertices are either in (I) vertices uncolored by in or (II) the vertices in the neighborhood of the ones in that steal their colors, or (III) set which shows the vertices left uncolord by in .
Suppose instead that . By Claim 5.3, we have that after running the almost-clique has at least many uncolored vertices with high probability and therefore satisfies the assumptions of Lemma 4.10. Hence, by Lemma 4.10, at most vertices of remain uncolored after terminates.
Furthermore, modifies the colors of vertices in . Since has at most neighbors outside of , the number of vertices outside that may be uncolored directly by is at most . Additionally, if a vertex gets recolored by , then in expectation many vertices in have the same color and become uncolored in ; resulting in many uncolored vertices in expectation (see Figure 5).
Let be the set of vertices inside that have received a color by . We showed above that each recolored vertex may cause only additional vertices to become uncolored in expectation. However, any vertex that becomes uncolored inside is subsequently handled by , which leaves at most vertices uncolored. Therefore, it suffices to account for vertices that become uncolored in for each .
For a vertex , the probability that its sampled color is used by a vertex in is at most . By linearity of expectation
(as )
where the last inequality follows from . Thus, in this case at most many vertices are uncolored in expectation.
Consequently, the total number of uncolored vertices by the joint execution of and is in expectation
concluding the proof.
5.2 Avoiding Yet Another Flaw
Recall the discussion before Lemma 5.2: a property we would need in our algorithm is that in the coloring , the number of blocked colors for each vertex is not too large. This is guaranteed by Lemma 5.1 for a vertex right after a call. But, we would like to maintain this property in the algorithm for all vertices and at all times.
Given the above discussion, we define the following additional flaw.
We should note that unlike Flaw 1 and Flaw 2, our aim is to maintain the graph free of Flaw 3 (or at least some approximation of it) at all times.
We can test if a vertex has this flaw quickly (with high probability) using the following lemma.
Lemma 5.7. For any sparser vertex , if has , then will return with high probability. Conversely, if is far from having , then will output with high probability. Moreover, the running time of is with certainty.
We prove this lemma by a simple sampling argument and standard concentration inequalities. We postpone this proof to Section A.
The way to fix a vertex with a is to simply call (as proven Lemma 5.1). We can analyze the time spent for these calls subsequently in our proof. But, the catch is how to find vertices that violate this flaw? We do this next.
Checking for Flaw 3. We have one final subroutine, called , whose goal is to handle this task. The idea behind is to use a “lazy” checking combined with in Lemma 5.7. A difference of with our other subroutines is that we do not run this sequentially with other subroutines but rather it is always running in the background; think of as being called in multiple of our other subroutines as we will describe below. Although, to avoid the clutter in our algorithms’ description, we do not explicitly write these calls to inside them and only here specify how they should be.
Specifically, whenever any vertex changes color in , or joins or leaves , or adds and deletes an edge to another vertex (basically whenever or changes), we call :
Algorithm 5. CheckFlaw3(v): For any vertex , with probability , run , and if it returned , call ; go back to step.
Again, we emphasize that from now on, we consider as having been incorporated in all our algorithms that deal with without us including this part to each one explicitly.
The following lemma shows can actually be implemented quite fast when it does not call .
Lemma 5.8. A call to take time with high probability ignoring the time spent per calls.
Proof. Recall that is a constant. An easy application of Chernoff bound proves that , with high probability, only ever needs to check of neighbors of for ; thus, even though the algorithm is stated as a for-loop, we can first sample the names of these vertices (from the proper distribution), and then jump directly to testing those vertices instead of looping through all neighbors. Since the runtime of is with certainty (by Lemma 5.7), we obtain the final bound.
The following lemma captures the correctness of .
Lemma 5.9. Throughout the first polynomially many calls to , with high probability, is called on any vertex before ever.
Proof. Fix any vertex and suppose has been called at some time step and it output Pass. By Lemma 5.7, we know that at this point assuming correctness of . Now consider the changes in the neighborhood of that can affect ; anytime such a change happens, tosses a coin to re-run with probability . This implies that before another changes to happens, with high probability, again will be called. Conditioned on this, we can conclude that between any two calls to , there can be at most changes to which implies that as long as does not output wrong, vertex should never have before is called (and the algorithm goes into a go-back loop of running again). As such, since first polynomially many calls to succeed with high probability, a union bound over all vertices and calls to concludes the proof.
Lemma 5.9 allows us to maintain a state of being approximately Flaw 3-free at all times.
5.3 Dynamic Entropy Compression: Bounding Number of Calls to Resample
We are now ready to analyze the runtime and recourse of , throughout all updates of our algorithm. The key is to bound the “cost” the calls to and throughout all updates. We use dynamic entropy compression for this, following the description in Section 3 (with various changes for the formal proof).
Maintaining a log. We need to record an accurate journal of the algorithm in order to account for all possible sequence of events that result in many calls to . We do this by maintaining a log which records every update to the graph along with the changes applied to the decomposition and every call to throughout the execution of Algorithm 1. Every entry of this log is of one of the following forms:
-
: which records the -th update to the graph for some integer , where the edge is either inserted or deleted according to the sign .
-
: which records the -th call to for some integer , called on vertex , and if the call was from and if it came from .
-
: which represents the -th change applied to the decomposition as a tuple which shows a vertex that have moved in the decomposition and the new set it belongs to (which is either or ).
Note that each update incident on sparser vertices causes a call to SampleColor in Algorithm 1. Thus, as we are recording the updates in the log, we can also recover these calls to SampleColor as well (this also holds for the moves between and in the decomposition that are logged).
Using the construction of this log and given the number of updates, total changes applied to the decomposition, and the calls to Resample, one can bound the number of possible logs as below.
Claim 5.10. The number of distinct logs containing updates, changes to the decomposition, and calls to Resample is at most .
Proof. For each there are at most many different content for the bits of record as there is choice for each endpoint of the edge and 2 choices for insertion or deletion. And for each there are at most different content possible for as there are possible choices for and 2 choices for the line on which Resample was called. Each change to the decomposition is written as a tuple of a vertex and its corresponding set, so there are different possible contents for each tuple (assuming each set of the decomposition is represented by one of its vertices).
As all possible arrangements between , , and is at most , we get that the number of possible distinct contents for such log is at most
The inequality is true as , for integers and , concluding the proof.
Claim 5.10 bounds the number of possible logs. However, this is not enough for our purpose as not all logs have equal “cost” in terms of update time and recourse. To measure this cost, we extend the definition of cost of vertices to logs as well. Formally, we define the cost of a log as follows.
Definition 5.11 (Cost of a log). For a fixed log with as its set of recorded calls to Resample, let denote the vertex written in . Define to be the set of indices such that parameter of is ‘U’ (so sourced from UpdateSparserColor) and the set as the set of indices referring (so sourced from CheckFlaw3). Define
Random table of assignments. In order to analyze the behavior of the algorithm we need to control the randomness used in the calls to SampleColor and therefore Resample. We simulate all random bits used in these calls via a table of random assignments
where each entry contains a tuple whose first element is 1 with probability and 0 otherwise, and whose second element is drawn uniformly at random from .
We may assume the entries of are sampled before the algorithm begins. That is, instead of sampling new randomness each time SampleColor is called, the algorithm samples a table of assignments uniformly at random at the beginning and uses its randomness throughout. Note that all changes to , for vertices currently inside , comes through calls to SampleColor (when a vertex moves from to , the algorithm immediately sets ). The algorithm will then use this random table of assignments as follows:
-
The initial color assigned to a vertex is determined by : if the first element of is 0, then ; otherwise, is assigned the color given by the second element of (same as in the initiation phase of Section 4.4).
-
After starting the algorithm, each call to SampleColor consumes fresh randomness in the table, that is, it uses a cell in that has not been used (or even read) up to that point. Consequently, each call to Resample() for some consumes fresh randomness for every vertex . We simulate this by advancing to the next unused entry in row of (see Figure 6).
-
Let denote the number of times that SampleColor() has been called on by the time the algorithm reaches the call , i.e. the -th call to Resample as recorded in . We can recover this information from the log directly.
| v1 | (0, 4) | (1, 3) | (1, 2) | (1, 5) | (1, 4) | ... |
|---|---|---|---|---|---|---|
| v2 | (1, 3) | (1, 2) | (0, 2) | (0, 4) | (1, 4) | ... |
| v3 | (1, 2) | (0, 1) | (0, 3) | (1, 3) | (1, 2) | ... |
| v4 | (0, 5) | (1, 5) | (1, 4) | (0, 2) | (0, 3) | ... |
| v5 | (0, 2) | (0, 3) | (0, 1) | (1, 2) | (1, 5) | ... |
(a) Before calling Resample(v).
| v1 | (0, 4) | (1, 3) | (1, 2) | (1, 5) | (1, 4) | ... |
|---|---|---|---|---|---|---|
| v2 | (1, 3) | (1, 2) | (0, 2) | (0, 4) | (1, 4) | ... |
| v3 | (1, 2) | (0, 1) | (0, 3) | (1, 3) | (1, 2) | ... |
| v4 | (0, 5) | (1, 5) | (1, 4) | (0, 2) | (0, 3) | ... |
| v5 | (0, 2) | (0, 3) | (0, 1) | (1, 2) | (1, 5) | ... |
(b) After calling Resample(v).

(c) The Graph
Figure 6: The table show the random table of assignments for the graph in Figure 6c where all its vertices are in at this point of time. The bold boxes show the “Index” of each vertex at the current state. The first (yellow) column shows the initial colors assigned to the vertices.
Using as the source of randomness for Resample does not affect the behavior of the algorithm. As all entries are mutually independent, we may therefore assume that Algorithm 1 draws the randomness that it needs for calls to Resample and SampleColor from , as described above.
By Lemma 4.9, we know that the subroutines AttemptColorSparser correctly detect flaws with high probability. This is similarly true for Lemma 5.7 and TestFlaw3. Finally CheckFlaw3 also does its job correctly with high probability by Lemma 5.9. By a union bound over the first polynomially many calls to them, these guarantees continue to hold. Define the following event:
We can condition on and fix randomness of these three subroutines (without Resample calls inside the last one) and treat them as deterministic in the remainder of the analysis. The randomness of SampleColor and therefore remain entirely independent.
Consistency of a log with Algorithm 1. We say that a log is consistent with the random table if, when Algorithm 1 is executed using the randomness stored in , it invokes the subroutine Resample exactly as recorded in . Formally, let denote the -th Resample record in , say, Resample(). Then is consistent with if, at the time of , the randomness in certifies the flaw responsible for that invocation:
-
if logs a call to Resample with , then is far from having Flaw 3, and
-
if logs a call to Resample with , then has one of Flaw 1 or Flaw 2.
This notion allows us to reduce the analysis to bounding the probability that a fixed candidate log is consistent with the random table, and then union bounding over all logs.
To verify consistency, it suffices to reconstruct the state of each recorded vertex immediately before the corresponding call to Resample. The decomposition stored in the log uniquely determines the neighborhood of and following the log and using A we can determine the current coloring in the neighborhood of and check the consistency.
This definition immediately implies the following observation.
Observation 5.12. A log L of an execution of Algorithm 1 using A is consistent with A.
For each record and sparser neighbor , consider the mapping
This mapping is injective by the definition of : every call to Resample consumes fresh randomness for each participating vertex and advances the corresponding index. Consequently, no entry of is associated with two distinct pairs . Thus, for a fixed log , every recorded call accesses a unique collection of random-table entries.
We bound the probability that a fixed log with “large cost” is consistent with the random table. Let L be a fixed log describing resampling records . By chain rule,
when we condition on , we can even all the randomness used by the algorithm before the call to . Therefore, it suffices to bound each conditional probability
that is, conditioned on all earlier randomness from A used by the algorithm prescribed by the log, we bound the probability that the next recorded call is also justified by the randomness in A.
Lemma 5.13. Given updates on the graph, a random table of assignments , and a fixed log with the same updates and set of its records for calls to Resample, let be the vertex in for each ; then the following holds:
- If and is called with ,
- If and is called with ,
- If and is called with ,
Proof. Throughout the proof we assume everything is calculated conditioned on .
Case 1: is called with .
As we conditioned on , this case happens only when is not far from having Flaw 3. Therefore, conditioned on the randomness , the probability that occurs is at most the probability that is not far from Flaw 3, conditioned on the coloring outside of .
Let denote the collection of most recent randomness used by vertices in . By the definition of , the mapping
is an injection over . Consequently, the randomness of each corresponds to distinct entries of and are therefore independent.
Moreover, the condition can only reveal information about randomness outside of , and thus can only fix the coloring outside of . By construction, the random entries in are distributed exactly as the randomness used by SampleColor (and thus also Resample()).
The content of was sampled by a call to SampleColor(u) at some time . At this time , there were some colors that were not available for to keep: (1) colors used by sparser neighbors of under or (2) colors sampled and retained at the same time by a vertex with lower lexicographical order. Let be the set of these colors that are not available to .
Consequently, we can apply Lemma 5.1 as vertices in follow the same process for sampling colors. Specifically, even though a vertex may have sampled its color at time and the decision to retain that color is taken at that time, the color of at the time we are checking and is the same, as all changes to colors of can only be done through SampleColor(u) (thus, the coloring , restricted to , at this time is the same as the coloring of the lemma). As such, we obtain that
Equivalently, the probability that is not far from Flaw 3 is at most . Therefore,
Case 2: is called with .
Under the condition , the probability that is consistent with is at most the probability that has Flaw 1 or Flaw 2. This is because AttemptColorSparser() is invoked immediately before this call to Resample. Consequently, if has neither Flaw 1 nor Flaw 2, then by the conditioning we have, AttemptColorSparser would color in , and the call to Resample would not occur. Moreover, we have conditioned in that no vertices having colored_{\varphi^\star}(u) > 5\delta\Delta$at any point until now.
Similar to the previous case, we know that fixes the randomness sampled up to this point, except for the most recent randomness corresponding to as described above. For each let be the last time SampleColor(u) was called and define as its blocked colors at time . By our conditioning earlier, we know that at time .
Therefore, the random colors corresponding to random bits of follow the same process as Lemma 5.2. As argued above, the random bits in are mutually independent and conditioning on only fixes randomness used outside and consequently fixes the blocked sets.
Recall that a vertex has Flaw 1 when and . Moreover, we know that is -sparse for small constant and we have defined
. If then does not have Flaw 1 with certainty. Thus, assuming , using Lemma 5.2 with we have (again, notice that of that lemma corresponds to here by our argument earlier that the colors in have not changed since their sampling time),
Similarly a vertex has Flaw 2 if and By definition of cost for we have . Therefore, by Lemma 4.4, we get that each is -sparse. Hence, given with , by Lemma 5.2 for we have
concluding the proof.
We can now bound the probability that an entire specific log L is consistent with the table.
Lemma 5.14. For a random table of assignments A, the probability that a given fixed log L becomes consistent with A, conditioned on , is at most .
Proof. Throughout this proof we assume everything is calculated conditioned on .
Let be the set of records in for calls to Resample. For each , let be the vertex on which was called for. We assume conditioning on throughout this proof and avoid writing it repeatedly. We already saw that by chain rule,
Let be the set of indices where is called with of UpdateSparserColor. And let be the ones with . By Lemma 5.13, for each we have
and for each we have
Combining the above inequalities, we have
Therefore, by definition of we can conclude that
We now prove that over t updates, is limited with high probability.
Lemma 5.15. If L is a log created through the execution of Algorithm 1 over t updates with d changes to the decomposition, we have
Proof. In this proof we condition on the event and avoid writing it repeatedly.
Assume is the table of random assignments used by Algorithm 1. By Lemma 5.14, we saw that given a fixed log with , the probability that this log becomes consistent with , and therefore is a possible log for the algorithm, is at most .
Let be the set of all possible logs with cost exactly and calls to resample over updates with many changes to the decomposition. Using union bound we have
(by Lemma 5.14)
We next bound the number of possible pairs consisting of a log and its corresponding cost value when there are updates, changes in decomposition, and calls to Resample.
By Claim 5.10 we know that there are at most many logs with updates, changes in decomposition, and calls to Resample.
Consider a fixed log. By Definition 5.11, each call to Resample contributes either a fixed quantity (if it is invoked with ) or a quantity of the form (if it is invoked with ) to .
If , then , while if , then . Consequently, each call to Resample can contribute at most
different values to the cost, where the additional two possibilities account for the fixed contribution and the value . Therefore, for a fixed set of calls to Resample recorded in a log, the number of possible values of is at most
Combining this with the bound on the number of logs, the total number of possible pairs is at most
As each has , by definition of for some with many calls to Resample, we know that
as . Therefore, the union bound can be stated as below
where the last inequality is true as the first term in the geometric series is which dominates the other terms, concluding the proof.
5.4 Proof of Lemmas 4.15 and 4.16
We are now ready to bound the number of uncolored vertices caused by UpdateSparserColor and subsequently its total runtime. We emphasize that since we are running CheckFlaw3 in the background, we have to be extra careful with analyzing its runtime and recourse. However, at least for the recourse, CheckFlaw3 does not change any of the colorings and instead interacts with through calls to Resample which we are accounting for here.
Lemma (Restatement of Lemma 4.15). The total number of uncolored vertices caused by subroutine UpdateSparserColor over t updates is at most with high probability.
Proof. Let L be a log created after running Algorithm 1 over t updates.
By Lemma 4.5, maintaining the decomposition has amortized update time and recourse, and the number of almost-cliques that change from one set of the -classification into another set is amortized . As each almost-clique contains at most vertices, the amortized number of vertices that change sets is . Therefore, up to the end of the first two lines of Algorithm 1 after a single update the runtime is and the number of uncolored vertices is
By Lemma 5.6 we know that for each joint call to Resample(v) and PartialColorOH(K(v)) (if we just consider the first subroutine), the number of uncolored vertices caused by them is in expectation. On the other hand, by definition of cost we have
where is the vertex recorded in . Therefore, the total uncolored vertices caused by the subroutine UpdateSparserColor over updates, according to is at most in expectation.
Throughout running Algorithm 1 over updates, let be the vertex on which the -th call to Resample was invoked. Define to be the random variable showing the number of uncolored vertices caused by the -th joint call to Resample and PartialColorOH (if ). We know by Lemma 5.6 that . Note that depends on the graph at that point and also which depends on the outcome of the algorithm up to this point. Define as the distribution on which is drawn from where this distribution depends on the outcome of the algorithm up to this point, and therefore depends on the values of .
As PartialColorOH deterministically leaves at most many vertices uncolored and Resample recolors at its neighbors where each can also result in uncoloring their neighbors with the same color in , therefore we always have where is the maximum number of edges that are present in the graph after some update.
Let for whatever value has on this execution of the algorithm. For some fixed and by linearity of expectation we have . However, we do not have a fixed and this is also determined by the output of the algorithm. By Lemma 5.15, for some created over updates which contains changes of decomposition recorded, we have
and by Lemma 4.5 we know , thus we have
Therefore, all random variables follow the same structure as stated in Proposition 4.17 with parameters (as each ), , and . Consequently, with ,
Finally, we know that holds with high probability over updates. Therefore, as we always have , there are uncolored vertices caused by UpdateSparserColor over updates with high probability. ■
Next, we prove the bound on total runtime of UpdateSparserColor. Here, we have to account for the runtime of CheckFlaw3 in the background as well.
Lemma (Restatement of Lemma 4.16). Throughout running Algorithm 1 over updates, with high probability the time spent on subroutine UpdateSparserColor is time.
Proof of Lemma 4.16. To bound the time spent on UpdateSparserColor, we bound the time spent on its subroutines. That is AttemptColorSparser, TestFlaw3, Resample, and PartialColorOH plus separately accounted for CheckFlaw3.
- Runtime of Resample and PartialColorOH: For the -th call to Resample and PartialColorOH (if the input vertex is in ), define be the time spent on this call. By Lemma 5.4 we know that . Moreover, because we can check at most all neighbors of all vertices. If the log constructed by the algorithm is and it has calls to resample, by Definition 5.11 we know that . If , then . By Lemma 5.15, if the created over updates contains changes of decomposition, we have
and by Lemma 4.5 we know , thus we have
Therefore, all random variables follow the same structure as stated in Proposition 4.17 with parameters (as each ), , and . Consequently, with we get
We know that with high probability holds over updates and setting and we get that with high probability the total time spent on the joint calls to Resample and PartialColorOH over updates is time.
-
Runtime of TestFlaw3: As each UpdateSparserColor(v) is invoked when v had a flaw, therefore at least one call to Resample is invoked inside UpdateSparserColor to resolve the flaw. Thus, we can bound the number of calls to UpdateSparserColor by r. For each UpdateSparserColor, there are at most calls to subroutine TestFlaw3 that do not result in a call to Resample, and all the other calls to TestFlaw3 are accompanied with a Resample and can be bounded by r. As there are at most r many calls to UpdateSparserColor, then TestFlaw3 is called at most times over all updates. By Lemma 5.7, each call to TestFlaw3 takes time. Therefore, the total time spent on this subroutine is . As (argued earlier) and since with high probability by Lemma 5.15, we have with high probability.
-
Runtime of AttemptColorSparser invoked inside UpdateSparserColor: We know that the subroutine AttemptColorSparser is invoked at most once in UpdateSparserColor. Moreover, if there are calls to Resample recorded in the log, then there are at most calls to UpdateSparserColor, and therefore calls to AttemptColorSparser inside this subroutine.
Redefine to be the time spent on the -th call to AttemptColorSparser. By Lemma 4.9 we know that for each . Also, by Lemma 4.13 we have . And if , we know that . By Definition 5.11 we have and by Lemma 5.15 and Lemma 4.5 with high probability . Thus, using the same argument as above, we get that the total time spent on this subroutine is with high probability.
- Runtime of CheckFlaw3 in the background: By Lemma 5.8, the time to run CheckFlaw3 with high probability is once we ignore Resample calls (which we already accounted for). The number of calls to CheckFlaw3 include for the updates to the graph and for the changes in the decomposition, plus every call to SampleColor. These themselves can be split into calls to SampleColor outside and inside Resample. The outside calls are similarly upper bounded by whereas in the inside calls are at most per each of many Resample calls (the bound on the Resample is calculated above a few times already). By Lemma 5.15, we have and by Lemma 4.5, , both with high probability. Thus, the total runtime in this step is
Therefore, the total time spent on UpdateSparserColor is
6 Handling Remaining Sparser Vertices
We now describe and analyze the AttemptColorSparser and PartialColorOH subroutines.
6.1 The AttemptColorSparser Subroutine
We use the following subroutine to color in any sparser vertex that does not have Flaw 1 or Flaw 2 and is blank in .
Algorithm 6. AttemptColorSparser(v):
- For to trials:
(a) Sample a color uniformly at random.
(b) Iterate over all vertices in under and if any is a sparser neighbor of continue to the next iteration of for-loop. Otherwise, set , uncolor the denser neighbors with color in , return Success, and terminate.
- If did not terminate until now, return Fail.
Lemma (Restatement of Lemma 4.9). For a sparser vertex , AttemptColorSparser(v) takes time in expectation. If does not have any of Flaw 1 and Flaw 2 under , AttemptColorSparser(v) with high probability colors successfully in without returning Fail. Moreover, this subroutine uncolors at most many denser vertices in expectation.
Proof. For a random color , size of is at most in expectation. Therefore, checking availability of each color takes time in expectation. As we have trials, the expected runtime of AttemptColorSparser is ( is constant).
Assuming vertex does not have any of Flaw 1 and Flaw 2, then if we either have or . If then, there are at least colors not used by any neighbor of . This is because, the value of shows the minimum number of available colors left for even when all vertices of receive distinct colors by . If , then there are at least many colors that are not used by any sparser neighbor of .
Thus, the probability that does not get colored in AttemptColorSparser is at most
Similarly, when , assuming does not have Flaw 2 we have or and thus, there are at least colors not used by any sparser neighbor of in , therefore we have
Therefore, with high probability successfully gets colored in AttemptColorSparser.
As a random color is used by denser neighbors of in expectation, uncolors at most denser neighbors in expectation.
We also prove the worst-case runtime of this subroutine with the bound mentioned in Lemma 4.13.
Proof of Lemma 4.13 for AttemptColorSparser. In AttemptColorSparser(v), as an alternative to checking color classes we can always check the color of all neighbors of v. Whenever the runtime of AttemptColorSparser(v) reaches the limit of m, go over all neighbors of v (which is trivially bounded by the number of edges). Thus, the total runtime is in the worst-case.
6.2 The PartialColor0H Subroutine
The subroutine PartialColor0H is called when an almost-clique have many uncolored vertices. The algorithm uses random color trials to color uncolored vertices in K.
Algorithm 7. PartialColor0H(K):
-
Let be the set of uncolored vertices in .
-
While , let be a vertex maximizing , and do:
(a) Run RandomColorTrial(v), and remove v from B.
Lemma (Restatement of Lemma 4.10). Let be any out-heavy almost-clique in the decomposition with at least uncolored vertices in . Calling PartialColor0H() extends the coloring to color all but vertices of in expected time without recoloring or uncoloring any vertex.
Proof. For each , by definition, we have
Averaging this inequality over all yields . Since , we have . Thus, we have
Initially, and , hence the number of initially colored vertices in is at most .
Let and be all vertices in the initial set in non-increasing order of . We have . Since is the average of all out degrees in , at least half of the vertices have . Thus, there are at most many indices such that . Let denote the set of vertices remaining in at the time is processed. When PartialColor0H reaches , we have
This is because all the colored neighbors of are in the set .
Case 1: For an index , we know
(as initially colored vertices in are at most , and )
Therefore these vertices have at least many available colors. Consequently, as the algorithm runs RandomColorTrial, by Proposition 2.2 the time spent for each of these vertices is in expectation.
Case 2: For an index , we know that . At the time is processed,
(as and by Eq (2))
(as )
In particular, the success probability of a random color trial is at least
Thus, the expected number of samples needed is . We continue this process as long as , ensuring that sufficient available colors remain. Consequently, at most vertices in remain uncolored.
Finally, as the algorithm uses RandomColorTrial, by Proposition 2.2, the time spent for the i-th vertex is in expectation. Therefore, the expected running time is
(as )
where we get the final bound by the bounds on harmonic series, concluding the proof.
We also prove the worst-case runtime of PartialColorOH with the bound mentioned in Lemma 4.13.
Proof of Lemma 4.13 for PartialColorOH. In PartialColorOH(K) for some almost-clique K, as an alternative to checking color classes in RandomColorTrial we can always check the colors used on endpoints of all edges incident on every vertex . Therefore, we can deterministically find an available color for each of them. Whenever the runtime of PartialColorOH(K) reaches the limit of m, we can stop the algorithm and go over all edges to do so. Thus, the total runtime is in the worst-case.
7 Handling Dense Vertices
In this section, we fill out the remaining parts of the proof of Theorem 1 by describing and analyzing how the algorithm handles denser vertices. This part of the proof is similar to the approach of [FH25] and we borrow many ideas from that work. We provide these parts mainly for completeness as the way the algorithm of [FH25] and ours are structured globally is quite different and thus we need to carefully modify different steps in [FH25] to make sure they work for us as well.
Before moving on to the details of the subroutines, we note that throughout Algorithm 1 we maintain the following related data structures:
-
An array matched for all matched vertices in colorful anti-matching(Definition 4.6; see also Invariant 3), where for each vertex , if is unmatched we have and if it is matched to some vertex we have .
-
A list of available colors for each almost-clique , which shows all the colors in that is not used by any vertex in .
Note that both of these data structures can be updated in constant time throughout Algorithm 1 whenever a vertex is assigned a new color.
7.1 The ExpandAntiMatching Subroutine
The goal of ExpandAntiMatching is to ensure Invariant 3 holds for a given almost-clique .
Algorithm 8. ExpandAntiMatching(): for ensuring Invariant 3 for an almost-clique .
- While do the following:
(a) Sample an anti-edge from anti-edges in uniformly at random. If is incident on , repeat this step, otherwise continue.
(b) Sample a color uniformly at random. Go over all vertices with color to check if (1) is used on more than one vertex in , or (2) is used to color a vertex ; if so, repeat this step, otherwise continue.
(c) Color , add to and if there is a single vertex with color , uncolor to .
- Return all uncolored vertices.
This can be done by sampling proportional to , and picking a non-edge from uniformly.
Given Algorithm 8, we can now restate and prove Lemma 4.7.
Lemma (Restatement of Lemma 4.7). Let be an almost-clique in the decomposition violating Invariant 3. The subroutine ExpandAntiMatching() increases size of until it again satisfies Invariant 3 in expected time where is the number of anti-edges added to . This subroutine may recolor vertices of in , while ensuring properness of the (partial) coloring , and creates new uncolored vertices in which it also returns.
Proof. Each time the while-loop proceeds, we have . Also, we know there are total of many anti-edges inside . Moreover, as each vertex has at least neighbors in and , then each matched anti-edge inside is incident on at most other anti-edges, which means the total number of anti-edges incident on the anti-matching is at most
where the last inequality holds as . Therefore, for small enough , at least half of the anti-edges inside can be added to the matching as they are not incident on . Thus, ExpandAntiMatching finds such anti-edge in expected constant time. Also, after sampling an anti-edge , we can check if any of its endpoints are matched using the data structure matched in constant time.
After finding a proper anti-edge that is not incident on , the algorithm samples a color and checks if it is used by any vertex in or by more than one other vertex in . This can be done by going over the color class in expected time. Moreover, there are at most many colors used by more than one vertex in and by properties of almost-cliques we have . Therefore, there are at least available colors for small enough . Consequently, by Proposition 2.2 we find such proper color in expected time.
After successfully finding a color , there is at most one vertex which we have to recolor in order to ‘steal’ its color and add to the matching. Therefore, ExpandAntiMatching spends expected time to increase by one and uncolors at most one new vertex. Therefore, if ExpandAntiMatching increases by , the expected runtime is and the expected recourse is at most , concluding the proof.
We also prove the worst-case runtime of this subroutine with the bound mentioned in Lemma 4.13.
Proof of Lemma 4.13 for ExpandAntiMatching. We can increase the size of the anti-matching by going over all edges and finding the ones that are incident to vertices in the almost-clique . As a consequence we will find anti-edges in and the colors incident on them. Therefore, we can extend the matching size by picking an available color for an anti-edge that is not incident on .
Thus, whenever the runtime of AttemptColorSparser(v) reaches the limit of , we go over all edges and do as described above and the total runtime is in the worst-case.
7.2 The ColorDenser Subroutine
Finally, we have the ColorDenser subroutine that, assuming Invariant 3, can color all remaining dense vertices. For each almost-clique , vertices
are called inliers and the remaining vertices are called outliers. This subroutine treats outlier and inlier vertices separately.
Algorithm 9. ColorDenser(v): for coloring dense vertex v.
-
Let . If and , sample a color uniformly at random. Go over all vertices with color to see if there is any in ; if so repeat this step, otherwise set and terminate.
-
If and , go over all neighbors of in and find a color . Set and terminate.
-
Otherwise, if is an outlier, sample a color uniformly at random, repeat this steps until a color that is accepted by all of (R1)–(R3) is found:
(R1) If , reject and return to step 3.
(R2) If there exists with , reject and return to step 3.
(R3) If , reject and return to step 3.
- Once is accepted, set . Then, go over the color class of , if there exists a vertex with , let and call ColorDenser(w).
All (R1)–(R3) can be checked by going over the vertices in color class
Given Algorithm 9, we can now restate and prove Lemma 4.8.
Lemma (Restatement of Lemma 4.8). Let be a denser vertex with such that Invariant 3 holds for the almost-clique that belongs to. The subroutine ColorDenser(v) extends the coloring to color as well in expected time by recoloring vertices inside , while ensuring properness of the (partial) coloring , without creating new uncolored vertices.
Proof. We first consider the case where is an inlier and . We bound the number of colors available for inside that is not used by any vertex in . As denotes the set of colors not used by vertices in we have,
Since itself is currently uncolored, the number of distinct colors used on is at most , as denotes the set of repeated colors in . Therefore,
Using the fact that , we obtain
where the last inequality uses .
By Invariant 3, we have . Since is an inlier, , and thus the above quantity is at least . Hence, there are at least many available colors for and in expectation after many trials we sample an available color for . Each color class has expected size , therefore by Proposition 2.2 this step takes in expectation.
When and , we know that therefore we can go over all vertices in and find the first available color in in time. Similar to above, we have
We know by Invariant 3 that and as we have . Hence, there exists a color that is not used by any vertex in , and we can assign to .
Next, consider the case where is an outlier. The algorithm samples colors uniformly at random from and checks whether a sampled color satisfies conditions (R1)–(R3). Each check can be performed by scanning the color class of . Since a uniformly random color has expected class size , verifying a sampled color takes time in expectation.
We now argue that at least a constant fraction of all colors are valid. A color is proper if it satisfies (R1)–(R3), i.e., it is: (i) not in , (ii) not used by any vertex in , (iii) not used by any outlier neighbor of in , and (iv) used by at most one inlier in .
We upper bound the number of colors violating each condition. By Invariant 3, . By the definition of almost-cliques, at most colors are used by . By Markov's inequality, the number of outliers in is at most , and the number of colors used by more than one inlier is at most . Therefore, the number of forbidden colors is at most
For sufficiently small constant , the number of remaining colors is at least . Therefore, by Proposition 2.2 the expected time needed to find an available color is .
Finally, note that the procedure may recurse on at most one inlier vertex w. As shown above, ColorDenser(w) successfully colors the inlier vertex w without creating new uncolored vertices. Therefore, the overall procedure colors v while maintaining properness and does not introduce any new uncolored vertex.
The total expected running time is , as claimed.
Now, we complete the proof of Lemma 4.13 by proving the worst-case runtime of ColorDenser.
Proof of Lemma 4.13 for ColorDenser. For every we can wither find an available color for or find an inlier neighbor for it which it can steal a color from by going over all its neighbors. As , we can run ColorDenser(v) in worst-case time by running the described process whenever ColorDenser reaches the limit of time.
AI Disclosure: No AI tools were used in any capacity in the research or preparation of this submission, except possibly for minor typo editing.
Acknowledgement. We are thankful to David Wajc for helpful discussions, and to Yuval Gil and Magnus Halldorsson for sharing their independent result in [GH27] with us.
References
[ACK19] Sepehr Assadi, Yu Chen, and Sanjeev Khanna. Sublinear algorithms for vertex coloring. In Timothy M. Chan, editor, Proceedings of ACM-SIAM Symposium on Discrete Algorithms, SODA 2019, pages 767–786. SIAM, 2019. 1, 2, 3, 5, 6, 12, 15, 18, 20, 25
[AKM22] Sepehr Assadi, Pankaj Kumar, and Parth Mittal. Brooks' theorem in graph streams: a single-pass semi-streaming algorithm for -coloring. In Stefano Leonardi and Anupam Gupta, editors, Proceedings of ACM SIGACT Symposium on Theory of Computing, STOC 2022, pages 234–247. ACM, 2022. 16
[AY25] Sepehr Assadi and Helia Yazdanyar. Simple sublinear algorithms for vertex coloring via asymmetric palette sparsification. TheoretICS, 5, 2026. Conference version: Symposium on Simplicity in Algorithms, SOSA 2025. 1, 2, 3, 4, 6, 12, 13, 20
[AY26] Sepehr Assadi and Helia Yazdanyar. Fully dynamic algorithms for coloring triangle-free graphs. In Sayan Bhattacharya, Danupon Nanongkai, Michael Benedikt, and Gabriele Puppis, editors, 53rd International Colloquium on Automata, Languages, and Programming, ICALP 2026, Royal Holloway, University of London, Egham, United Kingdom, July 7-10, 2026, volume 374 of LIPIcs, pages 16:1–16:22. Schloss Dagstuhl - Leibniz-Zentrum für Informatik, 2026. 2, 3, 5, 7, 12
[BBF26] Aaron Bernstein, Sayan Bhattacharya, Nick Fischer, Peter Kiss, and Thatchaphol Saranurak. Separations between oblivious and adaptive adversaries for natural dynamic graph problems. In Kasper Green Larsen and Barna Saha, editors, Proceedings of the 2026 Annual ACM-SIAM Symposium on Discrete Algorithms, SODA 2026, Vancouver, BC, Canada, January 11-14, 2026, pages 5669–5687. SIAM, 2026. 1
[BBKS25] Aaron Bernstein, Sayan Bhattacharya, Peter Kiss, and Thatchaphol Saranurak. Deterministic dynamic maximal matching in sublinear update time. In Michal Koucký and Nikhil Bansal, editors, Proceedings of the 57th Annual ACM Symposium on Theory of Computing, STOC 2025, Prague, Czechia, June 23-27, 2025, pages 132–143. ACM, 2025. 2
[BCHN18] 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. 1, 2, 7
[BEPS15] Leonid Barenboim, Michael Elkin, Seth Pettie, and Johannes Schneider. The locality of distributed symmetry breaking, 2015. 1
[BFG24] Michael A. Bender, Jeremy T. Fineman, Seth Gilbert, John Kuszmaul, and Maxwell Young. Fully energy-efficient randomized backoff: Slow feedback loops yield fast contention resolution. In Ran Gelles, Dennis Olivetti, and Petr Kuznetsov, editors, Proceedings of the 43rd ACM Symposium on Principles of Distributed Computing, PODC 2024, Nantes, France, June 17-21, 2024, pages 231–242. ACM, 2024. 52
[BGK ] Sayan Bhattacharya, Fabrizio Grandoni, Janardhan Kulkarni, Quanquan C. Liu, and Shay Solomon. Fully dynamic ( )-coloring in O(1) update time. ACM Trans. Algorithms, 18(2):10:1–10:25, 2022. 1
[BGS11] Surender Baswana, Manoj Gupta, and Sandeep Sen. Fully dynamic maximal matching in O(log n) update time. In Rafail Ostrovsky, editor, IEEE 52nd Annual Symposium on Foundations of Computer Science, FOCS 2011, Palm Springs, CA, USA, October 22-25, 2011, pages 383-392. IEEE Computer Society, 2011. 1
[BKM ] Amos Beimel, Haim Kaplan, Yishay Mansour, Kobbi Nissim, Thatchaphol Saranurak, and Uri Stemmer. Dynamic algorithms against an adaptive adversary: generic constructions and lower bounds. In Stefano Leonardi and Anupam Gupta, editors, STOC '22: 54th Annual ACM SIGACT Symposium on Theory of Computing, Rome, Italy, June 20 - 24, 2022, pages 1671-1684. ACM, 2022. 1
[BRW25] Soheil Behnezhad, Rajmohan Rajaraman, and Omer Wasim. Fully dynamic ( )-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. 1, 2, 3, 4, 5, 6, 12, 14, 15, 16, 18, 19, 20
[CDP21] 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. 1
[CFG ] Yi-Jun Chang, Manuela Fischer, Mohsen Ghaffari, Jara Uitto, and Yufan Zheng. The complexity of ( ) coloring in congested clique, massively parallel computation, and centralized local computation. In Proceedings of ACM Symposium on Principles of Distributed Computing, PODC 2019, pages 471-480, 2019. 1
[CKS26] Julia Chuzhoy, Sanjeev Khanna, and Junkai Song. A faster deterministic algorithm for fully dynamic maximal matching. In Aditya Bhaskara and Artur Czumaj, editors, Proceedings of the 58th Annual ACM Symposium on Theory of Computing, STOC 2026, Salt Lake City, UT, USA, June 22-26, 2026, pages 1604-1615. ACM, 2026. 2
[CLP20] Yi-Jun Chang, Wenzheng Li, and Seth Pettie. Distributed ( )-coloring via ultrafast graph shattering. SIAM Journal on Computing, 49(3):497-539, 2020. 1, 2, 5, 6, 9
[CMNS25] Yi-Jun Chang, Gopinath Mishra, Hung Thuan Nguyen, and Farrel D Salim. Round and communication efficient graph coloring, 2025. 1
[CQ18] Chandra Chekuri and Kent Quanrud. Randomized MWU for positive lps. 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 358-377. SIAM, 2018. 52
[FGH ] Maxime Flin, Mohsen Ghaffari, Magnús M. Halldórsson, Fabian Kuhn, and Alexandre Nolin. A distributed palette sparsification theorem. In David P. Woodruff, editor, Proceedings of ACM-SIAM Symposium on Discrete Algorithms, SODA 2024, pages 4083-4123. SIAM, 2024. 18
[FH25] Maxime Flin and Magnús M. Halldórsson. Faster dynamic ( )-coloring against adaptive adversaries. In Keren Censor-Hillel, Fabrizio Grandoni, Joël Ouaknine, and
Gabriele Puppis, editors, 52nd International Colloquium on Automata, Languages, and Programming, ICALP 2025, Aarhus, Denmark, July 8-11, 2025, LIPIcs, pages 79:1-79:21. Schloss Dagstuhl - Leibniz-Zentrum für Informatik, 2025. 1, 2, 3, 4, 5, 6, 12, 13, 14, 15, 16, 17, 18, 19, 20, 42, 50
[FHM23] Manuela Fischer, Magnús M. Halldórsson, and Yannic Maus. Fast distributed brooks' theorem. In Nikhil Bansal and Viswanath Nagarajan, editors, Proceedings of the ACM-SIAM Symposium on Discrete Algorithms, SODA 2023, pages 2567–2588. SIAM, 2023. 16
[FM24] Maxime Flin and Parth Mittal. () vertex coloring in communication. In Ran Gelles, Dennis Olivetti, and Petr Kuznetsov, editors, Proceedings of ACM Symposium on Principles of Distributed Computing, PODC 2024, pages 416–424. ACM, 2024. 1
[Fre75] David A Freedman. On tail probabilities for martingales. the Annals of Probability, pages 100–118, 1975. 4, 52
[GH27] Yuval Gil and Magnús M. Halldórsson. Dynamic ()-coloring against an adaptive adversary: Faster, simpler, worst-case, and bounded recourse. In Proceedings of the 2027 Annual ACM-SIAM Symposium on Discrete Algorithms, SODA 2027, Philadelphia, PA, USA, January 24-27. SIAM, 2027. To appear., 2027. 3, 45
[GK21] Mohsen Ghaffari and Fabian Kuhn. Deterministic distributed vertex coloring: Simpler, faster, and without network decomposition, 2021. 1
[GK25] Mohsen Ghaffari and Jaehyun Koo. Dynamic graph coloring: Sequential, parallel, and distributed, 2025. 1
[HMR+26] Bernhard Haeupler, Slobodan Mitrović, Srikkanth Ramachandran, Wen-Horng Sheu, and Robert Tarjan. Dynamic construction of the lov'asz local lemma. arXiv preprint arXiv:2604.20836, 2026. 2, 3, 4, 5, 7, 8, 12
[HP22] Monika Henzinger and Pan Peng. Constant-time dynamic ()-coloring. ACM Trans. Algorithms, 18(2):16:1–16:21, 2022. 1
[HSS16] David G. Harris, Johannes Schneider, and Hsin-Hao Su. Distributed ()-coloring in sublogarithmic rounds. In Daniel Wichs and Yishay Mansour, editors, Proceedings of ACM SIGACT Symposium on Theory of Computing, STOC 2016, pages 465–478. ACM, 2016. 1, 2, 6, 9, 15
[KQ25] William Kuszmaul and Qi Qi. The multiplicative version of azuma's inequality, with an application to contention analysis, 2025. 4, 14, 22, 52
[Lin92] Nathan Linial. Locality in distributed graph algorithms. SIAM Journal on Computing, 21(1):193–201, 1992. 1
[Mos09] Robin A Moser. A constructive proof of the lovász local lemma. In Proceedings of the forty-first annual ACM symposium on Theory of computing, pages 343–350, 2009. 2, 7, 12
[MR97] Michael Molloy and Bruce A. Reed. A bound on the strong chromatic index of a graph'. J. Comb. Theory B, 69(2):103–109, 1997. 2, 25, 54
[MR02] Michael Molloy and Bruce Reed. Graph Colouring and the Probabilistic Method, volume 23. Springer Science & Business Media, 2002. 2, 4, 6, 9, 25, 54, 55
[MR10] Michael Molloy and Bruce A. Reed. Asymptotically optimal frugal colouring. J. Comb. Theory B, 100(2):226–246, 2010. 5
[MT10] Robin A Moser and Gábor Tardos. A constructive proof of the general lovász local lemma. Journal of the ACM (JACM), 57(2):1–15, 2010. 2, 7, 12
[Ree98] Bruce Reed. , , and . Journal of Graph Theory, 27(4):177–212, 1998. 2, 15
[Sol16] Shay Solomon. Fully dynamic maximal matching in constant update time. In Irit Dinur, editor, IEEE 57th Annual Symposium on Foundations of Computer Science, FOCS 2016, Hyatt Regency, New Brunswick, New Jersey, USA, October 9-11, 2016, pages 325–334. IEEE Computer Society, 2016. 1
[Tal95] Michel Talagrand. Concentration of measure and isoperimetric inequalities in product spaces. Publications Mathématiques de l'Institut des Hautes Etudes Scientifiques, 81(1):73–205, 1995. 4
A Omitted Proofs
We present the proofs of the results missing from the main body of the paper in this appendix.
A.1 Proof of Corollary 1.1
Corollary (Restatement of Corollary 1.1). There is a randomized algorithm that given any on any -vertex dynamic -sparse graph with maximum degree (sufficiently large w.r.t. ) maintains a -coloring against an adaptive adversary in amortized update time with high probability.
Prof sketch. We run Algorithm 1 without the decomposition and let be the set of all vertices of the graph, which, by the assumption in the corollary, are all -sparse. We also slightly modify SampleColor so it picks its colors randomly from instead of .
The proof of Lemma 5.2 continues to apply after this modification to provide a slack of for vertices. For concreteness, let be the hidden constant in this notation. Since we have generated slack and maximum degree is , if let the number of available colors be , then, it means even if we use different colors on all remaining neighbors of a vertex, it will still have available colors. Thus, running AttemptColor in time with high probability can color any vertex with such a slack. Alternatively, we can also go over all neighbors of a vertex and given the slack find an available color to color the vertex in time.
We also need to handle the dynamic entropy compression argument. For that, Lemma 5.2 provides a probability of for a Resample call to happen, which allows us to bound the total number of Resample calls over updates by using exactly the previous arguments. Finally, each call to Resample can be implemented either in expected time as before, or in time by checking neighbors of each vertex directly to see if the color can be assigned (instead of checking the color class).
All in all, these imply an algorithm that with high probability takes
time for handling updates (the high probability part is also achieved by Proposition 4.17 exactly as before). Balancing out for , the amortized update time is as desired.
A.2 Proof of Lemma 4.4
We have the following result due to [FH25] for out-heavy almost-cliques (their result also applies to anti-heavy ones but for our purpose, this is not needed).
Lemma A.1 ([FH25, Lemma 3.6]). Fix any sparse-dense decomposition and its classification. Any vertex in an out-heavy almost-clique is -sparse for
Using this lemma, we can move to the proof of Lemma 4.4.
Lemma (Restatement of Lemma 4.4). Fix any sparse-dense decomposition and its classification. Any vertex in an out-heavy almost-clique is -sparse for
Proof. If , then by Lemma A.1 we know is -sparse, and therefore it is -sparse as well.
Assume . Let be the neighbors of in . If there exists anti-edges with one endpoint in and another in , then has at most edges in its neighborhood, and therefore is -sparse. So we assume there are less than many anti-edges between and . Then, at least many edges exists from to . Therefore, we get
(by assumption)
which is a contradiction as is sufficiently small. Therefore, is -sparse and therefore -sparse as desired.
A.3 Proof of Lemma 4.5
Lemma (Restatement of Lemma 4.5). Let be small and . There is a fully dynamic algorithm that with high probability maintains a sparse-dense decomposition of for together with its -classification. The algorithm provides all guarantees of Proposition 4.2 and additionally the number of almost-cliques that change from one set of the -classification to another set is amortized per update.
Proof. The algorithm in Lemma 4.5 runs Proposition 4.2 to maintain the decomposition and thus satisfies the guarantees of Proposition 4.2. In addition, it maintains an -classification using the following procedures.
When an almost-clique K is formed, the algorithm adds it to one of the classes using the following criteria:
• to if ;
• to if and ;
• to otherwise.
When an almost-clique collapses, it is deleted from its class. Finally, after each update, the algorithm re-evaluates the class of each almost-clique and removes it from its current list if:
• from if ;
• from if or ;
• from if or .
A removed almost-clique is then added to another class using the same criteria mentioned earlier as if it was just formed.
Checking that is an -classification is now straightforward (through a somewhat tedious verification of each case) and we omit the proof. We now bound the amortized number of change in classifications of almost-cliques.
Consider an almost-clique that is just added to . We know which means it has at least anti-edges inside it (by the lower bound on size of in the decomposition). For to be removed from later, its needs to go below , which requires its number of anti-edges to become at most (by the upper bound on the size of ). This means at least changes to ANTI-sets is needed before needs another change of class. Since amortized number of changes to ANTI-sets by Proposition 4.2 is per update and each change contributes to exactly one almost-clique, the almost-clique needs dedicated updates before it changes class. In other words, the amortized number of times moves in and out of is per update.
A similar analysis can be used to bound the changes between any two other classes as well (by additionally noting that an update to an edge, instead of an anti-edge, can also only affect two almost-cliques at most). Since the overhead of maintenance of the -decomposition is just a constant factor over the decomposition, we can conclude the proof.
A.4 Proof of Proposition 4.17
Different forms of the following proposition appear in the literature, see, e.g., [Fre75,CQ18,BFG , KQ25]; we use the following formulation which is an immediate extension of a result of [KQ25] that proves this for .
Proposition ([KQ25]). Suppose Alice constructs a sequence of random variables , with , where , using the following iterative process. For each , once the outcome of are determined, Alice then selects the probability distribution from which will be drawn; is then drawn from . Alice is an adaptive adversary in that she can adapt to the outcome of . The only constraint on Alice is that if we define and , then, for some and , ; that is, the sum of the means of the probability distributions must be at most with probability . If , then for any , we have
Proof. The proof is by a reduction to the case proven in [KQ25, Corollary 11].
Define the following sequence of variables . Follow Alice's selection of with and for each , check if defined so far by Alice has or not; if no, continue setting but if yes, set . This is yet another adaptive adversary and the variables satisfy the guarantee that
always. Thus, by the case applied to , for , we have,
At the same time, we have,
by the assumption in the statement of the lemma. By union bound, we have,
concluding the proof.
A.5 Proof of Lemma 4.18
Lemma (Restatement of Lemma 4.18). Throughout running Algorithm 1 over t updates, with high probability, the time spent and number of uncolored vertices generated by subroutine:
-
AttemptColorSparser is time and vertices;
-
SampleColor is time and vertices;
-
ExpandAntiMatching is time and vertices;
-
ColorDenser is time and zero vertices.
Proof. We have already proved part (1) in the main body of the paper. The remaining proofs are quite similar and we sketch them here for completeness. Recall that denotes the largest number of edges at any point during the updates. Clearly, we have .
Proof of (2): Let be the number of times SampleColor is called directly in Algorithm 1 (here we do not consider the calls to SampleColor invoked inside other subroutines as these calls are considered in the runtime of the corresponding subroutine). For each redefine to be the random variable showing the runtime spent on the -th call to SampleColor and redefine to be the number of uncolored vertices caused by this call to SampleColor.
By Lemma 4.12 for each we have and . Moreover, the number of vertices that move from to in the decomposition per update is with high probability by Lemma 4.5. The other calls to SampleColor are caused directly by the updates which are at most many. So with high probability and . Therefore, by Proposition 4.17 and using the same argument as Part (1), with high probability the time spent on SampleColor is and the number of uncolored vertices caused by it is at most .
Proof of (3): Assume the total number of times ExpandAntiMatching is used to increase the size of some anti-matching is . For each redefine be the random variable showing the time spent in ExpandAntiMatching for increasing the size of some anti-matching by one. Also, redefine to show the number of uncolored vertices caused by the same process.
In Lemma 4.7 we saw that for each we have and . By Lemma 4.13 we know that , where is the largest number of edges the graph at a single point in time has over all updates. Also, as there are vertices in the graph trivially holds.
Let and . By linearity of expectation we have and .
The uncolored vertices that cause a violation in Invariant 3 and therefore a call to the subroutine ExpandAntiMatching are caused by UpdateSparserColor, AttemptColorSparser, or SampleColor.
By the previous two parts, with high probability SampleColor causes many uncolored vertices and AttemptColorSparser causes many uncolored vertices over all updates. By Lemma 4.15 we know that UpdateSparserColor causes many uncolored vertices over all updates with high probability. Therefore, the total number of uncolored vertices that might cause a call to ExpandAntiMatching and consequently is bounded by vertices.
Using Proposition 4.17 with the same argument above we get that with high probabilities the total runtime spent on ExpandAntiMatching is and the total number of uncolored vertices it causes over all updates is at most .
Proof of (4): Finally, let be the number of times ColorDenser is called throughout the algorithm. Redefine as the time spent on the -th call to ColorDenser. By Lemma 4.8 we know that for each . Moreover, by Lemma 4.13 we have . Again, we know that ColorDenser is called when there is an uncolored (denser) vertex, which is caused by one of the subroutines UpdateSparserColor, SampleColor, AttemptColorSparser, or ExpandAntiMatching.
By Lemma 4.15 and the previous parts of the proof, the number of uncolored vertices left by these subroutines over all updates is with high probability. Thus, , where with high probability . So using Proposition 4.17 and the same argument as above, the total time spent on ColorDenser is with high probability. Finally, recall that ColorDenser does not uncolor any vertex. This concludes the proof.
A.6 Proof of Lemma 5.1
Lemma. Fix a vertex along with a set and a time associated to each vertex . Suppose for every , with probability , we sample a color and assign it to iff: (1) the color , and (2) no neighbor with or with lower lexicographical order while has also sampled this color. All other vertices are marked blank. Let be the partial coloring function obtained this way. Then,
Proof. For each , let denote the indicator random variable that is 1 iff the -th neighbor of exists and is in and has sampled a color in the described process. Let . As each vertex samples a color with probability , we have
Then by Chernoff bound (Proposition 2.1),
Moreover, any vertex in that keeps a color has first sampled one, hence, is at least number of vertices in that are colored, namely, , concluding the proof.
A.7 Proof of Lemma 5.2
Here we present the proof of Lemma 5.2. The proof closely follows the approach in [MR97, MR02]. Before moving on to the proof we recall the Talagrand's concentration inequality.
Talagrand's inequality: A function is called c-Lipschitz for some iff changing any can affect the value of by at most . Additionally, is called -certifiable iff whenever there are at most variables so that knowing the values of these variables certifies .
Proposition A.2 (Talagrand's inequality; cf. [MR02]). Let be independent random variables and be a c-Lipschitz and -certifiable function. For any ,
We can now prove Lemma 5.2.
Lemma (Restatement of Lemma 5.2). Let be sufficiently small. Fix a -sparse vertex with along with a set and a time associated to each vertex such that . Suppose for every , with probability , we sample a color and assign it to iff: (1) the color , and (2) no neighbor with or with lower lexicographical order while has sampled this color. Let be the partial coloring obtained this way. Then,
Proof of Lemma 5.2. We prove this lemma by bounding the number of pairs of sparser vertices in neighborhood of that have received the same color under . Let be the number of pairs in which end up with the same color. By definition we get . So it suffices to prove that with high probability is bounded.
As is -sparse and , there are at least many anti-edges between its sparser neighbors. Let be arbitrary anti-edges in . Let be the number of colors that are sampled by both endpoints of exactly one of these anti-edges and is also kept by both its endpoints. We can see that , so it suffices to find a lower bound for . Note that might be smaller than the number of same color pairs in as we are considering a more restricted condition.
For each anti-edge let be the indicator random variable where iff (I) and have sampled same color which is not in and (II) no other vertex in has sampled color . As for each we have , then for each we have
Consequently, as is colored by the described process, we have
Therefore, we have .
Let be the random variable showing the number of colors that are sampled by the endpoints of at least one anti-edge in , and let be the random variable showing the number of colors sampled by the endpoints of at least one anti-edge in where the color is also sampled by some other vertex in or is blocked by its corresponding set . By definition we have . We can see that both and are functions of independent random variables that define the choices of random colors for this neighborhood. Moreover, is 2-certifiable as it can be verified by knowing the sampled color for two vertices and also is 3-certifiable as it can be verified by knowing the sampled color for three vertices or two vertices and element of one of their blocked sets. Also, as changing color of a vertex can affect at most two colors involved in and , the new color and the old color, then both are 2-Lipschitz. We also have
Therefore, we can use Talagrand inequality from Proposition A.2 as follows
Similarly, as , we get
Using the two inequalities above, we have that with probability at least both Y and Z are concentrated and therefore
Thus, with probability at least we have
A.8 Proof of Lemma 5.7
The following subroutine determines if a sparser vertex has Flaw 3 without checking all its neighbors.
Algorithm 10. TestFlaw3(v):
-
For each , sample an integer from uniformly at random.
-
Let be the number of where and -th neighbor of is colored by .
-
If return Fail; otherwise return Pass.
Lemma. For any sparser vertex , if has Flaw 3, then TestFlaw3(v) will return Fail with high probability. Conversely, if is far from having Flaw 3, then TestFlaw3(v) will output Pass with high probability. Moreover, the running time of TestFlaw3(v) is with certainty.
Proof. Assume has Flaw 3, then , i.e. has at least many colored neighbors under .
For each , let be the indicator random variable that is 1 iff the -th vertex of exists and is colored under . Let . Observe that is precisely the value of in . Since each sample is chosen independently and uniformly at random, then
as colored . Using Chernoff bound (Proposition 2.1) we get
Hence, given is a small constant in , with high probability, we have , and therefore TestFlaw3(v) returns Fail.
Now suppose that is far from having Flaw 3. Then, , which implies . Then we have
(as )
(by Proposition 2.1)
Therefore, with high probability, , and so TestFlaw3(v) returns Pass in this case.
Finally, the procedure samples and checks the colors of vertices. Hence, its running time is with certainty.