Manuscript Offprint
arXiv:2611.06611Constant-Time Dynamic Edge Coloring via Dynamic Splitting and LLL
Open access. PaperVantage converted this article to text, so layout and figures may differ from the original. This text is shared under the same licence.
Abstract
We give a dynamic algorithm that maintains a near-optimal edge coloring in constant expected time per update. For every fixed , the algorithm maintains a edge coloring under edge insertions and deletions in poly worst-case expected update time against an oblivious adversary, provided . The previous constant-time algorithm of Bhattacharya, Costa, Panski, and Solomon (BCPS) required , where is the number of vertices. We remove this dependence on , answering their open question.
Our approach differs substantially from that of BCPS, which relied on coloring in locally tree-like subgraphs. Instead, we draw on distributed algorithms that organize partial coloring through successive applications of the Lovász Local Lemma (LLL). We develop a dynamic LLL solver with worst-case expected update bounds and a dynamic splitting algorithm that partitions edges into low-degree subgraphs. A key technical contribution is a bottom-up method for iterative splitting, which avoids the logarithmic overhead of maintaining successive levels. It achieves constant expected update time by adaptively choosing which levels to inspect and repair, rather than inspecting every level after each update. We believe these dynamic splitting and LLL tools can be of interest beyond edge coloring.
Contents
| 1 | Introduction | 1 |
|---|---|---|
| 2 | Technical Overview | 5 |
| 3 | Dynamic Lovász Local Lemma | 9 |
| 4 | Dynamic (1 + ε)Δ edge coloring: poly(Δ) update time | 17 |
| 5 | Dynamic (1 + ε)Δ edge coloring: O(log Δ) + poly(1/ε) update time | 20 |
| 6 | Dynamic (1 + ε)Δ edge coloring: poly(1/ε) update time | 23 |
| 7 | Proof of the Component Size Upper Bound | 39 |
| 8 | AI Statement | 45 |
1.1 Context and our contribution
Vizing's theorem shows that every simple graph of maximum degree admits a edge coloring. However, maintaining such a coloring efficiently in dynamic graphs, as edges are inserted or deleted, remains open: There is no known dynamic algorithm for it with subpolynomial update time, except in the special case of low-degree graphs. We discuss these and other related results, including static algorithms, in Section 1.2. In contrast, the problem becomes more tractable when we relax the number of colors slightly, to colors. The state of the art is the algorithm of Bhattacharya, Costa, Panski, and Solomon (BCPS) [BCPS24], which maintains a edge coloring in poly worst-case expected update time against an oblivious adversary, provided that
Their algorithm thus gives constant update time for fixed , but requires a large maximum degree as a function of the number of vertices . They explicitly left improving this degree requirement while retaining constant update time as a “challenging open question” [BCPS24, Section 1.4].
As a side comment, we note that constant-time dynamic algorithms remain rare, limited to only a handful of problems, all of which have much simpler structures than (near-optimal) edge coloring, at least in the static setting.¹
Our main result. We present a constant-time dynamic algorithm for edge coloring that removes the -dependence in the degree requirement and assumes only , where is a constant depending only on .
Theorem 1. For every , there is a threshold and a randomized dynamic algorithm with the following guarantee. Given a fixed degree bound , the algorithm maintains a proper edge coloring with at most colors under edge insertions and deletions in a simple graph of maximum degree at most . Against an oblivious adversary, each update takes poly worst-case expected time.
This answers the open question posed by BCPS. We emphasize that the theorem bounds the expected cost of each update, rather than an amortized average over the whole update sequence. The oblivious adversary in the statement fixes the update sequence knowing our algorithm, but without knowing its random choices. The notation hides factors polylogarithmic in .
Our Method, and Technical Contributions. At a high level, our algorithm builds on Röll's nibble approach [Röd85], which BCPS also followed and which is one of the major approaches to near-optimal edge coloring. Beyond this high-level similarity, however, we depart completely from their method. The nibble colors the graph gradually, preserving regularity conditions on the remaining degrees and available palettes after each partial-coloring round. The local randomized choices make this organization attractive for dynamic maintenance, but dependencies between the
¹Examples include maximal matching and its dual, 2-approximate vertex cover [Sol16]; -vertex coloring [BGK⁺22, HP20, GK27]; and constant-stretch spanners [BKS12].
choices make the probabilistic analysis delicate. BCPS [BCPS24] address these dependencies by partitioning the edges into locally tree-like subgraphs, exploiting the probabilistic independence between the branches of the local neighborhoods during the iterations of coloring each subgraph.
Instead, we take a different route by bringing in viewpoints from distributed graph algorithms. We abstract the guarantees desired from each iteration of partial coloring as a Lovázs Local Lemma (LLL) problem, following Elkin, Pettie, and Su [EPS15] and Chang, He, Li, Pettie, and Uitto [CHL 18]. We develop a dynamic LLL solver to maintain these instances without requiring locally tree-like neighborhoods. This first gives an update time polynomial in the degree. We then remove that dependence through a dynamic splitting algorithm, which effectively cuts down the relevant degree of the edge-coloring instances to poly(1/ ). This ingredient itself is inspired by algorithmic LLL techniques in the distributed literature, namely graph shattering [HMN22], and making it run in constant update time is the most technical part of our contribution in this paper. To summarize, we can organize our contributions into the following three categories (and we are hopeful that ingredients (I) and (III) will be of broader interest, beyond edge coloring):
(I) Dynamic LLL. We describe a dynamic LLL algorithm that maintains a satisfying assignment in poly( ) worst-case expected time per update in the LLL (a clause-variable update), assuming the polynomial LLL criterion for a sufficiently large absolute constant . Here bounds the bad-event probabilities, bounds the dependency degree, and bounds the local instance parameters and the costs of sampling and evaluating events. This criterion is readily satisfied in all our applications. A clause-variable update adds or removes a variable from a clause. We process batches of these changes, allowing several variables or clauses to be modified simultaneously. We require the LLL criterion to hold before and after each batch, so that we always have a meaningful problem, without requiring every intermediate instance to satisfy the criterion. Our algorithm for this part is simple and builds on the observation that the distributed resampling algorithm of Chung, Pettie, and Su [CPS14] is stable under dynamic updates when we preserve its randomness: the changes to its execution are small in expectation. This directly exploits the locality of the algorithm and its witness-tree analysis: the probability of resampling at later rounds decreases fast enough to offset the growth of the neighborhood that an update can affect. We view this as a general tool that may be useful beyond edge coloring.
(II) Low-degree edge coloring. We obtain a dynamic edge-coloring algorithm with poly( ) worst-case expected update time for . In particular, we obtain poly( ) update time when . We achieve this by applying our dynamic LLL solver iteratively to the nibble-based static partial-coloring algorithm of Chang et al. [CHL 18], with a more careful bound on how many changes one iteration passes to the next. Here, we note that a direct black-box application would lose a polynomial factor in in each iteration and lead to a update time. We avoid this and achieve poly( ) update time by coupling color proposals before and after a palette change, so that changing one color in a large palette rarely changes the proposal. We use this result as the low-degree coloring ingredient for our final algorithm.
Concentration bounds, which in our applications give failure probabilities that decay exponentially in suitable functions of the degree parameters, make the bad-event probabilities smaller than any fixed inverse polynomial in those parameters. Indeed, we could work with even stronger LLL criteria—e.g., requiring inverse-quasipolynomial failure probabilities or even inverse exponentials with small polynomial exponents—by trading off some parameters, while keeping both the degree threshold and the update time polynomial in . In addition, this polynomial criterion makes the expected repair work and recourse small, which is essential when we compose several LLL iterations.
(III) Bottom-up splitting. Our third contribution is a scheme that partitions the graph into at most edge-disjoint subgraphs of maximum degree at most , in constant expected update time and recourse. This allows us to solve the edge-coloring problem in each subgraph independently with a separate palette, obtaining worst-case expected update time for the original graph. Maintaining this partition in constant expected update time is the technical heart of the paper. We first develop a warm-up top-down iterative splitting algorithm, which gives update time for edge coloring. We then develop a bottom-up variant that represents the hierarchy implicitly and discovers which levels need attention. The algorithm and analysis here use LLL-inspired notions such as locally freezing variables during a partial assignment when certain constraints become at risk of violation, and graph shattering to show that the unresolved regions break into small connected components. We analyze the dependencies between levels through a joint witness argument. This lets us inspect and repair only the relevant parts of the hierarchy, with expected cost independent of the number of partitioning levels, allowing us to achieve constant expected update time for its maintenance. We believe that this bottom-up splitting technique can also be useful beyond edge coloring.
In Section 2, we give a closer overview of these ingredients and how we combine them to obtain the dynamic edge-coloring result of Theorem 1.
Two comments on the -dependencies of our constants. (A) The poly dependence in our update time is currently bottlenecked by the poly update time of our dynamic edge-coloring algorithm on graphs of maximum degree at most , a constant for fixed . This is the degree bound reached by our present reduction (Lemma 9). The splitting procedures incur only expected work and generate expected updates to these low-degree instances per input update. Thus, improving the worst-case expected update time for maintaining edge colorings in this degree range would also improve our update-time bound for graphs of unbounded degree. (B) The degree requirement , where , is inherited from the nibble-based coloring approach. Intuitively, sampling counts with expectation and variance have fluctuations of order , or relative fluctuations of order . Keeping these fluctuations within an fraction of the expectation therefore requires to be at least on the order of , with additional logarithmic factors to obtain the concentration needed by the LLL. This sampling fluctuation is the source of the bottleneck in our current degree threshold.
1.2 Other Related Work
Randomized dynamic edge coloring. Duan, He, and Zhang [DHZ19] gave a randomized dynamic edge-coloring algorithm with poly amortized update time when . Bhattacharya, Grandoni, and Wajc [BGW21] obtained poly expected recourse (recolorings) per update in a sufficiently large-degree regime, without a corresponding constant update-time guarantee. Christiansen [Chr23] removed the additional large-degree requirement and obtained poly worst-case update time with high probability. Setting gives a dynamic edge-coloring algorithm with poly update time, which is polylogarithmic in for graphs of degree at most polylogn. BCPS [BCPS24] then achieved constant worst-case expected update time for fixed under the degree requirement discussed above. We compare most directly with their update guarantee, while also reaching the degrees for which Christiansen's polylogarithmic-time algorithm was previously the relevant alternative.
Haeupler, Mitrović, Ramachandran, Sheu, and Tarjan [HMR⁺26] gave a dynamic edge-coloring algorithm against an adaptive adversary, with amortized update time over polynomial-length update sequences, for . They also build on the distributed partial-coloring algorithm of Chang et al. [CHL⁺18]. Their guarantee supports an adaptive adversary, who knows the algorithm's outputs and random choices so far and can choose subsequent updates accordingly. We focus on an oblivious adversary and obtain constant worst-case expected bounds independent of and .
Deterministic dynamic edge coloring. Christiansen [Chr26] gave a deterministic algorithm maintaining a edge coloring in amortized update time. This provides a subpolynomial bound for fixed without randomization. Our focus is the randomized setting, where we seek constant update time.
Dynamic LLL. Haeupler et al. [HMR⁺26] developed a general framework for maintaining solutions under constraint insertions and deletions against adaptive adversaries. In standard variable-based LLL settings with fixed slack, their framework gives amortized update time, with an additional initialization cost, where bounds the number of variables per clause and bounds the dependency degree. They obtain this guarantee by bounding the total number of resampling steps over the update sequence, and derive several applications, including their edge-coloring result. We work under a polynomial LLL criterion, which is readily satisfied in all our applications and in many other algorithmic applications of the LLL. We support batches of clause-variable changes against an oblivious adversary. We obtain worst-case expected update bounds and small expected recourse, which lets us compose the solver with successive partial-coloring instances.
Static edge coloring. Karloff and Shmoys [KS87] gave a near-linear-time algorithm using colors. More recent work has developed several approaches beyond the nibble. Elkin and Khuzman [EK24] gave a deterministic edge-coloring algorithm in time. Assadi [Ass25] used fair matchings and a reduction to bipartite edge coloring to obtain colors in expected time; he also obtained colors in expected time for . Bernshteyn and Dhawan [BD26] used randomized multi-step Vizing chains to obtain a linear-time algorithm with high probability for every fixed and .
For the exact Vizing bound, Assadi et al. [ABB⁺25] gave a randomized edge-coloring algorithm in time with high probability, using batched recoloring with Vizing fans and alternating paths. These static results do not directly bound the cost of repairing a coloring after an individual update. Vizing-chain methods also underlie dynamic algorithms, including those of Duan, He, and Zhang [DHZ19] and Christiansen [Chr23]; our route to constant update time instead develops dynamic LLL and splitting tools.
Distributed edge coloring. Several ingredients of our algorithms are directly inspired by distributed approaches to near-optimal edge coloring. Elkin, Pettie, and Su [EPS15] obtained randomized -edge-coloring algorithms for every fixed and sufficiently large depending only on , using distributed LLL algorithms to enforce the desired guarantees in successive nibble iterations (lower bounds on available palette sizes and upper bounds on remaining degrees and on the number of uncolored edges incident to a vertex whose palettes contain a given color). Chang, He, Li, Pettie, and Uitto [CHL⁺18] refined this approach to use LLL instances, permitting palettes as small as . Our dynamic edge-coloring algorithm for constant-degree graphs essentially shows how to maintain their partial-coloring procedure dynamically as edges are inserted or deleted. Subsequently, Halldórsson, Maus, and Nolin [HMN22] further improved the distributed complexity for fixed by using shattering to solve splitting instances and reduce degrees before applying LLL-based edge coloring. Their splitting approach directly inspires our degree-reduction machinery, though our constant-time dynamic splitting requires substantial new technical ingredients and analysis beyond this high-level connection.
2 Technical Overview
The overall merit of our approach is to maintain the execution transcripts of static randomized algorithms, using persistent randomness for each variable. After an input update, we repair the transcript so that it agrees with a static execution on the new input using the same randomness. This approach also appears in the prior work of Bhattacharya, Costa, Panski, and Solomon [BCPS24].
Static distributed algorithms are natural candidates for this approach: their locality limits how an input change can propagate through the transcript. The main challenge is to identify the parts of the transcript that need repair without inspecting every part that might have changed.
2.1 Dynamic Lovász Local Lemma
Our first ingredient, described in Section 3, is a dynamic algorithm to maintain a satisfying assignment of an LLL instance. The instance goes through batches of clause-variable updates, in which each update inserts a variable into a clause or removes it from a clause. When the LLL instances have large slack, the expected recourse of our algorithm will be extremely small, while the expected runtime will only depend on how efficiently one can maintain the state of clauses under the initial assignment after each update.
We observe that the distributed LLL algorithm of Chung, Pettie, and Su [CPS14], a parallel variant of the Moser-Tardos resampling algorithm [MT10], is a nice candidate to maintain dynamically. It starts with a random assignment and consists of several resampling iterations until the assignment satisfies every clause. In each iteration, it finds a particular independent set of bad events that occur under the current assignment and resamples all variables involved in those events.
We leverage the following two properties of the static algorithm during the analysis of our dynamic algorithm.
-
First, changes propagate locally from one iteration to the next. More precisely, say the information for a clause at stage records whether it is falsified by the assignment at stage and whether any variable is resampled in that stage. We are able to demonstrate that, any clause whose information at stage changes must lie within distance of a clause being modified in the dependency graph. Thus, for a single update, at most clauses can be affected at stage , where is the degree of the dependency graph. This locality also relates consecutive iterations, and we can use changes at earlier stages to guide efficient repair at later stages.
-
Second, thanks to the witness-tree analysis given in [CPS14], which is originally used to give the round complexity of the static algorithm, we are able to show a rapidly decreasing probability that any particular clause needs attention at a late stage during the repair. Specifically, a clause needs attention in iteration with probability roughly , where bounds the maximum probability of a clause being falsified. This argument is independent of the locality property above, so we can apply it to all clauses in the local neighborhood.
From the properties, we are able to show that the expected repair work is very small when the slack is large, which is indeed the case for our edge-coloring applications. The main bottleneck becomes certifying that no repair is needed. Careful maintenance can remove the overhead of maintaining the dependency graph and other auxiliary information, leaving one dominant cost: checking whether a clause is falsified under the initial random assignment after a clause update. A naive way to implement this check takes time polynomial in the LLL parameter, which is why the algorithm in Section 4 is useful only in the small-degree regime. We later combine it with the degree-splitting procedures in Section 5, where bad events can be maintained much more efficiently.
2.2 Edge Coloring: Small Degree Regime
In Section 4, we obtain a dynamic edge coloring with poly() expected update time when . This algorithm will be used when a graph has maximum degree poly.
The Static Algorithm and its Black-Box Maintenance The dynamic algorithm maintains the transcript of the static edge-coloring algorithm by Chang et al. [CHL]. The static algorithm consists of two phases, and the first phase contains partial-coloring iterations. In each iteration, edges that have not received a color independently propose a color from their palettes, and an edge gets colored if no adjacent edge proposes the same color. An LLL instance for each iteration ensures the invariants needed for the next iteration. The second phase will do a trivial cleanup, and it is easy to maintain in the dynamic setting in time per update.
In Section 4.1, we describe our first attempt, using the dynamic LLL algorithm described above to maintain the satisfying assignment to the LLL instances in the first phase. In these instances, to check whether a bad event happens, one need to collect a constant-hop neighborhood and perform a computation with poly() time. As a result, each LLL instance takes poly() time per update.
We also need to consider how a single update propagates in these iterations. In the worst case, a single edge insertion or deletion in iteration creates constant many edge insertions or deletions for iteration along with palette changes. Although each palette update inserts or removes only one color from the palette of an edge, it changes the possible values and distribution of the corresponding variable. Treating every such change as a variable replacement introduces a polynomial blowup in the number of updates at every iteration, resulting update time.
The Improvement In Section 4.2, we describe how we improve the algorithm above and get poly() update time. The key observation for the improvement is that every edge has a palette of size , while a typical palette update changes only one color. Intuitively speaking, each palette change should only affect the LLL solution with probability .
To make this intuition formal, we still represent a palette update by replacing the corresponding variable, but we couple their first randomness in the LLL algorithm. This allows us to argue that when the palette of an edge changes from to , with probability , where denotes symmetric difference, the palette update on does not affect the transcript of the dynamic LLL algorithm.
Consequently, for every update in iteration , among palette changes in iteration generated from this update, only constant of them in expectation has an effect to the next iteration. As a result, the expected number of meaningful updates grows by only a constant factor between consecutive iterations, giving a total expected number of updates polynomial in and total update time poly().
2.3 Edge Coloring: Iterative Degree Splitting
In Section 5, we describe dynamic algorithms to maintain edge coloring when in time . The main idea is to partition the input graph into several subgraphs of degree , and then apply the small-degree algorithm in Section 4 on each of them with distinct palette.
Dynamic Degree Splitting In the algorithm, we wish to maintain an edge bipartition for an graph of maximum degree such that the degree discrepancy for every vertex is small. In the static setting, we can achieve every small discrepancy in linear time by computing Euler tours, but this is not a good choice for the dynamic setting.
Instead, we relax the discrepancy requirement to be at most . A concentration bound implies that a random bipartition satisfies the requirement for a single vertex with probability . Based on this, we can formulate an LLL instance with large slack to find a good random bipartition, and use the dynamic LLL algorithm to maintain a satisfying assignment.
A good property for this LLL instance, compared to that in the low-degree case, is that one can update in constant time whether a bad event occurs under the initial random assignment for each edge insertion or deletion. Our dynamic LLL algorithm can therefore maintain such bipartition in constant update time.
We apply this bipartition recursively for times until the maximum degree of every resulting subgraph reaches , and a final partition reduces the degree further to . Each time, the degree upper bound is slightly larger than an exact halving. We choose the factor carefully so that these losses accumulate to only a factor over the entire recursion. We then apply the algorithm in Section 4 to every final subgraph. The total palette will then be .
The large LLL slack ensures that the recourse at any level is extremely small. As a result, the typical execution for an update is that, we apply it to some LLL instance for every level, and each of them reports no change in its maintained LLL solution. The bottleneck of the algorithm is to visit all levels to certify that no repair is needed and apply the update to the corresponding final low-degree instance, giving total expected update time .
An Alternative Approach Based on Graph Shattering In order to get constant-time algorithm, we introduce an alternative approach in [HMN22] for degree bipartition, based on graph shattering.
The algorithm has two phases. In the pre-shattering phase, edges propose independent random directions. A local procedure detects problematic regions and marks some edges as bad. All unmarked edges keep their original random directions. In the post-shattering phase, each connected component of bad edges is bipartitioned deterministically with small discrepancy.
An important property for this algorithm is that only the local pre-shattering phase decides which edges must deviate from their initial random directions. The post-shattering phase may inspect an entire bad component, but it does not cause new edges outside that component to become bad. This will provide useful locality to build our constant-time algorithm, while the general LLL algorithm in Section 3 does not have this property.
2.4 Edge Coloring: Bottom-Up Degree Splitting
The work bottleneck for the algorithm above is visiting all levels and certifying that their very rare bad events do not occur, rather than fixing bad events. A simple lazy implementation does not avoid this cost: In the top-down algorithm, determining which subgraph at a given level contains a newly inserted edge requires knowing the decisions made at all earlier levels. Thus, the algorithm appears to have to process the levels in order before it even knows where the edge will end up.
To obtain constant update time, we observe that only the final partition is passed to the small-degree coloring algorithm. Correctness requires the degree bound to hold only in this final partition. Therefore, we do not need to repair every bad event at every intermediate level; we only need to fix the failures that can affect the degree of a final subgraph.
At a high level, based on the graph-shattering algorithm in Section 5, the algorithm in Section 6 samples all randomness for an edge at once. This specify in advance the final subgraph that the edge would reach if no repair were necessary. We can therefore apply an edge update directly to that final subgraph in constant time. We then perform a bottom-up local search for the bad events responsible for a possible degree overflow there. The search keeps only enough bad events to recover the final degree guarantee and ignores intermediate failures that cannot affect it. We then repair exactly the part of the execution exposed by this search based on a modification of the algorithm in Section 5.
To avoid visiting every level, we store the execution explicitly only near detected failures. Everywhere else, the execution agrees with the initially sampled directions and can be represented implicitly. Updating one final subgraph therefore updates the implicit information at all intermediate levels without visiting them one by one.
Multi-Level Shattering Analysis The amount of repair work done by the dynamic algorithm is related to sizes of the “bad components” affected by the update. The usual shattering analysis says that every bad component has logarithmic size with high probability. Because our LLL instances have large slack, with the same proof, the expected bad-component size around any fixed vertex is extremely small. In the top-down algorithm, each level has independent randomness and we can conclude that the total work and recourse is small.
The same argument does not apply to the bottom-up algorithm. Its local search reveals information about the random choices at several levels, so the components encountered at different levels can no longer be treated as independent. We therefore analyze all levels jointly in Sections 6 and 7.
We begin by identifying the critical failures at which the ideal random execution first goes wrong. A critical failure is extremely unlikely: the execution at the preceding level is still well behaved, leaving enough slack for a strong concentration bound at the current level.
We draw a ball of radius poly( ) for a critical failure of level inside the subgraph where the failure occurs. denotes the degree upper bound for level . The ball will roughly contain vertices. Because the pre-shattering procedure is local, whenever an edge deviates from its initial random direction, we can trace this back to find a critical failure whose ball contains the edge. Viewing the iterative bipartition as a execution tree, the collection of balls in the ancestors of a node contain everything that may need to be updated or recomputed at that node.
To measure how these balls interact, we form an auxiliary graph of the balls and show in Section 6 that the cost of the local search for essential bad events and the final repair is small if we can bound the component size in .
In Section 7, we bound the expected size of this component through joint witness. Each witness, contains the shortest path in between two balls and a low-degree local structure for each ball in the path to certify that these vertices and edges are indeed in . Counting the expected component size then reduces to counting the expected number of witness.
The remaining difficulty is that a witness can span several levels. We handle this by exposing the randomness one level at a time, from top to bottom. At each step, we bound the conditional probability that a partially verified witness survives the next level. Multiplying these bounds gives the probability bound for a complete witness. Finally, we sum this probability over all possible witness structures. The probability decreases faster than the number of structures grows, proving that the expected component size, and hence the expected update work, is small.
Finally, our technique largely relies on the fact that the witness is a constant-degree structure, and we expect that this can be generalized and only be generalized to bound any constant moment of the connected component size distribution.
3 Dynamic Lovász Local Lemma
In this section, we give a dynamic algorithm that maintains a satisfying assignment for a Lovász Local Lemma instance under clause modifications.
3.1 Model and Main Result
There is a set of mutually independent random variables and a fixed set of clauses, each with a unique identifier in . Every variable has a domain and a distribution over . Write for the variables on which depends and . Initially, and every clause is empty.
For and , a function specifies the truth table of when ; in our applications, this family of truth tables is represented implicitly. By convention, a clause with no variables is satisfied, so the initial instance is satisfiable. For a fixed instance, let denote the probability that is falsified under the product distribution of its variables.
The dependency graph of the instance has one vertex for each clause and an edge between two clauses when they share a variable. For a graph , a vertex , and , we define to contain every vertex, including , within distance at most from , and define to be . We use the following parameters as uniform upper bounds throughout the update sequence:
| Parameter | Upper bound on |
|---|---|
| Maximum number of clauses that a variable is in | |
| Maximum number of variables that a clause depends on | |
| Expected time to sample from any | |
| Expected time to evaluate a clause on a given assignment |
The clauses containing a fixed variable form a clique in , so we may take . We take and , as otherwise the instance is trivial.
We assume two additional properties. First, each clause has a data structure that maintains its value under insertions and deletions of variables in expected time per operation. For variable insertion, its value is also given. Reevaluating the clause after each operation gives a trivial implementation, so we may take . Second, there is a uniform parameter such that, for every instance, some function satisfies and
(1) for every . In the typical symmetric LLL setting, we will pick to be the constant function , and for every event suffices. The restriction gives and .
Theorem 2. Under these assumptions, there is a dynamic algorithm that maintains a satisfying assignment against an oblivious adversary. It supports the following updates:
-
Introduce an isolated variable in expected time.
-
Remove an isolated variable in time.
-
Apply a batch of distinct clause updates. Each update adds to when and removes otherwise. The expected update time is
and the expected recourse, defined as the number of value changes in the final output, is
In our applications, will be larger than any polynomial in the other parameters. The expected time per update is then dominated by , and the expected recourse is correspondingly small.
3.2 The Static Algorithm
We first review the static algorithm of Chung, Pettie, and Su [CPS14] and introduce notations. Independently for every variable , sample a randomness table of independent samples from . The initial assignment is . Resampling a variable advances its value to the next entry of its table.
The static algorithm consists of stages. At stage , the algorithm evaluates every clause under and lets denote whether is falsified. After that, we take an independent set of falsified clauses in by including every ID local minimum. Specifically, define
and set . The set is independent in , so each variable belongs to at most one clause in . Resampling all variables in these clauses produces . The execution stops when every clause is satisfied, and we extend the execution by infinitely many empty stages so that two transcripts remain aligned even if they terminate at different stages.
The following table summarizes the transcript of the static algorithm and the additional quantities that will be maintained by the dynamic algorithm.
It is worth noting that the bits for implicitly define the assignment for . Similarly, the final output assignment assigns the value .
In the following, we review the probabilistic statement of Chung, Pettie, and Su [CPS14] based on witness trees. For an execution, its resampling log concatenates , ordering each set by increasing clause ID.
Definition 1 (2-witness tree). For a resampling event in an execution, the 2-witness tree for is a rooted tree with a labeling generated in the following way: Initially, consists of a single root with label . Iterate downward from to 1. If for some , create a node with label and make it a child of any deepest such node .
| Quantity | Meaning |
|---|---|
| Whether is falsified by | |
| The counter in Equation (2) | |
| Clauses selected for resampling at stage | |
| Whether is resampled at stage | |
| Total number of resamplings of | |
| Last stage at which is resampled | |
| Last stage affecting a variable of |
Table 1: Data in an LLL transcript
Lemma 1 ([CPS14], Lemma 3.6). If , then the execution contains a 2-witness tree with root label and size at least .
Lemma 2 ([CPS14], Appendix B). For every clause and , the probability that the execution contains a 2-witness tree with root label and at least nodes is at most .
From Lemmas 1 and 2 and a union bound over the root labels, the probability that does not satisfy every clause is at most . Thus the algorithm terminates almost surely, and within stages with high probability.
In the following we establish some useful consequences of the previous lemmas.
Lemma 3. For every variable and , .
Proof. If , some clause is resampled at a stage at least . The corresponding witness tree has at least nodes by Lemma 1. Applying Lemma 2 and taking a union bound over at most choices of gives the desired bound. The first inequality follows from that implies .
Corollary 1. For every clause and , .
Proof. The event requires for some , so its probability follows from Lemma 3 and a union bound over at most variables. If , the clause is falsified by but satisfied by the final assignment. Some variable in must therefore be resampled at a stage at least , implying .
3.3 Maintaining the Transcript
Insertions and deletions of isolated variables will be handled trivially, so let us fix a batch of clause updates. Let and be the static transcripts of the instances before and after the batch, with the same randomness for each variable. With a plausible initialization for the empty instance, it therefore suffices for the dynamic algorithm to transform the old transcript into the new one after each batch.
For a transcript item , write for its value in , where . If equals , we will simply use to denote its value in both and .
Define and . Since all information in Table 1 depends on and , we will pay attention to dirty pairs such that . In the following, we establish some properties of dirty pairs.
Observation 1. For any and , .
Proof. is dirty only when or since whenever , and the statement holds by applying Corollary 1 separately to and .
Notice that, although the randomness in two transcripts are coupled, the randomness within each transcript is mutually independent and follows the prescribed distributions. The oblivious adversary fixes both instances independently of the randomness, so we can apply Lemma 3 and corollary 1 to each of them.
Lemma 4. Every dirty pair satisfies .
Proof. We induct on . It suffices to consider dirty pairs with . This means that, and for every clause do not change under the update. In this case, , so cannot be dirty, and this gives the base case.
For , a dirty pair requires some with . Since is unchanged, there must exist some with different values under and . As is defined to be in both transcripts and the randomness for two transcripts are the same, for some .
If , a clause in their symmetric difference belongs to and is within one hop of . Thus is within two hops of . Otherwise, some enters or leaves , so is dirty. By the induction hypothesis, is within hops of . Since and , the distance between and is at most .
Corollary 2. For each , the expected number of dirty pairs is .
Proof. The graph has maximum degree at most 2d. By Lemma 4, there are at most possible clauses with dirty. Each of these pairs is dirty with probability according to Observation 1. As a result, the expected number of dirty pairs is because .
Corollary 3. Let . For every , . Consequently, the expected recourse of the dynamic algorithm is .
Proof. There are two possibilities where changes after the update:
-
Either a clause enters or leaves , meaning that is dirty. Each dirty pair changes for at most variables . By Corollary 2, this case accounts for variables in .
-
Or, enters or leaves for some , meaning that belongs to . For each , happens with probability by Corollary 1 and . Each such clause again affects at most variables, so this case accounts for variables in .
This shows that . The algorithm shifts its output from to . Every variable with belongs to , and summing over proves the final claim.
Our algorithm will find dirty pairs and construct stage by stage. At the start of stage , the algorithm will hold a candidate set containing every clause for which is dirty, and also know for every clause . The initialization implemented below will construct and compute the information for stage one. It also makes available
Stage consists of the following steps:
-
For each , update membership in using . Every forms a dirty pair , so this recovers .
-
For every clause in the union of and , update for as appropriate. This will recover and identify , since either due to a clause entering or leaving , or due to entering or leaving for some .
-
Update , and for every variable .
-
Construct from all clauses satisfying at least one of the following conditions:
(1) ;
(2) and ;
(3) and .
- Set . We compute for every clause , and continue to the next stage if .
Notice that stage one will be executed even when is empty. After this process ends, we output the final assignment and compute according to its definition in table 1.
In the following, we argue the correctness of the algorithm.
Lemma 5. Before stage in the algorithm, the following invariants hold:
-
The algorithm has recovered and for and also for ;
-
The set contains every clause C for which is dirty;
-
The algorithm has recovered for every clause C and .
Proof. We prove the invariants by induction. At stage one, invariant 1 holds trivially, while invariants 2 and 3 hold due to the initialization discussed below.
Suppose the invariants hold before stage . Steps 1 and 2 in stage recover and for . Since , this also shows that the algorithm constructs , and invariant 1 holds.
To show invariant 2, define to include every clause satisfying either , or and . We claim that . Fix and consider two cases:
. If , condition (2) includes it. Otherwise, its variable set does not change, but . This means some satisfies , and for some . Condition (1) puts in . Condition (2) then adds to and for every .
- . is satisfied in both and , and for every . As a result, implies .
If for some , condition (1) includes . Otherwise, has the same assignment under and , hence and is dirty. Invariant 2 in the induction hypothesis gives . As is falsified by but does not belong to , , and condition (3) includes it in .
Finally, there are two ways for to be dirty:
-
contain a clause with , where and .
-
, but there is a clause with and . In this case, either or belongs to , and it belongs to , so .
This proves invariant 2 for stage , and invariant 3 follows immediately from invariant 2 and step 5.
Corollary 4. When the algorithm terminates, the invariants in lemma 5 hold for every and the algorithm reconstructs .
Proof. From lemma 5, it suffices to consider the stopping condition. Suppose for some . Then , and condition (2) implies for every . There are no dirty pairs at stage , so . Additionally, there is no clause with , so steps 1–3 of stage do nothing, and . This also shows that conditions (1)–(3) in step 4 of stage produce no clause in , so and all resampling bits and clause falsification bits in subsequent iterations coincide between and .
In sum, all invariants hold for every at the end. Since we update , and along the way according to their definitions and finally compute , the algorithm reconstructs .
3.4 Implementation Details and Analysis
Transcript storage. For each clause , we store and sequences , , and ; for each variable , we store its randomness table, , and the sequence . Each infinite-length sequence is represented by a linked list of its nonzero entries in increasing order of stage. Since everything is zero for an empty stage, the length of each linked list is finite almost surely. Accessing or locating index in each array now costs rather than constant.
We use hash tables of size and , respectively, to store and , with chaining [Knu05] to resolve collisions. Each clause will lazily generate a random key , and each variable lazily generates . The expected number of collisions is for each insertion or deletion, so each update takes time. The buckets for are generated lazily when is inserted to avoid time for variable insertion. Iterating through and takes and time, respectively, and we can iterate through in time since .
Initialization. During initialization, we first apply updates in to get and for clauses and variables in expected time. We can also easily compute for each clause along the way in time.
We maintain a data structure for each clause to evaluate it on . Since , we only need to apply updates in to in expected time to get for ; clause satisfies .
There are several possibilities a clause satisfies :
• , where .
• but for some , meaning that .
, , but belongs to only one of and , meaning that either or belongs to .
In sum, if , then there is such that or is one and . We go through every such that or is one, and then compute for every .
By Equation (1), each of the events and has probability . Hence, in expectation, clauses need to update their counters, and the expected work to perform these updates is . Finally, include in every clause whose pair changed. We have .
For use in later stages, during initialization, we also construct for every in time. Applying the same idea as in Corollary 1, we have
The total expected cost to construct for is , and the expected total initialization cost is therefore .
Implementing a stage. Next, we discuss implementations for stage r.
-
Step 1 takes time to access -th index in an array for every .
-
To implement step 2, it suffices to inspect every clause and update as appropriate for , since . Each clause affects 2s variables, and each variable contributes work to access and update , so the total work is .
-
Step 2 yields the variable set . In step 3, every variable updates and in time, and updating takes time since it may generate a new entry in its randomness table. So the total cost for step 3 is .
-
In step 4, condition (1) requires every to add every clause in to , while conditions (2) and (3) require the algorithm to inspect every clause in , so constructing costs .
-
Constructing in step 5 costs . For each clause in , recovering its assignment in incurs work, and evaluation takes expected time. The counters are computed in time afterwards, so step 5 costs in expectation since .
Charge the work in step 5 of stage r to stage . By Corollary 3 and eq. (3), the expected work charged to stage r is
From the initialization, we know that , and we will bound for in the following.
Lemma 6. For every and , and .
Proof. The distance claim is trivial if , so we consider the case where , meaning that . Consider the three candidate conditions that include in .
Under condition (1), some satisfies . One possibility is that a clause enters or leaves , in which case Lemma 4 shows and . The other case is that some clause belongs to , where and . In either case, the distance between and is at most 2r.
For conditions (2) and (3), either , where the distance is clearly zero, or . At , initialization gives . For , a direct induction gives that every clause in is within hops of . Both cases imply the claimed distance bound.
For the second assertion, condition (1) supplies with . When , , and when , . Condition (2) states directly. Under condition (3), is falsified by , so some variable must be resampled at stage or later before the clause becomes satisfied. Hence .
For a fixed clause , applying the same idea as in Corollary 1 and a union bound over variables gives that the probability that is . The oblivious update sequence fixes the -hop neighborhood of independently of the randomness tables, and the neighborhood contains clauses, so Lemma 6 implies
We conclude that the total expected work for stages is
The expected work for stage one is since , and it is dominated by the sum above. Equation (5) therefore gives the total expected work for these stages.
Final cleanup. Finally, we compute only for clauses in . To justify this, consider a clause outside it. Due to condition (1), for every and . If , then . Otherwise, it belongs to . If , condition (2) at stage one would put it in , a contradiction. Thus , and this implies . Each computation scans at most variables, so the expected cleanup cost is at most
We finally wrap up the discussion and prove the main theorem of this section.
Proof of Theorem 2. For a batch of clause updates, correctness follows from Lemma 5. The expected recourse is by Corollary 3. Initialization takes expected time, repair takes expected time, and cleanup takes expected time. Their sum gives the stated work bound.
To introduce an isolated variable, initialize its transcript data to be all zero and generate as its value in the output assignment. This takes expected time. To remove an isolated variable, discard its record and remove it from the output, taking constant time.
4 Dynamic edge coloring: poly() update time
In this section, we give a dynamic algorithm that maintains a edge coloring in poly() expected update time. We first illustrate a black-box application of Theorem 2 in the iterative edge-coloring framework of [CHL], leading to a time algorithm, and then improve it to poly() by a more careful application of Theorem 2.
Notice that the static algorithm in [CHL] requires , and this will be the parameter range in which all the following edge-coloring algorithms operate. For a fixed , define to be the smallest maximum degree for which the static algorithm in [CHL] works.
4.1 The Static Algorithm and a Black-Box Dynamic Algorithm
We begin by reviewing the two phases of the static algorithm of [CHL]. Its first phase consists of iterations of a partial-coloring procedure. It uses a palette for some , and leaves an uncolored graph of maximum degree . The second phase colors this remaining graph with the colors outside .
At the beginning of iteration , let be the graph of uncolored edges and let be the palette of . Write for the degree of in , and write for the number of edges of incident to whose palettes contain . The algorithm maintains, for suitable parameter sequences , the invariants
We do not need the exact definitions of these sequences. We only use that , , and for every and some constant not depending on or . These bounds follow from [CHL, Lemma 4].
The first step of iteration is to form an augmented instance to ensure uniform progress across the instance in the following way:
-
First, each edge in drops arbitrary colors to achieve uniform palette size .
-
After that, define to be a set of placeholder colors disjoint from . We attach an imaginary subtree of depth three to every vertex . The palette of each imaginary edge either contains all of or contains all but one color of together with one color from . The goal is that at every vertex within a two-hop neighborhood of the real vertices, the color degree of every color in , including imaginary edges, is exactly .
Notice that the degree of a vertex may exceed or the color degree of a color in at a vertex may exceed in the augmented instance, but we will only keep real edges in and colors in after the iteration, so this causes no issue. We assume that there are enough imaginary edges around each internal vertex with palette .
The procedure OneShotColoring is then applied to the augmented instance. It independently selects a uniformly random color for every edge . An edge is successfully colored if none of its adjacent edges in selects the same color. The unsuccessful real edges form , and colors used by successful adjacent edges are removed from their palettes.
The LLL instance for iteration contains clauses asserting the degree, color-degree, and palette invariants for vertices and edges in . As observed in [HMR26, Section 10.1], every variable occurs in clauses, and the maximum failure probability is when . Hence all the parameters in Theorem 2 are poly(), except .
Lemma 7. There is a dynamic algorithm that maintains a edge coloring of a graph of maximum degree under edge insertions and deletions with expected update time .
Proof. For every iteration , maintain an instance using Theorem 2, and process in order. Let be the updates to generated by the preceding iteration, where consists of the input update.
Since is built on the augmented instance , we first construct the corresponding batch of updates to . In addition to inserting or deleting the real edge itself, an insertion or deletion in changes the palettes of imaginary edges to maintain the uniform color degree; enough imaginary edges with palette are available for this purpose. Implementing every such palette change by deleting and reinserting the edge gives .
Now we apply the updates in to . We first introduce the new variables for insertions in , apply one batch of updates to the variable sets of the affected clauses, and then remove the variables that have become isolated. By Theorem 2, these operations take expected work. The variable insertions and deletions incur recourse, while the clause updates incur additional expected recourse. Thus the total expected recourse is .
We next generate from the recourse of . If the selected color of an edge changes, only and adjacent edges selecting its old or new color can change their success status. At most one such adjacent edge at each endpoint can be successful for either color, so at most five edges change their success status and at most five real edges enter or leave . A changed successful color in , on either a real or an imaginary edge, affects the palettes of adjacent real edges. Thus one change in the selected color generates updates to . Consequently, . Iterating through levels and using shows that the expected work and recourse of the first phase are .
In the second phase, we color the remaining graph, whose maximum degree is , with the colors outside . We maintain this coloring greedily: delete the color of an edge that leaves the graph, and assign any color unused at either endpoint to an edge that enters the graph. This takes time per change, so the total expected update time remains .
4.2 A poly() algorithm
The loss in Lemma 7 comes from implementing a palette change as a variable replacement. In the following theorem, we show that only fraction of palette changes affect the selected colors in , if we carefully couple the randomness of the variables. With this, we can show that the number of updates grows by only a constant factor per iteration.
Theorem 3. There is a dynamic algorithm that maintains a edge coloring of a graph of maximum degree under edge insertions and deletions with expected update time poly().
Proof. We first specify how the entries in the randomness table are sampled. For every variable and , lazily generate a uniformly random permutation of , and let be the first color of in this permutation. This is a uniformly random element of , and .
As in Lemma 7, process in order, and let and be the updates to and , respectively. Let be the edge insertions and deletions in , and let be the palette changes in . A palette change in is a pair with that adds or removes from . Define and analogously. Initially, and .
From Lemma 7, each edge in generates one update in and updates in . For an insertion of a color into , or a deletion with , no change to the augmented instance is needed. Otherwise, we need to replace in by an arbitrary color of and update a constant number of edges in the imaginary subtrees to maintain uniform color degree. Hence and .
We apply to in the same way as Lemma 7. For each with palette changes, we replace its old variable with a new variable , implemented by an edge deletion and an edge insertion. However, we will couple the zeroth randomness-table entries of and by setting ; all entries with index are generated independently.
Conditional on the entire input history from earlier iterations, the update sequence and palettes for this iteration are fixed independently of its randomness. We first argue that the coupling preserves the bounds in Theorem 2. Indeed, we only couple pairs of variables in which one variable belongs exclusively to clauses in and the other belongs exclusively to clauses in . Thus, within each of and , the randomness tables of all variables remain mutually independent with the prescribed distributions. Therefore, Lemmas 2 and 3 apply separately to and . The analysis of Theorem 2 uses these two tail bounds only through union bounds and does not require the two transcripts to be independent. Thus the update takes expected work, and the batch of clause updates generates expected recourse.
Now we bound the changes propagated to the next iteration. Let count the number of edges in that either change their selected colors or are inserted or deleted. Every update in contributes one to , and the clause updates in contributes edges to in expectation.
Now consider an edge whose palette changes from to . Define and to be its color before and after the update. If they differ, then either or . The first event has probability by Lemma 3. For the second event, as , the permutation must place an element of first among . As a result,
and each palette change in contributes edges to in expectation. In sum, we have
As in the analysis of Lemma 7, each edge counted by changes the status of real edges and generates palette updates in . At the same time, changes in could propagate to the next iteration. Consequently,
Define the quantity . Since and , the preceding bounds give for some constant , and for every . Since , the process for all iterations takes expected work in total. Finally, the same greedy method handles the second phase with an additional factor. The total expected work remains .
5 Dynamic edge coloring: update time
In this section, we build a dynamic algorithm for edge coloring with update time . We first illustrate the iterative degree splitting approach using the algorithm in theorem 2, and then introduce an alternative algorithm based on graph shattering.
5.1 Iterative Degree Splitting
The main idea is to apply the following lemma recursively to reduce the degree of the input instance.
Lemma 8. Let bound the maximum degree of a dynamic graph , and let and satisfy . There is a dynamic algorithm that partitions into subgraphs, each of maximum degree at most . Its expected update time is , and its expected recourse, defined by the sum of edge membership changes across all subgraphs, is .
Proof. Consider the random process in which each edge independently chooses uniformly from and joins the -th subgraph. For each vertex , let be the event that its degree exceeds in some subgraph. A Chernoff bound followed by a union bound over subgraphs gives . The event depends only on the variables for edges incident to , so the dependency graph has degree at most . Since , this is an LLL instance.
We maintain a satisfying assignment of the instance with Theorem 2. Its parameters are , , , , , and . In this instance, : for every vertex, we store its degree in each subgraph and the number of subgraphs that exceed the threshold in , and updating these quantities after a single insertion or deletion takes constant time.
Finally, an edge update introduces or removes one variable, which participates in two bad events. By Theorem 2, the expected work is , and the expected recourse is .
We first use this procedure once to handle a bounded range of degrees.
Lemma 9. There is an algorithm that maintains a edge coloring for a dynamic graph of maximum degree under edge insertions and deletions with expected update time .
Proof. Set for a sufficiently large constant . If , the claim follows directly from Theorem 3. Suppose instead that . We first apply Lemma 8 with and . Every resulting subgraph has maximum degree at most , and the lemma applies because . We then apply independent instances of Theorem 3 to these subgraphs with distinct palettes, so the total palette size is .
The partition algorithm has expected work and recourse. The update sequence for each Theorem 3 instance is oblivious to the randomness, so each instance has expected work and recourse. Every reassigned edge produces one deletion and one insertion among the instances, so the total expected update time across all instances is .
It remains to consider . We define , and for every
We additionally define ; thus . The sequence gives the degree bounds across the levels of our recursive execution.
Let be the smallest index for which . Then and . We may assume that is large enough so that for every , and thus for . It follows that
To see why , observe that and for every . Thus,
The argument above similarly gives for every and thus for .
Lemma 10. There is an algorithm that maintains a edge coloring of a graph of maximum degree under edge insertions and deletions with expected update time .
Proof. By Lemma 9, it suffices to consider . Our algorithm consists of levels, with independent randomness at every level. At level , the algorithm maintains a partition into subgraphs of maximum degree at most . Starting with , we apply Lemma 8 with and to every member of , and add the resulting bipartitions to for level . We have , so the lemma can be applied. Finally, for every graph in , we apply Lemma 9 to obtain a edge coloring. Since , the final coloring uses colors.
At level , an update causes expected recourse . Every reassigned edge produces one deletion and one insertion at the next level, so each update in the -th level passes in expectation updates to the next level. As a result, a single edge update to , equivalent to an update to , generates in expectation
updates to for every . Summing over levels shows that maintaining takes expected work and generates recourse to . Finally, each update to is passed to the corresponding instance in Lemma 9, so the total expected cost is .
5.2 Alternative Approach Based on Graph Shattering
Here, we review an alternative approach to compute the iterative degree bipartition in the static setting given in [HMN22]. This will be the backbone of our final constant-time dynamic edge coloring algorithm.
The recursion has the same structure as in Lemma 10 and is represented by a full binary tree with levels . We use nodes for elements of and reserve vertices for elements of . The output at depth is a partition of the input graph into subgraphs.
Write for the root of , for the depth of in , for the set of leaves, and for the set of leaves inside the subtree of a node . A node is internal if it is not a leaf. For an internal node, write and for its left and right children; for , write for its parent. Two nodes are comparable if one is an ancestor of the other. Here and below, a node is considered an ancestor of itself.
For , set . Independently for every edge and depth , sample a uniform direction and a uniform category ; all category and direction choices are mutually independent.
Algorithm Description In the algorithm, each node in maintains an output edge set . Initially, and all other sets are empty. The algorithm calls , where performs the following steps.
-
Let . If , stop the process.
-
Partition into by placing each edge into its category. Initialize for , and set .
-
Process the categories in the order .
(a) Let consist of edges in that have not entered . Each such edge proposes .
(b) Perform the following tests for every vertex in parallel:
-
the degree test fails if the number of incident edges in exceeds ;
-
the discrepancy test fails if the numbers of incident edges in directed LC and RC differ by more than .
If either test fails, call a failure. For each failure , add all its incident edges in to . For every neighbor of in and , also freeze all edges in incident to by adding them to .
(c) Send every surviving edge of to or according to its proposed direction.
-
For every connected component of , deterministically compute an edge bipartition with degree discrepancy at most two at every vertex. Send its two parts to and . This can be done deterministically by computing an Euler tour of the component after pairing odd-degree vertices.
-
Call and .
We call steps 2 and 3 the pre-shattering process and step 4 the post-shattering process.
The following table summarizes the input and data that the algorithm keeps track of. For quantities index by a node , write .
| Quantity | Meaning |
|---|---|
| The sampled direction of edge at depth | |
| The sampled category of edge at depth | |
| The edges assigned to node | |
| The set of category- edges at | |
| The edges of that are not already bad when category begins | |
| The edges added to the bad set while processing category , including frozen edges | |
Table 2: Input and data in a static edge-splitting transcript
Algorithm Correctness In the following, we prove the correctness of the algorithm. Let .
Observation 2. For every , is a partition of .
Proof. We prove by induction on . The base case is trivial. Suppose that the statement holds for and consider any node of depth . After the pre-shattering process of , every edge in belongs to exactly one of , and . The post-shattering process further partitions into two parts, and merge them with and . This implies that and partitions , and thus partitions from the induction hypothesis.
Lemma 11. For every , the maximum degree of any graph in is at most .
Proof. We prove by induction on . The base case is trivial as the input graph is of maximum degree .
Suppose that the statement holds for . Consider any node of depth and any vertex . produces an edge bipartition of according to Observation 2, and to show that the degree of in both edge sets does not exceed , it suffices to show that the degree discrepancy is at most . The post-shattering process always produces at most two discrepancy for each vertex, so we pay attention to pre-shattering process next.
During , Let be the first category in which or a neighbor of in fails, and set if it does not exist. Consider the contribution to the discrepancy for each category:
-
For , every edge incident to in is not moved to and the discrepancy test bounds their discrepancy by .
-
For , either fails and contributes nothing, or its degree test passes and the surviving edges contribute at most to the discrepancy.
-
For , since neighboring failure in category freezes every edge incident to in later categories, category contributes zero to the discrepancy.
In sum, the pre-shattering discrepancy is therefore at most , and the total discrepancy is at most .
6 Dynamic edge coloring: poly update time
In this section, we develop the algorithm that removes the dependence on from the update time based on the static algorithm in Section 5.2.
6.1 A Modified Static Algorithm
We follow all definitions and notations in Section 5.2. For each edge , we notice that the random directions defines a routing path for , where and
Definition 2 (). For a node of depth , define to be the set of edges that would reach if they followed their routing paths.
By a slight abuse of notation, in the following, we also use an edge set such as to denote the graph with vertex set and edge set .
The edge sets describe the ideal execution of the algorithm, in which every edge follows its sampled directions. However, the algorithm may need to reroute some edges when the random choices are unfavorable. The algorithm described in Section 5.2 tests every possible vertex in the pre-shattering process to compute , the set of edges being rerouted. In our modified algorithm,the rerouting is instead guided by a set of seed failures, defined as follows.
Definition 3 (Seed failure). A pair with is a seed failure if , or if is internal and some category satisfies at least one of the following conditions in :
-
more than category-i edges are incident to ;
-
the numbers of incident category-i edges with direction LC and RC differ by more than .
Notice that the tests in the seed failure match those in step 3(b) of the algorithm in Section 5.2, but use different underlying edge sets. Seed failures identify the starting points where the algorithm may need to deviate from the proposed edge set .
For , define , where the empty sum gives . The next definition characterizes the “effect” of a seed failure.
Definition 4 (Cluster). The cluster of consists of all pairs such that is a descendant of and contains a path from to of length at most on which every vertex except the terminal vertex has degree at most . Paths of length zero are allowed.
Since we require every vertex except the terminal vertex to have degree at most , one can show that a cluster contains at most pairs. Roughly speaking, in our algorithm below, each seed failure is responsible for degree overflow within its cluster during the execution. We now state the completeness condition required of by the static algorithm.
Definition 5 (Completeness). A set is complete for an instance if it satisfies all the following.
(I) Every pair in is a seed failure.
(II) Every seed failure in the cluster of a pair in also belongs to .
(III) If , , and , then .
(IV) If is a leaf and , then .
Algorithm Description Fix a complete set . Each node maintains an output edge set and a set of active vertices. Initially, and all other sets are empty. The algorithm calls , where performs the following steps. Steps different from the algorithm in Section 5.2 are marked red.
-
Let . If , stop the process.
-
Define to be .
-
Partition into by placing each edge into its category. Initialize for , and set .
-
Process the categories in the order .
(a) Let consist of edges in that have not entered . Each such edge proposes .
(b) Initialize to be , and perform the following tests for every vertex in parallel:
-
the degree test fails if the number of incident edges in exceeds ;
-
the discrepancy test fails if the numbers of incident edges in directed LC and RC differ by more than .
If either test fails, call a failure. For each failure , add all its incident edges in to . For every neighbor of in and , also freeze all edges in incident to by adding them to . Whenever an edge enters , add both endpoints to .
(c) Send every surviving edge of to or according to its proposed direction.
-
For every connected component of , deterministically compute an edge bipartition with degree discrepancy at most two at every vertex. Send its two parts to and . This can be done deterministically by computing an Euler tour of the component after pairing odd-degree vertices.
-
Define to be . Set and to be , and call and .
Table 3 summarizes the input and data that the modified static algorithm additionally keeps track of apart from Table 2. For quantities indexed by a node , write .
| Quantity | Meaning |
|---|---|
| The node at depth along its routing path | |
| The ideal edge set | |
| The complete set of seed failures supplied to the algorithm | |
| The set of active vertices | |
| Activated vertices after processing categories | |
| The final active set |
Table 3: Additional input and data in the new static edge-splitting transcript
Algorithm Correctness We start with some simple observations and then prove the algorithm's degree guarantee.
The first observation shows the monotonicity of active sets and is straightforward from the algorithm description.
Observation 3. If for some internal node and , then for every and for every strict descendant of .
The second observation says that the process of activation is local.
Observation 4. For an internal node and , every vertex in is within distance of in .
Proof. We argue by induction on . The base case is trivial. For the induction step, only when it is incident to an edge moved to . The failure responsible for the movement satisfies , and the distance between and in is at most two. This completes the induction.
The next observation shows that a passive vertex's adjacency list follows the ideal execution.
Observation 5. For every node and , the sets of edges incident to are the same in and .
Proof. We argue by induction on . The base case is trivial. For the induction step, by Observation 3, . As a result, the induction hypothesis implies that the sets of edges incident to are the same in and . Since , none of the edges incident to in enters the bad set, and every edge follows its proposed direction. Then the statement follows since contains the set of edges in that propose to enter .
In the next lemma, we show that every activated vertex is in the cluster of some seed failure in .
Lemma 12. For every internal node and , there is such that is an ancestor of , the distance between and in is at most , and is in the cluster of .
Proof. We find by an iterative process. Each step in the process records an ancestor of , a vertex , and a path from to in of length at most . Initially, by Observation 4, there is a vertex within distance at most from . We set and let be the shortest path from to in . In each step, we do the following checks.
-
If , then and . Apply Observation 4 to find a path of length at most from some to , add it to the beginning of , eliminate loops when necessary, and replace with .
-
If but an edge of is absent from , then that edge departed from its routing path at a strict ancestor of , and according to Observation 3. Replace the prefix ending at by a path of length at most from some to , and replace with .
-
For the remaining case, . If a vertex of other than has degree greater than in , let be the first such vertex. The prefix ending at witnesses that lies in the cluster of . Properties (II) and (III) of completeness give . Retain the suffix from to and replace by .
-
If none of these cases applies, witnesses that lies in the cluster of , and the procedure stops.
It is easy to see that every nonterminal step in this process moves to a strict ancestor and preserves the length invariant. The process enters step 4 and terminates when . It cannot enter the first two branches because , and the third case does not apply because all vertices have degree at most . Thus, the process terminates after finitely many steps and finds satisfying the statement.
Corollary 5. For every internal node and , is not a seed failure.
Proof. From Lemma 12, there is whose cluster contains . Since , , so is not a seed failure by property (II) of completeness.
The previous claims suffice to prove the degree guarantee for active vertices.
Lemma 13. If is complete, then for a node of depth and , .
Proof. We prove the statement by induction on . For the base case , every vertex in has degree at most . For the induction step, denote and fix . We claim, by a case analysis, that :
-
When , the induction hypothesis gives that ;
-
When , we know that is a seed failure. If , then ; if , since otherwise by Observation 3. This means, according to property (III) of completeness, . Finally, since , Observation 5 gives that .
-
Finally, when , is not a seed failure by Corollary 5, and according to Observation 5.
As and partition , to show that , it suffices to show that the degree discrepancy of the bipartition generated in for is bounded by . The post-shattering part generates discrepancy at most two for every vertex, and we consider pre-shattering next.
Write , , and . If , then following the same argument as in lemma 11, the pre-shattering discrepancy is at most .
Now suppose that , and let be the category in which becomes active. Before this category, no incident edge has become bad, and every incident edge follows its proposed direction. Since is not a seed failure and , Observation 5 bounds the total discrepancy of these earlier categories by . Category contributes at most its degree, , to the discrepancy. Starting with category , is tested, and lemma 11 bounds the remaining contribution by . Hence the pre-shattering discrepancy is at most , and the total discrepancy is at most , as required.
For passive vertices at the leaves, Observation 5 and completeness guarantee (IV) imply that their final degrees are at most . This, along with Lemma 13, gives the degree guarantee of the algorithm.
Corollary 6. If is complete, then every graph in has maximum degree at most .
Proof. Fix a leaf and vertex . From Lemma 13, when , . When , we have by Observation 5. From property (IV) of completeness, if , then and , a contradiction. This proves the claim.
6.2 The Dynamic Algorithm
The dynamic algorithm maintains the transcript of the static algorithm above in two stages. The discovery stage maintains a complete set , and the repair stage updates the transcript using this set. During the dynamic algorithm, the random directions and categories remain unchanged throughout the lifetime of an edge .
In the rest of this section, let us fix an update, denoted by . We use and to denote the sets of edges whose routing paths pass through before and after this update, respectively. Further, define . The clusters of a pair in the old and new instances, called its old and new clusters, are defined by Definition 4 using and as the underlying graphs.
6.2.1 Algorithm Description
Failure Discovery Stage In the first stage, we explicitly maintain vertex degrees and adjacency lists of only for leaves. For an internal node , is maintained implicitly as the union of over . We also explicitly maintain the seed failure set . For an insertion, we sample , while the random categories are sampled lazily. These choices remain unchanged throughout the lifetime of . For either an insertion or a deletion, we then apply the update to , thereby obtaining the new leaf edge sets.
We then call a recursive procedure Search on pairs in to update . We generate an initial Search call for , , and every pair in whose old cluster contains either of these two pairs. Every Search call generated recursively is called noninitial.
Search performs the following steps.
-
If is no longer a seed failure after the update, remove it from if present, and return.
-
Add to if absent.
-
If and , call Search.
-
Call Search for every pair in the new cluster of .
Repeated calls to Search with the same parameter are redundant, so we use an additional bit for each pair to guarantee that every pair is visited only once throughout the stage. We use to denote the set before the discovery stage and to denote the set after all Search calls have finished.
Lemma 14. After every update, if is complete for the old instance, then is complete for the new instance.
Proof. We show the properties one by one.
-
For (I), the status of as a seed failure can change only when and lies on the routing path of . Any such pair in has an old cluster containing , so it generates an initial call and gets removed from if it is no longer a seed failure. All newly added members are seed failures by the algorithm description, so (I) holds.
-
For (II), notice that the old and new cluster definitions differ. We use the following observation: For , if neither nor belongs to the old cluster of , then the old and new clusters of are the same, and the sets of seed failures in this cluster are also the same. To see this, if is not on the routing path of , then does not affect and the statement is immediate. Otherwise, the path that witnesses the gain or loss of the cluster must use or pass through an endpoint whose degree changes in the old instance. The prefix then witnesses that or belongs to the old cluster of , contradicting the assumption. The same argument also shows that the cluster of cannot contain a pair whose adjacency information changes in , so the set of seed failures remains unchanged.
Now fix . If is called, step 4 visits all seed failures in its new cluster and adds them to . If is not called, it is in , and its cluster and the set of seed failures in that cluster remain unchanged. Since is complete for the old instance, (II) also holds in this case.
-
For (III), write and first observe that when and , is a seed failure, since otherwise summing its category discrepancies would give that , contradicting the degree overflow. As a result, if is called, step 3 will call and add to . Otherwise, and , so since is complete, and finally since it is still a seed failure.
-
Finally, if the event is caused by the new edge , then and , and step 3 of adds to by property (III). Otherwise, . The persistent overflow at implies that is still a seed failure, so it remains in .
A Naive Failure Repair Stage As in Section 3, define as the static algorithm transcript of the old instance with seed failure set , and as the static algorithm transcript of the new instance using . The two transcripts use the same randomness for each edge. For a transcript item and , we use to refer to the value of in . We assume that the algorithm knows before the update and constructs by updating .
We use the following definition to group the transcript data.
Definition 6. For a transcript , an internal node , an integer , and a vertex , we define the local information to be the following:
-
The set of edges incident to w in ;
-
The set of edges incident to w in for ;
• Whether w belongs to for .
For each internal node of depth and , we maintain a dirty set . It is intended to contain all vertices with , and we say is good if it indeed contains all such vertices. For now, assume that all dirty sets are good.
The repair process for starts after the process for completes and produces a set . We initialize to be when , and is initialized to contain the two endpoints of the updated edge . Additionally, for every vertex with , we add to . For every vertex in , we compute based on , and when , which have already been constructed during the discovery stage and the repair process for .
If is empty, we can skip the process for repairing . Otherwise, categories are processed one by one to update the local information. Since the pre-shattering process for each category is local, we mainly focus on vertices around for recomputation. Specifically, define
From the algorithm description, depends only on for inside the two-hop neighborhood of in . The same holds for . As a result, if does not lie in the two-hop neighborhood of in , . So it suffices to compute for every within the two-hop neighborhood of in by simulating step 4(b) in .
After the local information update, is constructed. For each connected component C in this graph, if C does not intersect , then the same component also appears in , in which case we can reuse the old bipartition. For all other connected components, we recompute and store a new bipartition.
Let be the set of vertices whose connected component in touches . Notice that . At the end of the repair process, is passed to both children for initialization, and the repair process continues until we reach a leaf.
Failure Repair Stage, with a Clever Initialization The previous algorithm cannot avoid the overhead in work, since the edge update itself can affect the local information of nodes in the recursion tree even if it does not cause any change in the execution. To address this, we notice that Observation 5 describes the structure of when .
Observation 6. For , an internal node of depth , an integer , and a vertex , stores the following: its adjacency list in is the same as in ; none of its incident edges enter for ; and for .
Proof. By the algorithm description, for every . Thus, for , and . By Observation 5, its adjacency list in is the same as that in . Finally, since includes whenever an incident edge of is added to , we conclude that has no edge incident to for every .
Since we have already maintained for every leaf b during failure discovery, we only need to explicitly store when x is activated.
We can see the benefit of this implicit representation when neither endpoint of is activated in either or and . In this case, the repair stage requires no work, since the discovery stage has already updated , and all local information affected by this update is represented implicitly through these leaf edge sets.
This motivates our new initialization rule. We compute to be the shallowest internal node on the routing path of the updated edge such that an endpoint of belongs to . Define
when such a node does not exist. Instead of adding and to , we will add and to for every node along the path from to .
Next, we prove the correctness of the algorithm. Recall that is good if it contains every vertex w whose local information differs between the two transcripts. We first show that the goodness property propagates from top to bottom.
Observation 7. For an internal node and , if is good, then so is .
Proof. Consider a vertex outside the two-hop neighborhood of in . Since is good, every vertex within distance at most two of has the same local information for category in both transcripts. From the algorithm description, only these vertices can affect the local information for category . Thus every vertex whose local information for category changes lies in the two-hop neighborhood of in . The repair process examines exactly this neighborhood, so is good.
Observation 8. For an internal node of depth , if is good, then so is .
Proof. Consider a vertex whose local information differs between the two transcripts. Suppose that an edge incident to enters or leaves . If its presence in or its status in the parent's pre-shattering process changes, the goodness of places in . Otherwise, is bad in both transcripts and its post-shattering assignment changes. The deterministic bipartition for each component then implies that its component has changed. Its new component contains an endpoint of a changed bad edge, so .
The remaining possibility is a change in membership in . A change in the first set puts in , and a change in the second set adds directly to . Thus is good.
We next show that a good dirty set produces a correct repair.
Lemma 15. Let be an internal node of depth . Suppose that, before the repair at , the algorithm has constructed and also when , and that is good. Then the repair at constructs , , , and all local information at in .
Proof. We use induction on the category to prove that is constructed for every vertex during the repair process. The base case is implied by the fact that is good and the algorithm has access to , , and . For the induction step, by Observation 7, is good. For every vertex outside , ; for vertices inside , is computed from category- local information given by the induction hypothesis.
As tracks whether belongs to , is also constructed, as is . The fixed randomness determines the child of to which each edge in is sent. Additionally, the post-shattering process recomputes every component touching and reuses the bipartition for old components. Since the post-shattering process is deterministic, the resulting bipartition is the same as that generated in . Thus, the algorithm constructs and .
Together, the preceding results would prove the correctness of the algorithm if were good. This is the case when we add and to , but it does not hold for the new initialization. Define to be the set of vertices such that . We prove a stronger invariant for the algorithm with the new initialization, consisting of three items for every internal node of depth and :
-
For every vertex , is constructed.
-
If , then is a strict ancestor of , is one of the endpoints of , and .
-
, and are constructed.
We first show that invariants 1 and 2 for imply those for .
Lemma 16. For an internal node of depth , if invariants 1 and 2 for hold for , then every vertex that does not belong to either or the two-hop neighborhood of in satisfies .
Proof. Since , by invariant 1. As a result, when , either is incident to an edge in , or .
For the case , either , where by invariants 1 and 2, a contradiction, or some , which we will refute next.
If , a failure is responsible for moving it into in the corresponding transcript. since by invariant 2, and since and are within two hops. These imply that , and is a failure in both transcripts. However, this failure adds to in only one transcript, so some satisfies . cannot belong to by the choice of , so and must be since the other two vertices do not belong to .
By invariant 2, is a strict ancestor of , is an endpoint of and . By Observation 6, the only difference between and is the edge . Either connects and , meaning that , as an endpoint of , belongs to ; or does not connect and , in which case and , as an endpoint of , belongs to . In sum, some endpoint of belongs to , and cannot be a strict ancestor of , a contradiction.
Lemma 17. For a node of depth , invariants 1 and 2 for imply the same invariants for when .
Proof. Lemma 16 immediately implies that only contains endpoints of . Now we show that for every , . Together with invariant 2 for , this proves invariant 2 for .
The case contradicts the choice of . We may also assume that is outside the two-hop neighborhood of in since otherwise . As a consequence, the only case we need to refute is . We can find a failure in that moves an edge to . As and are within two hops in , and is also a failure in . Following the same argument as Lemma 16, we can show that some endpoint of belongs to , contradicting the choice of .
Finally, from Lemma 16, it remains to consider for invariant 1. Since , its local information is represented implicitly in both transcripts, while the leaf edge sets are already updated during failure discovery. This shows that is updated to agree with .
Next, we show that invariants 1 and 2 for imply invariant 3 for and invariants 1 and 2 for its children.
Lemma 18. For an internal node a of depth d, invariants 1 and 2 for imply invariant 3 for a and invariants 1 and 2 for and when and are internal.
Proof. First consider the case where . Following the post-shattering argument in Lemma 15, , , and are constructed, giving invariant 3. Further, from Observation 8, and the initialization on the children computes new local information, establishing invariants 1 and 2 for both children.
Now suppose is not empty. As no vertex in belongs to , these vertices are isolated in both and , and the post-shattering bipartition does not change when we add them to . This means and are constructed. Additionally, can be generated from the local information given by invariant 1 for . This shows invariant 3 for .
Now, fix an internal child of . We know that adding to will make good since every vertex in is isolated. Thus, compared with the execution using a good dirty set, initialization at node with dirty set ignores only vertices in . Consequently, , and every vertex in is an endpoint of by invariant 2 at .
Now we show that is empty when is not a strict ancestor of . Fix . By invariant 2 at , and . If , then and , a contradiction. Since , the adjacency information at must be different between and .
By Observation 5, the sets of edges incident to are the same in and , as well as in and . If does not belong to the routing path of , then the edges incident to are the same in and , and . If belongs to the routing path of but is not a strict ancestor of , both endpoints of are added to . Thus, is empty whenever is not a strict ancestor of .
Finally, assume that , so is a strict ancestor of . Since cannot belong to , it either belongs to or does not belong to . The first case cannot happen, since then would be an ancestor of . This proves invariant 2 for .
We finally show invariant 1 for . By invariant 3 at , and are constructed, so each vertex gets . Every vertex in does not belong to , so is maintained implicitly in both transcripts, and it is updated to agree with during the discovery stage. Other vertices do not change their local information. This concludes invariant 1.
We now combine these results to prove correctness.
Lemma 19. After the failure repair process for an update , all invariants hold for every internal node and . Specifically, the algorithm constructs .
Proof. We induct on to prove all invariants. The step from to is given in Lemma 17, while the step from to and is given in Lemma 18. It remains to consider the base case and .
The local information for vertices whose membership in changes is computed explicitly. Every other vertex with must be an endpoint of , meaning that only contains endpoints of . If , then , meaning that and is represented implicitly. We have applied the update to in the failure discovery stage, so is updated correspondingly to agree with , giving invariant 1. Finally, since otherwise and . This gives invariant 2.
6.2.2 Tools for Analyzing Expected Work
We first introduce the objects needed to analyze the expected work in both stages.
Definition 7 (Critical failure). For an update, a pair is a critical failure if there is such that is a seed failure in and either or is not a seed failure in .
Critical failures can be seen as the starting points where one of and deviates from the ideal execution. If is a seed failure at a leaf, its parent is also a seed failure by the discrepancy argument in the proof of Lemma 14. Hence every critical failure is at an internal node.
We also define for . Since is large enough, one can show that the sequence decreases geometrically.
Lemma 20. Fix an update in the dynamic algorithm. For every vertex w and every internal node a of depth d,
The bound remains valid after conditioning on all randomness at levels smaller than , on the level- randomness of edges not incident to in , and on the randomness of the edge being updated.
Proof. We prove the conditional statement; the unconditional one follows from the law of total probability.
Fix . When , whether is a seed failure in is determined by the fixed randomness above . If it is, cannot be a critical failure in ; otherwise, . For , we also have .
Now, fix . Let count the category- edges incident to in . It is a sum of at most independent Bernoulli variables, each with success probability , except that the contribution of the updated edge, if present, is fixed. Since is sufficiently large, a Chernoff bound gives
Now condition on the category choices under the event . The discrepancy between LC and RC directions around for category- edges is a sum of at most independent uniform signs, apart from a possible fixed from the updated edge. Hoeffding's inequality then gives
A union bound over the categories and proves the bound. The events do not depend on the randomness at level for edges not incident to in , so conditioning on this randomness has no effect.
For , put . For a critical failure , let its affected region be the induced subgraph of the -hop neighborhood of in . Next, we define the most important auxiliary graph for the analysis.
Definition 8 ( ). The graph has vertex set
For each affected region , there is a horizontal edge in between each pair of vertices , for which x and y belong to . There is also a vertical edge in between and whenever are comparable and both vertices belong to .
Notice that we use for vertices in to distinguish them from critical failures . For , let be its component in if , and let it be empty otherwise. The following lemma will be central in our expected work analysis.
Lemma 21. For every , , and ,
The same bound holds after conditioning on all random choices of the updated edge.
We prove Lemma 21 in Section 7. By a direct summation and the fact that is geometrically decreasing, the following corollary is immediate.
Corollary 7. For an update , fix the random choices of . Let count the number of vertices in connected to for some such that . Then
6.2.3 Implementation Details and Analysis
We now describe the implementation of both stages. Before the algorithm processes edge updates, we compute , and for , and for in time.
Implementing the Discovery Stage For each edge update , we generate if it is an insertion, and insert or delete in . Mapping LC to zero and RC to one, the sequence corresponds to a uniform integer in . We can therefore define a mapping from to such that for every possible . Since , we can generate the random directions and identify in time.
To apply in in constant time, we maintain the adjacency information with a hash table of size for every leaf and every vertex , using chaining to resolve collisions. The algorithm maintains an independent random function from to , each entry sampled lazily. Since , each value of fits in an -bit word and can be sampled and accessed in time. Each time we apply , we insert or delete in , and insert or delete in . The length of is constant in expectation: indeed, an edge belongs to only when , and . The first condition ensures that there are at most edges other than that can enter , and the remaining two conditions hold with probability for every such edge.
For every vertex and leaf , we store a linked list of the pairs in whose clusters contain . This allows us to enumerate the linked lists at and for initial Search calls. According to the proof of Lemma 14, these lists also include all pairs in whose cluster or status as a seed failure can change after the update.
During a call, we need to check whether is a seed failure. We first introduce a subroutine that returns the adjacency list of in when and returns fail when . Since , we iterate through and the hash table to construct the adjacency list. Once the adjacency list is longer than , we return fail; if the list always has length at most , we return the final list. The process iterates through
buckets. Since extracting each item takes time, the total work performed by this process is .
With the process above, we can check whether is a seed failure in time by gathering the adjacency list of in . If the process fails, is immediately a seed failure; otherwise, we perform the remaining checks in time. The process also allows the algorithm to identify all pairs in the cluster of and update the linked lists by a straightforward BFS within time.
Cost Analysis for the Discovery Stage We have argued that maintaining takes time; it remains to consider the Search calls. Say a Search call succeeds if is a seed failure in , and fails otherwise.
For every seed failure in either or , we can always find a critical failure such that is an ancestor of . Take one of maximum depth and call it the corresponding critical failure of .
Lemma 22. For every successful call , the vertex associated with its corresponding critical failure is connected in to for some . The same conclusion holds for every failed initial call with .
Proof. First, notice that for every critical failure . We induct on the forest of Search calls to prove the statement, where the parent of a noninitial call is the first successful call that generates it. For the base case, consider a successful initial call. Then is a seed failure in , and the old cluster of contains either or . This means that the distance between and in is at most . Its corresponding critical failure satisfies and . Finally, is an ancestor of and is an ancestor of , so , and has the connectivity required by the lemma. The statement for a failed initial call with is the same as above, except that is a seed failure in rather than .
For the induction step, suppose a successful noninitial call is generated by . The induction hypothesis shows that the vertex associated with the corresponding critical failure of is connected to in for some . By the algorithm description, either and , or is in the new cluster of . In both cases, the distance between and in is at most , meaning that is connected to by horizontal edges in . Let be the corresponding critical failure of . Then is comparable to since is, and and are connected by a vertical edge. This finishes the induction.
Lemma 23. The discovery stage has expected worst-case update time.
Proof. Fix the random choices for the updated edge. Let count the number of successful calls with . By Lemma 22, each is associated with a vertex counted by for some . A fixed vertex counted by contributes at most to . Therefore, by Corollary 7,
Charge the work on every failed noninitial call to the successful call that generates it. A successful call at depth generates at most calls with
, so finding these pairs, filtering out seed failures among them, and maintaining the linked lists take work in total. Consequently, the total expected work for successful calls is at most
since , the sequence decreases geometrically, and is sufficiently large. For the failed initial Search calls, the cases in which or take time since we can keep track of vertex degrees in along the way. The other cases follow the same analysis as above due to the second part of Lemma 22.
Cost Analysis for the Repair Stage We have already described the implementation, so we turn to the cost analysis. We first relate the dirty sets to connected components in .
Lemma 24. For every internal node of depth and every , there is a critical failure such that is an ancestor of , is connected in to for some , and . Consequently, is connected to in .
Proof. We induct on . First consider . A vertex x is included for one of three reasons:
. From Lemma 22, the vertex associated with its corresponding critical failure is connected to in for some , and is an ancestor of , so it satisfies the claim.
and . From the induction hypothesis we get the desired critical failure with distance bound .
and is along the path from to path. Either or belongs to , and from Lemma 12, we know that there is a seed failure in whose cluster contains or . As is the updated edge and is on its routing path, the distance between and in is at most . Let be the corresponding critical failure of . Then is connected to in , so it satisfies the claim.
The argument above gives a critical failure satisfying all the conditions and the tighter distance bound . It proves the base case for the following induction statement on : For every , there is a critical failure satisfying all conditions in the lemma statement and a tighter distance bound
For the induction step, is within the two-hop neighborhood of for every in . Notice that the underlying edge set of is , rather than . For vertices in , apply the induction hypothesis directly. For other vertices , take a shortest path to in , and set if the path has length one. If it lies entirely in , then the induction step holds trivially.
If not, then either or belongs to , so that edge deviates from its routing path. Let be the highest ancestor of such that either or belongs to . Then some belongs to . By Lemma 12, there is a seed failure in either transcript whose cluster contains . Take its corresponding critical failure .
We know that is an ancestor of , and the distance between and in is at most . Additionally, and belong to by the choice of so are in the affected region of , and the distance between and in is at most . Finally, we show that is connected to in for some . The vertex is connected to by a horizontal edge, whereas the induction hypothesis gives an ancestor of such that is connected to . Since and are comparable, there is a vertical edge between and .
It remains to consider . Fix and a shortest path in from to . The case is trivial; hence, consider . From the argument above, there is some ancestor of such that is connected to for some .
For each , let be the highest ancestor of such that the edge enters . Such an exists since is a candidate. We know that , so we can apply Lemma 12 to find a seed failure whose new cluster contains and consider its corresponding critical failure . By the choice of , belongs to , so the distance between and either endpoint of is at most , meaning that and are connected by horizontal edges in . At the same time, is connected to by a vertical edge since they are both ancestors of . Consequently, is a critical failure such that is connected to , and the distance between and in is at most . This proves the claim.
The following corollary is immediate from Lemma 24 and corollary 7.
Corollary 8. Define . Then . The statement also holds conditional on the randomness of the updated edge.
Proof. From Lemma 24, every pair with and corresponds to a vertex in connected to for some ancestor of . Such a vertex counts toward in Corollary 7. Each vertex with contributes at most pairs to , so the expected value of is bounded by
□
Lemma 25. The expected work in the repair stage is .
Proof. We split the main cost in the repair stage into the pre-shattering and post-shattering parts.
We first notice that the maximum degree of is for . This follows from and Corollary 6. Thus, the maximum degree of is .
In the pre-shattering part, for every node of depth , , and , is computed. If , then is maintained implicitly, and we spend work to mark it as implicit; otherwise, we collect the set of vertices and local information in its two-hop neighborhood in time to construct .
We also need to take into account work to compute . Since implies for internal nodes inside the subtree of , we can find by tracing upward along the routing path. Testing whether can be done by checking in time, so the total time to find is .
To skip repairs on nodes with empty , we maintain an array of lists in which contains the set of nodes with and . We also maintain the smallest index such that . Each pair adds to , and the two endpoints of add to . Finally, we go through for the repair. This incurs an additional cost of , dominated by the previous poly cost.
In the post-shattering part, each vertex in participates in computing the new post-shattering bipartition. The total work is the number of vertices, , plus the number of edges in the affected components. For , if the number of edges incident to in is nonzero, then and the degree of in is . In sum, the total work in the post-shattering part is .
Combining the two parts, we know that each vertex counted in , defined in Corollary 8, generates poly work. From Corollary 8, , so the expected total work is
since , the sequence decreases geometrically, and is large enough.
We are ready for the final theorem.
Theorem 4. There is a randomized algorithm that maintains a proper edge coloring for a dynamic graph with maximum degree . Against an oblivious adversary, each edge insertion or deletion takes poly expected worst-case time.
Proof. If , apply Lemma 9 directly. Otherwise, use the dynamic algorithm in this section to maintain the partition , and apply Lemma 9 to each subgraph with disjoint palettes. This application uses the facts that and every subgraph in always has maximum degree at most according to Lemmas 14 and 19 and corollary 6. This results in a coloring of size as .
By Lemmas 23 and 25, maintaining takes expected work and produces expected edge updates, so the total expected cost of the Lemma 9 instances is poly. This means that the whole algorithm has poly expected work.
7 Proof of the Component Size Upper Bound
In this section, we prove Lemma 21. Recall the definition of : it has vertex set
For each affected region , there is a horizontal edge in between each pair of vertices for which and belong to . There is also a vertical edge in between and whenever are comparable and both vertices belong to .
Fix the updated edge and condition on all random choices for . In the rest of this section, for a node and , define to be when and to be the depth- ancestor of when .
7.1 A Witness for Each Vertex in the Connected Component
Let be a graph whose vertices are the critical failures in the instance. Two distinct critical failures and are adjacent in if and are comparable and
Lemma 26. If and are in the same connected component of , then there is a sequence of critical failures
such that , , , , and neighboring failures are adjacent in .
Proof. If , choose any critical failure whose affected region contains . Otherwise, choose a path in from to . Associate a critical failure with each . When and , is a critical failure that introduces the horizontal edge between and in ; otherwise, it is a critical failure that introduces .
We claim that the sequence satisfies the statement. From the definition, , , , and . For every , if , then and the two failures are adjacent in ; otherwise, and are comparable, and . Consecutive equal failures can be suppressed, and all remaining neighboring failures are adjacent in , giving the required sequence.
We now define a witness certifying that lies in the same component of as .
Definition 9 (Witness). For and , a witness of length from to consists of pairs for , vertices , and two simple paths for every . Write , , and . The following properties hold for every :
-
, , , , and are comparable when .
-
is a critical failure.
-
is a path and is a path in , each of length at most .
-
is a tree with at most one vertex of degree three and all other vertices of degree at most two.
The following properties hold for every with :
-
If and are comparable, then .
-
If , then .
-
.
Figure 1 provides an illustration of a possible witness satisfying properties one through four.
Next, we show that a witness necessarily exists whenever a pair of vertices lies in the same connected component.
Lemma 27. If and are in the same connected component of , then there is a witness from to .

Figure 1: A possible witness of length four from to
Proof. By Lemma 26, there is a path in from a critical failure whose affected region contains to a critical failure whose affected region contains . Choosing a shortest path and setting and gives properties 1 and 2.
For each , choose any . For each , fix a shortest-path tree of rooted at , and let and be its paths to and . Because has radius , these paths satisfy property 3. Their union is a tree in which only the branching point can have degree three, proving property 4.
Suppose and are comparable. If and intersect, then and are adjacent in , contradicting the minimality of the path in . Since and , this proves property 5. This also shows that when and are comparable; for noncomparable and , and are disjoint. This gives property 7. Finally, if and the centers were equal or adjacent in , the affected regions would intersect; this proves property 6.
From Lemma 27, we know that to prove Lemma 21, it suffices to bound the expected number of witnesses starting at .
7.2 Level-by-Level Exposure for Counting
We expose one level of randomness at a time to count the number of witnesses.
Definition 10 (Partial witness). Fix and for . Write , and . For , the descriptor is a -witness ending at if the following properties hold for every
-
, , and are comparable for .
-
If , then is a critical failure.
-
is a simple path and is a simple path in , each of length at most .
-
is a tree with at most one vertex of degree three, and all its other vertices have degree at most two.
Additionally, the following properties hold for every with :
-
If and are comparable, then .
-
If and , then .
-
.
By comparing the definitions, a witness is an R-witness. The next two lemmas explain the usefulness of the partial witness definition.
Lemma 28. If is a -witness for some , then it is also a -witness.
Proof. Only properties 2, 3, and 6 depend on . Properties 2 and 6 become weaker when decreases. For property 3, is an ancestor of , so . Hence property 3 also becomes weaker.
Lemma 29. Relative to the fixed randomness of the updated edge e, whether W is a d-witness depends only on the randomness of all other edges at levels before d. In particular, whether it is a 0-witness does not depend on the randomness.
Proof. Only properties 2, 3, and 6 depend on the edge randomness. If , whether is critical is determined by the seed failure tests at and at when , which depend on randomness at levels at most . The graph in property 3 is determined by the random directions on each edge at levels smaller than . Finally, when property 6 applies, , and depends only on the direction randomness at levels smaller than . Thus all three properties depend only on levels smaller than .
For a fixed descriptor and , define
We next bound the probability that a d-witness is also a -witness.
Lemma 30. For every descriptor and every such that has nonzero probability of being a d-witness,
Proof. By Lemma 29, the event that is a -witness depends only on levels before . We condition on any randomness from those levels under which it is a -witness and prove a uniform bound over the conditioning.
For every , property 3 at level requires every edge in to be routed from to . If there are conflicting requirements, or the fixed updated edge violates a requirement, the probability that they all hold is zero; otherwise, they impose exactly mutually independent requirements on the random directions. With probability , all requirements are fulfilled.
Partition by the parity of the index and let be a larger class, so . For , let be the event that is a critical failure. For distinct , we have . As a result, property 6 ensures that the distance between and is greater than one when , and their incident edges in are disjoint. If , and are always disjoint because two nodes are at the same depth. Therefore, the events depend on disjoint sets of level- random choices and are mutually independent. By Lemma 20,
It remains to account for dependencies between the routing requirements and the critical failures. We claim that for each , all but six routing requirements are independent of . To see this, if an edge in with is incident to in , then is a descendant of , and property 5 implies . Since , we have , so this edge can only come from . The claim follows because property 4 bounds the degree of in each of these two edge sets by three.
After discarding at most routing requirements, the remaining requirements and the critical failure events are mutually independent. As a result, the probability that becomes a -witness is at most
For an edge , define its witness depth by . Applying Lemma 30 successively gives the following corollary.
Corollary 9. There is an absolute constant such that, for every fixed 0-witness ,
Proof. The statement is immediate when the probability is zero; otherwise, the probability that is a -witness is always nonzero for every according to Lemma 28. By Lemmas 28 and 29, the probability that is a witness is the product of is an -witness is an -witness] for every . Applying Lemma 30 bounds this probability by
7.3 Counting Witnesses
Lemma 31. Fix , , and the randomness of the updated edge, and write . For every , the expected number of -witnesses from to vertices with is .
Proof. We enumerate all 0-witnesses from to and sum the bound in Corollary 9. Fix the length of the witness and the depth sequence with and . We have and . Suppose and have been chosen. We enumerate from to , then enumerate from to , and compute the product in Corollary 9 incrementally for every possible witness along the way.
We extend and by one edge at a time. By property 7, an edge in or does not belong to . As a result, the new edge is either the updated edge , one of at most six edges in according to property 4, or an edge that has not appeared before. In the last case, we have at most choices, and, denoting this edge by , we need to charge since grows from zero to . When an edge reappears at a larger depth, we omit its additional routing penalty for an upper bound. Each extension therefore contributes a multiplicative to the sum of probabilities. There are at most choices for the two path lengths and at most extensions. Since , the weighted number of choices for , , and is at most
For , we additionally need to choose a node of depth comparable with . If , the choice is unique. Otherwise, the number of choices is . Finally, accounting for the critical-failure probability in the weight and multiplying over , we conclude that the sum of probabilities over all 0-witnesses with the fixed length and depth sequence is
Summing over all possible depth sequences , the total sum of probabilities for all 0-witnesses of length is , where when is small enough. As a consequence, summing over all lengths gives an expected number of witnesses at most . When , necessarily , and its contribution is at most . This proves the claim.
Proof of Lemma 21. Fix and , and write . For every with , Lemma 27 supplies an -witness from to . Witnesses ending at distinct vertices are distinct; thus, the number of depth- vertices in the component is at most the number of -witnesses ending at depth . Taking expectations and applying Lemma 31 proves the conditional bound. Averaging over the choices fixed for proves the unconditional bound.
8 AI Statement
The authors designed the algorithms and analyses presented in this paper. We have used AIs (GPT 6.1 Sol, GPT 6.0 Astra, and GPT 5.6 Sol) for reviewing our write-ups and help with the writing and copyediting. In addition, they helped us simplify Definition 9 in Section 7. We have verified all parts and assume responsibility for the content.
References
[ABB+25] Sepehr Assadi, Soheil Behnezhad, Sayan Bhattacharya, Martín Costa, Shay Solomon, and Tianyi Zhang. Vizing's theorem in near-linear time. In Proceedings of the 57th Annual ACM Symposium on Theory of Computing, pages 24–35, 2025.
[Ass25] Sepehr Assadi. Faster vizing and near-vizing edge coloring algorithms. In Proceedings of the 2025 Annual ACM-SIAM Symposium on Discrete Algorithms (SODA), pages 4861–4898, 2025.
[BCPS24] Sayan Bhattacharya, Martín Costa, Nadav Panski, and Shay Solomon. Nibbling at long cycles: Dynamic (and static) edge coloring in optimal time. In Proceedings of the 2024 Annual ACM-SIAM Symposium on Discrete Algorithms (SODA), pages 3393–3440, 2024. Full version: arXiv:2311.03267.
[BD26] Anton Bernshteyn and Abhishek Dhawan. A linear-time algorithm for -edge-coloring. SIAM Journal on Discrete Mathematics, 40(2):919–958, 2026. Full version: arXiv:2407.04887.
[BGK+22] Sayan Bhattacharya, Fabrizio Grandoni, Janardhan Kulkarni, Quanquan C. Liu, and Shay Solomon. Fully dynamic -coloring in update time. ACM Transactions on Algorithms, 18(2):10:1–10:25, 2022. Full version: arXiv:1910.02063.
[BGW21] Sayan Bhattacharya, Fabrizio Grandoni, and David Wajc. Online edge coloring algorithms via the nibble method. In Proceedings of the 2021 Annual ACM-SIAM Symposium on Discrete Algorithms (SODA), 2021.
[BKS12] Surender Baswana, Sumeet Khurana, and Soumojit Sarkar. Fully dynamic randomized algorithms for graph spanners. ACM Transactions on Algorithms, 8(4):35:1–35:51, 2012.
[CHL+18] Yi-Jun Chang, Qizheng He, Wenzheng Li, Seth Pettie, and Jara Uitto. The complexity of distributed edge coloring with small palettes. In Proceedings of the 2018 Annual ACM-SIAM Symposium on Discrete Algorithms (SODA), pages 2633–2652, 2018. Full version: arXiv:1708.04290.
[Chr23] Aleksander B. G. Christiansen. The power of multi-step vizing chains. In Proceedings of the 55th Annual ACM Symposium on Theory of Computing, pages 1013–1026, 2023.
[Chr26] Aleksander B. G. Christiansen. Deterministic dynamic edge colouring. In Proceedings of the 2026 Annual ACM-SIAM Symposium on Discrete Algorithms (SODA), pages 1047–1096, 2026.
[CPS14] Kai-Min Chung, Seth Pettie, and Hsin-Hao Su. Distributed algorithms for the lovász local lemma and graph coloring. In Proceedings of the 2014 ACM symposium on Principles of distributed computing, pages 134–143, 2014.
[DHZ19] Ran Duan, Haoqing He, and Tianyi Zhang. Dynamic edge coloring with improved approximation. In Proceedings of the 2019 Annual ACM-SIAM Symposium on Discrete Algorithms (SODA), pages 1937–1945, 2019.
[EK24] Michael Elkin and Ariel Khuzman. Deterministic simple -edge-coloring in near-linear time. arXiv preprint arXiv:2401.10538, 2024.
[EPS15] Michael Elkin, Seth Pettie, and Hsin-Hao Su. -edge-coloring is much easier than maximal matching in the distributed setting. In Proceedings of the 2015 Annual ACM-SIAM Symposium on Discrete Algorithms (SODA), pages 355–370, 2015.
[GK27] Mohsen Ghaffari and Jaehyun Koo. Dynamic graph coloring: Sequential, parallel, and distributed. In Proceedings of the 2027 Annual ACM-SIAM Symposium on Discrete Algorithms (SODA), 2027. Full version: arXiv:2512.09218.
[HMN22] Magnús M Halldórrsson, Yannic Maus, and Alexandre Nolin. Fast distributed vertex splitting with applications. In 36th International Symposium on Distributed Computing (DISC 2022), volume 246 of Leibniz International Proceedings in Informatics (LIPIcs), pages 26:1–26:24, 2022. Full version: arXiv:2208.08119.
[HMR+26] Bernhard Haeupler, Slobodan Mitrović, Srikkanth Ramachandran, Wen-Horng Sheu, and Robert Tarjan. Dynamic construction of the lovász local lemma. arXiv preprint arXiv:2604.20836, 2026.
[HP20] Monika Henzinger and Pan Peng. Constant-time dynamic -coloring. In 37th International Symposium on Theoretical Aspects of Computer Science (STACS 2020), volume 154 of Leibniz International Proceedings in Informatics (LIPIcs), pages 53:1–53:18, 2020. Full version: arXiv:1907.04745.
[Knu05] Donald Ervin Knuth. The art of computer programming. Pearson Education, 2005.
[KS87] Howard J. Karloff and David B. Shmoys. Efficient parallel algorithms for edge coloring problems. Journal of Algorithms, 8(1):39–52, 1987.
[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.
[Röd85] Vojtěch Röll. On a packing and covering problem. European Journal of Combinatorics, 6(1):69–78, 1985.
[Sol16] Shay Solomon. Fully dynamic maximal matching in constant update time. In 2016 IEEE 57th Annual Symposium on Foundations of Computer Science (FOCS), pages 325–334, 2016. Full version: arXiv:1604.08491.