Introduction
This paper presents a constant-time dynamic algorithm for near-optimal edge coloring. We next review the context and the most directly related work, and then state our results and technical contributions. This is then followed by a discussion of other related work.
Context and our contribution
Vizing’s theorem shows that every simple graph of maximum degree Δ \Delta Δ admits a ( Δ + 1 ) (\Delta+ 1) ( Δ + 1 ) 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 § 1.2 . In contrast, the problem becomes more tractable when we relax the number of colors slightly, to ( 1 + ϵ ) Δ (1 + \epsilon)\Delta ( 1 + ϵ ) Δ colors. The state of the art is the algorithm of Bhattacharya, Costa, Panski, and Solomon (BCPS) [BCPS24], which maintains a ( 1 + ϵ ) Δ (1 + \epsilon)\Delta ( 1 + ϵ ) Δ edge coloring in poly ( 1 / ϵ ) \operatorname{poly}(1/\epsilon) poly ( 1/ ϵ ) worst-case expected update time against an oblivious adversary, provided that
Δ ≥ ( log n / ϵ 4 ) Θ ( log ( 1 / ϵ ) / ϵ ) . \Delta\ge\left(\log n/\epsilon^{4}\right)^{\Theta(\log(1/\epsilon)/\epsilon)}. Δ ≥ ( log n / ϵ 4 ) Θ ( l o g ( 1/ ϵ ) / ϵ ) .
Their algorithm thus gives constant update time for fixed ϵ \epsilon ϵ , but requires a large maximum degree as a function of the number of vertices n n n . 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.1
Our main result. We present a constant-time dynamic algorithm for ( 1 + ϵ ) Δ (1+\epsilon)\Delta ( 1 + ϵ ) Δ edge coloring that removes the n n n -dependence in the degree requirement and assumes only Δ ≥ Δ ϵ \Delta\ge\Delta_\epsilon Δ ≥ Δ ϵ , where Δ ϵ = O ~ ( 1 / ϵ 2 ) \Delta_\epsilon= \widetilde{O}(1/\epsilon^2) Δ ϵ = O ( 1/ ϵ 2 ) is a constant depending only on ϵ \epsilon ϵ .
Theorem 1. For every 0 < ϵ < 1 0 < \epsilon< 1 0 < ϵ < 1 , there is a threshold Δ ϵ = O ~ ( 1 / ϵ 2 ) \Delta_\epsilon= \widetilde{O}(1/\epsilon^2) Δ ϵ = O ( 1/ ϵ 2 ) and a randomized dynamic algorithm with the following guarantee. Given a fixed degree bound Δ ≥ Δ ϵ \Delta\ge\Delta_\epsilon Δ ≥ Δ ϵ , the algorithm maintains a proper edge coloring with at most ( 1 + ϵ ) Δ (1+\epsilon)\Delta ( 1 + ϵ ) Δ colors under edge insertions and deletions in a simple graph of maximum degree at most Δ \Delta Δ . Against an oblivious adversary, each update takes poly ( 1 / ϵ ) \operatorname{poly}(1/\epsilon) poly ( 1/ ϵ ) 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 O ~ \widetilde{O} O notation hides factors polylogarithmic in 1 / ϵ 1/\epsilon 1/ ϵ .
Our Method, and Technical Contributions. At a high level, our algorithm builds on Rödl’s nibble approach [Rödl85], 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 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ász Local Lemma (LLL) problem, following Elkin, Pettie, and Su [14 ] and Chang, He, Li, Pettie, and Uitto [8 ] . 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 / ε ) \operatorname{poly}(1/\varepsilon) poly ( 1/ ε ) . This ingredient itself is inspired by algorithmic LLL techniques in the distributed literature, namely graph shattering [16 ] , 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 ( Δ ) \operatorname{poly}(\Delta) poly ( Δ ) worst-case expected time per update in the LLL (a clause–variable update), assuming the polynomial LLL criterion p d C < 1 pd^C < 1 p d C < 1 for a sufficiently large absolute constant C C C . Here p p p bounds the bad-event probabilities, d d d bounds the dependency degree, and Δ \Delta Δ bounds the local instance parameters and the costs of sampling and evaluating events. This criterion is readily satisfied in all our applications.2 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 [11 ] 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 ( 1 + ε ) Δ (1+\varepsilon)\Delta ( 1 + ε ) Δ edge-coloring algorithm with poly ( Δ ) \operatorname{poly}(\Delta) poly ( Δ ) worst-case expected update time for Δ ≥ Δ ε \Delta\ge\Delta_\varepsilon Δ ≥ Δ ε . In particular, we obtain poly ( 1 / ε ) \operatorname{poly}(1/\varepsilon) poly ( 1/ ε ) update time when Δ = poly ( 1 / ε ) \Delta= \operatorname{poly}(1/\varepsilon) Δ = poly ( 1/ ε ) . We achieve this by applying our dynamic LLL solver iteratively to the nibble-based static partial-coloring algorithm of Chang et al. [8 ] , 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 Δ \Delta Δ in each iteration and lead to a Δ O ( log ( 1 / ε ) ) \Delta^{O(\log(1/\varepsilon))} Δ O ( l o g ( 1/ ε )) update time. We avoid this and achieve poly ( Δ ) \operatorname{poly}(\Delta) 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.
(III) Bottom-up splitting. Our third contribution is a scheme that partitions the graph into at most ( 1 + O ( ϵ ) ) Δ / D (1 + O(\epsilon))\Delta/D ( 1 + O ( ϵ )) Δ/ D edge-disjoint subgraphs of maximum degree at most D = poly ( 1 / ϵ ) D = \operatorname{poly}(1/\epsilon) D = poly ( 1/ ϵ ) , 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 poly ( 1 / ϵ ) \operatorname{poly}(1/\epsilon) poly ( 1/ ϵ ) 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 O ( log Δ ) + poly ( 1 / ϵ ) O(\log\Delta) + \operatorname{poly}(1/\epsilon) O ( log Δ ) + poly ( 1/ ϵ ) 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 § 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 ϵ \epsilon ϵ -dependencies of our constants. (A) The poly ( 1 / ϵ ) \operatorname{poly}(1/\epsilon) poly ( 1/ ϵ ) dependence in our update time is currently bottlenecked by the poly ( D ) \operatorname{poly}(D) poly ( D ) update time of our dynamic edge-coloring algorithm on graphs of maximum degree at most D = O ( ϵ − 5 ) D = O(\epsilon^{-5}) D = O ( ϵ − 5 ) , a constant for fixed ϵ \epsilon ϵ . This is the degree bound reached by our present reduction (Lemma 9). The splitting procedures incur only O ( 1 ) O(1) O ( 1 ) expected work and generate O ( 1 ) O(1) O ( 1 ) expected updates to these low-degree instances per input update. Thus, improving the worst-case expected update time for maintaining ( 1 + ϵ ) D (1+\epsilon)D ( 1 + ϵ ) D edge colorings in this degree range would also improve our update-time bound for graphs of unbounded degree. (B) The degree requirement Δ ≥ Δ ϵ \Delta\ge\Delta_{\epsilon} Δ ≥ Δ ϵ , where Δ ϵ = O ~ ( ϵ − 2 ) \Delta_{\epsilon} = \widetilde{O}(\epsilon^{-2}) Δ ϵ = O ( ϵ − 2 ) , is inherited from the nibble-based coloring approach. Intuitively, sampling counts with expectation d d d and variance Θ ( d ) \Theta(d) Θ ( d ) have fluctuations of order d \sqrt{d} d , or relative fluctuations of order 1 / d 1/\sqrt{d} 1/ d . Keeping these fluctuations within an ϵ \epsilon ϵ fraction of the expectation therefore requires d d d to be at least on the order of 1 / ϵ 2 1/\epsilon^2 1/ ϵ 2 , with additional logarithmic factors to obtain the concentration needed by the LLL. This sampling fluctuation is the source of the 1 / ϵ 2 1/\epsilon^2 1/ ϵ 2 bottleneck in our current degree threshold.
Other Related Work
Randomized dynamic edge coloring. Duan, He, and Zhang [12 ] gave a randomized dynamic ( 1 + ϵ ) Δ (1+\epsilon)\Delta ( 1 + ϵ ) Δ edge-coloring algorithm with poly ( log n , 1 / ϵ ) \operatorname{poly}(\log n,1/\epsilon) poly ( log n , 1/ ϵ ) amortized update time when Δ = Ω ( log 2 n / ϵ 2 ) \Delta= \Omega(\log^2 n/\epsilon^2) Δ = Ω ( log 2 n / ϵ 2 ) . Bhattacharya, Grandoni, and Wajc [6 ] obtained poly ( 1 / ϵ ) \operatorname{poly}(1/\epsilon) poly ( 1/ ϵ ) expected recourse (recolorings) per update in a sufficiently large-degree regime, without a corresponding constant update-time guarantee. Christiansen [9 ] removed the additional large-degree requirement and obtained poly ( log n , 1 / ϵ ) \operatorname{poly}(\log n,1/\epsilon) poly ( log n , 1/ ϵ ) worst-case update time with high probability. Setting ϵ = 1 / Δ \epsilon= 1/\Delta ϵ = 1/Δ gives a dynamic ( Δ + 1 ) (\Delta+1) ( Δ + 1 ) edge-coloring algorithm with poly ( Δ log n ) \operatorname{poly}(\Delta\log n) poly ( Δ log n ) update time, which is polylogarithmic in n n n for graphs of degree at most polylogn n n . BCPS [BCPS24] then achieved constant worst-case expected update time for fixed ϵ \epsilon ϵ 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 ( 1 + ϵ ) Δ (1+\epsilon)\Delta ( 1 + ϵ ) Δ edge-coloring algorithm against an adaptive adversary, with amortized update time ( Δ log n ) O ( log ( 1 / ϵ ) ) (\Delta\log n)^{O(\log(1/\epsilon))} ( Δ log n ) O ( l o g ( 1/ ϵ )) over polynomial-length update sequences, for ϵ = ω ( log 2.5 Δ / Δ ) \epsilon= \omega(\log^{2.5}\Delta/\sqrt{\Delta}) ϵ = ω ( log 2.5 Δ/ Δ ) . They also build on the distributed partial-coloring algorithm of Chang et al. [8 ] . 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 n n n and Δ \Delta Δ .
Deterministic dynamic edge coloring. Christiansen [10 ] gave a deterministic algorithm maintaining a ( 1 + ϵ ) Δ (1+\epsilon)\Delta ( 1 + ϵ ) Δ edge coloring in 2 O ~ log ( 1 / ϵ ) ( log n ) 2^{\widetilde{O}_{\log(1/\epsilon)}(\sqrt{\log n})} 2 O l o g ( 1/ ϵ ) ( l o g n ) amortized update time. This provides a subpolynomial bound for fixed ϵ \epsilon ϵ 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 O ~ ( poly ( k , d ) ) \widetilde{O}(\operatorname{poly}(k,d)) O ( poly ( k , d )) amortized update time, with an additional initialization cost, where k k k bounds the number of variables per clause and d d d 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 [20 ] gave a near-linear-time algorithm using Δ + O ~ ( Δ ) \Delta+\widetilde{O}(\sqrt{\Delta}) Δ + O ( Δ ) colors. More recent work has developed several approaches beyond the nibble. Elkin and Khuzman [13 ] gave a deterministic ( 1 + ϵ ) Δ (1+\epsilon)\Delta ( 1 + ϵ ) Δ edge-coloring algorithm in O ( m log n / ϵ ) O(m\log n/\epsilon) O ( m log n / ϵ ) time. Assadi [2 ] used fair matchings and a reduction to bipartite edge coloring to obtain Δ + O ( log n ) \Delta+O(\log n) Δ + O ( log n ) colors in O ( m log Δ ) O(m\log\Delta) O ( m log Δ ) expected time; he also obtained ( 1 + ϵ ) Δ (1+\epsilon)\Delta ( 1 + ϵ ) Δ colors in O ( m log ( 1 / ϵ ) ) O(m\log(1/\epsilon)) O ( m log ( 1/ ϵ )) expected time for ϵ = ω ( log n / Δ ) \epsilon=\omega(\log n/\Delta) ϵ = ω ( log n /Δ ) . Bernshteyn and Dhawan [4 ] used randomized multi-step Vizing chains to obtain a linear-time algorithm with high probability for every fixed ϵ > 0 \epsilon>0 ϵ > 0 and Δ ≥ 1 / ϵ \Delta\ge1/\epsilon Δ ≥ 1/ ϵ .
For the exact Vizing bound, Assadi et al. [ABB$^{+}$25] gave a randomized ( Δ + 1 ) (\Delta+1) ( Δ + 1 ) edge-coloring algorithm in O ( m log n ) O(m\log n) O ( m log n ) 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 [12 ] and Christiansen [9 ] ; 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 [14 ] obtained randomized ( 1 + ϵ ) Δ (1+\epsilon)\Delta ( 1 + ϵ ) Δ -edge-coloring algorithms for every fixed ϵ > 0 \epsilon>0 ϵ > 0 and sufficiently large Δ \Delta Δ depending only on ϵ \epsilon ϵ , 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 [8 ] refined this approach to use O ( log ( 1 / ϵ ) ) O(\log(1/\epsilon)) O ( log ( 1/ ϵ )) LLL instances, permitting palettes as small as Δ + O ~ ( Δ ) \Delta+\widetilde{O}(\sqrt{\Delta}) Δ + O ( Δ ) . 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 [16 ] further improved the distributed complexity for fixed ϵ \epsilon ϵ 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.
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.
Dynamic Lovász Local Lemma
Our first ingredient, described in § 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 [11 ] , a parallel variant of the Moser–Tardos resampling algorithm [21 ] , 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 r r r records whether it is falsified by the assignment at stage r r r and whether any variable is resampled in that stage. We are able to demonstrate that, any clause whose information at stage r r r changes must lie within distance Θ ( r ) \Theta(r) Θ ( r ) of a clause being modified in the dependency graph. Thus, for a single update, at most d Θ ( r ) d^{\Theta(r)} d Θ ( r ) clauses can be affected at stage r r r , where d d d 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 [11 ] , 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 r r r with probability roughly ( p d 2 ) Θ ( r ) (p d^2)^{\Theta(r)} ( p d 2 ) Θ ( r ) , where p p p 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 d Θ ( r ) d^{\Theta(r)} d Θ ( r ) 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.
( 1 + ϵ ) Δ (1+\epsilon)\Delta ( 1 + ϵ ) Δ Edge Coloring: Small Degree Regime
In Section 4, we obtain a dynamic ( 1 + ϵ ) Δ (1+\epsilon)\Delta ( 1 + ϵ ) Δ edge coloring with poly ( Δ ) \operatorname{poly}(\Delta) poly ( Δ ) expected update time when Δ = Ω ~ ( ϵ − 2 ) \Delta= \widetilde{\Omega}(\epsilon^{-2}) Δ = Ω ( ϵ − 2 ) . This algorithm will be used when a graph has maximum degree poly ( 1 / ϵ ) \operatorname{poly}(1/\epsilon) poly ( 1/ ϵ ) .
The Static Algorithm and its Black-Box Maintenance The dynamic algorithm maintains the transcript of the static edge-coloring algorithm by Chang et al. [8 ] . The static algorithm consists of two phases, and the first phase contains O ( log ( 1 / ϵ ) ) O(\log(1/\epsilon)) O ( log ( 1/ ϵ )) 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 O ( Δ ) O(\Delta) O ( Δ ) time per update.
In § 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 ( Δ ) \operatorname{poly}(\Delta) poly ( Δ ) time. As a result, each LLL instance takes poly ( Δ ) \operatorname{poly}(\Delta) 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 i i i creates constant many edge insertions or deletions for iteration i + 1 i+1 i + 1 along with O ( Δ ) O(\Delta) O ( Δ ) 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 Δ O ( log ( 1 / ϵ ) ) \Delta^{O(\log(1/\epsilon))} Δ O ( l o g ( 1/ ϵ )) update time.
The Improvement In § 4.2 , we describe how we improve the Δ O ( log ( 1 / ϵ ) ) \Delta^{O(\log(1/\epsilon))} Δ O ( l o g ( 1/ ϵ )) algorithm above and get poly ( Δ ) \operatorname{poly}(\Delta) poly ( Δ ) update time. The key observation for the improvement is that every edge has a palette of size Ω ( Δ ) \Omega(\Delta) Ω ( Δ ) , while a typical palette update changes only one color. Intuitively speaking, each palette change should only affect the LLL solution with probability O ( 1 / Δ ) O(1/\Delta) O ( 1/Δ ) .
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 e e e changes from Ψ ( e ) \Psi(e) Ψ ( e ) to Ψ ′ ( e ) \Psi'(e) Ψ ′ ( e ) , with probability 1 − O ( ∣ Ψ ( e ) △ Ψ ′ ( e ) ∣ / Δ ) 1-O(|\Psi(e)\mathbin{\triangle}\Psi'(e)|/\Delta) 1 − O ( ∣Ψ ( e ) △ Ψ ′ ( e ) ∣/Δ ) , where △ \mathbin{\triangle} △ denotes symmetric difference, the palette update on e e e does not affect the transcript of the dynamic LLL algorithm.
Consequently, for every update in iteration i i i , among O ( Δ ) O(\Delta) O ( Δ ) palette changes in iteration i + 1 i+1 i + 1 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 1 / ϵ 1/\epsilon 1/ ϵ and total update time poly ( Δ ) \operatorname{poly}(\Delta) poly ( Δ ) .
( 1 + ϵ ) Δ (1+\epsilon)\Delta ( 1 + ϵ ) Δ Edge Coloring: Iterative Degree Splitting
In Section 5, we describe dynamic algorithms to maintain ( 1 + ϵ ) Δ (1+\epsilon)\Delta ( 1 + ϵ ) Δ edge coloring when Δ ≥ Δ ϵ \Delta\ge\Delta_{\epsilon} Δ ≥ Δ ϵ in time O ( log Δ ) + poly ( 1 / ϵ ) O(\log\Delta) + \operatorname{poly}(1/\epsilon) O ( log Δ ) + poly ( 1/ ϵ ) . The main idea is to partition the input graph into several subgraphs of degree poly ( 1 / ϵ ) \operatorname{poly}(1/\epsilon) poly ( 1/ ϵ ) , 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 G G G of maximum degree Δ \Delta Δ 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 Δ / poly ( log Δ ) \Delta/\operatorname{poly}(\log\Delta) Δ/ poly ( log Δ ) . A concentration bound implies that a random bipartition satisfies the requirement for a single vertex with probability exp ( − Ω ~ ( Δ ) ) \exp(-\widetilde{\Omega}(\Delta)) exp ( − Ω ( Δ )) . 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 R = O ( log Δ ) R = O(\log\Delta) R = O ( log Δ ) times until the maximum degree of every resulting subgraph reaches exp ( poly ( 1 / ϵ ) ) \exp(\operatorname{poly}(1/\epsilon)) exp ( poly ( 1/ ϵ )) , and a final partition reduces the degree further to poly ( 1 / ϵ ) \operatorname{poly}(1/\epsilon) poly ( 1/ ϵ ) . 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 1 + O ( ϵ ) 1 + O(\epsilon) 1 + O ( ϵ ) factor over the entire recursion. We then apply the algorithm in Section 4 to every final subgraph. The total palette will then be ( 1 + O ( ϵ ) ) Δ (1 + O(\epsilon))\Delta ( 1 + O ( ϵ )) Δ .
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 O ( log Δ ) O(\log\Delta) O ( log Δ ) levels to certify that no repair is needed and apply the update to the corresponding final low-degree instance, giving total expected update time O ( log Δ ) + poly ( 1 / ϵ ) O(\log\Delta) + \operatorname{poly}(1/\epsilon) O ( log Δ ) + poly ( 1/ ϵ ) .
An Alternative Approach Based on Graph Shattering In order to get constant-time algorithm, we introduce an alternative approach in [16 ] 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 § 3 does not have this property.
( 1 + ϵ ) Δ (1+\epsilon)\Delta ( 1 + ϵ ) Δ Edge Coloring: Bottom-Up Degree Splitting
The work bottleneck for the algorithm above is visiting all O ( log Δ ) O(\log\Delta) O ( log Δ ) 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 ( log Δ i ) \operatorname{poly}(\log\Delta_i) poly ( log Δ i ) for a critical failure of level i i i inside the subgraph where the failure occurs. Δ i \Delta_i Δ i denotes the degree upper bound for level i i i . The ball will roughly contain exp ( poly ( log Δ i ) ) \exp(\operatorname{poly}(\log\Delta_i)) exp ( poly ( log Δ i )) 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 G ^ \widehat{G} G 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 G ^ \widehat{G} G .
In § 7 , we bound the expected size of this component through joint witness. Each witness, contains the shortest path in G ^ \widehat{G} G 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 G ^ \widehat{G} G . 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.
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.
Model and Main Result
There is a set V V V of mutually independent random variables and a fixed set C \mathcal{C} C of m m m clauses, each with a unique identifier in [ m ] [m] [ m ] . Every variable x ∈ V x \in V x ∈ V has a domain Ω x \Omega_x Ω x and a distribution D x D_x D x over Ω x \Omega_x Ω x . Write vbl ( C ) \operatorname{vbl}(C) vbl ( C ) for the variables on which C C C depends and C ( x ) = { C : x ∈ vbl ( C ) } C(x) = \{C : x \in\operatorname{vbl}(C)\} C ( x ) = { C : x ∈ vbl ( C )} . Initially, V = ∅ V = \varnothing V = ∅ and every clause is empty.
For C ∈ C C \in\mathcal{C} C ∈ C and U ⊆ V U \subseteq V U ⊆ V , a function f C , U : ∏ x ∈ U Ω x → { 0 , 1 } f_{C,U} : \prod_{x \in U} \Omega_x \to\{0,1\} f C , U : ∏ x ∈ U Ω x → { 0 , 1 } specifies the truth table of C C C when vbl ( C ) = U \operatorname{vbl}(C) = U vbl ( C ) = U ; 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 Pr [ C ] \Pr[C] Pr [ C ] denote the probability that C C C is falsified under the product distribution of its variables.
The dependency graph H H H of the instance has one vertex for each clause and an edge between two clauses when they share a variable. For a graph H H H , a vertex v v v , and r ≥ 1 r \ge1 r ≥ 1 , we define Γ H r ( v ) \Gamma_H^r(v) Γ H r ( v ) to contain every vertex, including v v v , within distance at most r r r from v v v , and define Γ H ( v ) \Gamma_H(v) Γ H ( v ) to be Γ H 1 ( v ) \Gamma_H^1(v) Γ H 1 ( v ) . We use the following parameters as uniform upper bounds throughout the update sequence:
Table 1.
The clauses containing a fixed variable form a clique in H H H , so we may take k ≤ d k \le d k ≤ d . We take k , s ≥ 1 k, s \ge1 k , s ≥ 1 and d ≥ 2 d \ge2 d ≥ 2 , 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 T u p d a t e T_{\mathrm{update}} T update 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 T u p d a t e ≤ T e v a l T_{\mathrm{update}} \le T_{\mathrm{eval}} T update ≤ T eval . Second, there is a uniform parameter q ∈ ( 0 , 1 / 2 ) q \in(0,1/2) q ∈ ( 0 , 1/2 ) such that, for every instance, some function x : C → [ 0 , 1 ) x : \mathcal{C} \to[0,1) x : C → [ 0 , 1 ) satisfies max C x ( C ) / ( 1 − x ( C ) ) = O ( 1 ) \max_{C} x(C)/(1-x(C)) = O(1) max C x ( C ) / ( 1 − x ( C )) = O ( 1 ) and
Pr [ A ] ≤ q 4 d 2 ( x ( A ) ∏ B ∈ Γ H 2 ( A ) ( 1 − x ( B ) ) ) (1) \Pr[A] \le\frac{q}{4d^2}\left(x(A)\prod_{B \in\Gamma_H^2(A)}(1-x(B))\right) \tag*{(1)} Pr [ A ] ≤ 4 d 2 q x ( A ) B ∈ Γ H 2 ( A ) ∏ ( 1 − x ( B )) (1)
for every A ∈ C A \in\mathcal{C} A ∈ C . In the typical symmetric LLL setting, we will pick x x x to be the constant function x ( A ) = 1 / d 2 x(A) = 1/d^2 x ( A ) = 1/ d 2 , and Pr [ A ] ≤ q / ( 4 e d 4 ) \Pr[A] \le q/(4ed^4) Pr [ A ] ≤ q / ( 4 e d 4 ) for every event A A A suffices. The restriction q < 1 / 2 q < 1/2 q < 1/2 gives ∑ r ≥ 1 q r = O ( q ) \sum_{r \ge1} q^r = O(q) ∑ r ≥ 1 q r = O ( q ) and ∑ r ≥ 1 r q r = O ( q ) \sum_{r \ge1} rq^r = O(q) ∑ r ≥ 1 r q r = O ( q ) .
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 x x x in O ( T s a m p l e ) O(T_{\mathrm{sample}}) O ( T sample ) expected time.
Remove an isolated variable x x x in O ( 1 ) O(1) O ( 1 ) time.
Apply a batch B = { ( C i , x i ) : i ∈ [ ∣ B ∣ ] } \mathcal{B} = \{(C_i,x_i) : i \in[|\mathcal{B}|]\} B = {( C i , x i ) : i ∈ [ ∣ B ∣ ]} of distinct clause updates. Each update ( C i , x i ) (C_i,x_i) ( C i , x i ) adds x i ∈ V x_i \in V x i ∈ V to vbl ( C i ) \operatorname{vbl}(C_i) vbl ( C i ) when x i ∉ vbl ( C i ) x_i \notin\operatorname{vbl}(C_i) x i ∈ / vbl ( C i ) and removes x i x_i x i otherwise. The expected update time is
O ( ∣ B ∣ ( T u p d a t e + k 2 s 2 d q ( T e v a l + T s a m p l e ) ) ) , O\left(|\mathcal{B}|\left(T_{\mathrm{update}} + k^2s^2dq(T_{\mathrm{eval}} + T_{\mathrm{sample}})\right)\right), O ( ∣ B ∣ ( T update + k 2 s 2 d q ( T eval + T sample ) ) ) , and the expected recourse, defined as the number of value changes in the final output, is
O ( ∣ B ∣ s 2 q ) . O(|\mathcal{B}|s^2q). O ( ∣ B ∣ s 2 q ) .
In our applications, 1 / q 1/q 1/ q will be larger than any polynomial in the other parameters. The expected time per update is then dominated by T u p d a t e T_{\mathrm{update}} T update , and the expected recourse is correspondingly small.
The Static Algorithm
We first review the static algorithm of Chung, Pettie, and Su [11 ] and introduce notations. Independently for every variable x x x , sample a randomness table ( R ( x , i ) ) i ≥ 0 (R(x,i))_{i \ge0} ( R ( x , i ) ) i ≥ 0 of independent samples from D x D_x D x . The initial assignment is σ 0 ( x ) = R ( x , 0 ) \sigma_0(x) = R(x,0) σ 0 ( x ) = R ( x , 0 ) . Resampling a variable advances its value to the next entry of its table.
The static algorithm consists of stages. At stage r ≥ 1 r \ge1 r ≥ 1 , the algorithm evaluates every clause under σ r − 1 \sigma_{r-1} σ r − 1 and lets b C , r b_{C,r} b C , r denote whether C ∈ C C \in\mathcal{C} C ∈ C is falsified. After that, we take an independent set of falsified clauses in H H H by including every ID local minimum. Specifically, define
cnt C , r = b C , r ∑ C ′ ∈ Γ H ( C ) [ ID ( C ′ ) < ID ( C ) , b C ′ , r = 1 ] (2) \operatorname{cnt}_{C,r} = b_{C,r}\sum_{C' \in\Gamma_H(C)} [\operatorname{ID}(C') < \operatorname{ID}(C),\ b_{C',r} = 1] \tag*{(2)} cnt C , r = b C , r C ′ ∈ Γ H ( C ) ∑ [ ID ( C ′ ) < ID ( C ) , b C ′ , r = 1 ] (2)
and set I r = { C : b C , r = 1 , cnt C , r = 0 } I_r = \{C : b_{C,r} = 1,\ \operatorname{cnt}_{C,r} = 0\} I r = { C : b C , r = 1 , cnt C , r = 0 } . The set I r I_r I r is independent in H H H , so each variable belongs to at most one clause in I r I_r I r . Resampling all variables in these clauses produces σ r \sigma_r σ r . 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 b x , r b_{x,r} b x , r for r ≥ 1 r \ge1 r ≥ 1 implicitly define the assignment σ i ( x ) = R ( x , ∑ j = 1 i b x , j ) \sigma_i(x) = R\left(x,\sum_{j=1}^{i} b_{x,j}\right) σ i ( x ) = R ( x , ∑ j = 1 i b x , j ) for i ≥ 0 i \ge0 i ≥ 0 . Similarly, the final output assignment σ ∞ \sigma_\infty σ ∞ assigns x x x the value R ( x , s x ) R(x,s_x) R ( x , s x ) .
In the following, we review the probabilistic statement of Chung, Pettie, and Su [11 ] based on witness trees. For an execution, its resampling log L L L concatenates I 1 , I 2 , … I_1,I_2,\ldots I 1 , I 2 , … , ordering each set by increasing clause ID.
Definition 1 (2-witness tree). For a resampling event L i L_i L i in an execution, the 2-witness tree for L i L_i L i is a rooted tree T T T with a labeling f f f generated in the following way: Initially, T T T consists of a single root with label L i L_i L i . Iterate j j j downward from i − 1 i-1 i − 1 to 1 1 1 . If L j ∈ Γ H 2 ( f ( x ) ) L_j \in\Gamma_H^2(f(x)) L j ∈ Γ H 2 ( f ( x )) for some x ∈ V ( T ) x \in V(T) x ∈ V ( T ) , create a node with label L j L_j L j and make it a child of any deepest such node x x x .
Table 1 (PDF p. 13). Data in an LLL transcript
Lemma 1 ([11 ] , Lemma 3.6). If C ∈ I r C\in I_r C ∈ I r , then the execution contains a 2-witness tree with root label C C C and size at least r r r .
Lemma 2 ([11 ] , Appendix B). For every clause C C C and r ≥ 1 r\ge1 r ≥ 1 , the probability that the execution contains a 2-witness tree with root label C C C and at least r r r nodes is at most ( q / 4 d 2 ) r x ( C ) / ( 1 − x ( C ) ) (q/4d^2)^r x(C)/(1-x(C)) ( q /4 d 2 ) r x ( C ) / ( 1 − x ( C )) .
From Lemmas 1 and 2 and a union bound over the root labels, the probability that σ t \sigma_t σ t does not satisfy every clause is at most ( q / 4 d 2 ) t + 1 ∑ C ∈ C x ( C ) / ( 1 − x ( C ) ) (q/4d^2)^{t+1}\sum_{C\in\mathcal{C}}x(C)/(1-x(C)) ( q /4 d 2 ) t + 1 ∑ C ∈ C x ( C ) / ( 1 − x ( C )) . Thus the algorithm terminates almost surely, and within O ( log ( m + 1 ) ) O(\log(m+1)) O ( log ( m + 1 )) stages with high probability.
In the following we establish some useful consequences of the previous lemmas.
Lemma 3. For every variable x x x and r ≥ 1 r\ge1 r ≥ 1 , Pr [ b x , r = 1 ] ≤ Pr [ r x ≥ r ] = O ( k ( q / 4 d 2 ) r ) \Pr[b_{x,r}=1]\le\Pr[r_x\ge r]=O(k(q/4d^2)^r) Pr [ b x , r = 1 ] ≤ Pr [ r x ≥ r ] = O ( k ( q /4 d 2 ) r ) .
Proof. If r x ≥ r r_x\ge r r x ≥ r , some clause C ∈ C ( x ) C\in\mathcal{C}(x) C ∈ C ( x ) is resampled at a stage at least r r r . The corresponding witness tree has at least r r r nodes by Lemma 1. Applying Lemma 2 and taking a union bound over at most k k k choices of C C C gives the desired bound. The first inequality follows from that b x , r = 1 b_{x,r}=1 b x , r = 1 implies r x ≥ r r_x\ge r r x ≥ r .
Corollary 1. For every clause C C C and r ≥ 1 r\ge1 r ≥ 1 , Pr [ b C , r = 1 ] ≤ Pr [ ℓ C ≥ r ] = O ( k s ( q / 4 d 2 ) r ) \Pr[b_{C,r}=1]\le\Pr[\ell_C\ge r]=O(ks(q/4d^2)^r) Pr [ b C , r = 1 ] ≤ Pr [ ℓ C ≥ r ] = O ( k s ( q /4 d 2 ) r ) .
Proof. The event ℓ C ≥ r \ell_C\ge r ℓ C ≥ r requires r x ≥ r r_x\ge r r x ≥ r for some x ∈ vbl ( C ) x\in\operatorname{vbl}(C) x ∈ vbl ( C ) , so its probability follows from Lemma 3 and a union bound over at most s s s variables. If b C , r = 1 b_{C,r}=1 b C , r = 1 , the clause is falsified by σ r − 1 \sigma_{r-1} σ r − 1 but satisfied by the final assignment. Some variable in C C C must therefore be resampled at a stage at least r r r , implying ℓ C ≥ r \ell_C\ge r ℓ C ≥ r .
Maintaining the Transcript
Insertions and deletions of isolated variables will be handled trivially, so let us fix a batch B B B of clause updates. Let T o l d \mathcal{T}^{\mathrm{old}} T old and T n e w \mathcal{T}^{\mathrm{new}} T new 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 X X X , write X α X^\alpha X α for its value in T α \mathcal{T}^\alpha T α , where α ∈ { o l d , n e w } \alpha\in\{\mathrm{old},\mathrm{new}\} α ∈ { old , new } . If X o l d X^{\mathrm{old}} X old equals X n e w X^{\mathrm{new}} X new , we will simply use X X X to denote its value in both T o l d \mathcal{T}^{\mathrm{old}} T old and T n e w \mathcal{T}^{\mathrm{new}} T new .
Define H ∪ = H o l d ∪ H n e w H^\cup=H^{\mathrm{old}}\cup H^{\mathrm{new}} H ∪ = H old ∪ H new and M = { C i : i ∈ [ [ B ] ] } \mathcal{M}=\{C_i:i\in[[B]]\} M = { C i : i ∈ [[ B ]]} . Since all information in Table 1 depends on b C , r b_{C,r} b C , r and cnt C , r \operatorname{cnt}_{C,r} cnt C , r , we will pay attention to dirty pairs ( C , r ) (C,r) ( C , r ) such that ( b C , r o l d , cnt C , r o l d ) ≠ ( b C , r n e w , cnt C , r n e w ) (b^{\mathrm{old}}_{C,r},\operatorname{cnt}^{\mathrm{old}}_{C,r})\ne(b^{\mathrm{new}}_{C,r},\operatorname{cnt}^{\mathrm{new}}_{C,r}) ( b C , r old , cnt C , r old ) = ( b C , r new , cnt C , r new ) . In the following, we establish some properties of dirty pairs.
Observation 1. For any C ∈ C C\in\mathcal{C} C ∈ C and r ≥ 1 r\ge1 r ≥ 1 , Pr [ ( C , r ) is dirty ] = O ( k s ( q / 4 d 2 ) r ) \Pr[(C,r)\text{ is dirty}]=O(ks(q/4d^2)^r) Pr [( C , r ) is dirty ] = O ( k s ( q /4 d 2 ) r ) .
Proof. ( C , r ) (C,r) ( C , r ) is dirty only when b C , r o l d = 1 b^{\mathrm{old}}_{C,r}=1 b C , r old = 1 or b C , r n e w = 1 b^{\mathrm{new}}_{C,r}=1 b C , r new = 1 since cnt C , r = 0 \operatorname{cnt}_{C,r}=0 cnt C , r = 0 whenever b C , r = 0 b_{C,r}=0 b C , r = 0 , and the statement holds by applying Corollary 1 separately to T o l d \mathcal{T}^{\mathrm{old}} T old and T n e w \mathcal{T}^{\mathrm{new}} T new .
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 ( C , r ) (C,r) ( C , r ) satisfies dist H ∪ ( C , M ) ≤ 2 r − 1 \operatorname{dist}_{H^{\cup}}(C,\mathcal{M}) \le2r-1 dist H ∪ ( C , M ) ≤ 2 r − 1 .
Proof. We induct on r r r . It suffices to consider dirty pairs ( C , r ) (C,r) ( C , r ) with dist H ∪ ( C , M ) ≥ 2 \operatorname{dist}_{H^{\cup}}(C,\mathcal{M}) \ge2 dist H ∪ ( C , M ) ≥ 2 . This means that, Γ H ( C ) \Gamma_{H}(C) Γ H ( C ) and vbl ( C ′ ) \operatorname{vbl}(C') vbl ( C ′ ) for every clause C ′ ∈ Γ H ( C ) C' \in\Gamma_{H}(C) C ′ ∈ Γ H ( C ) do not change under the update. In this case, σ 0 o l d = σ 0 n e w \sigma^{\mathrm{old}}_{0}=\sigma^{\mathrm{new}}_{0} σ 0 old = σ 0 new , so ( C , 1 ) (C,1) ( C , 1 ) cannot be dirty, and this gives the base case.
For r ≥ 2 r \ge2 r ≥ 2 , a dirty pair requires some C ′ ∈ Γ H ∪ ( C ) C' \in\Gamma_{H^{\cup}}(C) C ′ ∈ Γ H ∪ ( C ) with b C ′ , r o l d ≠ b C ′ , r n e w b^{\mathrm{old}}_{C',r} \ne b^{\mathrm{new}}_{C',r} b C ′ , r old = b C ′ , r new . Since vbl ( C ′ ) \operatorname{vbl}(C') vbl ( C ′ ) is unchanged, there must exist some x ∈ vbl ( C ′ ) x \in\operatorname{vbl}(C') x ∈ vbl ( C ′ ) with different values under σ r − 1 o l d \sigma^{\mathrm{old}}_{r-1} σ r − 1 old and σ r − 1 n e w \sigma^{\mathrm{new}}_{r-1} σ r − 1 new . As σ r − 1 ( x ) \sigma_{r-1}(x) σ r − 1 ( x ) is defined to be R ( x , ∑ j = 1 r − 1 b x , j ) R(x,\sum_{j=1}^{r-1} b_{x,j}) R ( x , ∑ j = 1 r − 1 b x , j ) in both transcripts and the randomness for two transcripts are the same, b x , j o l d ≠ b x , j n e w b^{\mathrm{old}}_{x,j} \ne b^{\mathrm{new}}_{x,j} b x , j old = b x , j new for some 1 ≤ j < r 1 \le j < r 1 ≤ j < r .
If C o l d ( x ) ≠ C n e w ( x ) C^{\mathrm{old}}(x) \ne C^{\mathrm{new}}(x) C old ( x ) = C new ( x ) , a clause C ′ ′ C'' C ′′ in their symmetric difference belongs to M \mathcal{M} M and is within one hop of C ′ C' C ′ . Thus C C C is within two hops of M \mathcal{M} M . Otherwise, some C ′ ′ ∈ C ( x ) C'' \in C(x) C ′′ ∈ C ( x ) enters or leaves I j I_j I j , so ( C ′ ′ , j ) (C'',j) ( C ′′ , j ) is dirty. By the induction hypothesis, C ′ ′ C'' C ′′ is within 2 j − 1 2j-1 2 j − 1 hops of M \mathcal{M} M . Since dist H ∪ ( C , C ′ ) ≤ 1 \operatorname{dist}_{H^{\cup}}(C,C') \le1 dist H ∪ ( C , C ′ ) ≤ 1 and dist H ∪ ( C ′ , C ′ ′ ) ≤ 1 \operatorname{dist}_{H^{\cup}}(C',C'') \le1 dist H ∪ ( C ′ , C ′′ ) ≤ 1 , the distance between C C C and M \mathcal{M} M is at most 2 j + 1 ≤ 2 r − 1 2j+1 \le2r-1 2 j + 1 ≤ 2 r − 1 .
Corollary 2. For each r ≥ 1 r \ge1 r ≥ 1 , the expected number of dirty pairs ( C , r ) (C,r) ( C , r ) is O ( s q r ∣ B ∣ ) O(sq^{r}|\mathcal{B}|) O ( s q r ∣ B ∣ ) .
Proof. The graph H ∪ H^{\cup} H ∪ has maximum degree at most 2 d 2d 2 d . By Lemma 4, there are at most ∣ B ∣ ( 2 d ) 2 r − 1 |\mathcal{B}|(2d)^{2r-1} ∣ B ∣ ( 2 d ) 2 r − 1 possible clauses C C C with ( C , r ) (C,r) ( C , r ) dirty. Each of these pairs is dirty with probability O ( k s ( q / 4 d 2 ) r ) O(ks(q/4d^{2})^{r}) O ( k s ( q /4 d 2 ) r ) according to Observation 1. As a result, the expected number of dirty pairs is O ( ( k s / d ) q r ∣ B ∣ ) = O ( s q r ∣ B ∣ ) O((ks/d)q^{r}|\mathcal{B}|)=O(sq^{r}|\mathcal{B}|) O (( k s / d ) q r ∣ B ∣ ) = O ( s q r ∣ B ∣ ) because k ≤ d k \le d k ≤ d .
Corollary 3. Let Z r = { x : b x , r o l d ≠ b x , r n e w } Z_r=\{x:b^{\mathrm{old}}_{x,r}\ne b^{\mathrm{new}}_{x,r}\} Z r = { x : b x , r old = b x , r new } . For every r ≥ 1 r \ge1 r ≥ 1 , E [ ∣ Z r ∣ ] = O ( s 2 q r ∣ B ∣ ) \mathbb{E}[|Z_r|]=O(s^{2}q^{r}|\mathcal{B}|) E [ ∣ Z r ∣ ] = O ( s 2 q r ∣ B ∣ ) . Consequently, the expected recourse of the dynamic algorithm is O ( s 2 q ∣ B ∣ ) O(s^{2}q|\mathcal{B}|) O ( s 2 q ∣ B ∣ ) .
Proof. There are two possibilities where b x , r b_{x,r} b x , r changes after the update:
Either a clause C C C enters or leaves I r I_r I r , meaning that ( C , r ) (C,r) ( C , r ) is dirty. Each dirty pair ( C , r ) (C,r) ( C , r ) changes b x , r b_{x,r} b x , r for at most 2 s 2s 2 s variables x x x . By Corollary 2, this case accounts for O ( s 2 q r ∣ B ∣ ) O(s^{2}q^{r}|\mathcal{B}|) O ( s 2 q r ∣ B ∣ ) variables in Z r Z_r Z r .
Or, x x x enters or leaves vbl ( C ) \operatorname{vbl}(C) vbl ( C ) for some C ∈ I r o l d ∩ I r n e w C \in I_r^{\mathrm{old}} \cap I_r^{\mathrm{new}} C ∈ I r old ∩ I r new , meaning that C C C belongs to M ∩ I r o l d \mathcal{M} \cap I_r^{\mathrm{old}} M ∩ I r old . For each C ∈ M C \in\mathcal{M} C ∈ M , b C , r o l d = 1 b^{\mathrm{old}}_{C,r}=1 b C , r old = 1 happens with probability O ( k s ( q / 4 d 2 ) r ) = O ( s q r ) O(ks(q/4d^{2})^{r})=O(sq^{r}) O ( k s ( q /4 d 2 ) r ) = O ( s q r ) by Corollary 1 and k ≤ d k \le d k ≤ d . Each such clause again affects at most 2 s 2s 2 s variables, so this case accounts for O ( s 2 q r ∣ B ∣ ) O(s^{2}q^{r}|\mathcal{B}|) O ( s 2 q r ∣ B ∣ ) variables in Z r Z_r Z r .
This shows that E [ ∣ Z r ∣ ] = O ( s 2 q r ∣ B ∣ ) \mathbb{E}[|Z_r|]=O(s^{2}q^{r}|\mathcal{B}|) E [ ∣ Z r ∣ ] = O ( s 2 q r ∣ B ∣ ) . The algorithm shifts its output from σ ∞ o l d ( x ) \sigma^{\mathrm{old}}_{\infty}(x) σ ∞ old ( x ) to σ ∞ n e w ( x ) \sigma^{\mathrm{new}}_{\infty}(x) σ ∞ new ( x ) . Every variable x x x with σ ∞ o l d ( x ) ≠ σ ∞ n e w ( x ) \sigma^{\mathrm{old}}_{\infty}(x)\ne\sigma^{\mathrm{new}}_{\infty}(x) σ ∞ old ( x ) = σ ∞ new ( x ) belongs to ⋃ r ≥ 1 Z r \bigcup_{r\ge1}Z_r ⋃ r ≥ 1 Z r , and summing E [ ∣ Z r ∣ ] \mathbb{E}[|Z_r|] E [ ∣ Z r ∣ ] over r ≥ 1 r \ge1 r ≥ 1 proves the final claim.
Our algorithm will find dirty pairs and construct T n e w \mathcal{T}^{\mathrm{new}} T new stage by stage. At the start of stage r ≥ 1 r \ge1 r ≥ 1 , the algorithm will hold a candidate set C r C_r C r containing every clause C C C for which ( C , r ) (C,r) ( C , r ) is dirty, and also know ( b C , r n e w , cnt C , r n e w ) (b^{\mathrm{new}}_{C,r},\operatorname{cnt}^{\mathrm{new}}_{C,r}) ( b C , r new , cnt C , r new ) for every clause C C C . The initialization implemented below will construct C 1 C_1 C 1 and compute the information for stage one. It also makes available
ℓ C ⋆ = max ( { 0 } ∪ { r x o l d : x ∈ vbl o l d ( C ) ∪ vbl n e w ( C ) } ) . \ell_C^\star= \max\left(\{0\} \cup\{r_x^{\mathrm{old}} : x \in\operatorname{vbl}^{\mathrm{old}}(C) \cup\operatorname{vbl}^{\mathrm{new}}(C)\}\right). ℓ C ⋆ = max ( { 0 } ∪ { r x old : x ∈ vbl old ( C ) ∪ vbl new ( C )} ) .
Stage r r r consists of the following steps:
For each C ∈ C r C \in C_r C ∈ C r , update membership in I r I_r I r using ( b C , r n e w , cnt C , r n e w ) (b^{\mathrm{new}}_{C,r},\operatorname{cnt}^{\mathrm{new}}_{C,r}) ( b C , r new , cnt C , r new ) . Every C ∈ I r o l d ⊕ I r n e w C \in I_r^{\mathrm{old}} \oplus I_r^{\mathrm{new}} C ∈ I r old ⊕ I r new forms a dirty pair ( C , r ) (C,r) ( C , r ) , so this recovers I r n e w I_r^{\mathrm{new}} I r new .
For every clause C C C in the union of I r o l d ⊕ I r n e w I_r^{\mathrm{old}} \oplus I_r^{\mathrm{new}} I r old ⊕ I r new and M ∩ I r o l d ∩ I r n e w \mathcal{M} \cap I_r^{\mathrm{old}} \cap I_r^{\mathrm{new}} M ∩ I r old ∩ I r new , update b x , r b_{x,r} b x , r for x ∈ vbl o l d ( C ) ∪ vbl n e w ( C ) x \in\operatorname{vbl}^{\mathrm{old}}(C) \cup\operatorname{vbl}^{\mathrm{new}}(C) x ∈ vbl old ( C ) ∪ vbl new ( C ) as appropriate. This will recover b x , r n e w b_{x,r}^{\mathrm{new}} b x , r new and identify Z r Z_r Z r , since b x , r n e w ≠ b x , r o l d b_{x,r}^{\mathrm{new}} \ne b_{x,r}^{\mathrm{old}} b x , r new = b x , r old either due to a clause entering or leaving I r I_r I r , or due to x x x entering or leaving vbl ( C ) \operatorname{vbl}(C) vbl ( C ) for some C ∈ I r o l d ∩ I r n e w C \in I_r^{\mathrm{old}} \cap I_r^{\mathrm{new}} C ∈ I r old ∩ I r new .
Update s x s_x s x , r x r_x r x and σ ∞ ( x ) \sigma_\infty(x) σ ∞ ( x ) for every variable x ∈ Z r x \in Z_r x ∈ Z r .
Construct C ‾ r + 1 \overline{C}_{r+1} C r + 1 from all clauses satisfying at least one of the following conditions:
vbl n e w ( C ) ∩ Z r ≠ ∅ \operatorname{vbl}^{\mathrm{new}}(C) \cap Z_r \ne\varnothing vbl new ( C ) ∩ Z r = ∅ ;
C ∈ C r ∪ M C \in C_r \cup\mathcal{M} C ∈ C r ∪ M and ℓ C ⋆ ≥ r \ell_C^\star\ge r ℓ C ⋆ ≥ r ;
C ∈ C r C \in C_r C ∈ C r and cnt C , r n e w > 0 \operatorname{cnt}^{\mathrm{new}}_{C,r} > 0 cnt C , r new > 0 .
Set C r + 1 = Γ H ∪ ( C ‾ r + 1 ) C_{r+1} = \Gamma_{H \cup}(\overline{C}_{r+1}) C r + 1 = Γ H ∪ ( C r + 1 ) . We compute ( b C , r + 1 n e w , cnt C , r + 1 n e w ) (b^{\mathrm{new}}_{C,r+1},\operatorname{cnt}^{\mathrm{new}}_{C,r+1}) ( b C , r + 1 new , cnt C , r + 1 new ) for every clause C ∈ C r + 1 C \in C_{r+1} C ∈ C r + 1 , and continue to the next stage if C r + 1 ≠ ∅ C_{r+1} \ne\varnothing C r + 1 = ∅ .
Notice that stage one will be executed even when C 1 C_1 C 1 is empty. After this process ends, we output the final assignment σ ∞ n e w \sigma_\infty^{\mathrm{new}} σ ∞ new and compute ℓ C n e w \ell_C^{\mathrm{new}} ℓ C new according to its definition in table 1. In the following, we argue the correctness of the algorithm.
Lemma 5. Before stage r ≥ 1 r \ge1 r ≥ 1 in the algorithm, the following invariants hold:
The algorithm has recovered I j n e w I_j^{\mathrm{new}} I j new and b x , j n e w b_{x,j}^{\mathrm{new}} b x , j new for 1 ≤ j < r 1 \le j < r 1 ≤ j < r and also σ j n e w \sigma_j^{\mathrm{new}} σ j new for 0 ≤ j < r 0 \le j < r 0 ≤ j < r ;
The set C r C_r C r contains every clause C C C for which ( C , r ) (C,r) ( C , r ) is dirty;
The algorithm has recovered ( b C , j n e w , cnt C , j n e w ) (b_{C,j}^{\mathrm{new}},\operatorname{cnt}_{C,j}^{\mathrm{new}}) ( b C , j new , cnt C , j new ) for every clause C C C and 1 ≤ j ≤ r 1 \le j \le r 1 ≤ j ≤ r .
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 r r r . Steps 1 and 2 in stage r r r recover I r n e w I_r^{\mathrm{new}} I r new and b x , r n e w b_{x,r}^{\mathrm{new}} b x , r new for x ∈ V x \in V x ∈ V . Since σ r ( x ) = R ( x , ∑ j = 1 r b x , j ) \sigma_r(x) = R\left(x,\sum_{j=1}^{r} b_{x,j}\right) σ r ( x ) = R ( x , ∑ j = 1 r b x , j ) , this also shows that the algorithm constructs σ r n e w \sigma_r^{\mathrm{new}} σ r new , and invariant 1 holds.
To show invariant 2, define A r + 1 A_{r+1} A r + 1 to include every clause C C C satisfying either b C , r + 1 o l d ≠ b C , r + 1 n e w b_{C,r+1}^{\mathrm{old}} \ne b_{C,r+1}^{\mathrm{new}} b C , r + 1 old = b C , r + 1 new , or b C , r + 1 n e w = 1 b_{C,r+1}^{\mathrm{new}} = 1 b C , r + 1 new = 1 and C ∈ M C \in\mathcal{M} C ∈ M . We claim that A r + 1 ⊆ C ‾ r + 1 A_{r+1} \subseteq\overline{C}_{r+1} A r + 1 ⊆ C r + 1 . Fix C ∈ A r + 1 C \in A_{r+1} C ∈ A r + 1 and consider two cases:
ℓ C ⋆ ≥ r \ell_C^\star\ge r ℓ C ⋆ ≥ r . If C ∈ M C \in\mathcal{M} C ∈ M , condition (2) includes it. Otherwise, its variable set does not change, but b C , r + 1 o l d ≠ b C , r + 1 n e w b_{C,r+1}^{\mathrm{old}} \ne b_{C,r+1}^{\mathrm{new}} b C , r + 1 old = b C , r + 1 new . This means some x ∈ vbl ( C ) x \in\operatorname{vbl}(C) x ∈ vbl ( C ) satisfies σ r o l d ( x ) ≠ σ r n e w ( x ) \sigma_r^{\mathrm{old}}(x) \ne\sigma_r^{\mathrm{new}}(x) σ r old ( x ) = σ r new ( x ) , and b x , j o l d ≠ b x , j n e w b_{x,j}^{\mathrm{old}} \ne b_{x,j}^{\mathrm{new}} b x , j old = b x , j new for some j ≤ r j \le r j ≤ r . Condition (1) puts C C C in C ‾ j + 1 ⊆ C j + 1 \overline{C}_{j+1} \subseteq C_{j+1} C j + 1 ⊆ C j + 1 . Condition (2) then adds C C C to C ‾ k \overline{C}_k C k and C k C_k C k for every k ∈ [ j + 1 , r + 1 ] k \in[j+1,r+1] k ∈ [ j + 1 , r + 1 ] .
ℓ C ⋆ < r \ell_C^{\star} < r ℓ C ⋆ < r . C C C is satisfied in both σ r − 1 o l d \sigma^{\mathrm{old}}_{r-1} σ r − 1 old and σ r o l d \sigma^{\mathrm{old}}_r σ r old , and b x , r o l d = 0 b^{\mathrm{old}}_{x,r}=0 b x , r old = 0 for every x ∈ vbl n e w ( C ) x \in\operatorname{vbl}^{\mathrm{new}}(C) x ∈ vbl new ( C ) . As a result, C ∈ A r + 1 C \in\mathcal{A}_{r+1} C ∈ A r + 1 implies b C , r + 1 n e w = 1 b^{\mathrm{new}}_{C,r+1}=1 b C , r + 1 new = 1 .
If b x , r n e w = 1 b^{\mathrm{new}}_{x,r}=1 b x , r new = 1 for some x ∈ vbl n e w ( C ) x \in\operatorname{vbl}^{\mathrm{new}}(C) x ∈ vbl new ( C ) , condition (1) includes C C C . Otherwise, C C C has the same assignment under σ r n e w \sigma^{\mathrm{new}}_r σ r new and σ r − 1 \sigma^{r-1} σ r − 1 , hence b C , r n e w = 1 b^{\mathrm{new}}_{C,r}=1 b C , r new = 1 and ( C , r ) (C,r) ( C , r ) is dirty. Invariant 2 in the induction hypothesis gives C ∈ C r C \in C_r C ∈ C r . As C C C is falsified by σ r − 1 n e w \sigma^{\mathrm{new}}_{r-1} σ r − 1 new but does not belong to I r n e w I^{\mathrm{new}}_r I r new , cnt C , r n e w > 0 \operatorname{cnt}^{\mathrm{new}}_{C,r}>0 cnt C , r new > 0 , and condition (3) includes it in C ‾ r + 1 \overline{C}_{r+1} C r + 1 .
Finally, there are two ways for ( C , r + 1 ) (C,r+1) ( C , r + 1 ) to be dirty:
Γ H ∪ ( C ) \Gamma_{H^{\cup}}(C) Γ H ∪ ( C ) contain a clause C ′ C' C ′ with b C ′ , r + 1 o l d ≠ b C ′ , r + 1 n e w b^{\mathrm{old}}_{C',r+1} \ne b^{\mathrm{new}}_{C',r+1} b C ′ , r + 1 old = b C ′ , r + 1 new , where C ′ ∈ A r + 1 ⊆ C ‾ r + 1 C' \in\mathcal{A}_{r+1} \subseteq\overline{C}_{r+1} C ′ ∈ A r + 1 ⊆ C r + 1 and C ∈ C r + 1 C \in C_{r+1} C ∈ C r + 1 .
b C , r + 1 o l d = b C , r + 1 n e w = 1 b^{\mathrm{old}}_{C,r+1}=b^{\mathrm{new}}_{C,r+1}=1 b C , r + 1 old = b C , r + 1 new = 1 , but there is a clause C ′ C' C ′ with ( C , C ′ ) ∈ H o l d ⊕ H n e w (C,C') \in H^{\mathrm{old}} \oplus H^{\mathrm{new}} ( C , C ′ ) ∈ H old ⊕ H new and b C ′ , r + 1 o l d = b C ′ , r + 1 n e w = 1 b^{\mathrm{old}}_{C',r+1}=b^{\mathrm{new}}_{C',r+1}=1 b C ′ , r + 1 old = b C ′ , r + 1 new = 1 . In this case, either C C C or C ′ C' C ′ belongs to M \mathcal{M} M , and it belongs to A r + 1 \mathcal{A}_{r+1} A r + 1 , so C ∈ C r + 1 C \in C_{r+1} C ∈ C r + 1 .
This proves invariant 2 for stage r + 1 r+1 r + 1 , 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 r ≥ 1 r \ge1 r ≥ 1 and the algorithm reconstructs T n e w \mathcal{T}^{\mathrm{new}} T new .
Proof. From lemma 5, it suffices to consider the stopping condition. Suppose C r + 1 = ∅ C_{r+1}=\varnothing C r + 1 = ∅ for some r ≥ 1 r \ge1 r ≥ 1 . Then C ‾ r + 1 = ∅ \overline{C}_{r+1}=\varnothing C r + 1 = ∅ , and condition (2) implies ℓ C ⋆ < r \ell_C^{\star}<r ℓ C ⋆ < r for every C ∈ M C \in\mathcal{M} C ∈ M . There are no dirty pairs at stage r + 1 r+1 r + 1 , so I r + 1 o l d = I r + 1 n e w I^{\mathrm{old}}_{r+1}=I^{\mathrm{new}}_{r+1} I r + 1 old = I r + 1 new . Additionally, there is no clause C ∈ M C \in\mathcal{M} C ∈ M with ℓ C ⋆ ≥ r + 1 \ell_C^{\star}\ge r+1 ℓ C ⋆ ≥ r + 1 , so steps 1–3 of stage r + 1 r+1 r + 1 do nothing, and b x , r + 1 o l d = b x , r + 1 n e w b^{\mathrm{old}}_{x,r+1}=b^{\mathrm{new}}_{x,r+1} b x , r + 1 old = b x , r + 1 new . This also shows that conditions (1)–(3) in step 4 of stage r + 1 r+1 r + 1 produce no clause in C ‾ r + 2 \overline{C}_{r+2} C r + 2 , so C r + 2 = ∅ C_{r+2}=\varnothing C r + 2 = ∅ and all resampling bits and clause falsification bits in subsequent iterations coincide between T o l d \mathcal{T}^{\mathrm{old}} T old and T n e w \mathcal{T}^{\mathrm{new}} T new .
In sum, all invariants hold for every r ≥ 1 r \ge1 r ≥ 1 at the end. Since we update s x s_x s x , r x r_x r x , and σ ∞ \sigma_{\infty} σ ∞ along the way according to their definitions and finally compute ℓ C n e w \ell_C^{\mathrm{new}} ℓ C new , the algorithm reconstructs T n e w \mathcal{T}^{\mathrm{new}} T new .
Implementation Details and Analysis
Transcript storage. For each clause C C C , we store ℓ C \ell_C ℓ C and sequences b C , r b_{C,r} b C , r , cnt C , r \operatorname{cnt}_{C,r} cnt C , r , and [ C ∈ I r ] [C \in I_r] [ C ∈ I r ] ; for each variable x x x , we store its randomness table, s x s_x s x , r x r_x r x , and the sequence b x , r b_{x,r} b x , r . 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 r r r in each array now costs O ( r ) O(r) O ( r ) rather than constant.
We use hash tables of size s s s and k k k , respectively, to store vbl ( C ) \operatorname{vbl}(C) vbl ( C ) and C ( x ) C(x) C ( x ) , with chaining [19 ] to resolve collisions. Each clause C C C will lazily generate a random key k C ∈ [ k ] k_C \in[k] k C ∈ [ k ] , and each variable lazily generates k x ∈ [ s ] k_x \in[s] k x ∈ [ s ] . The expected number of collisions is O ( 1 ) O(1) O ( 1 ) for each insertion or deletion, so each update takes O ( 1 ) O(1) O ( 1 ) time. The buckets for C ( x ) C(x) C ( x ) are generated lazily when x x x is inserted to avoid O ( k ) O(k) O ( k ) time for variable insertion. Iterating through vbl ( C ) \operatorname{vbl}(C) vbl ( C ) and C ( x ) C(x) C ( x ) takes O ( s ) O(s) O ( s ) and O ( k ) O(k) O ( k ) time, respectively, and we can iterate through Γ H ( C ) \Gamma_H(C) Γ H ( C ) in O ( k s ) O(ks) O ( k s ) time since d ≤ k s d \le ks d ≤ k s .
Initialization. During initialization, we first apply updates in B \mathcal{B} B to get vbl n e w ( C ) \operatorname{vbl}^{\mathrm{new}}(C) vbl new ( C ) and C n e w ( x ) C^{\mathrm{new}}(x) C new ( x ) for clauses C C C and variables x x x in O ( ∣ B ∣ ) O(|\mathcal{B}|) O ( ∣ B ∣ ) expected time. We can also easily compute ℓ C ⋆ \ell_C^{\star} ℓ C ⋆ for each clause C C C along the way in O ( ∣ B ∣ ) O(|\mathcal{B}|) O ( ∣ B ∣ ) time.
We maintain a data structure A C \mathcal{A}_C A C for each clause C C C to evaluate it on σ 0 \sigma_0 σ 0 . Since σ 0 o l d = σ 0 n e w \sigma^{\mathrm{old}}_0=\sigma^{\mathrm{new}}_0 σ 0 old = σ 0 new , we only need to apply updates in B \mathcal{B} B to A C \mathcal{A}_C A C in O ( ∣ B ∣ T u p d a t e ) O(|\mathcal{B}|T_{\mathrm{update}}) O ( ∣ B ∣ T update ) expected time to get b C , 1 n e w b^{\mathrm{new}}_{C,1} b C , 1 new for C ∈ M C \in\mathcal{M} C ∈ M ; clause C ∉ M C \notin\mathcal{M} C ∈ / M satisfies b C , 1 o l d = b C , 1 n e w b^{\mathrm{old}}_{C,1}=b^{\mathrm{new}}_{C,1} b C , 1 old = b C , 1 new .
There are several possibilities a clause C C C satisfies cnt C , 1 n e w ≠ cnt C , 1 o l d \operatorname{cnt}^{\mathrm{new}}_{C,1} \ne\operatorname{cnt}^{\mathrm{old}}_{C,1} cnt C , 1 new = cnt C , 1 old :
b C , 1 o l d ≠ b C , 1 n e w b^{\mathrm{old}}_{C,1} \ne b^{\mathrm{new}}_{C,1} b C , 1 old = b C , 1 new , where C ∈ M C \in\mathcal{M} C ∈ M .
b C , 1 o l d = b C , 1 n e w = 1 b^{\mathrm{old}}_{C,1} = b^{\mathrm{new}}_{C,1} = 1 b C , 1 old = b C , 1 new = 1 but b C ′ , 1 o l d ≠ b C ′ , 1 n e w b^{\mathrm{old}}_{C',1} \ne b^{\mathrm{new}}_{C',1} b C ′ , 1 old = b C ′ , 1 new for some C ′ ∈ Γ H ∪ ( C ) C' \in\Gamma_{H^{\cup}}(C) C ′ ∈ Γ H ∪ ( C ) , meaning that C ′ ∈ M C' \in\mathcal{M} C ′ ∈ M .
b C , 1 o l d = b C , 1 n e w = 1 b^{\mathrm{old}}_{C,1} = b^{\mathrm{new}}_{C,1} = 1 b C , 1 old = b C , 1 new = 1 , b C ′ , 1 o l d = b C ′ , 1 n e w = 1 b^{\mathrm{old}}_{C',1} = b^{\mathrm{new}}_{C',1} = 1 b C ′ , 1 old = b C ′ , 1 new = 1 , but ( C , C ′ ) (C,C') ( C , C ′ ) belongs to only one of H o l d H^{\mathrm{old}} H old and H n e w H^{\mathrm{new}} H new , meaning that either C C C or C ′ C' C ′ belongs to M \mathcal{M} M .
In sum, if c n t C , 1 n e w ≠ c n t C , 1 o l d \mathrm{cnt}^{\mathrm{new}}_{C,1} \ne\mathrm{cnt}^{\mathrm{old}}_{C,1} cnt C , 1 new = cnt C , 1 old , then there is C ′ ∈ Γ H ∪ ( C ) C' \in\Gamma_{H^{\cup}}(C) C ′ ∈ Γ H ∪ ( C ) such that b C ′ , 1 o l d b^{\mathrm{old}}_{C',1} b C ′ , 1 old or b C ′ , 1 n e w b^{\mathrm{new}}_{C',1} b C ′ , 1 new is one and C ′ ∈ M C' \in\mathcal{M} C ′ ∈ M . We go through every C ′ ∈ M C' \in\mathcal{M} C ′ ∈ M such that b C ′ , 1 o l d b^{\mathrm{old}}_{C',1} b C ′ , 1 old or b C ′ , 1 n e w b^{\mathrm{new}}_{C',1} b C ′ , 1 new is one, and then compute c n t C , 1 n e w \mathrm{cnt}^{\mathrm{new}}_{C,1} cnt C , 1 new for every C ∈ Γ H ∪ ( C ′ ) C \in\Gamma_{H^{\cup}}(C') C ∈ Γ H ∪ ( C ′ ) .
By Equation (1) , each of the events b C ′ , 1 o l d = 1 b^{\mathrm{old}}_{C',1}=1 b C ′ , 1 old = 1 and b C ′ , 1 n e w = 1 b^{\mathrm{new}}_{C',1}=1 b C ′ , 1 new = 1 has probability O ( q / d 2 ) O(q/d^2) O ( q / d 2 ) . Hence, in expectation, O ( q ∣ M ∣ ) O(q|\mathcal{M}|) O ( q ∣ M ∣ ) clauses need to update their counters, and the expected work to perform these updates is O ( k s q ∣ M ∣ ) O(ksq|\mathcal{M}|) O ( k s q ∣ M ∣ ) . Finally, include in C 1 \mathcal{C}_1 C 1 every clause whose ( b , c n t ) (b,\mathrm{cnt}) ( b , cnt ) pair changed. We have E [ ∣ C 1 ∣ ] = O ( q ∣ M ∣ ) \mathbb{E}[|\mathcal{C}_1|] = O(q|\mathcal{M}|) E [ ∣ C 1 ∣ ] = O ( q ∣ M ∣ ) .
For use in later stages, during initialization, we also construct M r = { C ∈ M : ℓ C ∗ ≥ r } \mathcal{M}_r = \{C \in\mathcal{M} : \ell_C^* \ge r\} M r = { C ∈ M : ℓ C ∗ ≥ r } for every r ≥ 1 r \ge1 r ≥ 1 in O ( ∣ M ∣ + ∑ r ≥ 1 ∣ M r ∣ ) O(|\mathcal{M}|+\sum_{r\ge1}|\mathcal{M}_r|) O ( ∣ M ∣ + ∑ r ≥ 1 ∣ M r ∣ ) time. Applying the same idea as in Corollary 1, we have
E [ ∣ M r ∣ ] = O ( k s ( q 4 d 2 ) r ∣ B ∣ ) = O ( s q r ∣ B ∣ ) . (3) \mathbb{E}[|\mathcal{M}_r|] = O\left(ks\left(\frac{q}{4d^2}\right)^r|\mathcal{B}|\right) = O(sq^r|\mathcal{B}|). \tag*{(3)} E [ ∣ M r ∣ ] = O ( k s ( 4 d 2 q ) r ∣ B ∣ ) = O ( s q r ∣ B ∣ ) . (3)
The total expected cost to construct M r \mathcal{M}_r M r for r ≥ 1 r \ge1 r ≥ 1 is O ( ∣ B ∣ ( 1 + s q ) ) O(|\mathcal{B}|(1+sq)) O ( ∣ B ∣ ( 1 + s q )) , and the expected total initialization cost is therefore O ( ∣ B ∣ ( T u p d a t e + k s q ) ) O(|\mathcal{B}|(T_{\mathrm{update}}+ksq)) O ( ∣ B ∣ ( T update + k s q )) .
Implementing a stage. Next, we discuss implementations for stage r r r .
Step 1 takes O ( r ∣ C r ∣ ) O(r|\mathcal{C}_r|) O ( r ∣ C r ∣ ) time to access r r r -th index in an array for every C ∈ C r C \in\mathcal{C}_r C ∈ C r .
To implement step 2, it suffices to inspect every clause C ∈ C r ∪ M r C \in\mathcal{C}_r \cup\mathcal{M}_r C ∈ C r ∪ M r and update b x , r b_{x,r} b x , r as appropriate for x ∈ vbl o l d ( C ) ∪ vbl n e w ( C ) x \in\operatorname{vbl}^{\mathrm{old}}(C) \cup\operatorname{vbl}^{\mathrm{new}}(C) x ∈ vbl old ( C ) ∪ vbl new ( C ) , since M ∩ I r o l d ⊆ M r \mathcal{M} \cap I_r^{\mathrm{old}} \subseteq\mathcal{M}_r M ∩ I r old ⊆ M r . Each clause affects 2 s 2s 2 s variables, and each variable contributes O ( r ) O(r) O ( r ) work to access and update b x , r b_{x,r} b x , r , so the total work is O ( s r ( ∣ C r ∣ + ∣ M r ∣ ) ) O(sr(|\mathcal{C}_r|+|\mathcal{M}_r|)) O ( sr ( ∣ C r ∣ + ∣ M r ∣ )) .
Step 2 yields the variable set Z r = { x : b x , r o l d ≠ b x , r n e w } Z_r = \{x : b^{\mathrm{old}}_{x,r} \ne b^{\mathrm{new}}_{x,r}\} Z r = { x : b x , r old = b x , r new } . In step 3, every variable x ∈ Z r x \in Z_r x ∈ Z r updates s x s_x s x and r x r_x r x in O ( 1 ) O(1) O ( 1 ) time, and updating σ ∞ ( x ) \sigma_\infty(x) σ ∞ ( x ) takes O ( T s a m p l e ) O(T_{\mathrm{sample}}) O ( T sample ) time since it may generate a new entry in its randomness table. So the total cost for step 3 is O ( T s a m p l e ∣ Z r ∣ ) O(T_{\mathrm{sample}}|Z_r|) O ( T sample ∣ Z r ∣ ) .
In step 4, condition (1) requires every x ∈ Z r x \in Z_r x ∈ Z r to add every clause in C n e w ( x ) \mathcal{C}^{\mathrm{new}}(x) C new ( x ) to C ‾ r + 1 \overline{\mathcal{C}}_{r+1} C r + 1 , while conditions (2) and (3) require the algorithm to inspect every clause in C r ∪ M r \mathcal{C}_r \cup\mathcal{M}_r C r ∪ M r , so constructing C ‾ r + 1 \overline{\mathcal{C}}_{r+1} C r + 1 costs O ( k ∣ Z r ∣ + r ∣ C r ∣ + ∣ M r ∣ ) O(k|Z_r|+r|\mathcal{C}_r|+|\mathcal{M}_r|) O ( k ∣ Z r ∣ + r ∣ C r ∣ + ∣ M r ∣ ) .
Constructing C r + 1 \mathcal{C}_{r+1} C r + 1 in step 5 costs O ( k s ∣ C ‾ r + 1 ∣ ) O(ks|\overline{\mathcal{C}}_{r+1}|) O ( k s ∣ C r + 1 ∣ ) . For each clause in C r + 1 \mathcal{C}_{r+1} C r + 1 , recovering its assignment in σ r \sigma_r σ r incurs O ( r s ) O(rs) O ( r s ) work, and evaluation takes T e v a l T_{\mathrm{eval}} T eval expected time. The counters are computed in O ( k s r ) O(ksr) O ( k sr ) time afterwards, so step 5 costs O ( ( T e v a l + k s r ) ∣ C r + 1 ∣ ) O((T_{\mathrm{eval}}+ksr)|\mathcal{C}_{r+1}|) O (( T eval + k sr ) ∣ C r + 1 ∣ ) in expectation since C ‾ r + 1 ⊆ C r + 1 \overline{\mathcal{C}}_{r+1} \subseteq\mathcal{C}_{r+1} C r + 1 ⊆ C r + 1 .
Charge the work in step 5 of stage r r r to stage r + 1 r+1 r + 1 . By Corollary 3 and eq. (3) , the expected work charged to stage r r r is
O ( ∣ B ∣ s 2 q r ( k + r + T s a m p l e ) + ( k s r + T e v a l ) E [ ∣ C r ∣ ] ) . (4) O\left(|\mathcal{B}|s^2q^r(k+r+T_{\mathrm{sample}})+(ksr+T_{\mathrm{eval}})\mathbb{E}[|\mathcal{C}_r|]\right). \tag*{(4)} O ( ∣ B ∣ s 2 q r ( k + r + T sample ) + ( k sr + T eval ) E [ ∣ C r ∣ ] ) . (4)
From the initialization, we know that E [ ∣ C 1 ∣ ] = O ( q ∣ B ∣ ) \mathbb{E}[|\mathcal{C}_1|] = O(q|\mathcal{B}|) E [ ∣ C 1 ∣ ] = O ( q ∣ B ∣ ) , and we will bound E [ ∣ C r ∣ ] \mathbb{E}[|\mathcal{C}_r|] E [ ∣ C r ∣ ] for r ≥ 2 r \ge2 r ≥ 2 in the following.
Lemma 6. For every r ≥ 1 r \ge1 r ≥ 1 and C ∈ C ‾ r + 1 C \in\overline{\mathcal{C}}_{r+1} C ∈ C r + 1 , dist H ∪ ( C , M ) ≤ 2 r \operatorname{dist}_{H\cup}(C,\mathcal{M}) \le2r dist H ∪ ( C , M ) ≤ 2 r and max ( ℓ C ⋆ , ℓ C n e w ) ≥ r \max(\ell_C^\star,\ell_C^{\mathrm{new}}) \ge r max ( ℓ C ⋆ , ℓ C new ) ≥ r .
Proof. The distance claim is trivial if C ∈ M C \in\mathcal{M} C ∈ M , so we consider the case where C ∉ M C \notin\mathcal{M} C ∈ / M , meaning that vbl o l d ( C ) = vbl n e w ( C ) \operatorname{vbl}^{\mathrm{old}}(C) = \operatorname{vbl}^{\mathrm{new}}(C) vbl old ( C ) = vbl new ( C ) . Consider the three candidate conditions that include C C C in C ‾ r + 1 \overline{\mathcal{C}}_{r+1} C r + 1 .
Under condition (1), some x ∈ vbl n e w ( C ) x \in\operatorname{vbl}^{\mathrm{new}}(C) x ∈ vbl new ( C ) satisfies b x , r o l d ≠ b x , r n e w b_{x,r}^{\mathrm{old}} \ne b_{x,r}^{\mathrm{new}} b x , r old = b x , r new . One possibility is that a clause C ′ ∈ C o l d ( x ) ∪ C n e w ( x ) C' \in C^{\mathrm{old}}(x) \cup C^{\mathrm{new}}(x) C ′ ∈ C old ( x ) ∪ C new ( x ) enters or leaves I r I_r I r , in which case Lemma 4 shows dist H ∪ ( C ′ , M ) ≤ 2 r − 1 \operatorname{dist}_{H\cup}(C',\mathcal{M}) \le2r-1 dist H ∪ ( C ′ , M ) ≤ 2 r − 1 and dist H ∪ ( C , C ′ ) ≤ 1 \operatorname{dist}_{H\cup}(C,C') \le1 dist H ∪ ( C , C ′ ) ≤ 1 . The other case is that some clause C ′ C' C ′ belongs to C o l d ( x ) ⊕ C n e w ( x ) C^{\mathrm{old}}(x) \oplus C^{\mathrm{new}}(x) C old ( x ) ⊕ C new ( x ) , where C ′ ∈ M C' \in\mathcal{M} C ′ ∈ M and dist H ∪ ( C , C ′ ) ≤ 1 \operatorname{dist}_{H\cup}(C,C') \le1 dist H ∪ ( C , C ′ ) ≤ 1 . In either case, the distance between C C C and M \mathcal{M} M is at most 2 r 2r 2 r .
For conditions (2) and (3), either C ∈ M C \in\mathcal{M} C ∈ M , where the distance is clearly zero, or C ∈ C r C \in C_r C ∈ C r . At r = 1 r=1 r = 1 , initialization gives C 1 ⊆ Γ H ∪ ( M ) C_1 \subseteq\Gamma_{H\cup}(\mathcal{M}) C 1 ⊆ Γ H ∪ ( M ) . For r ≥ 2 r \ge2 r ≥ 2 , a direct induction gives that every clause in C r = Γ H ∪ ( C ‾ r ) C_r = \Gamma_{H\cup}(\overline{C}_r) C r = Γ H ∪ ( C r ) is within 2 ( r − 1 ) + 1 2(r-1)+1 2 ( r − 1 ) + 1 hops of M \mathcal{M} M . Both cases imply the claimed distance bound.
For the second assertion, condition (1) supplies x ∈ vbl n e w ( C ) x \in\operatorname{vbl}^{\mathrm{new}}(C) x ∈ vbl new ( C ) with b x , r o l d ≠ b x , r n e w b_{x,r}^{\mathrm{old}} \ne b_{x,r}^{\mathrm{new}} b x , r old = b x , r new . When b x , r o l d = 1 b_{x,r}^{\mathrm{old}}=1 b x , r old = 1 , ℓ C ⋆ ≥ r \ell_C^\star\ge r ℓ C ⋆ ≥ r , and when b x , r n e w = 1 b_{x,r}^{\mathrm{new}}=1 b x , r new = 1 , ℓ C n e w ≥ r \ell_C^{\mathrm{new}} \ge r ℓ C new ≥ r . Condition (2) states ℓ C ⋆ ≥ r \ell_C^\star\ge r ℓ C ⋆ ≥ r directly. Under condition (3), C C C is falsified by σ r − 1 n e w \sigma_{r-1}^{\mathrm{new}} σ r − 1 new , so some variable must be resampled at stage r r r or later before the clause becomes satisfied. Hence ℓ C n e w ≥ r \ell_C^{\mathrm{new}} \ge r ℓ C new ≥ r . □ \square □
For a fixed clause C C C , applying the same idea as in Corollary 1 and a union bound over O ( s ) O(s) O ( s ) variables gives that the probability that max ( ℓ C ⋆ , ℓ C n e w ) ≥ r \max(\ell_C^\star,\ell_C^{\mathrm{new}}) \ge r max ( ℓ C ⋆ , ℓ C new ) ≥ r is O ( k s ( q / 4 d 2 ) r ) O(ks(q/4d^2)^r) O ( k s ( q /4 d 2 ) r ) . The oblivious update sequence fixes the 2 r 2r 2 r -hop neighborhood of M \mathcal{M} M independently of the randomness tables, and the neighborhood contains O ( ( 4 d 2 ) r ∣ B ∣ ) O((4d^2)^r|\mathcal{B}|) O (( 4 d 2 ) r ∣ B ∣ ) clauses, so Lemma 6 implies
E [ ∣ C ‾ r + 1 ∣ ] = O ( k s q r ∣ B ∣ ) , E [ ∣ C r + 1 ∣ ] = O ( k s d q r ∣ B ∣ ) . \mathbb{E}[|\overline{C}_{r+1}|] = O(ksq^r|\mathcal{B}|), \mathbb{E}[|C_{r+1}|] = O(ksdq^r|\mathcal{B}|). E [ ∣ C r + 1 ∣ ] = O ( k s q r ∣ B ∣ ) , E [ ∣ C r + 1 ∣ ] = O ( k s d q r ∣ B ∣ ) .
We conclude that the total expected work for stages r ≥ 2 r \ge2 r ≥ 2 is
∣ B ∣ ∑ r ≥ 1 O ( s 2 q r + 1 ( k + r + T s a m p l e ) + ( k s r + T e v a l ) k s d q r ) = O ( k 2 s 2 d q ( T e v a l + T s a m p l e ) ∣ B ∣ ) . (5) |\mathcal{B}|\sum_{r\ge1} O\left(s^2q^{r+1}(k+r+T_{\mathrm{sample}})+(ksr+T_{\mathrm{eval}})ksdq^r\right)=O(k^2s^2dq(T_{\mathrm{eval}}+T_{\mathrm{sample}})|\mathcal{B}|). \tag*{(5)} ∣ B ∣ r ≥ 1 ∑ O ( s 2 q r + 1 ( k + r + T sample ) + ( k sr + T eval ) k s d q r ) = O ( k 2 s 2 d q ( T eval + T sample ) ∣ B ∣ ) . (5)
The expected work for stage one is O ( ∣ B ∣ s 2 q ( k + T s a m p l e + T e v a l ) ) O(|\mathcal{B}|s^2q(k+T_{\mathrm{sample}}+T_{\mathrm{eval}})) O ( ∣ B ∣ s 2 q ( k + T sample + T eval )) since E [ ∣ C 1 ∣ ] = O ( q ∣ B ∣ ) \mathbb{E}[|C_1|]=O(q|\mathcal{B}|) E [ ∣ C 1 ∣ ] = O ( q ∣ B ∣ ) , and it is dominated by the sum above. Equation (5) therefore gives the total expected work for these stages.
Final cleanup. Finally, we compute ℓ C n e w \ell_C^{\mathrm{new}} ℓ C new only for clauses in ⋃ r ≥ 1 C r \bigcup_{r\ge1}C_r ⋃ r ≥ 1 C r . To justify this, consider a clause outside it. Due to condition (1), b x , r o l d = b x , r n e w b_{x,r}^{\mathrm{old}}=b_{x,r}^{\mathrm{new}} b x , r old = b x , r new for every x ∈ vbl n e w ( C ) x \in\operatorname{vbl}^{\mathrm{new}}(C) x ∈ vbl new ( C ) and r ≥ 1 r \ge1 r ≥ 1 . If vbl o l d ( C ) = vbl n e w ( C ) \operatorname{vbl}^{\mathrm{old}}(C)=\operatorname{vbl}^{\mathrm{new}}(C) vbl old ( C ) = vbl new ( C ) , then ℓ C o l d = ℓ C n e w \ell_C^{\mathrm{old}}=\ell_C^{\mathrm{new}} ℓ C old = ℓ C new . Otherwise, it belongs to M \mathcal{M} M . If ℓ C ⋆ ≥ 1 \ell_C^\star\ge1 ℓ C ⋆ ≥ 1 , condition (2) at stage one would put it in C ‾ 2 ⊆ C 2 \overline{C}_2 \subseteq C_2 C 2 ⊆ C 2 , a contradiction. Thus ℓ C ⋆ = 0 \ell_C^\star=0 ℓ C ⋆ = 0 , and this implies ℓ C o l d = ℓ C n e w = 0 \ell_C^{\mathrm{old}}=\ell_C^{\mathrm{new}}=0 ℓ C old = ℓ C new = 0 .
Each computation scans at most s s s variables, so the expected cleanup cost is at most
O ( s ∑ r ≥ 1 E [ ∣ C r ∣ ] ) = O ( k s 2 d q ∣ B ∣ ) . O\left(s\sum_{r\ge1}\mathbb{E}[|C_r|]\right)=O(ks^2dq|\mathcal{B}|). O ( s r ≥ 1 ∑ E [ ∣ C r ∣ ] ) = O ( k s 2 d q ∣ B ∣ ) .
We finally wrap up the discussion and prove the main theorem of this section.
Proof of Theorem 2. For a batch B \mathcal{B} B of clause updates, correctness follows from Lemma 5. The expected recourse is O ( s 2 q ∣ B ∣ ) O(s^2q|\mathcal{B}|) O ( s 2 q ∣ B ∣ ) by Corollary 3. Initialization takes O ( ∣ B ∣ ( T u p d a t e + k s q ) ) O(|\mathcal{B}|(T_{\mathrm{update}}+ksq)) O ( ∣ B ∣ ( T update + k s q )) expected time, repair takes O ( ∣ B ∣ k 2 s 2 d q ( T e v a l + T s a m p l e ) ) O(|\mathcal{B}|k^2s^2dq(T_{\mathrm{eval}}+T_{\mathrm{sample}})) O ( ∣ B ∣ k 2 s 2 d q ( T eval + T sample )) expected time, and cleanup takes O ( ∣ B ∣ k s 2 d q ) O(|\mathcal{B}|ks^2dq) O ( ∣ B ∣ k s 2 d q ) expected time. Their sum gives the stated work bound.
To introduce an isolated variable, initialize its transcript data to be all zero and generate R ( x , 0 ) R(x,0) R ( x , 0 ) as its value in the output assignment. This takes O ( T s a m p l e ) O(T_{\mathrm{sample}}) O ( T sample ) expected time. To remove an isolated variable, discard its record and remove it from the output, taking constant time. □ \square □
Dynamic ( 1 + ϵ ) Δ (1+\epsilon)\Delta ( 1 + ϵ ) Δ edge coloring: poly ( Δ ) \operatorname{poly}(\Delta) poly ( Δ ) update time
In this section, we give a dynamic algorithm that maintains a ( 1 + ϵ ) Δ (1+\epsilon)\Delta ( 1 + ϵ ) Δ edge coloring in poly ( Δ ) \operatorname{poly}(\Delta) poly ( Δ ) expected update time. We first illustrate a black-box application of Theorem 2 in the iterative edge-coloring framework of [8 ] , leading to a Δ O ( log ( 1 / ϵ ) ) \Delta^{O(\log(1/\epsilon))} Δ O ( l o g ( 1/ ϵ )) time algorithm, and then improve it to poly ( Δ ) \operatorname{poly}(\Delta) poly ( Δ ) by a more careful application of Theorem 2.
Notice that the static algorithm in [8 ] requires ϵ = ω ( log 2.5 Δ / Δ ) \epsilon=\omega(\log^{2.5}\Delta/\sqrt{\Delta}) ϵ = ω ( log 2.5 Δ/ Δ ) , and this will be the parameter range in which all the following edge-coloring algorithms operate. For a fixed ϵ \epsilon ϵ , define Δ ϵ = Θ ~ ( ϵ − 2 ) \Delta_{\epsilon}=\widetilde{\Theta}(\epsilon^{-2}) Δ ϵ = Θ ( ϵ − 2 ) to be the smallest maximum degree for which the static algorithm in [8 ] works.
The Static Algorithm and a Black-Box Dynamic Algorithm
We begin by reviewing the two phases of the static algorithm of [8 ] . Its first phase consists of r = O ( log ( 1 / ϵ ) ) r=O(\log(1/\epsilon)) r = O ( log ( 1/ ϵ )) iterations of a partial-coloring procedure. It uses a palette C 1 = [ ( 1 + ϵ p a l ) Δ ] \mathcal{C}_1=[(1+\epsilon_{\mathrm{pal}})\Delta] C 1 = [( 1 + ϵ pal ) Δ ] for some ϵ p a l ∈ ( 0 , ϵ ) \epsilon_{\mathrm{pal}}\in(0,\epsilon) ϵ pal ∈ ( 0 , ϵ ) , and leaves an uncolored graph of maximum degree Δ ′ = ( ϵ − ϵ p a l ) Δ / 5 = Θ ( ϵ Δ ) \Delta'=(\epsilon-\epsilon_{\mathrm{pal}})\Delta/5=\Theta(\epsilon\Delta) Δ ′ = ( ϵ − ϵ pal ) Δ/5 = Θ ( ϵ Δ ) . The second phase colors this remaining graph with the colors outside C 1 \mathcal{C}_1 C 1 .
At the beginning of iteration i i i , let G i G_i G i be the graph of uncolored edges and let Ψ i ( e ) ⊆ C 1 \Psi_i(e)\subseteq\mathcal{C}_1 Ψ i ( e ) ⊆ C 1 be the palette of e ∈ E ( G i ) e\in E(G_i) e ∈ E ( G i ) . Write deg i ( v ) \deg_i(v) deg i ( v ) for the degree of v v v in G i G_i G i , and write deg i , c ( v ) \deg_{i,c}(v) deg i , c ( v ) for the number of edges of G i G_i G i incident to v v v whose palettes contain c c c . The algorithm maintains, for suitable parameter sequences { d i } \{d_i\} { d i } , { t i } \{t_i\} { t i } , { p i } \{p_i\} { p i } , the invariants
max v deg i ( v ) ≤ d i , \max_{v}\deg_i(v)\leq d_i, v max deg i ( v ) ≤ d i ,
max v , c deg i , c ( v ) ≤ t i , \max_{v,c}\deg_{i,c}(v)\leq t_i, v , c max deg i , c ( v ) ≤ t i ,
min e ∈ E ( G i ) ∣ Ψ i ( e ) ∣ ≥ p i . \min_{e\in E(G_i)}|\Psi_i(e)|\geq p_i. e ∈ E ( G i ) min ∣ Ψ i ( e ) ∣ ≥ p i .
We do not need the exact definitions of these sequences. We only use that max { d i , t i , p i } = O ( Δ ) \max\{d_i,t_i,p_i\}=O(\Delta) max { d i , t i , p i } = O ( Δ ) , t i / p i + 1 ≤ C t_i/p_{i+1}\leq C t i / p i + 1 ≤ C , and p i / p i + 1 ≤ C p_i/p_{i+1}\leq C p i / p i + 1 ≤ C for every i ∈ [ r ] i\in[r] i ∈ [ r ] and some constant C C C not depending on i i i or ϵ \epsilon ϵ . These bounds follow from [8 Lemma 4] .
The first step of iteration i i i is to form an augmented instance ( G i ′ , Ψ i ′ ) (G'_i,\Psi'_i) ( G i ′ , Ψ i ′ ) to ensure uniform progress across the instance in the following way:
After that, define C 0 \mathcal{C}_0 C 0 to be a set of p i p_i p i placeholder colors disjoint from C 1 \mathcal{C}_1 C 1 . We attach an imaginary subtree of depth three to every vertex v ∈ V ( G i ) v\in V(G_i) v ∈ V ( G i ) . The palette of each imaginary edge either contains all of C 0 \mathcal{C}_0 C 0 or contains all but one color of C 0 \mathcal{C}_0 C 0 together with one color from C 1 \mathcal{C}_1 C 1 . The goal is that at every vertex within a two-hop neighborhood of the real vertices, the color degree of every color in C 1 \mathcal{C}_1 C 1 , including imaginary edges, is exactly t i t_i t i .
Notice that the degree of a vertex may exceed d i d_i d i or the color degree of a color in C 0 \mathcal{C}_0 C 0 at a vertex may exceed t i t_i t i in the augmented instance, but we will only keep real edges in G i G_i G i and colors in C 1 \mathcal{C}_1 C 1 after the iteration, so this causes no issue. We assume that there are enough imaginary edges around each internal vertex with palette C 0 \mathcal{C}_0 C 0 .
The procedure OneShotColoring is then applied to the augmented instance. It independently selects a uniformly random color c i ( e ) ∈ Ψ i ′ ( e ) c_i(e)\in\Psi'_i(e) c i ( e ) ∈ Ψ i ′ ( e ) for every edge e ∈ E ( G i ′ ) e\in E(G'_i) e ∈ E ( G i ′ ) . An edge is successfully colored if none of its adjacent edges in G i ′ G'_i G i ′ selects the same color. The unsuccessful real edges form G i + 1 G_{i+1} G i + 1 , and colors used by successful adjacent edges are removed from their palettes.
The LLL instance for iteration i i i contains clauses asserting the degree, color-degree, and palette invariants for vertices and edges in G i + 1 G_{i+1} G i + 1 . As observed in [HMR+26, Section 10.1], every variable occurs in O ( Δ 3 ) O(\Delta^3) O ( Δ 3 ) clauses, and the maximum failure probability is exp ( − ϵ 2 Δ / log 4 + o ( 1 ) Δ ) = exp ( − ω ( log Δ ) ) \exp(-\epsilon^2\Delta/\log^{4+o(1)}\Delta)=\exp(-\omega(\log\Delta)) exp ( − ϵ 2 Δ/ log 4 + o ( 1 ) Δ ) = exp ( − ω ( log Δ )) when Δ ≥ Δ ϵ \Delta\ge\Delta_\epsilon Δ ≥ Δ ϵ . Hence all the parameters in Theorem 2 are poly ( Δ ) \operatorname{poly}(\Delta) poly ( Δ ) , except q = Δ − ω ( 1 ) q=\Delta^{-\omega(1)} q = Δ − ω ( 1 ) .
Lemma 7. There is a dynamic algorithm that maintains a ( 1 + ϵ ) Δ (1+\epsilon)\Delta ( 1 + ϵ ) Δ edge coloring of a graph of maximum degree Δ ≥ Δ ϵ \Delta\ge\Delta_\epsilon Δ ≥ Δ ϵ under edge insertions and deletions with expected update time Δ O ( log ( 1 / ϵ ) ) \Delta^{O(\log(1/\epsilon))} Δ O ( l o g ( 1/ ϵ )) .
Proof. For every iteration i i i , maintain an instance L i \mathcal{L}_i L i using Theorem 2, and process L 1 , … , L r \mathcal{L}_1,\ldots,\mathcal{L}_r L 1 , … , L r in order. Let B i \mathcal{B}_i B i be the updates to ( G i , Ψ i ) (G_i,\Psi_i) ( G i , Ψ i ) generated by the preceding iteration, where B 1 \mathcal{B}_1 B 1 consists of the input update.
Since L i \mathcal{L}_i L i is built on the augmented instance ( G i ′ , Ψ i ′ ) (G'_i,\Psi'_i) ( G i ′ , Ψ i ′ ) , we first construct the corresponding batch of updates to G i ′ G'_i G i ′ . In addition to inserting or deleting the real edge itself, an insertion or deletion in G i G_i G i changes the palettes of O ( p i ) O(p_i) O ( p i ) imaginary edges to maintain the uniform color degree; enough imaginary edges with palette C 0 C_0 C 0 are available for this purpose. Implementing every such palette change by deleting and reinserting the edge gives ∣ B i ′ ∣ = O ( p i ∣ B i ∣ ) |\mathcal{B}'_i|=O(p_i|\mathcal{B}_i|) ∣ B i ′ ∣ = O ( p i ∣ B i ∣ ) .
Now we apply the updates in B i ′ \mathcal{B}'_i B i ′ to L i \mathcal{L}_i L i . We first introduce the new variables for insertions in B i ′ \mathcal{B}'_i B i ′ , apply one batch of updates to the variable sets of the O ( Δ 3 ∣ B i ′ ∣ ) O(\Delta^3|\mathcal{B}'_i|) O ( Δ 3 ∣ B i ′ ∣ ) affected clauses, and then remove the variables that have become isolated. By Theorem 2, these operations take ∣ B i ′ ∣ poly ( Δ ) |\mathcal{B}'_i|\operatorname{poly}(\Delta) ∣ B i ′ ∣ poly ( Δ ) expected work. The variable insertions and deletions incur O ( ∣ B i ′ ∣ ) O(|\mathcal{B}'_i|) O ( ∣ B i ′ ∣ ) recourse, while the clause updates incur ∣ B i ′ ∣ Δ − ω ( 1 ) |\mathcal{B}'_i|\Delta^{-\omega(1)} ∣ B i ′ ∣ Δ − ω ( 1 ) additional expected recourse. Thus the total expected recourse is O ( ∣ B i ′ ∣ ) O(|\mathcal{B}'_i|) O ( ∣ B i ′ ∣ ) .
We next generate B i + 1 \mathcal{B}_{i+1} B i + 1 from the recourse of L i \mathcal{L}_i L i . If the selected color of an edge e e e changes, only e e e 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 G i + 1 G_{i+1} G i + 1 . A changed successful color in C 1 C_1 C 1 , on either a real or an imaginary edge, affects the palettes of O ( t i ) O(t_i) O ( t i ) adjacent real edges. Thus one change in the selected color generates O ( t i ) O(t_i) O ( t i ) updates to ( G i + 1 , Ψ i + 1 ) (G_{i+1},\Psi_{i+1}) ( G i + 1 , Ψ i + 1 ) . Consequently, E [ ∣ B i + 1 ∣ ] = O ( t i E [ ∣ B i ′ ∣ ] ) = O ( t i p i E [ ∣ B i ∣ ] ) \mathbb{E}[|\mathcal{B}_{i+1}|]=O(t_i\mathbb{E}[|\mathcal{B}'_i|])=O(t_ip_i\mathbb{E}[|\mathcal{B}_i|]) E [ ∣ B i + 1 ∣ ] = O ( t i E [ ∣ B i ′ ∣ ]) = O ( t i p i E [ ∣ B i ∣ ]) . Iterating through r = O ( log ( 1 / ϵ ) ) r=O(\log(1/\epsilon)) r = O ( log ( 1/ ϵ )) levels and using max { t i , p i } = O ( Δ ) \max\{t_i,p_i\}=O(\Delta) max { t i , p i } = O ( Δ ) shows that the expected work and recourse of the first phase are Δ O ( log ( 1 / ϵ ) ) \Delta^{O(\log(1/\epsilon))} Δ O ( l o g ( 1/ ϵ )) .
In the second phase, we color the remaining graph, whose maximum degree is Δ ′ = ( ϵ − ϵ p a l ) Δ / 5 \Delta'=(\epsilon-\epsilon_{\mathrm{pal}})\Delta/5 Δ ′ = ( ϵ − ϵ pal ) Δ/5 , with the 5 Δ ′ 5\Delta' 5 Δ ′ colors outside C 1 C_1 C 1 . 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 O ( Δ ) O(\Delta) O ( Δ ) time per change, so the total expected update time remains Δ O ( log ( 1 / ϵ ) ) \Delta^{O(\log(1/\epsilon))} Δ O ( l o g ( 1/ ϵ )) . □ \square □
A poly(Δ \Delta Δ ) algorithm
The loss in Lemma 7 comes from implementing a palette change as a variable replacement. In the following theorem, we show that only O ( 1 / p i + poly ( Δ ) q ) O(1/p_i+\operatorname{poly}(\Delta)q) O ( 1/ p i + poly ( Δ ) q ) fraction of palette changes affect the selected colors in L i \mathcal{L}_i L i , 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 ( 1 + ϵ ) Δ (1+\epsilon)\Delta ( 1 + ϵ ) Δ edge coloring of a graph of maximum degree Δ ≥ Δ ϵ \Delta\ge\Delta_\epsilon Δ ≥ Δ ϵ under edge insertions and deletions with expected update time poly ( Δ ) \operatorname{poly}(\Delta) poly ( Δ ) .
Proof. We first specify how the entries in the randomness table are sampled. For every variable x e ∈ L i x_e\in\mathcal{L}_i x e ∈ L i and j ≥ 0 j\ge0 j ≥ 0 , lazily generate a uniformly random permutation π x e , j \pi_{x_e,j} π x e , j of C 1 ∪ C 0 C_1\cup C_0 C 1 ∪ C 0 , and let R ( x e , j ) R(x_e,j) R ( x e , j ) be the first color of Ψ i ′ ( e ) \Psi'_i(e) Ψ i ′ ( e ) in this permutation. This is a uniformly random element of Ψ i ′ ( e ) \Psi'_i(e) Ψ i ′ ( e ) , and T s a m p l e = ∣ C 1 ∪ C 0 ∣ = O ( Δ ) T_{\mathrm{sample}}=|C_1\cup C_0|=O(\Delta) T sample = ∣ C 1 ∪ C 0 ∣ = O ( Δ ) . As in Lemma 7, process L 1 , … , L r \mathcal{L}_1,\ldots,\mathcal{L}_r L 1 , … , L r in order, and let B i \mathcal{B}_i B i and B i ′ \mathcal{B}'_i B i ′ be the updates to ( G i , Ψ i ) (G_i,\Psi_i) ( G i , Ψ i ) and ( G i ′ , Ψ i ′ ) (G'_i,\Psi'_i) ( G i ′ , Ψ i ′ ) , respectively. Let S i S_i S i be the edge insertions and deletions in B i \mathcal{B}_i B i , and let T i T_i T i be the palette changes in B i \mathcal{B}_i B i . A palette change in T i T_i T i is a pair ( e , c ) (e,c) ( e , c ) with e ∉ S i e\notin S_i e ∈ / S i that adds or removes c c c from Ψ i ( e ) \Psi_i(e) Ψ i ( e ) . Define S i ′ S'_i S i ′ and T i ′ T'_i T i ′ analogously. Initially, ∣ S 1 ∣ = 1 |S_1|=1 ∣ S 1 ∣ = 1 and T 1 = ∅ T_1=\varnothing T 1 = ∅ .
From Lemma 7, each edge in S i S_i S i generates one update in S i ′ S'_i S i ′ and O ( p i ) O(p_i) O ( p i ) updates in T i ′ T'_i T i ′ . For an insertion of a color into Ψ i ( e ) \Psi_i(e) Ψ i ( e ) , or a deletion ( e , c ) ∈ T i (e,c)\in T_i ( e , c ) ∈ T i with c ∉ Ψ i ′ ( e ) c\notin\Psi'_i(e) c ∈ / Ψ i ′ ( e ) , no change to the augmented instance is needed. Otherwise, we need to replace c c c in Ψ i ′ ( e ) \Psi'_i(e) Ψ i ′ ( e ) by an arbitrary color of Ψ i ( e ) ∖ Ψ i ′ ( e ) \Psi_i(e)\setminus\Psi'_i(e) Ψ i ( e ) ∖ Ψ i ′ ( e ) and update a constant number of edges in the imaginary subtrees to maintain uniform color degree. Hence ∣ S i ′ ∣ = ∣ S i ∣ |S'_i|=|S_i| ∣ S i ′ ∣ = ∣ S i ∣ and ∣ T i ′ ∣ = O ( p i ∣ S i ∣ + ∣ T i ∣ ) |T'_i|=O(p_i|S_i|+|T_i|) ∣ T i ′ ∣ = O ( p i ∣ S i ∣ + ∣ T i ∣ ) .
We apply B i ′ \mathcal{B}'_i B i ′ to L i \mathcal{L}_i L i in the same way as Lemma 7. For each e e e with palette changes, we replace its old variable x e o l d x_e^{\mathrm{old}} x e old with a new variable x e n e w x_e^{\mathrm{new}} x e new , implemented by an edge deletion and an edge insertion. However, we will couple the zeroth randomness-table entries of x e o l d x_e^{\mathrm{old}} x e old and x e n e w x_e^{\mathrm{new}} x e new by setting π x e n e w , 0 = π x e o l d , 0 \pi_{x_e^{\mathrm{new}},0}=\pi_{x_e^{\mathrm{old}},0} π x e new , 0 = π x e old , 0 ; all entries with index j ≥ 1 j\ge1 j ≥ 1 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 T o l d \mathcal{T}^{\mathrm{old}} T old and the other belongs exclusively to clauses in T n e w \mathcal{T}^{\mathrm{new}} T new . Thus, within each of T o l d \mathcal{T}^{\mathrm{old}} T old and T n e w \mathcal{T}^{\mathrm{new}} T new , the randomness tables of all variables remain mutually independent with the prescribed distributions. Therefore, Lemmas 2 and 3 apply separately to T o l d \mathcal{T}^{\mathrm{old}} T old and T n e w \mathcal{T}^{\mathrm{new}} T new . 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 ∣ B i ′ ∣ poly ( Δ ) |\mathcal{B}'_i|\operatorname{poly}(\Delta) ∣ B i ′ ∣ poly ( Δ ) expected work, and the batch of clause updates generates O ( ∣ B i ′ ∣ poly ( Δ ) q ) O(|\mathcal{B}'_i|\operatorname{poly}(\Delta)q) O ( ∣ B i ′ ∣ poly ( Δ ) q ) expected recourse.
Now we bound the changes propagated to the next iteration. Let D i D_i D i count the number of edges in G i ′ G'_i G i ′ that either change their selected colors or are inserted or deleted. Every update in S i ′ S'_i S i ′ contributes one to D i D_i D i , and the clause updates in L i \mathcal{L}_i L i contributes O ( ∣ B i ′ ∣ poly ( Δ ) q ) O(|\mathcal{B}'_i|\operatorname{poly}(\Delta)q) O ( ∣ B i ′ ∣ poly ( Δ ) q ) edges to D i D_i D i in expectation.
Now consider an edge e e e whose palette changes from Ψ o l d ( e ) \Psi^{\mathrm{old}}(e) Ψ old ( e ) to Ψ n e w ( e ) \Psi^{\mathrm{new}}(e) Ψ new ( e ) . Define c i o l d ( e ) c_i^{\mathrm{old}}(e) c i old ( e ) and c i n e w ( e ) c_i^{\mathrm{new}}(e) c i new ( e ) to be its color before and after the update. If they differ, then either max { r x e o l d o l d , r x e n e w n e w } > 0 \max\{r_{x_e^{\mathrm{old}}}^{\mathrm{old}},r_{x_e^{\mathrm{new}}}^{\mathrm{new}}\}>0 max { r x e old old , r x e new new } > 0 or R ( x e o l d , 0 ) ≠ R ( x e n e w , 0 ) R(x_e^{\mathrm{old}},0)\ne R(x_e^{\mathrm{new}},0) R ( x e old , 0 ) = R ( x e new , 0 ) . The first event has probability O ( poly ( Δ ) q ) O(\operatorname{poly}(\Delta)q) O ( poly ( Δ ) q ) by Lemma 3. For the second event, as π x e o l d , 0 = π x e n e w , 0 \pi_{x_e^{\mathrm{old}},0}=\pi_{x_e^{\mathrm{new}},0} π x e old , 0 = π x e new , 0 , the permutation must place an element of Ψ o l d ( e ) ⊕ Ψ n e w ( e ) \Psi^{\mathrm{old}}(e)\mathbin{\oplus}\Psi^{\mathrm{new}}(e) Ψ old ( e ) ⊕ Ψ new ( e ) first among Ψ o l d ( e ) ∪ Ψ n e w ( e ) \Psi^{\mathrm{old}}(e)\cup\Psi^{\mathrm{new}}(e) Ψ old ( e ) ∪ Ψ new ( e ) . As a result,
Pr [ R ( x e o l d , 0 ) ≠ R ( x e n e w , 0 ) ] = ∣ Ψ o l d ( e ) ⊕ Ψ n e w ( e ) ∣ ∣ Ψ o l d ( e ) ∪ Ψ n e w ( e ) ∣ = O ( ∣ Ψ o l d ( e ) ⊕ Ψ n e w ( e ) ∣ p i ) . \Pr[R(x_e^{\mathrm{old}},0)\ne R(x_e^{\mathrm{new}},0)]
=\frac{|\Psi^{\mathrm{old}}(e)\mathbin{\oplus}\Psi^{\mathrm{new}}(e)|}{|\Psi^{\mathrm{old}}(e)\cup\Psi^{\mathrm{new}}(e)|}
=O\left(\frac{|\Psi^{\mathrm{old}}(e)\mathbin{\oplus}\Psi^{\mathrm{new}}(e)|}{p_i}\right). Pr [ R ( x e old , 0 ) = R ( x e new , 0 )] = ∣ Ψ old ( e ) ∪ Ψ new ( e ) ∣ ∣ Ψ old ( e ) ⊕ Ψ new ( e ) ∣ = O ( p i ∣ Ψ old ( e ) ⊕ Ψ new ( e ) ∣ ) .
and each palette change in T i ′ T'_i T i ′ contributes O ( 1 / p i + poly ( Δ ) q ) = O ( 1 / p i ) O(1/p_i+\operatorname{poly}(\Delta)q)=O(1/p_i) O ( 1/ p i + poly ( Δ ) q ) = O ( 1/ p i ) edges to D i D_i D i in expectation. In sum, we have
E [ D i ] = O ( E [ ∣ S i ′ ∣ + ∣ T i ′ ∣ p i + poly ( Δ ) q ∣ B i ′ ∣ ] ) = O ( E [ ∣ S i ∣ + ∣ T i ∣ p i ] ) . \mathbb{E}[D_i]
=O\left(\mathbb{E}\left[|S'_i|+\frac{|T'_i|}{p_i}+\operatorname{poly}(\Delta)q|\mathcal{B}'_i|\right]\right)
=O\left(\mathbb{E}\left[|S_i|+\frac{|T_i|}{p_i}\right]\right). E [ D i ] = O ( E [ ∣ S i ′ ∣ + p i ∣ T i ′ ∣ + poly ( Δ ) q ∣ B i ′ ∣ ] ) = O ( E [ ∣ S i ∣ + p i ∣ T i ∣ ] ) .
As in the analysis of Lemma 7, each edge counted by D i D_i D i changes the status of O ( 1 ) O(1) O ( 1 ) real edges and generates O ( t i ) O(t_i) O ( t i ) palette updates in G i + 1 G_{i+1} G i + 1 . At the same time, changes in T i T_i T i could propagate to the next iteration. Consequently,
E [ ∣ S i + 1 ∣ ] = O ( E [ D i ] ) , E [ ∣ T i + 1 ∣ ] = O ( t i E [ D i ] + E [ ∣ T i ∣ ] ) . \mathbb{E}[|S_{i+1}|]=O(\mathbb{E}[D_i]),\quad
\mathbb{E}[|T_{i+1}|]=O(t_i\mathbb{E}[D_i]+\mathbb{E}[|T_i|]). E [ ∣ S i + 1 ∣ ] = O ( E [ D i ]) , E [ ∣ T i + 1 ∣ ] = O ( t i E [ D i ] + E [ ∣ T i ∣ ]) .
Define the quantity Z i = E [ ∣ S i ∣ + ∣ T i ∣ / p i ] Z_i=\mathbb{E}[|S_i|+|T_i|/p_i] Z i = E [ ∣ S i ∣ + ∣ T i ∣/ p i ] . Since t i / p i + 1 ≤ C t_i/p_{i+1}\le C t i / p i + 1 ≤ C and p i / p i + 1 ≤ C p_i/p_{i+1}\le C p i / p i + 1 ≤ C , the preceding bounds give Z i + 1 ≤ C ′ Z i Z_{i+1}\le C'Z_i Z i + 1 ≤ C ′ Z i for some constant C ′ C' C ′ , and Z i ≤ exp ( O ( r ) ) = ( 1 / ϵ ) O ( 1 ) = poly ( Δ ) Z_i\le\exp(O(r))=(1/\epsilon)^{O(1)}=\operatorname{poly}(\Delta) Z i ≤ exp ( O ( r )) = ( 1/ ϵ ) O ( 1 ) = poly ( Δ ) for every i ≤ r + 1 i \le r + 1 i ≤ r + 1 . Since E [ ∣ B i ′ ∣ ] = O ( p i Z i ) \mathbb{E}[|B'_i|] = O(p_i Z_i) E [ ∣ B i ′ ∣ ] = O ( p i Z i ) , the process for all iterations takes poly ( Δ ) \operatorname{poly}(\Delta) poly ( Δ ) expected work in total. Finally, the same greedy method handles the second phase with an additional O ( Δ ) O(\Delta) O ( Δ ) factor. The total expected work remains poly ( Δ ) \operatorname{poly}(\Delta) poly ( Δ ) .
Dynamic ( 1 + ϵ ) Δ (1+\epsilon)\Delta ( 1 + ϵ ) Δ edge coloring: O ( log Δ ) + poly ( 1 / ϵ ) O(\log\Delta) + \operatorname{poly}(1/\epsilon) O ( log Δ ) + poly ( 1/ ϵ ) update time
In this section, we build a dynamic algorithm for ( 1 + ϵ ) Δ (1+\epsilon)\Delta ( 1 + ϵ ) Δ edge coloring with update time O ( log Δ ) + poly ( 1 / ϵ ) O(\log\Delta) + \operatorname{poly}(1/\epsilon) O ( log Δ ) + poly ( 1/ ϵ ) . We first illustrate the iterative degree splitting approach using the algorithm in Theorem 2, and then introduce an alternative algorithm based on graph shattering.
Iterative Degree Splitting
The main idea is to apply the following lemma recursively to reduce the degree of the input instance.
Lemma 8. Let Δ \Delta Δ bound the maximum degree of a dynamic graph G G G , and let F ∈ { 1 , … , ⌊ Δ ⌋ } F \in\{1,\ldots,\lfloor\Delta\rfloor\} F ∈ { 1 , … , ⌊ Δ ⌋} and 0 < δ ≤ 1 0 < \delta\le1 0 < δ ≤ 1 satisfy δ 2 Δ / F = ω ( log Δ ) \delta^2\Delta/F = \omega(\log\Delta) δ 2 Δ/ F = ω ( log Δ ) . There is a dynamic algorithm that partitions G G G into F F F subgraphs, each of maximum degree at most ( 1 + δ ) Δ / F (1+\delta)\Delta/F ( 1 + δ ) Δ/ F . Its expected update time is O ( 1 ) O(1) O ( 1 ) , and its expected recourse, defined by the sum of edge membership changes across all subgraphs, is 1 + exp ( − Ω ( δ 2 Δ / F ) ) 1+\exp(-\Omega(\delta^2\Delta/F)) 1 + exp ( − Ω ( δ 2 Δ/ F )) .
Proof. Consider the random process in which each edge e e e independently chooses x e x_e x e uniformly from [ F ] [F] [ F ] and joins the x e x_e x e -th subgraph. For each vertex v v v , let B v B_v B v be the event that its degree exceeds ( 1 + δ ) Δ / F (1+\delta)\Delta/F ( 1 + δ ) Δ/ F in some subgraph. A Chernoff bound followed by a union bound over F F F subgraphs gives Pr [ B v ] = exp ( − Ω ( δ 2 Δ / F ) ) \Pr[B_v] = \exp(-\Omega(\delta^2\Delta/F)) Pr [ B v ] = exp ( − Ω ( δ 2 Δ/ F )) . The event B v B_v B v depends only on the variables for edges incident to v v v , so the dependency graph has degree at most Δ \Delta Δ . Since δ 2 Δ / F = ω ( log Δ ) \delta^2\Delta/F = \omega(\log\Delta) δ 2 Δ/ F = ω ( log Δ ) , this is an LLL instance.
We maintain a satisfying assignment of the instance with Theorem 2. Its parameters are k = 2 k = 2 k = 2 , s = Δ s = \Delta s = Δ , d = Δ + 1 d = \Delta+1 d = Δ + 1 , q = 4 e d 4 exp ( − Ω ( δ 2 Δ / F ) ) = exp ( − ω ( log Δ ) ) q = 4ed^4\exp(-\Omega(\delta^2\Delta/F)) = \exp(-\omega(\log\Delta)) q = 4 e d 4 exp ( − Ω ( δ 2 Δ/ F )) = exp ( − ω ( log Δ )) , T e v a l = O ( Δ ) T_{\mathrm{eval}} = O(\Delta) T eval = O ( Δ ) , and T s a m p l e = O ( 1 ) T_{\mathrm{sample}} = O(1) T sample = O ( 1 ) . In this instance, T u p d a t e = O ( 1 ) T_{\mathrm{update}} = O(1) T update = O ( 1 ) : for every vertex, we store its degree in each subgraph and the number of subgraphs that exceed the threshold in σ 0 \sigma_0 σ 0 , 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 O ( 1 ) + q poly ( Δ ) = O ( 1 ) O(1) + q\operatorname{poly}(\Delta) = O(1) O ( 1 ) + q poly ( Δ ) = O ( 1 ) , and the expected recourse is 1 + q poly ( Δ ) = 1 + exp ( − Ω ( δ 2 Δ / F ) ) 1 + q\operatorname{poly}(\Delta) = 1 + \exp(-\Omega(\delta^2\Delta/F)) 1 + q poly ( Δ ) = 1 + exp ( − Ω ( δ 2 Δ/ F )) . □ \square □
We first use this procedure once to handle a bounded range of degrees.
Lemma 9. There is an algorithm that maintains a ( 1 + O ( ϵ ) ) Δ (1+O(\epsilon))\Delta ( 1 + O ( ϵ )) Δ edge coloring for a dynamic graph of maximum degree Δ ∈ [ Δ ϵ , exp ( Δ ϵ ) ] \Delta\in[\Delta_\epsilon,\exp(\Delta_\epsilon)] Δ ∈ [ Δ ϵ , exp ( Δ ϵ )] under edge insertions and deletions with expected update time poly ( 1 / ϵ ) \operatorname{poly}(1/\epsilon) poly ( 1/ ϵ ) .
Proof. Set D = C ϵ − 5 D = C\epsilon^{-5} D = C ϵ − 5 for a sufficiently large constant C C C . If Δ ≤ 3 D \Delta\le3D Δ ≤ 3 D , the claim follows directly from Theorem 3. Suppose instead that Δ ∈ ( 3 D , exp ( Δ ϵ ) ] \Delta\in(3D,\exp(\Delta_\epsilon)] Δ ∈ ( 3 D , exp ( Δ ϵ )] . We first apply Lemma 8 with δ = ϵ \delta= \epsilon δ = ϵ and F = ⌈ Δ / D ⌉ F = \lceil\Delta/D\rceil F = ⌈ Δ/ D ⌉ . Every resulting subgraph has maximum degree at most ( 1 + ϵ ) Δ / F ∈ [ D , 3 D ] (1+\epsilon)\Delta/F \in[D,3D] ( 1 + ϵ ) Δ/ F ∈ [ D , 3 D ] , and the lemma applies because δ 2 Δ / F ≥ ϵ − 3 = ω ( log Δ ) \delta^2\Delta/F \ge\epsilon^{-3} = \omega(\log\Delta) δ 2 Δ/ F ≥ ϵ − 3 = ω ( log Δ ) . We then apply independent instances of Theorem 3 to these subgraphs with distinct palettes, so the total palette size is ( 1 + ϵ ) 2 Δ + F = ( 1 + O ( ϵ ) ) Δ (1+\epsilon)^2\Delta+ F = (1+O(\epsilon))\Delta ( 1 + ϵ ) 2 Δ + F = ( 1 + O ( ϵ )) Δ .
The partition algorithm has O ( 1 ) O(1) O ( 1 ) expected work and recourse. The update sequence for each Theorem 3 instance is oblivious to the randomness, so each instance has poly ( 1 / ϵ ) \operatorname{poly}(1/\epsilon) poly ( 1/ ϵ ) 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 poly ( 1 / ϵ ) \operatorname{poly}(1/\epsilon) poly ( 1/ ϵ ) . □ \square □
It remains to consider Δ > exp ( Δ ϵ ) \Delta> \exp(\Delta_{\epsilon}) Δ > exp ( Δ ϵ ) . We define U 0 = Δ U_0 = \Delta U 0 = Δ , and for every d ≥ 0 d \ge0 d ≥ 0
U d + 1 = U d 2 ( 1 + 10 log 2 U d ) . U_{d+1} = \frac{U_d}{2}\left(1 + \frac{10}{\log^2 U_d}\right). U d + 1 = 2 U d ( 1 + log 2 U d 10 ) .
We additionally define q d = 1 / log 2 U d q_d = 1/\log^2 U_d q d = 1/ log 2 U d ; thus U d + 1 = U d ( 1 + 10 q d ) / 2 U_{d+1} = U_d(1 + 10q_d)/2 U d + 1 = U d ( 1 + 10 q d ) /2 . The sequence U d U_d U d gives the degree bounds across the levels of our recursive execution.
Let R R R be the smallest index for which U R ≤ exp ( Δ ϵ ) U_R \le\exp(\Delta_{\epsilon}) U R ≤ exp ( Δ ϵ ) . Then R = O ( log Δ ) R = O(\log\Delta) R = O ( log Δ ) and U R > exp ( Δ ϵ ) / 2 U_R > \exp(\Delta_{\epsilon})/2 U R > exp ( Δ ϵ ) /2 . We may assume that Δ ϵ \Delta_{\epsilon} Δ ϵ is large enough so that 10 q d ≤ 1 / 2 10q_d \le1/2 10 q d ≤ 1/2 for every d ≤ R d \le R d ≤ R , and thus U d + 1 ≤ 3 U d / 4 U_{d+1} \le3U_d/4 U d + 1 ≤ 3 U d /4 for d ∈ [ 0 , R − 1 ] d \in[0,R-1] d ∈ [ 0 , R − 1 ] . It follows that
U R = Δ 2 R ∏ d = 0 R − 1 ( 1 + 10 q d ) = Δ 2 R exp ( O ( ∑ d = 0 R − 1 q d ) ) = Δ 2 R exp ( O ( 1 / Δ ϵ ) ) = Δ 2 R ( 1 + O ( ϵ ) ) . U_R = \frac{\Delta}{2^R}\prod_{d=0}^{R-1}(1+10q_d) = \frac{\Delta}{2^R}\exp\left(O\left(\sum_{d=0}^{R-1}q_d\right)\right) = \frac{\Delta}{2^R}\exp(O(1/\Delta_{\epsilon})) = \frac{\Delta}{2^R}(1+O(\epsilon)). U R = 2 R Δ d = 0 ∏ R − 1 ( 1 + 10 q d ) = 2 R Δ exp ( O ( d = 0 ∑ R − 1 q d ) ) = 2 R Δ exp ( O ( 1/ Δ ϵ )) = 2 R Δ ( 1 + O ( ϵ )) .
To see why ∑ d = 0 R − 1 q d = O ( 1 / Δ ϵ ) \sum_{d=0}^{R-1}q_d = O(1/\Delta_{\epsilon}) ∑ d = 0 R − 1 q d = O ( 1/ Δ ϵ ) , observe that log U R − 1 > Δ ϵ \log U_{R-1} > \Delta_{\epsilon} log U R − 1 > Δ ϵ and log U d > log U d + 1 + log ( 4 / 3 ) \log U_d > \log U_{d+1} + \log(4/3) log U d > log U d + 1 + log ( 4/3 ) for every d ∈ [ 0 , R − 2 ] d \in[0,R-2] d ∈ [ 0 , R − 2 ] . Thus,
∑ d = 0 R − 1 q d ≤ ∑ d ≥ 0 1 ( Δ ϵ + d log ( 4 / 3 ) ) 2 = O ( ∫ Δ ϵ ∞ d x x 2 ) = O ( 1 / Δ ϵ ) . \sum_{d=0}^{R-1}q_d \le\sum_{d\ge0}\frac{1}{(\Delta_{\epsilon}+d\log(4/3))^2} = O\left(\int_{\Delta_{\epsilon}}^{\infty}\frac{dx}{x^2}\right) = O(1/\Delta_{\epsilon}). d = 0 ∑ R − 1 q d ≤ d ≥ 0 ∑ ( Δ ϵ + d log ( 4/3 ) ) 2 1 = O ( ∫ Δ ϵ ∞ x 2 d x ) = O ( 1/ Δ ϵ ) .
The argument above similarly gives U d = ( 1 + O ( ϵ ) ) Δ / 2 d U_d = (1+O(\epsilon))\Delta/2^d U d = ( 1 + O ( ϵ )) Δ/ 2 d for every d ∈ [ 0 , R ] d \in[0,R] d ∈ [ 0 , R ] and thus U d / U d ′ = ( 1 ± O ( ϵ ) ) 2 d ′ − d U_d/U_{d'} = (1\pm O(\epsilon))2^{d'-d} U d / U d ′ = ( 1 ± O ( ϵ )) 2 d ′ − d for d , d ′ ∈ [ 0 , R ] d,d' \in[0,R] d , d ′ ∈ [ 0 , R ] .
Lemma 10. There is an algorithm that maintains a ( 1 + O ( ϵ ) ) Δ (1+O(\epsilon))\Delta ( 1 + O ( ϵ )) Δ edge coloring of a graph of maximum degree Δ ≥ Δ ϵ \Delta\ge\Delta_{\epsilon} Δ ≥ Δ ϵ under edge insertions and deletions with expected update time poly ( 1 / ϵ ) + O ( log Δ ) \operatorname{poly}(1/\epsilon)+O(\log\Delta) poly ( 1/ ϵ ) + O ( log Δ ) .
Proof. By Lemma 9, it suffices to consider Δ > exp ( Δ ϵ ) \Delta> \exp(\Delta_{\epsilon}) Δ > exp ( Δ ϵ ) . Our algorithm consists of R R R levels, with independent randomness at every level. At level d ∈ [ 0 , R ] d \in[0,R] d ∈ [ 0 , R ] , the algorithm maintains a partition P d \mathcal{P}_d P d into 2 d 2^d 2 d subgraphs of maximum degree at most U d U_d U d . Starting with P 0 = { G } \mathcal{P}_0 = \{G\} P 0 = { G } , we apply Lemma 8 with F = 2 F=2 F = 2 and δ = 10 q d − 1 \delta=10q_{d-1} δ = 10 q d − 1 to every member of P d − 1 \mathcal{P}_{d-1} P d − 1 , and add the resulting bipartitions to P d \mathcal{P}_d P d for level d d d . We have ( 10 q d − 1 ) 2 U d − 1 / F = ω ( log U d − 1 ) (10q_{d-1})^2U_{d-1}/F=\omega(\log U_{d-1}) ( 10 q d − 1 ) 2 U d − 1 / F = ω ( log U d − 1 ) , so the lemma can be applied. Finally, for every graph in P R \mathcal{P}_R P R , we apply Lemma 9 to obtain a ( 1 + ϵ ) U R (1+\epsilon)U_R ( 1 + ϵ ) U R edge coloring. Since U R = ( 1 + O ( ϵ ) ) Δ / 2 R U_R=(1+O(\epsilon))\Delta/2^R U R = ( 1 + O ( ϵ )) Δ/ 2 R , the final coloring uses ( 1 + O ( ϵ ) ) Δ (1+O(\epsilon))\Delta ( 1 + O ( ϵ )) Δ colors.
At level d d d , an update causes expected recourse 1 + exp ( − Ω ( U d − 1 q d − 1 2 ) ) = 1 + exp ( − U d − 1 1 − o ( 1 ) ) 1+\exp(-\Omega(U_{d-1}q_{d-1}^2))=1+\exp(-U_{d-1}^{1-o(1)}) 1 + exp ( − Ω ( U d − 1 q d − 1 2 )) = 1 + exp ( − U d − 1 1 − o ( 1 ) ) . Every reassigned edge produces one deletion and one insertion at the next level, so each update in the d d d -th level passes in expectation 1 + exp ( − U d − 1 1 − o ( 1 ) ) 1+\exp(-U_{d-1}^{1-o(1)}) 1 + exp ( − U d − 1 1 − o ( 1 ) ) updates to the next level. As a result, a single edge update to G G G , equivalent to an update to P 0 \mathcal{P}_0 P 0 , generates in expectation
∏ d ′ = 0 d − 1 ( 1 + exp ( − Ω ( U d ′ q d ′ 2 ) ) ) ≤ exp ( ∑ d ′ = 0 d − 1 exp ( − U d ′ 1 − o ( 1 ) ) ) = O ( 1 ) \prod_{d'=0}^{d-1}(1+\exp(-\Omega(U_{d'}q_{d'}^2))) \le\exp\left(\sum_{d'=0}^{d-1}\exp(-U_{d'}^{1-o(1)})\right)=O(1) d ′ = 0 ∏ d − 1 ( 1 + exp ( − Ω ( U d ′ q d ′ 2 ))) ≤ exp ( d ′ = 0 ∑ d − 1 exp ( − U d ′ 1 − o ( 1 ) ) ) = O ( 1 )
updates to P d \mathcal{P}_d P d for every d ∈ [ R ] d\in[R] d ∈ [ R ] . Summing over R = O ( log Δ ) R=O(\log\Delta) R = O ( log Δ ) levels shows that maintaining P R \mathcal{P}_R P R takes O ( log Δ ) O(\log\Delta) O ( log Δ ) expected work and generates O ( 1 ) O(1) O ( 1 ) recourse to P R \mathcal{P}_R P R . Finally, each update to P R \mathcal{P}_R P R is passed to the corresponding instance in Lemma 9, so the total expected cost is poly ( 1 / ϵ ) \operatorname{poly}(1/\epsilon) poly ( 1/ ϵ ) . ∎
Alternative Approach Based on Graph Shattering
Here, we review an alternative approach to compute the iterative degree bipartition in the static setting given in [16 ] . 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 T T T with levels 0 , … , R 0,\ldots,R 0 , … , R . We use nodes for elements of T T T and reserve vertices for elements of V ( G ) V(G) V ( G ) . The output at depth d d d is a partition P d \mathcal{P}_d P d of the input graph into 2 d 2^d 2 d subgraphs.
Write r T r_T r T for the root of T T T , dep ( a ) \operatorname{dep}(a) dep ( a ) for the depth of a a a in T T T , L T \mathcal{L}_T L T for the set of leaves, and L T ( a ) \mathcal{L}_T(a) L T ( a ) for the set of leaves inside the subtree of a node a a a . A node a a a is internal if it is not a leaf. For an internal node, write LC ( a ) \operatorname{LC}(a) LC ( a ) and RC ( a ) \operatorname{RC}(a) RC ( a ) for its left and right children; for a ≠ r T a \ne r_T a = r T , write P ( a ) P(a) P ( a ) 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 0 ≤ d < R 0 \le d < R 0 ≤ d < R , set m d = ⌈ 1 / q d ⌉ m_d = \lceil1/q_d \rceil m d = ⌈ 1/ q d ⌉ . Independently for every edge e e e and depth d < R d < R d < R , sample a uniform direction dir e , d ∈ { LC , RC } \operatorname{dir}_{e,d} \in\{\operatorname{LC},\operatorname{RC}\} dir e , d ∈ { LC , RC } and a uniform category cat e , d ∈ [ m d ] \operatorname{cat}_{e,d} \in[m_d] cat e , d ∈ [ m d ] ; all category and direction choices are mutually independent.
Algorithm Description In the algorithm, each node a a a in T T T maintains an output edge set E a E_a E a . Initially, E r T = E ( G ) E_{r_T} = E(G) E r T = E ( G ) and all other sets are empty. The algorithm calls A ( r T ) \mathcal{A}(r_T) A ( r T ) , where A ( a ) \mathcal{A}(a) A ( a ) performs the following steps.
Let d = dep ( a ) d = \operatorname{dep}(a) d = dep ( a ) . If d = R d = R d = R , stop the process.
Partition E a E_a E a into E a , 1 , … , E a , m d E_{a,1},\ldots,E_{a,m_d} E a , 1 , … , E a , m d by placing each edge into its category. Initialize E a , i b a d = ∅ E^{\mathrm{bad}}_{a,i} = \varnothing E a , i bad = ∅ for i ∈ [ m d ] i \in[m_d] i ∈ [ m d ] , and set E a b a d = ⋃ i ∈ [ m d ] E a , i b a d E^{\mathrm{bad}}_a = \bigcup_{i \in[m_d]} E^{\mathrm{bad}}_{a,i} E a bad = ⋃ i ∈ [ m d ] E a , i bad .
Process the categories in the order i = 1 , … , m d i = 1,\ldots,m_d i = 1 , … , m d .
(a) Let H a , i H_{a,i} H a , i consist of edges in E a , i E_{a,i} E a , i that have not entered E a b a d E^{\mathrm{bad}}_a E a bad . Each such edge e e e proposes dir e , d ∈ { LC , RC } \operatorname{dir}_{e,d} \in\{\operatorname{LC},\operatorname{RC}\} dir e , d ∈ { LC , RC } .
(b) Perform the following tests for every vertex x x x in parallel:
– the degree test fails if the number of incident edges in H a , i H_{a,i} H a , i exceeds 2 U d / m d 2U_d/m_d 2 U d / m d ;
– the discrepancy test fails if the numbers of incident edges in H a , i H_{a,i} H a , i directed LC and RC differ by more than U d q d / m d U_dq_d/m_d U d q d / m d .
If either test fails, call ( x , a , i ) (x,a,i) ( x , a , i ) a failure . For each failure ( x , a , i ) (x,a,i) ( x , a , i ) , add all its incident edges in H a , i H_{a,i} H a , i to E a , i b a d E^{\mathrm{bad}}_{a,i} E a , i bad . For every neighbor y y y of x x x in H a , i H_{a,i} H a , i and j > i j > i j > i , also freeze all edges in E a , j E_{a,j} E a , j incident to y y y by adding them to E a , i b a d E^{\mathrm{bad}}_{a,i} E a , i bad .
(c) Send every surviving edge of H a , i H_{a,i} H a , i to E LC ( a ) E_{\operatorname{LC}(a)} E LC ( a ) or E RC ( a ) E_{\operatorname{RC}(a)} E RC ( a ) according to its proposed direction.
For every connected component of ( V ( G ) , E a b a d ) (V(G), E^{\mathrm{bad}}_a) ( V ( G ) , E a bad ) , deterministically compute an edge bipartition with degree discrepancy at most two at every vertex. Send its two parts to E LC ( a ) E_{\operatorname{LC}(a)} E LC ( a ) and E RC ( a ) E_{\operatorname{RC}(a)} E RC ( a ) . This can be done deterministically by computing an Euler tour of the component after pairing odd-degree vertices.
Call A ( LC ( a ) ) \mathcal{A}(\operatorname{LC}(a)) A ( LC ( a )) and A ( RC ( a ) ) \mathcal{A}(\operatorname{RC}(a)) A ( RC ( a )) .
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 a a a , write d = dep ( a ) d = \operatorname{dep}(a) d = dep ( a ) .
Algorithm Correctness In the following, we prove the correctness of the algorithm. Let P d = { E a ∣ dep ( a ) = d } \mathcal{P}_d = \{E_a \mid\operatorname{dep}(a)=d\} P d = { E a ∣ dep ( a ) = d } .
Observation 2. For every 0 ≤ d ≤ R 0 \le d \le R 0 ≤ d ≤ R , P d \mathcal{P}_d P d is a partition of E ( G ) E(G) E ( G ) .
Proof. We prove by induction on d d d . The base case d = 0 d=0 d = 0 is trivial. Suppose that the statement holds for d d d and consider any node a a a of depth d d d . After the pre-shattering process of A ( a ) \mathcal{A}(a) A ( a ) , every edge in E a E_a E a belongs to exactly one of E L C ( a ) E_{\mathrm{LC}(a)} E LC ( a ) , E R C ( a ) E_{\mathrm{RC}(a)} E RC ( a ) and E a b a d E^{\mathrm{bad}}_a E a bad . The post-shattering process further partitions E a b a d E^{\mathrm{bad}}_a E a bad into two parts, and merge them with E L C ( a ) E_{\mathrm{LC}(a)} E LC ( a ) and E R C ( a ) E_{\mathrm{RC}(a)} E RC ( a ) . This implies that E L C ( a ) E_{\mathrm{LC}(a)} E LC ( a ) and E R C ( a ) E_{\mathrm{RC}(a)} E RC ( a ) partitions E a E_a E a , and thus P d + 1 \mathcal{P}_{d+1} P d + 1 partitions E ( G ) E(G) E ( G ) from the induction hypothesis. □
Lemma 11. For every 0 ≤ d ≤ R 0 \le d \le R 0 ≤ d ≤ R , the maximum degree of any graph in P d \mathcal{P}_d P d is at most U d U_d U d .
Proof. We prove by induction on d d d . The base case d = 0 d=0 d = 0 is trivial as the input graph is of maximum degree Δ = U 0 \Delta=U_0 Δ = U 0 .
Suppose that the statement holds for d d d . Consider any node a a a of depth d d d and any vertex w w w . A ( a ) \mathcal{A}(a) A ( a ) produces an edge bipartition ( E L C ( a ) , E R C ( a ) ) (E_{\mathrm{LC}(a)}, E_{\mathrm{RC}(a)}) ( E LC ( a ) , E RC ( a ) ) of E a E_a E a according to Observation 2, and to show that the degree of w w w in both edge sets does not exceed U d + 1 U_{d+1} U d + 1 , it suffices to show that the degree discrepancy is at most 2 U d + 1 − U d = 10 U d q d 2U_{d+1}-U_d=10U_dq_d 2 U d + 1 − U d = 10 U d q d . The post-shattering process always produces at most two discrepancy for each vertex, so we pay attention to pre-shattering process next.
During A ( a ) \mathcal{A}(a) A ( a ) , let i ⋆ i^\star i ⋆ be the first category in which w w w or a neighbor of w w w in H a , i ⋆ H_{a,i^\star} H a , i ⋆ fails, and set i ⋆ = m + 1 i^\star=m+1 i ⋆ = m + 1 if it does not exist. Consider the contribution to the discrepancy for each category:
For i < i ⋆ i<i^\star i < i ⋆ , every edge incident to w w w in H a , i H_{a,i} H a , i is not moved to E a , i b a d E^{\mathrm{bad}}_{a,i} E a , i bad and the discrepancy test bounds their discrepancy by U d q d / m d U_dq_d/m_d U d q d / m d .
For i ⋆ i^\star i ⋆ , either w w w fails and contributes nothing, or its degree test passes and the surviving edges contribute at most 2 U d / m d ≤ 2 U d q d 2U_d/m_d\le2U_dq_d 2 U d / m d ≤ 2 U d q d to the discrepancy.
For i > i ⋆ i>i^\star i > i ⋆ , since neighboring failure in category i ⋆ i^\star i ⋆ freezes every edge incident to w w w in later categories, category i i i contributes zero to the discrepancy.
In sum, the pre-shattering discrepancy is therefore at most 3 U d q d 3U_dq_d 3 U d q d , and the total discrepancy is at most 2 + 3 U d q d ≤ 10 U d q d 2+3U_dq_d\le10U_dq_d 2 + 3 U d q d ≤ 10 U d q d . □
Dynamic ( 1 + ϵ ) Δ (1+\epsilon)\Delta ( 1 + ϵ ) Δ edge coloring: poly( 1 / ϵ ) (1/\epsilon) ( 1/ ϵ ) update time
In this section, we develop the algorithm that removes the dependence on Δ \Delta Δ from the update time based on the static algorithm in § 5.2 .
A Modified Static Algorithm
We follow all definitions and notations in § 5.2 . For each edge e e e , we notice that the random directions dir e , 0 , … , dir e , R − 1 \operatorname{dir}_{e,0},\ldots,\operatorname{dir}_{e,R-1} dir e , 0 , … , dir e , R − 1 defines a routing path path e , 0 , … , path e , R \operatorname{path}_{e,0},\ldots,\operatorname{path}_{e,R} path e , 0 , … , path e , R for e e e , where path e , 0 = r T \operatorname{path}_{e,0}=r_T path e , 0 = r T and
path e , d + 1 = { LC ( path e , d ) , dir e , d = LC , RC ( path e , d ) , dir e , d = RC . (6) \operatorname{path}_{e,d+1} =
\begin{cases}
\operatorname{LC}(\operatorname{path}_{e,d}), & \operatorname{dir}_{e,d}=\operatorname{LC},\\
\operatorname{RC}(\operatorname{path}_{e,d}), & \operatorname{dir}_{e,d}=\operatorname{RC}.
\end{cases} \tag*{(6)} path e , d + 1 = { LC ( path e , d ) , RC ( path e , d ) , dir e , d = LC , dir e , d = RC . (6)
Definition 2 (E ‾ a \overline{E}_a E a ). For a node a a a of depth d d d , define E ‾ a = { e ∈ E ( G ) : path e , d = a } \overline{E}_a=\{e\in E(G):\operatorname{path}_{e,d}=a\} E a = { e ∈ E ( G ) : path e , d = a } to be the set of edges that would reach a a a if they followed their routing paths.
By a slight abuse of notation, in the following, we also use an edge set such as E ‾ a \overline{E}_a E a to denote the graph with vertex set V ( G ) V(G) V ( G ) and edge set E ‾ a \overline{E}_a E a .
The edge sets E ‾ a \overline{E}_a E a 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 § 5.2 tests every possible vertex in the pre-shattering process to compute E b a d E^{\mathrm{bad}} E bad , the set of edges being rerouted. In our modified algorithm, the rerouting is instead guided by a set F \mathcal{F} F of seed failures , defined as follows.
Definition 3 (Seed failure). A pair ( u , a ) (u,a) ( u , a ) with d = dep ( a ) d=\operatorname{dep}(a) d = dep ( a ) is a seed failure if deg E ‾ a ( u ) > U d \deg_{\overline{E}_a}(u)>U_d deg E a ( u ) > U d , or if a a a is internal and some category i ∈ [ m d ] i\in[m_d] i ∈ [ m d ] satisfies at least one of the following conditions in E ‾ a \overline{E}_a E a :
more than 2 U d / m d 2U_d/m_d 2 U d / m d category-i i i edges are incident to u u u ;
the numbers of incident category-i i i edges with direction LC \operatorname{LC} LC and RC \operatorname{RC} RC differ by more than U d q d / m d U_dq_d/m_d U d q d / m d .
Notice that the tests in the seed failure match those in step 3(b) of the algorithm in § 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 E ‾ a \overline{E}_a E a .
For 0 ≤ d ≤ R 0\le d\le R 0 ≤ d ≤ R , define L d = ∑ i = d R − 1 2 m i = O ( log 3 U d ) L_d=\sum_{i=d}^{R-1}2m_i=O(\log^3 U_d) L d = ∑ i = d R − 1 2 m i = O ( log 3 U d ) , where the empty sum gives L R = 0 L_R=0 L R = 0 . The next definition characterizes the “effect” of a seed failure.
Definition 4 (Cluster). The cluster of ( w , b ) ∈ V ( G ) × T (w,b)\in V(G)\times T ( w , b ) ∈ V ( G ) × T consists of all pairs ( x , c ) (x,c) ( x , c ) such that c c c is a descendant of b b b and E ‾ b \overline{E}_b E b contains a path from w w w to x x x of length at most L dep ( b ) L_{\operatorname{dep}(b)} L dep ( b ) on which every vertex except the terminal vertex x x x has degree at most U dep ( b ) U_{\operatorname{dep}(b)} U dep ( b ) . Paths of length zero are allowed.
Since we require every vertex except the terminal vertex to have degree at most U dep ( b ) U_{\operatorname{dep}(b)} U dep ( b ) , one can show that a cluster contains at most exp ( O ( log 4 U dep ( b ) ) ) \exp(O(\log^4 U_{\operatorname{dep}(b)})) exp ( O ( log 4 U dep ( b ) )) 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 F \mathcal{F} F by the static algorithm.
Definition 5 (Completeness). A set F ⊆ V ( G ) × T \mathcal{F}\subseteq V(G)\times T F ⊆ V ( G ) × T is complete for an instance if it satisfies all the following.
(I) Every pair in F \mathcal{F} F is a seed failure.
(II) Every seed failure in the cluster of a pair in F \mathcal{F} F also belongs to F \mathcal{F} F .
(III) If ( w , b ) ∈ F (w,b)\in\mathcal{F} ( w , b ) ∈ F , b ≠ r T b\ne r_T b = r T , and deg E ‾ b ( w ) > U dep ( b ) \deg_{\overline{E}_b}(w)>U_{\operatorname{dep}(b)} deg E b ( w ) > U dep ( b ) , then ( w , P ( b ) ) ∈ F (w,P(b))\in\mathcal{F} ( w , P ( b )) ∈ F .
(IV) If c c c is a leaf and deg E ‾ c ( x ) > U R \deg_{\overline{E}_c}(x)>U_R deg E c ( x ) > U R , then ( x , P ( c ) ) ∈ F (x,P(c))\in\mathcal{F} ( x , P ( c )) ∈ F .
Algorithm Description Fix a complete set F \mathcal{F} F . Each node a a a maintains an output edge set E a E_a E a and a set V a ⋆ V_a^{\star} V a ⋆ of active vertices. Initially, E r T = E ( G ) E_{r_{\mathrm{T}}}=E(G) E r T = E ( G ) and all other sets are empty. The algorithm calls A ˉ ( r T ) \bar{\mathcal{A}}(r_{\mathrm{T}}) A ˉ ( r T ) , where A ˉ ( a ) \bar{\mathcal{A}}(a) A ˉ ( a ) performs the following steps. Steps different from the algorithm A ( a ) \mathcal{A}(a) A ( a ) in § 5.2 are marked red.
Let d = dep ( a ) d=\operatorname{dep}(a) d = dep ( a ) . If d = R d=R d = R , stop the process.
Define V ˉ a , 0 \bar{V}_{a,0} V ˉ a , 0 to be V a ⋆ ∪ { x : ( x , a ) ∈ F } V_a^{\star}\cup\{x:(x,a)\in\mathcal{F}\} V a ⋆ ∪ { x : ( x , a ) ∈ F } .
Partition E a E_a E a into E a , 1 , … , E a , m d E_{a,1},\ldots,E_{a,m_d} E a , 1 , … , E a , m d by placing each edge into its category. Initialize E a , i b a d = ∅ E_{a,i}^{\mathrm{bad}}=\varnothing E a , i bad = ∅ for i ∈ [ m d ] i\in[m_d] i ∈ [ m d ] , and set E a b a d = ⋃ i ∈ [ m d ] E a , i b a d E_a^{\mathrm{bad}}=\bigcup_{i\in[m_d]}E_{a,i}^{\mathrm{bad}} E a bad = ⋃ i ∈ [ m d ] E a , i bad .
Process the categories in the order i = 1 , … , m d i=1,\ldots,m_d i = 1 , … , m d . (a) Let H a , i H_{a,i} H a , i consist of edges in E a , i E_{a,i} E a , i that have not entered E a b a d E_a^{\mathrm{bad}} E a bad . Each such edge e e e proposes dir e , d ∈ { L C , R C } \operatorname{dir}_{e,d}\in\{\mathrm{LC},\mathrm{RC}\} dir e , d ∈ { LC , RC } .
(b) Initialize V ˉ a , i \bar{V}_{a,i} V ˉ a , i to be V ˉ a , i − 1 \bar{V}_{a,i-1} V ˉ a , i − 1 , and perform the following tests for every vertex x ∈ V ˉ a , i − 1 x\in\bar{V}_{a,i-1} x ∈ V ˉ a , i − 1 in parallel:
– the degree test fails if the number of incident edges in H a , i H_{a,i} H a , i exceeds 2 U d / m d 2U_d/m_d 2 U d / m d ;
– the discrepancy test fails if the numbers of incident edges in H a , i H_{a,i} H a , i directed L C \mathrm{LC} LC and R C \mathrm{RC} RC differ by more than U d q d / m d U_dq_d/m_d U d q d / m d .
If either test fails, call ( x , a , i ) (x,a,i) ( x , a , i ) a failure . For each failure ( x , a , i ) (x,a,i) ( x , a , i ) , add all its incident edges in H a , i H_{a,i} H a , i to E a , i b a d E_{a,i}^{\mathrm{bad}} E a , i bad . For every neighbor y y y of x x x in H a , i H_{a,i} H a , i and j > i j>i j > i , also freeze all edges in E a , j E_{a,j} E a , j incident to y y y by adding them to E a , i b a d E_{a,i}^{\mathrm{bad}} E a , i bad . Whenever an edge enters E a , i b a d E_{a,i}^{\mathrm{bad}} E a , i bad , add both endpoints to V ˉ a , i \bar{V}_{a,i} V ˉ a , i .
(c) Send every surviving edge of H a , i H_{a,i} H a , i to E L C ( a ) E_{\mathrm{LC}(a)} E LC ( a ) or E R C ( a ) E_{\mathrm{RC}(a)} E RC ( a ) according to its proposed direction.
For every connected component of ( V ( G ) , E a b a d ) (V(G),E_a^{\mathrm{bad}}) ( V ( G ) , E a bad ) , deterministically compute an edge bipartition with degree discrepancy at most two at every vertex. Send its two parts to E L C ( a ) E_{\mathrm{LC}(a)} E LC ( a ) and E R C ( a ) E_{\mathrm{RC}(a)} E RC ( a ) . This can be done deterministically by computing an Euler tour of the component after pairing odd-degree vertices.
Define V ˉ a \bar{V}_a V ˉ a to be V ˉ a , m dep ( a ) \bar{V}_{a,m_{\operatorname{dep}(a)}} V ˉ a , m dep ( a ) . Set V L C ( a ) ⋆ V_{\mathrm{LC}(a)}^{\star} V LC ( a ) ⋆ and V R C ( a ) ⋆ V_{\mathrm{RC}(a)}^{\star} V RC ( a ) ⋆ to be V ˉ a \bar{V}_a V ˉ a , and call A ( L C ( a ) ) \mathcal{A}(\mathrm{LC}(a)) A ( LC ( a )) and A ( R C ( a ) ) \mathcal{A}(\mathrm{RC}(a)) A ( RC ( a )) .
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 a a a , write d = dep ( a ) d=\operatorname{dep}(a) d = dep ( a ) .
Table 2. Input and data in a static edge-splitting transcript
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 x ∈ V ˉ a , i x \in\bar{V}_{a,i} x ∈ V ˉ a , i for some internal node a a a and i ∈ [ 0 , m dep ( a ) ] i \in[0,m_{\operatorname{dep}(a)}] i ∈ [ 0 , m dep ( a ) ] , then x ∈ V ˉ a , j x \in\bar{V}_{a,j} x ∈ V ˉ a , j for every j ∈ [ i , m dep ( a ) ] j \in[i,m_{\operatorname{dep}(a)}] j ∈ [ i , m dep ( a ) ] and x ∈ V b ⋆ x \in V_b^{\star} x ∈ V b ⋆ for every strict descendant b b b of a a a .
The second observation says that the process of activation is local.
Observation 4. For an internal node a a a and i ∈ [ 0 , m dep ( a ) ] i \in[0,m_{\operatorname{dep}(a)}] i ∈ [ 0 , m dep ( a ) ] , every vertex in V ˉ a , i \bar{V}_{a,i} V ˉ a , i is within distance 2 i 2i 2 i of V ˉ a , 0 \bar{V}_{a,0} V ˉ a , 0 in E a E_a E a .
Proof. We argue by induction on i i i . The base case i = 0 i=0 i = 0 is trivial. For the induction step, x ∈ V ˉ a , i \ V ˉ a , i − 1 x \in\bar{V}_{a,i}\backslash\bar{V}_{a,i-1} x ∈ V ˉ a , i \ V ˉ a , i − 1 only when it is incident to an edge moved to E a , i b a d E^{\mathrm{bad}}_{a,i} E a , i bad . The failure ( y , a , i ) (y,a,i) ( y , a , i ) responsible for the movement satisfies y ∈ V ˉ a , i − 1 y \in\bar{V}_{a,i-1} y ∈ V ˉ a , i − 1 , and the distance between x x x and y y y in E a E_a E a 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 a a a and w ∉ V a ⋆ w \notin V_a^{\star} w ∈ / V a ⋆ , the sets of edges incident to w w w are the same in E a E_a E a and E ˉ a \bar{E}_a E ˉ a .
Proof. We argue by induction on dep ( a ) \operatorname{dep}(a) dep ( a ) . The base case a = r T a=r_T a = r T is trivial. For the induction step, by Observation 3, V a ⋆ = V ˉ P ( a ) ⊇ V P ( a ) ⋆ V_a^{\star}=\bar{V}_{P(a)} \supseteq V_{P(a)}^{\star} V a ⋆ = V ˉ P ( a ) ⊇ V P ( a ) ⋆ . As a result, the induction hypothesis implies that the sets of edges incident to w w w are the same in E P ( a ) E_{P(a)} E P ( a ) and E ˉ P ( a ) \bar{E}_{P(a)} E ˉ P ( a ) . Since w ∉ V ˉ P ( a ) w \notin\bar{V}_{P(a)} w ∈ / V ˉ P ( a ) , none of the edges incident to w w w in E P ( a ) E_{P(a)} E P ( a ) enters the bad set, and every edge follows its proposed direction. Then the statement follows since E ˉ a \bar{E}_a E ˉ a contains the set of edges in E ˉ P ( a ) \bar{E}_{P(a)} E ˉ P ( a ) that propose to enter a a a .
In the next lemma, we show that every activated vertex is in the cluster of some seed failure in F \mathcal{F} F .
Lemma 12. For every internal node a a a and w ∈ V ˉ a w \in\bar{V}_a w ∈ V ˉ a , there is ( w ⋆ , a ⋆ ) ∈ F (w^{\star},a^{\star}) \in\mathcal{F} ( w ⋆ , a ⋆ ) ∈ F such that a ⋆ a^{\star} a ⋆ is an ancestor of a a a , the distance between w ⋆ w^{\star} w ⋆ and w w w in E ˉ a ⋆ \bar{E}_{a^{\star}} E ˉ a ⋆ is at most ∑ j = dep ( a ⋆ ) dep ( a ) 2 m j ≤ L dep ( a ⋆ ) \sum_{j=\operatorname{dep}(a^{\star})}^{\operatorname{dep}(a)}2m_j \le L_{\operatorname{dep}(a^{\star})} ∑ j = dep ( a ⋆ ) dep ( a ) 2 m j ≤ L dep ( a ⋆ ) , and ( w , a ) (w,a) ( w , a ) is in the cluster of ( w ⋆ , a ⋆ ) (w^{\star},a^{\star}) ( w ⋆ , a ⋆ ) .
Proof. We find ( w ⋆ , a ⋆ ) (w^{\star},a^{\star}) ( w ⋆ , a ⋆ ) by an iterative process. Each step in the process records an ancestor c c c of a a a , a vertex y ∈ V ˉ c , 0 y \in\bar{V}_{c,0} y ∈ V ˉ c , 0 , and a path P P P from y y y to w w w in E c E_c E c of length at most ∑ j = dep ( c ) dep ( a ) 2 m j \sum_{j=\operatorname{dep}(c)}^{\operatorname{dep}(a)}2m_j ∑ j = dep ( c ) dep ( a ) 2 m j . Initially, by Observation 4, there is a vertex y ∈ V ˉ a , 0 y \in\bar{V}_{a,0} y ∈ V ˉ a , 0 within distance at most 2 m dep ( a ) 2m_{\operatorname{dep}(a)} 2 m dep ( a ) from w w w . We set c = a c=a c = a and let P P P be the shortest path from y y y to w w w in E a E_a E a . In each step, we do the following checks.
If ( y , c ) ∉ F (y,c) \notin\mathcal{F} ( y , c ) ∈ / F , then c ≠ r T c \ne r_T c = r T and y ∈ V ˉ P ( c ) y \in\bar{V}_{P(c)} y ∈ V ˉ P ( c ) . Apply Observation 4 to find a path of length at most 2 m dep ( c ) − 1 2m_{\operatorname{dep}(c)-1} 2 m dep ( c ) − 1 from some z ∈ V ˉ P ( c ) , 0 z \in\bar{V}_{P(c),0} z ∈ V ˉ P ( c ) , 0 to y y y , add it to the beginning of P P P , eliminate loops when necessary, and replace ( y , c ) (y,c) ( y , c ) with ( z , P ( c ) ) (z,P(c)) ( z , P ( c )) .
If ( y , c ) ∈ F (y,c) \in\mathcal{F} ( y , c ) ∈ F but an edge u v uv uv of P P P is absent from E ˉ c \bar{E}_c E ˉ c , then that edge departed from its routing path at a strict ancestor of c c c , and u ∈ V ˉ P ( c ) u \in\bar{V}_{P(c)} u ∈ V ˉ P ( c ) according to Observation 3. Replace the prefix ending at u u u by a path of length at most 2 m dep ( c ) − 1 2m_{\operatorname{dep}(c)-1} 2 m dep ( c ) − 1 from some z ∈ V ˉ P ( c ) , 0 z \in\bar{V}_{P(c),0} z ∈ V ˉ P ( c ) , 0 to u u u , and replace ( y , c ) (y,c) ( y , c ) with ( z , P ( c ) ) (z,P(c)) ( z , P ( c )) .
For the remaining case, P ⊆ E ˉ c P \subseteq\bar{E}_c P ⊆ E ˉ c . If a vertex of P P P other than w w w has degree greater than U dep ( c ) U_{\operatorname{dep}(c)} U dep ( c ) in E ˉ c \bar{E}_c E ˉ c , let z z z be the first such vertex. The prefix ending at z z z witnesses that ( z , c ) (z,c) ( z , c ) lies in the cluster of ( y , c ) (y,c) ( y , c ) . Properties (II) and (III) of completeness give ( z , P ( c ) ) ∈ F (z,P(c)) \in\mathcal{F} ( z , P ( c )) ∈ F . Retain the suffix from z z z to w w w and replace ( y , c ) (y,c) ( y , c ) by ( z , P ( c ) ) (z,P(c)) ( z , P ( c )) .
If none of these cases applies, P P P witnesses that ( w , a ) (w,a) ( w , a ) lies in the cluster of ( y , c ) ∈ F (y,c) \in\mathcal{F} ( y , c ) ∈ F , and the procedure stops.
It is easy to see that every nonterminal step in this process moves c c c to a strict ancestor and preserves the length invariant. The process enters step 4 and terminates when c = r T c = r_T c = r T . It cannot enter the first two branches because E r T = E ˉ r T E_{r_T} = \bar{E}_{r_T} E r T = E ˉ r T , and the third case does not apply because all vertices have degree at most U 0 U_0 U 0 . Thus, the process terminates after finitely many steps and finds ( w ∗ , a ∗ ) ∈ F (w^*,a^*) \in\mathcal{F} ( w ∗ , a ∗ ) ∈ F satisfying the statement.
Corollary 5. For every internal node a a a and w ∈ V ˉ a ∖ V ˉ a , 0 w \in\bar{V}_a \setminus\bar{V}_{a,0} w ∈ V ˉ a ∖ V ˉ a , 0 , ( w , a ) (w,a) ( w , a ) is not a seed failure.
Proof. From Lemma 12 , there is ( w ∗ , a ∗ ) ∈ F (w^*,a^*) \in\mathcal{F} ( w ∗ , a ∗ ) ∈ F whose cluster contains ( w , a ) (w,a) ( w , a ) . Since w ∉ V ˉ a , 0 w \notin\bar{V}_{a,0} w ∈ / V ˉ a , 0 , ( w , a ) ∉ F (w,a) \notin\mathcal{F} ( w , a ) ∈ / F , so ( w , a ) (w,a) ( w , a ) 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 F \mathcal{F} F is complete, then for a node a a a of depth d d d and w ∈ V a ∗ w \in V_a^* w ∈ V a ∗ , deg E a ( w ) ≤ U d \deg_{E_a}(w) \le U_d deg E a ( w ) ≤ U d .
Proof. We prove the statement by induction on d d d . For the base case a = r T a = r_T a = r T , every vertex in E a E_a E a has degree at most U 0 U_0 U 0 . For the induction step, denote p = P ( a ) p = P(a) p = P ( a ) and fix w ∈ V a ∗ w \in V_a^* w ∈ V a ∗ . We claim, by a case analysis, that deg E p ( w ) ≤ U d − 1 \deg_{E_p}(w) \le U_{d-1} deg E p ( w ) ≤ U d − 1 :
When w ∈ V ˉ p , 0 ∖ V p ∗ w \in\bar{V}_{p,0} \setminus V_p^* w ∈ V ˉ p , 0 ∖ V p ∗ , we know that ( w , p ) (w,p) ( w , p ) is a seed failure. If p = r T p = r_T p = r T , then deg E p ( w ) ≤ U 0 \deg_{E_p}(w) \le U_0 deg E p ( w ) ≤ U 0 ; if p ≠ r T p \ne r_T p = r T , ( w , P ( p ) ) ∉ F (w,P(p)) \notin\mathcal{F} ( w , P ( p )) ∈ / F since otherwise w ∈ V ˉ P ( p ) , 0 ⊆ V ˉ P ( p ) = V p ∗ w \in\bar{V}_{P(p),0} \subseteq\bar{V}_{P(p)} = V_p^* w ∈ V ˉ P ( p ) , 0 ⊆ V ˉ P ( p ) = V p ∗ by Observation 3. This means, according to property (III) of completeness, deg E ˉ p ( w ) ≤ U d − 1 \deg_{\bar{E}_p}(w) \le U_{d-1} deg E ˉ p ( w ) ≤ U d − 1 . Finally, since w ∉ V p ∗ w \notin V_p^* w ∈ / V p ∗ , Observation 5 gives that deg E p ( w ) = deg E ˉ p ( w ) ≤ U d − 1 \deg_{E_p}(w) = \deg_{\bar{E}_p}(w) \le U_{d-1} deg E p ( w ) = deg E ˉ p ( w ) ≤ U d − 1 .
Finally, when w ∈ V ˉ p ∖ V ˉ p , 0 w \in\bar{V}_p \setminus\bar{V}_{p,0} w ∈ V ˉ p ∖ V ˉ p , 0 , ( w , p ) (w,p) ( w , p ) is not a seed failure by Corollary 5, and deg E p ( w ) = deg E ˉ p ( w ) ≤ U d − 1 \deg_{E_p}(w) = \deg_{\bar{E}_p}(w) \le U_{d-1} deg E p ( w ) = deg E ˉ p ( w ) ≤ U d − 1 according to Observation 5.
As E L C ( p ) E_{\mathrm{LC}}(p) E LC ( p ) and E R C ( p ) E_{\mathrm{RC}}(p) E RC ( p ) partition E p E_p E p , to show that deg E a ( w ) ≤ U d \deg_{E_a}(w) \le U_d deg E a ( w ) ≤ U d , it suffices to show that the degree discrepancy of the bipartition generated in A ( p ) \mathcal{A}(p) A ( p ) for w w w is bounded by 2 U d − U d − 1 = 10 q d − 1 U d − 1 2U_d - U_{d-1} = 10q_{d-1}U_{d-1} 2 U d − U d − 1 = 10 q d − 1 U d − 1 . The post-shattering part generates discrepancy at most two for every vertex, and we consider pre-shattering next.
Write U = U d − 1 U = U_{d-1} U = U d − 1 , q = q d − 1 q = q_{d-1} q = q d − 1 , and m = m d − 1 m = m_{d-1} m = m d − 1 . If w ∈ V ˉ p , 0 w \in\bar{V}_{p,0} w ∈ V ˉ p , 0 , then following the same argument as in lemma 11, the pre-shattering discrepancy is at most 3 U q 3Uq 3 U q .
Now suppose that w ∉ V ˉ p , 0 w \notin\bar{V}_{p,0} w ∈ / V ˉ p , 0 , and let i ∗ i^* i ∗ be the category in which w w w becomes active. Before this category, no incident edge has become bad, and every incident edge follows its proposed direction. Since ( w , p ) (w,p) ( w , p ) is not a seed failure and w ∉ V p ∗ w \notin V_p^* w ∈ / V p ∗ , Observation 5 bounds the total discrepancy of these earlier categories by U q Uq U q . Category i ∗ i^* i ∗ contributes at most its degree, 2 U / m ≤ 2 U q 2U/m \le2Uq 2 U / m ≤ 2 U q , to the discrepancy. Starting with category i ∗ + 1 i^*+1 i ∗ + 1 , w w w is tested, and lemma 11 bounds the remaining contribution by 3 U q 3Uq 3 U q . Hence the pre-shattering discrepancy is at most 6 U q 6Uq 6 U q , and the total discrepancy is at most 6 U q + 2 ≤ 10 U q 6Uq + 2 \le10Uq 6 U q + 2 ≤ 10 U q , as required.
For passive vertices at the leaves, Observation 5 and completeness guarantee (IV) imply that their final degrees are at most U R U_R U R . This, along with Lemma 13 , gives the degree guarantee of the algorithm.
Corollary 6. If F \mathcal{F} F is complete, then every graph in P R \mathcal{P}_R P R has maximum degree at most U R U_R U R .
Proof. Fix a leaf a a a and vertex w w w . From Lemma 13 , when w ∈ V a ∗ w \in V_a^* w ∈ V a ∗ , deg E ‾ a ( w ) ≤ U R \deg_{\overline{E}_a}(w) \le U_R deg E a ( w ) ≤ U R . When w ∉ V a ∗ w \notin V_a^* w ∈ / V a ∗ , we have deg E a ( w ) = deg E ‾ a ( w ) \deg_{E_a}(w) = \deg_{\overline{E}_a}(w) deg E a ( w ) = deg E a ( w ) by Observation 5. From property (IV) of completeness, if deg E ‾ a ( w ) > U R \deg_{\overline{E}_a}(w) > U_R deg E a ( w ) > U R , then ( w , P ( a ) ) ∈ F (w,P(a)) \in\mathcal{F} ( w , P ( a )) ∈ F and w ∈ V a ∗ w \in V_a^* w ∈ V a ∗ , a contradiction. This proves the claim.
The Dynamic Algorithm
The dynamic algorithm maintains the transcript of the static algorithm above in two stages. The discovery stage maintains a complete set F \mathcal{F} F , and the repair stage updates the transcript using this set. During the dynamic algorithm, the random directions dir e , 0 , … , dir e , R − 1 \operatorname{dir}_{e,0},\ldots,\operatorname{dir}_{e,R-1} dir e , 0 , … , dir e , R − 1 and categories cat e , 0 , … , cat e , R − 1 \operatorname{cat}_{e,0},\ldots,\operatorname{cat}_{e,R-1} cat e , 0 , … , cat e , R − 1 remain unchanged throughout the lifetime of an edge e e e .
In the rest of this section, let us fix an update, denoted by e = ( u , v ) e=(u,v) e = ( u , v ) . We use E ‾ b o l d \overline{E}_b^{\mathrm{old}} E b old and E ‾ b n e w \overline{E}_b^{\mathrm{new}} E b new to denote the sets of edges whose routing paths pass through b b b before and after this update, respectively. Further, define E ‾ b ∪ = E ‾ b o l d ∪ E ‾ b n e w \overline{E}_b^{\cup}=\overline{E}_b^{\mathrm{old}}\cup\overline{E}_b^{\mathrm{new}} E b ∪ = E b old ∪ E b new . The clusters of a pair in the old and new instances, called its old and new clusters, are defined by Definition 4 using E ‾ b o l d \overline{E}_b^{\mathrm{old}} E b old and E ‾ b n e w \overline{E}_b^{\mathrm{new}} E b new as the underlying graphs.
Algorithm Description
Failure Discovery Stage In the first stage, we explicitly maintain vertex degrees and adjacency lists of E ‾ a \overline{E}_a E a only for leaves. For an internal node b b b , E ‾ b \overline{E}_b E b is maintained implicitly as the union of E ‾ a \overline{E}_a E a over a ∈ L T ( b ) a \in\mathcal{L}_T(b) a ∈ L T ( b ) . We also explicitly maintain the seed failure set F \mathcal{F} F . For an insertion, we sample dir e , 0 , dir e , 1 , … , dir e , R − 1 \operatorname{dir}_{e,0},\operatorname{dir}_{e,1},\ldots,\operatorname{dir}_{e,R-1} dir e , 0 , dir e , 1 , … , dir e , R − 1 , while the random categories are sampled lazily. These choices remain unchanged throughout the lifetime of e e e . For either an insertion or a deletion, we then apply the update to E ‾ path e , R \overline{E}_{\operatorname{path}_{e,R}} E path e , R , thereby obtaining the new leaf edge sets.
We then call a recursive procedure Search on pairs in V ( G ) × T V(G)\times T V ( G ) × T to update F \mathcal{F} F . We generate an initial Search call for ( u , path e , R ) (u,\operatorname{path}_{e,R}) ( u , path e , R ) , ( v , path e , R ) (v,\operatorname{path}_{e,R}) ( v , path e , R ) , and every pair in F \mathcal{F} F whose old cluster contains either of these two pairs. Every Search call generated recursively is called noninitial .
Search( w , b ) (w,b) ( w , b ) performs the following steps.
If ( w , b ) (w,b) ( w , b ) is no longer a seed failure after the update, remove it from F \mathcal{F} F if present, and return.
Add ( w , b ) (w,b) ( w , b ) to F \mathcal{F} F if absent.
If b ≠ r T b \ne r_T b = r T and deg E ‾ b n e w ( w ) > U d e p ( b ) \deg_{\overline{E}_b^{\mathrm{new}}}(w)>U_{\mathrm{dep}}(b) deg E b new ( w ) > U dep ( b ) , call Search( w , P ( b ) ) (w,P(b)) ( w , P ( b )) .
Call Search( x , c ) (x,c) ( x , c ) for every pair ( x , c ) (x,c) ( x , c ) in the new cluster of ( w , b ) (w,b) ( w , b ) .
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 F o l d \mathcal{F}^{\mathrm{old}} F old to denote the set F \mathcal{F} F before the discovery stage and F n e w \mathcal{F}^{\mathrm{new}} F new to denote the set F \mathcal{F} F after all Search calls have finished.
Lemma 14. After every update, if F o l d \mathcal{F}^{\mathrm{old}} F old is complete for the old instance, then F n e w \mathcal{F}^{\mathrm{new}} F new is complete for the new instance.
Proof. We show the properties one by one.
For (I), the status of ( w , b ) (w,b) ( w , b ) as a seed failure can change only when w ∈ { u , v } w \in\{u,v\} w ∈ { u , v } and b b b lies on the routing path of e e e . Any such pair in F o l d \mathcal{F}^{\mathrm{old}} F old has an old cluster containing ( w , path e , R ) (w,\operatorname{path}_{e,R}) ( w , path e , R ) , so it generates an initial call and gets removed from F o l d \mathcal{F}^{\mathrm{old}} F old 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 ( w , b ) ∈ V ( G ) × T (w,b) \in V(G) \times T ( w , b ) ∈ V ( G ) × T , if neither ( u , path e , R ) (u,\operatorname{path}_{e,R}) ( u , path e , R ) nor ( v , path e , R ) (v,\operatorname{path}_{e,R}) ( v , path e , R ) belongs to the old cluster of ( w , b ) (w,b) ( w , b ) , then the old and new clusters of ( w , b ) (w,b) ( w , b ) are the same, and the sets of seed failures in this cluster are also the same. To see this, if b b b is not on the routing path of e e e , then e e e does not affect E ‾ b \overline{E}_b E b and the statement is immediate. Otherwise, the path that witnesses the gain or loss of the cluster must use e e e or pass through an endpoint whose degree changes in the old instance. The prefix then witnesses that ( u , path e , R ) (u,\operatorname{path}_{e,R}) ( u , path e , R ) or ( v , path e , R ) (v,\operatorname{path}_{e,R}) ( v , path e , R ) belongs to the old cluster of ( w , b ) (w,b) ( w , b ) , contradicting the assumption. The same argument also shows that the cluster of ( w , b ) (w,b) ( w , b ) cannot contain a pair ( x , c ) (x,c) ( x , c ) whose adjacency information changes in E ‾ c \overline{E}_c E c , so the set of seed failures remains unchanged.
Now fix ( w , b ) ∈ F n e w (w,b) \in\mathcal{F}^{\mathrm{new}} ( w , b ) ∈ F new . If Search ( w , b ) \operatorname{Search}(w,b) Search ( w , b ) is called, step 4 visits all seed failures in its new cluster and adds them to F n e w \mathcal{F}^{\mathrm{new}} F new . If Search ( w , b ) \operatorname{Search}(w,b) Search ( w , b ) is not called, it is in F o l d \mathcal{F}^{\mathrm{old}} F old , and its cluster and the set of seed failures in that cluster remain unchanged. Since F o l d \mathcal{F}^{\mathrm{old}} F old is complete for the old instance, (II) also holds in this case.
For (III), write d = dep ( b ) d = \operatorname{dep}(b) d = dep ( b ) and first observe that when b ≠ r T b \ne r_T b = r T and deg E ‾ b ( w ) > U dep ( b ) \deg_{\overline{E}_b}(w) > U_{\operatorname{dep}(b)} deg E b ( w ) > U dep ( b ) , ( w , P ( b ) ) (w,P(b)) ( w , P ( b )) is a seed failure, since otherwise summing its category discrepancies would give that deg E ‾ b ( w ) ≤ U d − 1 ( 1 + q d − 1 ) / 2 < U d \deg_{\overline{E}_b}(w) \le U_{d-1}(1+q_{d-1})/2 < U_d deg E b ( w ) ≤ U d − 1 ( 1 + q d − 1 ) /2 < U d , contradicting the degree overflow. As a result, if Search ( w , b ) \operatorname{Search}(w,b) Search ( w , b ) is called, step 3 will call Search ( w , P ( b ) ) \operatorname{Search}(w,P(b)) Search ( w , P ( b )) and add ( w , P ( b ) ) (w,P(b)) ( w , P ( b )) to F n e w \mathcal{F}^{\mathrm{new}} F new . Otherwise, ( w , b ) ∈ F o l d (w,b) \in\mathcal{F}^{\mathrm{old}} ( w , b ) ∈ F old and deg E ‾ b o l d ( w ) = deg E ‾ b n e w ( w ) \deg_{\overline{E}^{\mathrm{old}}_b}(w) = \deg_{\overline{E}^{\mathrm{new}}_b}(w) deg E b old ( w ) = deg E b new ( w ) , so ( w , P ( b ) ) ∈ F o l d (w,P(b)) \in\mathcal{F}^{\mathrm{old}} ( w , P ( b )) ∈ F old since F o l d \mathcal{F}^{\mathrm{old}} F old is complete, and finally ( w , P ( b ) ) ∈ F n e w (w,P(b)) \in\mathcal{F}^{\mathrm{new}} ( w , P ( b )) ∈ F new since it is still a seed failure.
Finally, if the event deg E ‾ R n e w ( x ) > U R \deg_{\overline{E}^{\mathrm{new}}_R}(x) > U_R deg E R new ( x ) > U R is caused by the new edge e e e , then x ∈ { u , v } x \in\{u,v\} x ∈ { u , v } and c = path e , R c = \operatorname{path}_{e,R} c = path e , R , and step 3 of Search ( x , c ) \operatorname{Search}(x,c) Search ( x , c ) adds ( x , P ( c ) ) (x,P(c)) ( x , P ( c )) to F n e w \mathcal{F}^{\mathrm{new}} F new by property (III). Otherwise, ( x , P ( c ) ) ∈ F o l d (x,P(c)) \in\mathcal{F}^{\mathrm{old}} ( x , P ( c )) ∈ F old . The persistent overflow at ( x , c ) (x,c) ( x , c ) implies that ( x , P ( c ) ) (x,P(c)) ( x , P ( c )) is still a seed failure, so it remains in F n e w \mathcal{F}^{\mathrm{new}} F new .
A Naive Failure Repair Stage As in § 3 , define T o l d \mathcal{T}^{\mathrm{old}} T old as the static algorithm transcript of the old instance with seed failure set F o l d \mathcal{F}^{\mathrm{old}} F old , and T n e w \mathcal{T}^{\mathrm{new}} T new as the static algorithm transcript of the new instance using F n e w \mathcal{F}^{\mathrm{new}} F new . The two transcripts use the same randomness for each edge. For a transcript item X X X and α ∈ { o l d , n e w } \alpha\in\{\mathrm{old},\mathrm{new}\} α ∈ { old , new } , we use X α X_\alpha X α to refer to the value of X X X in T α \mathcal{T}^\alpha T α . We assume that the algorithm knows T o l d \mathcal{T}^{\mathrm{old}} T old before the update and constructs T n e w \mathcal{T}^{\mathrm{new}} T new by updating T o l d \mathcal{T}^{\mathrm{old}} T old .
We use the following definition to group the transcript data.
Definition 6. For a transcript T α \mathcal{T}^{\alpha} T α , an internal node a a a , an integer i ∈ [ 0 , m dep ( a ) ] i \in[0,m_{\operatorname{dep}(a)}] i ∈ [ 0 , m dep ( a ) ] , and a vertex w w w , we define the local information O a , i α ( w ) \mathcal{O}^{\alpha}_{a,i}(w) O a , i α ( w ) to be the following:
The set of edges incident to w w w in E a α E^\alpha_a E a α ;
The set of edges incident to w w w in E a , j b a d , α E^{\mathrm{bad},\alpha}_{a,j} E a , j bad , α for 1 ≤ j ≤ i 1 \le j \le i 1 ≤ j ≤ i ;
Whether w w w belongs to V ~ a , j α \widetilde{V}^{\alpha}_{a,j} V a , j α for 0 ≤ j ≤ i 0 \le j \le i 0 ≤ j ≤ i .
For each internal node a a a of depth d d d and i ∈ [ 0 , m d ] i \in[0,m_d] i ∈ [ 0 , m d ] , we maintain a dirty set D a , i D_{a,i} D a , i . It is intended to contain all vertices w w w with σ a , i o l d ( w ) ≠ σ a , i n e w ( w ) \sigma_{a,i}^{\mathrm{old}}(w) \ne\sigma_{a,i}^{\mathrm{new}}(w) σ a , i old ( w ) = σ a , i new ( w ) , and we say D a , i D_{a,i} D a , i is good if it indeed contains all such vertices. For now, assume that all dirty sets are good.
The repair process for a ≠ r T a \ne r_T a = r T starts after the process for P ( a ) \mathrm{P}(a) P ( a ) completes and produces a set D P ( a ) ⋆ D_{\mathrm{P}(a)}^\star D P ( a ) ⋆ . We initialize D a , 0 D_{a,0} D a , 0 to be D P ( a ) ⋆ D_{\mathrm{P}(a)}^\star D P ( a ) ⋆ when a ≠ r T a \ne r_T a = r T , and D r T , 0 D_{r_T,0} D r T , 0 is initialized to contain the two endpoints of the updated edge e e e . Additionally, for every vertex w w w with ( w , a ) ∈ F o l d ⊕ F n e w (w,a) \in\mathcal{F}^{\mathrm{old}} \oplus\mathcal{F}^{\mathrm{new}} ( w , a ) ∈ F old ⊕ F new , we add w w w to D a , 0 D_{a,0} D a , 0 . For every vertex in D a , 0 D_{a,0} D a , 0 , we compute σ a , 0 n e w \sigma_{a,0}^{\mathrm{new}} σ a , 0 new based on F n e w \mathcal{F}^{\mathrm{new}} F new , E a n e w E_a^{\mathrm{new}} E a new and V a ⋆ , n e w = V ‾ P ( a ) n e w V_a^{\star,\mathrm{new}} = \overline{V}_{\mathrm{P}(a)}^{\mathrm{new}} V a ⋆ , new = V P ( a ) new when a ≠ r T a \ne r_T a = r T , which have already been constructed during the discovery stage and the repair process for P ( a ) \mathrm{P}(a) P ( a ) .
If D a , 0 D_{a,0} D a , 0 is empty, we can skip the process for repairing A ‾ ( a ) \overline{A}(a) A ( a ) . 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 D a , i D_{a,i} D a , i for recomputation. Specifically, define
J a = ( V , E a o l d ∪ E a n e w ) . J_a = (V, E_a^{\mathrm{old}} \cup E_a^{\mathrm{new}}). J a = ( V , E a old ∪ E a new ) .
From the algorithm description, σ a , i o l d ( x ) \sigma_{a,i}^{\mathrm{old}}(x) σ a , i old ( x ) depends only on σ a , i − 1 o l d ( y ) \sigma_{a,i-1}^{\mathrm{old}}(y) σ a , i − 1 old ( y ) for y y y inside the two-hop neighborhood of x x x in J a J_a J a . The same holds for σ a , i n e w ( x ) \sigma_{a,i}^{\mathrm{new}}(x) σ a , i new ( x ) . As a result, if x x x does not lie in the two-hop neighborhood of D a , i − 1 D_{a,i-1} D a , i − 1 in J a J_a J a , σ a , i o l d ( x ) = σ a , i n e w ( x ) \sigma_{a,i}^{\mathrm{old}}(x) = \sigma_{a,i}^{\mathrm{new}}(x) σ a , i old ( x ) = σ a , i new ( x ) . So it suffices to compute σ a , i n e w ( x ) \sigma_{a,i}^{\mathrm{new}}(x) σ a , i new ( x ) for every x x x within the two-hop neighborhood of D a , i − 1 D_{a,i-1} D a , i − 1 in J a J_a J a by simulating step 4(b) in A ‾ ( a ) \overline{A}(a) A ( a ) .
After the local information update, E a b a d , n e w E_a^{\mathrm{bad,new}} E a bad , new is constructed. For each connected component C C C in this graph, if C C C does not intersect D a , m d D_{a,m_d} D a , m d , then the same component also appears in T o l d T^{\mathrm{old}} T old , in which case we can reuse the old bipartition. For all other connected components, we recompute and store a new bipartition.
Let D a ⋆ D_a^\star D a ⋆ be the set of vertices whose connected component in E a b a d , n e w E_a^{\mathrm{bad,new}} E a bad , new touches D a , m d D_{a,m_d} D a , m d . Notice that D a , m d ⊆ D a ⋆ D_{a,m_d} \subseteq D_a^\star D a , m d ⊆ D a ⋆ . At the end of the repair process, D a ⋆ D_a^\star D a ⋆ 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 O ( log Δ ) O(\log\Delta) O ( log Δ ) overhead in work, since the edge update itself can affect the local information of R = O ( log Δ ) R = O(\log\Delta) R = O ( log Δ ) 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 σ a , i ( x ) \sigma_{a,i}(x) σ a , i ( x ) when x ∉ V ‾ a , i x \notin\overline{V}_{a,i} x ∈ / V a , i .
Observation 6. For α ∈ { o l d , n e w } \alpha\in\{\mathrm{old},\mathrm{new}\} α ∈ { old , new } , an internal node a a a of depth d d d , an integer i ∈ [ 0 , m d ] i \in[0,m_d] i ∈ [ 0 , m d ] , and a vertex x ∉ V ‾ a , i α x \notin\overline{V}_{a,i}^{\alpha} x ∈ / V a , i α , σ a , i α ( x ) \sigma_{a,i}^{\alpha}(x) σ a , i α ( x ) stores the following: its adjacency list in E a α E_a^\alpha E a α is the same as in E ‾ a α = ⋃ b ∈ T ( a ) E ‾ b α \overline{E}_a^\alpha= \bigcup_{b \in\mathcal{T}(a)} \overline{E}_b^\alpha E a α = ⋃ b ∈ T ( a ) E b α ; none of its incident edges enter E a , j b a d , α E_{a,j}^{\mathrm{bad},\alpha} E a , j bad , α for 1 ≤ j ≤ i 1 \le j \le i 1 ≤ j ≤ i ; and x ∉ V ‾ a , j α x \notin\overline{V}_{a,j}^{\alpha} x ∈ / V a , j α for 0 ≤ j ≤ i 0 \le j \le i 0 ≤ j ≤ i .
Proof. By the algorithm description, V ‾ a , j − 1 α ⊆ V ‾ a , j α \overline{V}_{a,j-1}^{\alpha} \subseteq\overline{V}_{a,j}^{\alpha} V a , j − 1 α ⊆ V a , j α for every 1 ≤ j ≤ i 1 \le j \le i 1 ≤ j ≤ i . Thus, x ∉ V ‾ a , j α x \notin\overline{V}_{a,j}^{\alpha} x ∈ / V a , j α for 0 ≤ j ≤ i 0 \le j \le i 0 ≤ j ≤ i , and x ∉ V a , j ⋆ , α x \notin V_{a,j}^{\star,\alpha} x ∈ / V a , j ⋆ , α . By Observation 5, its adjacency list in E a α E_a^\alpha E a α is the same as that in E ‾ a α \overline{E}_a^\alpha E a α . Finally, since V ‾ a , j α \overline{V}_{a,j}^{\alpha} V a , j α includes x x x whenever an incident edge of x x x is added to E a , j b a d , α E_{a,j}^{\mathrm{bad},\alpha} E a , j bad , α , we conclude that E a , j b a d , α E_{a,j}^{\mathrm{bad},\alpha} E a , j bad , α has no edge incident to x x x for every 1 ≤ j ≤ i 1 \le j \le i 1 ≤ j ≤ i . □ \square □
Since we have already maintained E ‾ b n e w \overline{E}_b^{\mathrm{new}} E b new for every leaf b b b during failure discovery, we only need to explicitly store σ a , i ( x ) \sigma_{a,i}(x) σ a , i ( x ) when x x x is activated.
We can see the benefit of this implicit representation when neither endpoint of e e e is activated in either T o l d T^{\mathrm{old}} T old or T n e w T^{\mathrm{new}} T new and F o l d = F n e w \mathcal{F}^{\mathrm{old}} = \mathcal{F}^{\mathrm{new}} F old = F new . In this case, the repair stage requires no work, since the discovery stage has already updated E ‾ p a t h e , R \overline{E}_{\mathrm{path}_e,R} E path e , R , and all local information affected by this update is represented implicitly through these leaf edge sets.
This motivates our new initialization rule. We compute s e s_e s e to be the shallowest internal node on the routing path of the updated edge e e e such that an endpoint of e e e belongs to V ‾ s e o l d \overline{V}_{s_e}^{\mathrm{old}} V s e old . Define s e = path e , R s_e = \operatorname{path}_{e,R} s e = path e , R when such a node does not exist. Instead of adding u u u and v v v to D r T , 0 D_{r_T,0} D r T , 0 , we will add u u u and v v v to D a , 0 D_{a,0} D a , 0 for every node a a a along the path from s e s_e s e to path e , R \operatorname{path}_{e,R} path e , R .
Next, we prove the correctness of the algorithm. Recall that D a , i D_{a,i} D a , i is good if it contains every vertex w w 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 a a a and 0 ≤ i < m dep ( a ) 0 \le i < m_{\operatorname{dep}(a)} 0 ≤ i < m dep ( a ) , if D a , i D_{a,i} D a , i is good, then so is D a , i + 1 D_{a,i+1} D a , i + 1 .
Proof. Consider a vertex x x x outside the two-hop neighborhood of D a , i D_{a,i} D a , i in J a J_a J a . Since D a , i D_{a,i} D a , i is good, every vertex within distance at most two of x x x has the same local information for category i i i in both transcripts. From the algorithm description, only these vertices can affect the local information for category i + 1 i+1 i + 1 . Thus every vertex whose local information for category i + 1 i+1 i + 1 changes lies in the two-hop neighborhood of D a , i D_{a,i} D a , i in J a J_a J a . The repair process examines exactly this neighborhood, so D a , i + 1 D_{a,i+1} D a , i + 1 is good.
Observation 8. For an internal node a ≠ r T a \ne r_T a = r T of depth d d d , if D P ( a ) , m d − 1 D_{P(a),m_{d-1}} D P ( a ) , m d − 1 is good, then so is D a , 0 D_{a,0} D a , 0 .
Proof. Consider a vertex x x x whose local information σ a , 0 ( x ) \sigma_{a,0}(x) σ a , 0 ( x ) differs between the two transcripts. Suppose that an edge f f f incident to x x x enters or leaves E a E_a E a . If its presence in E P ( a ) E_{P(a)} E P ( a ) or its status in the parent’s pre-shattering process changes, the goodness of D P ( a ) , m d − 1 D_{P(a),m_{d-1}} D P ( a ) , m d − 1 places x x x in D P ( a ) , m d − 1 ⊆ D a , 0 D_{P(a),m_{d-1}} \subseteq D_{a,0} D P ( a ) , m d − 1 ⊆ D a , 0 . Otherwise, f f f 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 x ∈ D P ( a ) ∗ ⊆ D a , 0 x \in D^*_{P(a)} \subseteq D_{a,0} x ∈ D P ( a ) ∗ ⊆ D a , 0 .
The remaining possibility is a change in membership in V ‾ a , 0 = V ‾ P ( a ) ∪ { w : ( w , a ) ∈ F } \overline{V}_{a,0} = \overline{V}_{P(a)} \cup\{w : (w,a) \in\mathcal{F}\} V a , 0 = V P ( a ) ∪ { w : ( w , a ) ∈ F } . A change in the first set puts x x x in D P ( a ) , m d − 1 D_{P(a),m_{d-1}} D P ( a ) , m d − 1 , and a change in the second set adds x x x directly to D a , 0 D_{a,0} D a , 0 . Thus D a , 0 D_{a,0} D a , 0 is good.
We next show that a good dirty set produces a correct repair.
Lemma 15. Let b b b be an internal node of depth d d d . Suppose that, before the repair at b b b , the algorithm has constructed E b n e w E_b^{\mathrm{new}} E b new and also V ‾ P ( b ) n e w \overline{V}_{P(b)}^{\mathrm{new}} V P ( b ) new when b ≠ r T b \ne r_T b = r T , and that D b , 0 D_{b,0} D b , 0 is good. Then the repair at b b b constructs E L C ( b ) n e w E_{LC(b)}^{\mathrm{new}} E L C ( b ) new , E R C ( b ) n e w E_{RC(b)}^{\mathrm{new}} E R C ( b ) new , V ‾ b n e w \overline{V}_b^{\mathrm{new}} V b new , and all local information at b b b in T n e w T^{\mathrm{new}} T new .
Proof. We use induction on the category i i i to prove that σ b , i n e w ( x ) \sigma_{b,i}^{\mathrm{new}}(x) σ b , i new ( x ) is constructed for every vertex x x x during the repair process. The base case i = 0 i = 0 i = 0 is implied by the fact that D b , 0 D_{b,0} D b , 0 is good and the algorithm has access to F n e w F^{\mathrm{new}} F new , E b n e w E_b^{\mathrm{new}} E b new , and V ‾ P ( b ) n e w \overline{V}_{P(b)}^{\mathrm{new}} V P ( b ) new . For the induction step, by Observation 7, D b , i D_{b,i} D b , i is good. For every vertex outside D b , i D_{b,i} D b , i , σ b , i o l d ( x ) = σ b , i n e w ( x ) \sigma_{b,i}^{\mathrm{old}}(x) = \sigma_{b,i}^{\mathrm{new}}(x) σ b , i old ( x ) = σ b , i new ( x ) ; for vertices inside D b , i D_{b,i} D b , i , σ b , i n e w ( x ) \sigma_{b,i}^{\mathrm{new}}(x) σ b , i new ( x ) is computed from category-( i − 1 ) (i-1) ( i − 1 ) local information given by the induction hypothesis.
As σ b , m d n e w ( x ) \sigma_{b,m_d}^{\mathrm{new}}(x) σ b , m d new ( x ) tracks whether x x x belongs to V ‾ b n e w \overline{V}_b^{\mathrm{new}} V b new , V ‾ b n e w \overline{V}_b^{\mathrm{new}} V b new is also constructed, as is E b b a d , n e w E_b^{\mathrm{bad,new}} E b bad , new . The fixed randomness determines the child of b b b to which each edge in E b n e w ∖ E b b a d , n e w E_b^{\mathrm{new}} \setminus E_b^{\mathrm{bad,new}} E b new ∖ E b bad , new is sent. Additionally, the post-shattering process recomputes every component touching D b , m d D_{b,m_d} D b , m d and reuses the bipartition for old components. Since the post-shattering process is deterministic, the resulting bipartition is the same as that generated in T n e w T^{\mathrm{new}} T new . Thus, the algorithm constructs E L C ( b ) n e w E_{LC(b)}^{\mathrm{new}} E L C ( b ) new and E R C ( b ) n e w E_{RC(b)}^{\mathrm{new}} E R C ( b ) new .
Together, the preceding results would prove the correctness of the algorithm if D r T , 0 D_{r_T,0} D r T , 0 were good. This is the case when we add u u u and v v v to D r T , 0 D_{r_T,0} D r T , 0 , but it does not hold for the new initialization. Define D ‾ a , i \overline{D}_{a,i} D a , i to be the set of vertices x ∉ D a , i x \notin D_{a,i} x ∈ / D a , i such that σ a , i o l d ( x ) ≠ σ a , i n e w ( x ) \sigma_{a,i}^{\mathrm{old}}(x) \ne\sigma_{a,i}^{\mathrm{new}}(x) σ a , i old ( x ) = σ a , i new ( x ) . We prove a stronger invariant for the algorithm with the new initialization, consisting of three items for every internal node a a a of depth d d d and i ∈ [ 0 , m d ] i \in[0,m_d] i ∈ [ 0 , m d ] :
For every vertex x x x , σ a , i n e w ( x ) \sigma^{\mathrm{new}}_{a,i}(x) σ a , i new ( x ) is constructed.
If x ∈ D ‾ a , i x \in\overline{D}_{a,i} x ∈ D a , i , then a a a is a strict ancestor of s e s_e s e , x x x is one of the endpoints of e e e , and x ∉ V ‾ a , i o l d ∪ V ‾ a , i n e w x \notin\overline{V}^{\mathrm{old}}_{a,i} \cup\overline{V}^{\mathrm{new}}_{a,i} x ∈ / V a , i old ∪ V a , i new .
E L C ( a ) n e w E^{\mathrm{new}}_{\mathrm{LC}(a)} E LC ( a ) new , E R C ( a ) n e w E^{\mathrm{new}}_{\mathrm{RC}(a)} E RC ( a ) new and V ‾ a n e w \overline{V}^{\mathrm{new}}_a V a new are constructed.
We first show that invariants 1 and 2 for ( a , i ) (a,i) ( a , i ) imply those for ( a , i + 1 ) (a,i+1) ( a , i + 1 ) .
Lemma 16. For an internal node a a a of depth d d d , if invariants 1 and 2 for ( a , i ) (a,i) ( a , i ) hold for i < m d i < m_d i < m d , then every vertex x x x that does not belong to either D ‾ a , i \overline{D}_{a,i} D a , i or the two-hop neighborhood of D a , i D_{a,i} D a , i in J a J_a J a satisfies σ a , i + 1 o l d ( x ) = σ a , i + 1 n e w ( x ) \sigma^{\mathrm{old}}_{a,i+1}(x) = \sigma^{\mathrm{new}}_{a,i+1}(x) σ a , i + 1 old ( x ) = σ a , i + 1 new ( x ) .
Proof. Since x ∉ D a , i ∪ D ‾ a , i x \notin D_{a,i} \cup\overline{D}_{a,i} x ∈ / D a , i ∪ D a , i , σ a , i o l d ( x ) = σ a , i n e w ( x ) \sigma^{\mathrm{old}}_{a,i}(x) = \sigma^{\mathrm{new}}_{a,i}(x) σ a , i old ( x ) = σ a , i new ( x ) by invariant 1. As a result, when σ a , i + 1 o l d ( x ) ≠ σ a , i + 1 n e w ( x ) \sigma^{\mathrm{old}}_{a,i+1}(x) \ne\sigma^{\mathrm{new}}_{a,i+1}(x) σ a , i + 1 old ( x ) = σ a , i + 1 new ( x ) , either x x x is incident to an edge in E a , i + 1 b a d , o l d ⊕ E a , i + 1 b a d , n e w E^{\mathrm{bad,old}}_{a,i+1} \oplus E^{\mathrm{bad,new}}_{a,i+1} E a , i + 1 bad , old ⊕ E a , i + 1 bad , new , or x ∈ V ‾ a , i + 1 o l d ⊕ V ‾ a , i + 1 n e w x \in\overline{V}^{\mathrm{old}}_{a,i+1} \oplus\overline{V}^{\mathrm{new}}_{a,i+1} x ∈ V a , i + 1 old ⊕ V a , i + 1 new .
For the case x ∈ V ‾ a , i + 1 o l d ⊕ V ‾ a , i + 1 n e w x \in\overline{V}^{\mathrm{old}}_{a,i+1} \oplus\overline{V}^{\mathrm{new}}_{a,i+1} x ∈ V a , i + 1 old ⊕ V a , i + 1 new , either x ∈ V ‾ a , i o l d ⊕ V ‾ a , i n e w x \in\overline{V}^{\mathrm{old}}_{a,i} \oplus\overline{V}^{\mathrm{new}}_{a,i} x ∈ V a , i old ⊕ V a , i new , where x ∈ D a , i x \in D_{a,i} x ∈ D a , i by invariants 1 and 2, a contradiction, or some ( x , y ) ∈ E a , i + 1 b a d , o l d ⊕ E a , i + 1 b a d , n e w (x,y) \in E^{\mathrm{bad,old}}_{a,i+1} \oplus E^{\mathrm{bad,new}}_{a,i+1} ( x , y ) ∈ E a , i + 1 bad , old ⊕ E a , i + 1 bad , new , which we will refute next.
If ( x , y ) ∈ E a , i + 1 b a d , o l d ⊕ E a , i + 1 b a d , n e w (x,y) \in E^{\mathrm{bad,old}}_{a,i+1} \oplus E^{\mathrm{bad,new}}_{a,i+1} ( x , y ) ∈ E a , i + 1 bad , old ⊕ E a , i + 1 bad , new , a failure ( z , a , i + 1 ) (z,a,i+1) ( z , a , i + 1 ) is responsible for moving it into E a , i + 1 b a d E^{\mathrm{bad}}_{a,i+1} E a , i + 1 bad in the corresponding transcript. z ∉ D ‾ a , i z \notin\overline{D}_{a,i} z ∈ / D a , i since D ‾ a , i ∩ ( V ‾ a , i o l d ∪ V ‾ a , i n e w ) = ∅ \overline{D}_{a,i} \cap(\overline{V}^{\mathrm{old}}_{a,i} \cup\overline{V}^{\mathrm{new}}_{a,i}) = \varnothing D a , i ∩ ( V a , i old ∪ V a , i new ) = ∅ by invariant 2, and z ∉ D a , i z \notin D_{a,i} z ∈ / D a , i since z z z and x x x are within two hops. These imply that σ a , i o l d ( z ) = σ a , i n e w ( z ) \sigma^{\mathrm{old}}_{a,i}(z) = \sigma^{\mathrm{new}}_{a,i}(z) σ a , i old ( z ) = σ a , i new ( z ) , and ( z , a , i + 1 ) (z,a,i+1) ( z , a , i + 1 ) is a failure in both transcripts. However, this failure adds ( x , y ) (x,y) ( x , y ) to E a , i + 1 b a d E^{\mathrm{bad}}_{a,i+1} E a , i + 1 bad in only one transcript, so some w ∈ { x , y , z } w \in\{x,y,z\} w ∈ { x , y , z } satisfies σ a , i o l d ( w ) ≠ σ a , i n e w ( w ) \sigma^{\mathrm{old}}_{a,i}(w) \ne\sigma^{\mathrm{new}}_{a,i}(w) σ a , i old ( w ) = σ a , i new ( w ) . w w w cannot belong to D a , i D_{a,i} D a , i by the choice of x x x , so w ∈ D ‾ a , i w \in\overline{D}_{a,i} w ∈ D a , i and w w w must be y y y since the other two vertices do not belong to D ‾ a , i \overline{D}_{a,i} D a , i .
By invariant 2, a a a is a strict ancestor of s e s_e s e , y y y is an endpoint of e e e and y ∉ V ‾ a , i o l d ∪ V ‾ a , i n e w y \notin\overline{V}^{\mathrm{old}}_{a,i} \cup\overline{V}^{\mathrm{new}}_{a,i} y ∈ / V a , i old ∪ V a , i new . By Observation 6, the only difference between σ a , i o l d ( y ) \sigma^{\mathrm{old}}_{a,i}(y) σ a , i old ( y ) and σ a , i n e w ( y ) \sigma^{\mathrm{new}}_{a,i}(y) σ a , i new ( y ) is the edge e e e . Either e e e connects y y y and z z z , meaning that z z z , as an endpoint of e e e , belongs to V ‾ a , i + 1 o l d \overline{V}^{\mathrm{old}}_{a,i+1} V a , i + 1 old ; or e e e does not connect y y y and z z z , in which case ( y , z ) ∈ E a o l d (y,z) \in E^{\mathrm{old}}_a ( y , z ) ∈ E a old and y y y , as an endpoint of e e e , belongs to V ‾ a , i + 1 o l d \overline{V}^{\mathrm{old}}_{a,i+1} V a , i + 1 old . In sum, some endpoint of e e e belongs to V ‾ a , i + 1 o l d ⊆ V ‾ o l d \overline{V}^{\mathrm{old}}_{a,i+1} \subseteq\overline{V}^{\mathrm{old}} V a , i + 1 old ⊆ V old , and a a a cannot be a strict ancestor of s e s_e s e , a contradiction. □
Lemma 17. For a node a a a of depth d d d , invariants 1 and 2 for ( a , i ) (a,i) ( a , i ) imply the same invariants for ( a , i + 1 ) (a,i+1) ( a , i + 1 ) when i ∈ [ 0 , m d − 1 ] i \in[0,m_d-1] i ∈ [ 0 , m d − 1 ] .
Proof. Lemma 16 immediately implies that D ‾ a , i + 1 \overline{D}_{a,i+1} D a , i + 1 only contains endpoints of e e e . Now we show that for every x ∈ D ‾ a , i + 1 x \in\overline{D}_{a,i+1} x ∈ D a , i + 1 , x ∉ V ‾ a , i + 1 o l d ∪ V ‾ a , i + 1 n e w x \notin\overline{V}^{\mathrm{old}}_{a,i+1} \cup\overline{V}^{\mathrm{new}}_{a,i+1} x ∈ / V a , i + 1 old ∪ V a , i + 1 new . Together with invariant 2 for ( a , i ) (a,i) ( a , i ) , this proves invariant 2 for ( a , i + 1 ) (a,i+1) ( a , i + 1 ) .
The case x ∈ V ‾ a , i + 1 o l d x \in\overline{V}^{\mathrm{old}}_{a,i+1} x ∈ V a , i + 1 old contradicts the choice of s e s_e s e . We may also assume that x x x is outside the two-hop neighborhood of D a , i D_{a,i} D a , i in J a J_a J a since otherwise x ∈ D a , i + 1 x \in D_{a,i+1} x ∈ D a , i + 1 . As a consequence, the only case we need to refute is x ∈ V ‾ a , i + 1 n e w ∖ V ‾ a , i + 1 o l d x \in\overline{V}^{\mathrm{new}}_{a,i+1} \setminus\overline{V}^{\mathrm{old}}_{a,i+1} x ∈ V a , i + 1 new ∖ V a , i + 1 old . We can find a failure ( z , a , i + 1 ) (z,a,i+1) ( z , a , i + 1 ) in T n e w \mathcal{T}^{\mathrm{new}} T new that moves an edge ( x , y ) (x,y) ( x , y ) to E a , i + 1 b a d , n e w E^{\mathrm{bad,new}}_{a,i+1} E a , i + 1 bad , new . As z z z and x x x are within two hops in J a J_a J a , σ a , i o l d ( z ) = σ a , i n e w ( z ) \sigma^{\mathrm{old}}_{a,i}(z) = \sigma^{\mathrm{new}}_{a,i}(z) σ a , i old ( z ) = σ a , i new ( z ) and ( z , a , i + 1 ) (z,a,i+1) ( z , a , i + 1 ) is also a failure in T o l d \mathcal{T}^{\mathrm{old}} T old . Following the same argument as Lemma 16 , we can show that some endpoint of e e e belongs to V ‾ a , i + 1 o l d \overline{V}^{\mathrm{old}}_{a,i+1} V a , i + 1 old , contradicting the choice of s e s_e s e .
Finally, from Lemma 16 , it remains to consider x ∈ D ‾ a , i + 1 x \in\overline{D}_{a,i+1} x ∈ D a , i + 1 for invariant 1. Since x ∉ V ‾ a , i + 1 o l d ∪ V ‾ a , i + 1 n e w x \notin\overline{V}^{\mathrm{old}}_{a,i+1} \cup\overline{V}^{\mathrm{new}}_{a,i+1} x ∈ / V a , i + 1 old ∪ V a , i + 1 new , its local information is represented implicitly in both transcripts, while the leaf edge sets are already updated during failure discovery. This shows that σ a , i + 1 ( x ) \sigma_{a,i+1}(x) σ a , i + 1 ( x ) is updated to agree with T n e w \mathcal{T}^{\mathrm{new}} T new . □
Next, we show that invariants 1 and 2 for ( a , m d e p ( a ) ) (a,m_{\mathrm{dep}(a)}) ( a , m dep ( a ) ) imply invariant 3 for a a a and invariants 1 and 2 for its children.
Lemma 18. For an internal node a a a of depth d d d , invariants 1 and 2 for ( a , m d ) (a,m_d) ( a , m d ) imply invariant 3 for a a a and invariants 1 and 2 for ( L C ( a ) , 0 ) (\mathrm{LC}(a),0) ( LC ( a ) , 0 ) and ( R C ( a ) , 0 ) (\mathrm{RC}(a),0) ( RC ( a ) , 0 ) when L C ( a ) \mathrm{LC}(a) LC ( a ) and R C ( a ) \mathrm{RC}(a) RC ( a ) are internal.
Proof. First consider the case where D ˉ a , m d = ∅ \bar{D}_{a,m_d} = \varnothing D ˉ a , m d = ∅ . Following the post-shattering argument in Lemma 15 , E L C ( a ) n e w E^{\mathrm{new}}_{\mathrm{LC}(a)} E LC ( a ) new , E R C ( a ) n e w E^{\mathrm{new}}_{\mathrm{RC}(a)} E RC ( a ) new , and V ˉ a n e w \bar{V}^{\mathrm{new}}_a V ˉ a new are constructed, giving invariant 3. Further, D ˉ L C ( a ) , 0 = D ˉ R C ( a ) , 0 = ∅ \bar{D}_{\mathrm{LC}(a),0} = \bar{D}_{\mathrm{RC}(a),0} = \varnothing D ˉ LC ( a ) , 0 = D ˉ RC ( a ) , 0 = ∅ from Observation 8, and the initialization on the children computes new local information, establishing invariants 1 and 2 for both children.
Now suppose D ˉ a , m d \bar{D}_{a,m_d} D ˉ a , m d is not empty. As no vertex in D ˉ a , m d \bar{D}_{a,m_d} D ˉ a , m d belongs to V ˉ a o l d ∪ V ˉ a n e w \bar{V}^{\mathrm{old}}_a \cup\bar{V}^{\mathrm{new}}_a V ˉ a old ∪ V ˉ a new , these vertices are isolated in both E a b a d , o l d E^{\mathrm{bad,old}}_a E a bad , old and E a b a d , n e w E^{\mathrm{bad,new}}_a E a bad , new , and the post-shattering bipartition does not change when we add them to D a , m d D_{a,m_d} D a , m d . This means E L C ( a ) n e w E^{\mathrm{new}}_{\mathrm{LC}(a)} E LC ( a ) new and E R C ( a ) n e w E^{\mathrm{new}}_{\mathrm{RC}(a)} E RC ( a ) new are constructed. Additionally, V ˉ a n e w \bar{V}^{\mathrm{new}}_a V ˉ a new can be generated from the local information given by invariant 1 for ( a , m d ) (a,m_d) ( a , m d ) . This shows invariant 3 for a a a .
Now, fix an internal child c c c of a a a . We know that adding D ˉ a , m d \bar{D}_{a,m_d} D ˉ a , m d to D a ⋆ D^\star_a D a ⋆ will make D c , 0 D_{c,0} D c , 0 good since every vertex in D ˉ a , m d \bar{D}_{a,m_d} D ˉ a , m d is isolated. Thus, compared with the execution using a good dirty set, initialization at node c c c with dirty set D c , 0 D_{c,0} D c , 0 ignores only vertices in D ˉ a , m d \bar{D}_{a,m_d} D ˉ a , m d . Consequently, D ˉ c , 0 ⊆ D ˉ a , m d \bar{D}_{c,0} \subseteq\bar{D}_{a,m_d} D ˉ c , 0 ⊆ D ˉ a , m d , and every vertex in D ˉ c , 0 \bar{D}_{c,0} D ˉ c , 0 is an endpoint of e e e by invariant 2 at ( a , m d ) (a,m_d) ( a , m d ) .
Now we show that D ˉ c , 0 \bar{D}_{c,0} D ˉ c , 0 is empty when c c c is not a strict ancestor of s e s_e s e . Fix x ∈ D ˉ c , 0 x \in\bar{D}_{c,0} x ∈ D ˉ c , 0 . By invariant 2 at ( a , m d ) (a,m_d) ( a , m d ) , x ∈ { u , v } x \in\{u,v\} x ∈ { u , v } and x ∉ V ˉ a o l d ∪ V ˉ a n e w x \notin\bar{V}^{\mathrm{old}}_a \cup\bar{V}^{\mathrm{new}}_a x ∈ / V ˉ a old ∪ V ˉ a new . If x ∈ V ˉ c , 0 o l d ⊕ V ˉ c , 0 n e w x \in\bar{V}^{\mathrm{old}}_{c,0} \oplus\bar{V}^{\mathrm{new}}_{c,0} x ∈ V ˉ c , 0 old ⊕ V ˉ c , 0 new , then ( x , c ) ∈ F o l d ⊕ F n e w (x,c) \in F^{\mathrm{old}} \oplus F^{\mathrm{new}} ( x , c ) ∈ F old ⊕ F new and x ∈ D c , 0 x \in D_{c,0} x ∈ D c , 0 , a contradiction. Since σ c , 0 o l d ( x ) ≠ σ c , 0 n e w ( x ) \sigma^{\mathrm{old}}_{c,0}(x) \ne\sigma^{\mathrm{new}}_{c,0}(x) σ c , 0 old ( x ) = σ c , 0 new ( x ) , the adjacency information at x x x must be different between E c o l d E^{\mathrm{old}}_c E c old and E c n e w E^{\mathrm{new}}_c E c new .
By Observation 5, the sets of edges incident to x x x are the same in E c o l d E^{\mathrm{old}}_c E c old and E ˉ c o l d \bar{E}^{\mathrm{old}}_c E ˉ c old , as well as in E c n e w E^{\mathrm{new}}_c E c new and E ˉ c n e w \bar{E}^{\mathrm{new}}_c E ˉ c new . If c c c does not belong to the routing path of e e e , then the edges incident to x x x are the same in E ˉ c o l d \bar{E}^{\mathrm{old}}_c E ˉ c old and E ˉ c n e w \bar{E}^{\mathrm{new}}_c E ˉ c new , and x ∉ D ˉ c , 0 x \notin\bar{D}_{c,0} x ∈ / D ˉ c , 0 . If c c c belongs to the routing path of e e e but is not a strict ancestor of s e s_e s e , both endpoints of e e e are added to D c , 0 D_{c,0} D c , 0 . Thus, D ˉ c , 0 \bar{D}_{c,0} D ˉ c , 0 is empty whenever c c c is not a strict ancestor of s e s_e s e .
Finally, assume that x ∈ D ˉ c , 0 x \in\bar{D}_{c,0} x ∈ D ˉ c , 0 , so c c c is a strict ancestor of s e s_e s e . Since x x x cannot belong to V ˉ c , 0 o l d ⊕ V ˉ c , 0 n e w \bar{V}^{\mathrm{old}}_{c,0} \oplus\bar{V}^{\mathrm{new}}_{c,0} V ˉ c , 0 old ⊕ V ˉ c , 0 new , it either belongs to V ˉ c , 0 o l d ∩ V ˉ c , 0 n e w \bar{V}^{\mathrm{old}}_{c,0} \cap\bar{V}^{\mathrm{new}}_{c,0} V ˉ c , 0 old ∩ V ˉ c , 0 new or does not belong to V ˉ c , 0 o l d ∪ V ˉ c , 0 n e w \bar{V}^{\mathrm{old}}_{c,0} \cup\bar{V}^{\mathrm{new}}_{c,0} V ˉ c , 0 old ∪ V ˉ c , 0 new . The first case cannot happen, since then s e s_e s e would be an ancestor of c c c . This proves invariant 2 for ( c , 0 ) (c,0) ( c , 0 ) .
We finally show invariant 1 for ( c , 0 ) (c,0) ( c , 0 ) . By invariant 3 at a a a , E c n e w E^{\mathrm{new}}_c E c new and V ˉ a n e w \bar{V}^{\mathrm{new}}_a V ˉ a new are constructed, so each vertex x ∈ D c , 0 x \in D_{c,0} x ∈ D c , 0 gets σ c , 0 n e w ( x ) \sigma^{\mathrm{new}}_{c,0}(x) σ c , 0 new ( x ) . Every vertex x x x in D ˉ c , 0 \bar{D}_{c,0} D ˉ c , 0 does not belong to V ˉ c , 0 o l d ∪ V ˉ c , 0 n e w \bar{V}^{\mathrm{old}}_{c,0} \cup\bar{V}^{\mathrm{new}}_{c,0} V ˉ c , 0 old ∪ V ˉ c , 0 new , so σ c , 0 \sigma_{c,0} σ c , 0 is maintained implicitly in both transcripts, and it is updated to agree with T n e w \mathcal{T}^{\mathrm{new}} T new during the discovery stage. Other vertices do not change their local information. This concludes invariant 1. □ \square □
We now combine these results to prove correctness.
Lemma 19. After the failure repair process for an update e e e , all invariants hold for every internal node a a a and i ∈ [ 0 , m dep ( a ) ] i \in[0,m_{\operatorname{dep}(a)}] i ∈ [ 0 , m dep ( a ) ] . Specifically, the algorithm constructs T n e w \mathcal{T}^{\mathrm{new}} T new .
Proof. We induct on ( dep ( a ) , i ) (\operatorname{dep}(a),i) ( dep ( a ) , i ) to prove all invariants. The step from ( a , i ) (a,i) ( a , i ) to ( a , i + 1 ) (a,i+1) ( a , i + 1 ) is given in Lemma 17 , while the step from ( a , m dep ( a ) ) (a,m_{\operatorname{dep}(a)}) ( a , m dep ( a ) ) to ( L C ( a ) , 0 ) (\mathrm{LC}(a),0) ( LC ( a ) , 0 ) and ( R C ( a ) , 0 ) (\mathrm{RC}(a),0) ( RC ( a ) , 0 ) is given in Lemma 18 . It remains to consider the base case a = r T a=r_T a = r T and i = 0 i=0 i = 0 .
The local information for vertices whose membership in V ˉ r T , 0 \bar{V}_{r_T,0} V ˉ r T , 0 changes is computed explicitly. Every other vertex x x x with σ r T , 0 o l d ( x ) ≠ σ r T , 0 n e w ( x ) \sigma^{\mathrm{old}}_{r_T,0}(x) \ne\sigma^{\mathrm{new}}_{r_T,0}(x) σ r T , 0 old ( x ) = σ r T , 0 new ( x ) must be an endpoint of e e e , meaning that D ˉ r T , 0 \bar{D}_{r_T,0} D ˉ r T , 0 only contains endpoints of e e e . If x ∉ D r T , 0 x \notin D_{r_T,0} x ∈ / D r T , 0 , then s e ≠ r T s_e \ne r_T s e = r T , meaning that x ∉ V ˉ r T , 0 x \notin\bar{V}_{r_T,0} x ∈ / V ˉ r T , 0 and σ r T , 0 ( x ) \sigma_{r_T,0}(x) σ r T , 0 ( x ) is represented implicitly. We have applied the update e e e to E ˉ p a t h e , R \bar{E}_{\mathrm{path}_e,R} E ˉ path e , R in the failure discovery stage, so σ r T , 0 ( x ) \sigma_{r_T,0}(x) σ r T , 0 ( x ) is updated correspondingly to agree with T n e w \mathcal{T}^{\mathrm{new}} T new , giving invariant 1. Finally, x ∉ V ˉ r T , 0 n e w x \notin\bar{V}^{\mathrm{new}}_{r_T,0} x ∈ / V ˉ r T , 0 new since otherwise ( x , r T ) ∈ F o l d ⊕ F n e w (x,r_T) \in F^{\mathrm{old}} \oplus F^{\mathrm{new}} ( x , r T ) ∈ F old ⊕ F new and x ∈ D r T , 0 x \in D_{r_T,0} x ∈ D r T , 0 . This gives invariant 2. □ \square □
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 ( w , a ) ∈ V ( G ) × T (w,a) \in V(G) \times T ( w , a ) ∈ V ( G ) × T is a critical failure if there is α ∈ { o l d , n e w } \alpha\in\{\mathrm{old},\mathrm{new}\} α ∈ { old , new } such that ( w , a ) (w,a) ( w , a ) is a seed failure in T α T^\alpha T α and either a = r T a=r_T a = r T or ( w , P ( a ) ) (w,\mathrm{P}(a)) ( w , P ( a )) is not a seed failure in T α T^\alpha T α .
Critical failures can be seen as the starting points where one of T o l d T^{\mathrm{old}} T old and T n e w T^{\mathrm{new}} T new deviates from the ideal execution. If ( w , a ) (w,a) ( w , a ) 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 τ d = U d q d 3 = U d / log 6 U d \tau_d=U_dq_d^3=U_d/\log^6 U_d τ d = U d q d 3 = U d / log 6 U d for d ∈ [ 0 , R ] d\in[0,R] d ∈ [ 0 , R ] . Since U R U_R U R is large enough, one can show that the sequence τ 0 , … , τ R \tau_0,\ldots,\tau_R τ 0 , … , τ R decreases geometrically.
Lemma 20. Fix an update in the dynamic algorithm. For every vertex w w w and every internal node a a a of depth d d d ,
Pr [ ( w , a ) is a critical failure ] ≤ exp ( − Ω ( τ d ) ) . \Pr[(w,a)\text{ is a critical failure}] \le\exp(-\Omega(\tau_d)). Pr [( w , a ) is a critical failure ] ≤ exp ( − Ω ( τ d )) . The bound remains valid after conditioning on all randomness at levels smaller than d d d , on the level-d d d randomness of edges not incident to w w w in E ˉ a ∪ = E ˉ a o l d ∪ E ˉ a n e w \bar{E}^{\cup}_a=\bar{E}^{\mathrm{old}}_a\cup\bar{E}^{\mathrm{new}}_a E ˉ a ∪ = E ˉ a old ∪ E ˉ a new , and on the randomness of the edge e e e being updated.
Proof. We prove the conditional statement; the unconditional one follows from the law of total probability.
Fix α ∈ { o l d , n e w } \alpha\in\{\mathrm{old},\mathrm{new}\} α ∈ { old , new } . When d > 0 d>0 d > 0 , whether ( w , P ( a ) ) (w,\mathrm{P}(a)) ( w , P ( a )) is a seed failure in T α T^\alpha T α is determined by the fixed randomness above a a a . If it is, ( w , a ) (w,a) ( w , a ) cannot be a critical failure in T α T^\alpha T α ; otherwise, deg E ˉ a α ( w ) ≤ U d − 1 ( 1 + q d − 1 ) / 2 ≤ U d \deg_{\bar{E}^\alpha_a}(w)\le U_{d-1}(1+q_{d-1})/2\le U_d deg E ˉ a α ( w ) ≤ U d − 1 ( 1 + q d − 1 ) /2 ≤ U d . For a = r T a=r_T a = r T , we also have deg E ˉ a α ( w ) ≤ U d \deg_{\bar{E}^\alpha_a}(w)\le U_d deg E ˉ a α ( w ) ≤ U d .
Now, fix i ∈ [ m d ] i\in[m_d] i ∈ [ m d ] . Let X i X_i X i count the category-i i i edges incident to w w w in E ˉ a α \bar{E}^\alpha_a E ˉ a α . It is a sum of at most U d U_d U d independent Bernoulli variables, each with success probability 1 / m d 1/m_d 1/ m d , except that the contribution of the updated edge, if present, is fixed. Since U d / m d U_d/m_d U d / m d is sufficiently large, a Chernoff bound gives
Pr [ X i > 2 U d / m d ] = exp ( − Ω ( U d q d ) ) = exp ( − Ω ( τ d ) ) . \Pr[X_i>2U_d/m_d]=\exp(-\Omega(U_dq_d))=\exp(-\Omega(\tau_d)). Pr [ X i > 2 U d / m d ] = exp ( − Ω ( U d q d )) = exp ( − Ω ( τ d )) .
Now condition on the category choices under the event X i ≤ 2 U d / m d X_i\le2U_d/m_d X i ≤ 2 U d / m d . The discrepancy Y i Y_i Y i between LC and RC directions around w w w for category-i i i edges is a sum of at most 2 U d / m d 2U_d/m_d 2 U d / m d independent uniform signs, apart from a possible fixed ± 1 \pm1 ± 1 from the updated edge. Hoeffding’s inequality then gives
Pr [ ∣ Y i ∣ > U d q d / m d ∣ X i ≤ 2 U d / m d ] = exp ( − Ω ( ( U d q d / m d ) 2 U d / m d ) ) = exp ( − Ω ( τ d ) ) . \Pr[|Y_i|>U_dq_d/m_d\mid X_i\le2U_d/m_d]
=\exp\left(-\Omega\left(\frac{(U_dq_d/m_d)^2}{U_d/m_d}\right)\right)
=\exp(-\Omega(\tau_d)). Pr [ ∣ Y i ∣ > U d q d / m d ∣ X i ≤ 2 U d / m d ] = exp ( − Ω ( U d / m d ( U d q d / m d ) 2 ) ) = exp ( − Ω ( τ d )) .
A union bound over the m d m_d m d categories and α ∈ { o l d , n e w } \alpha\in\{\mathrm{old},\mathrm{new}\} α ∈ { old , new } proves the bound. The events do not depend on the randomness at level d d d for edges not incident to w w w in E ˉ a ∪ \bar{E}^{\cup}_a E ˉ a ∪ , so conditioning on this randomness has no effect.
For d < R d<R d < R , put ρ d = 2 L d + 1 \rho_d=2L_d+1 ρ d = 2 L d + 1 . For a critical failure ( w , a ) (w,a) ( w , a ) , let its affected region R w , a \mathcal{R}_{w,a} R w , a be the induced subgraph of the ρ dep ( a ) \rho_{\operatorname{dep}(a)} ρ dep ( a ) -hop neighborhood of w w w in E ˉ a ∪ \bar{E}^{\cup}_a E ˉ a ∪ . Next, we define the most important auxiliary graph for the analysis.
Definition 8 (G ^ \widehat{G} G ). The graph G ^ = ( V ^ , E ^ ) \widehat{G}=(\widehat{V},\widehat{E}) G = ( V , E ) has vertex set
V ^ = { ⟨ x , a ⟩ : x ∈ V ( R w , a ) for some critical failure ( w , a ) } . \widehat{V}=\{\langle x,a\rangle:x\in V(\mathcal{R}_{w,a})\text{ for some critical failure }(w,a)\}. V = {⟨ x , a ⟩ : x ∈ V ( R w , a ) for some critical failure ( w , a )} . For each affected region R w , a \mathcal{R}_{w,a} R w , a , there is a horizontal edge in E ^ \widehat{E} E between each pair of vertices ⟨ x , a ⟩ , ⟨ y , a ⟩ \langle x,a\rangle,\langle y,a\rangle ⟨ x , a ⟩ , ⟨ y , a ⟩ for which x x x and y y y belong to V ( R w , a ) V(\mathcal{R}_{w,a}) V ( R w , a ) . There is also a vertical edge in E ^ \widehat{E} E between ⟨ x , a ⟩ \langle x,a\rangle ⟨ x , a ⟩ and ⟨ x , b ⟩ \langle x,b\rangle ⟨ x , b ⟩ whenever a ≠ b a\ne b a = b are comparable and both vertices belong to V ^ \widehat{V} V .
Notice that we use ⟨ x , a ⟩ \langle x,a\rangle ⟨ x , a ⟩ for vertices in V ^ \widehat{V} V to distinguish them from critical failures ( x , a ) (x,a) ( x , a ) . For ⟨ w , a ⟩ ∈ V ( G ) × T \langle w,a\rangle\in V(G)\times T ⟨ w , a ⟩ ∈ V ( G ) × T , let K ^ ( ⟨ w , a ⟩ ) \widehat{K}(\langle w,a\rangle) K (⟨ w , a ⟩) be its component in G ^ \widehat{G} G if ⟨ w , a ⟩ ∈ V ^ \langle w,a\rangle\in\widehat{V} ⟨ w , a ⟩ ∈ V , and let it be empty otherwise. The following lemma will be central in our expected work analysis.
Lemma 21. For every w ∈ V ( G ) w \in V(G) w ∈ V ( G ) , a ∈ T ∖ L T a \in T \setminus\mathcal{L}_T a ∈ T ∖ L T , and 0 ≤ d < R 0 \le d < R 0 ≤ d < R ,
E [ ∣ { ⟨ x , b ⟩ ∈ K ^ ( ⟨ w , a ⟩ ) : dep ( b ) = d } ∣ ] ≤ exp ( − Ω ( τ d + τ dep ( a ) ) ) . \mathbb{E}\left[\left|\left\{\langle x,b\rangle\in\widehat{K}(\langle w,a\rangle): \operatorname{dep}(b)=d\right\}\right|\right] \le\exp\left(-\Omega\left(\tau_d+\tau_{\operatorname{dep}(a)}\right)\right). E [ { ⟨ x , b ⟩ ∈ K (⟨ w , a ⟩) : dep ( b ) = d } ] ≤ exp ( − Ω ( τ d + τ dep ( a ) ) ) . The same bound holds after conditioning on all random choices of the updated edge.
We prove Lemma 21 in § 7 . By a direct summation and the fact that τ i \tau_i τ i is geometrically decreasing, the following corollary is immediate.
Corollary 7. For an update e = ( u , v ) e=(u,v) e = ( u , v ) , fix the random choices of e e e . Let N r N_r N r count the number of vertices ⟨ w , b ⟩ \langle w,b\rangle ⟨ w , b ⟩ in V ^ \widehat{V} V connected to ⟨ u , path e , i ⟩ \langle u,\operatorname{path}_{e,i}\rangle ⟨ u , path e , i ⟩ for some 0 ≤ i < R 0 \le i < R 0 ≤ i < R such that dep ( b ) = r \operatorname{dep}(b)=r dep ( b ) = r . Then
E [ N r ] ≤ ∑ i = 0 R − 1 exp ( − Ω ( τ r + τ i ) ) = exp ( − Ω ( τ r ) ) . \mathbb{E}[N_r] \le\sum_{i=0}^{R-1}\exp\left(-\Omega(\tau_r+\tau_i)\right)=\exp\left(-\Omega(\tau_r)\right). E [ N r ] ≤ i = 0 ∑ R − 1 exp ( − Ω ( τ r + τ i ) ) = exp ( − Ω ( τ r ) ) .
Implementation Details and Analysis
We now describe the implementation of both stages. Before the algorithm processes edge updates, we compute R R R , U i U_i U i and q i q_i q i for i ∈ [ 0 , R ] i \in[0,R] i ∈ [ 0 , R ] , and m i m_i m i for i ∈ [ 0 , R − 1 ] i \in[0,R-1] i ∈ [ 0 , R − 1 ] in O ( log Δ ) O(\log\Delta) O ( log Δ ) time.
Implementing the Discovery Stage For each edge update e = ( u , v ) e=(u,v) e = ( u , v ) , we generate dir e , 0 , … , dir e , R − 1 \operatorname{dir}_{e,0},\ldots,\operatorname{dir}_{e,R-1} dir e , 0 , … , dir e , R − 1 if it is an insertion, and insert or delete e e e in E ‾ path e , R \overline{E}_{\operatorname{path}_{e,R}} E path e , R . Mapping LC to zero and RC to one, the sequence dir e , 0 , … , dir e , R − 1 \operatorname{dir}_{e,0},\ldots,\operatorname{dir}_{e,R-1} dir e , 0 , … , dir e , R − 1 corresponds to a uniform integer B e B_e B e in [ 0 , 2 R − 1 ] [0,2^R-1] [ 0 , 2 R − 1 ] . We can therefore define a mapping ϕ \phi ϕ from [ 0 , 2 R − 1 ] [0,2^R-1] [ 0 , 2 R − 1 ] to L T \mathcal{L}_T L T such that ϕ ( B e ) = path e , R \phi(B_e)=\operatorname{path}_{e,R} ϕ ( B e ) = path e , R for every possible B e B_e B e . Since R = O ( log Δ ) = O ( log n ) R=O(\log\Delta)=O(\log n) R = O ( log Δ ) = O ( log n ) , we can generate the random directions and identify path e , R \operatorname{path}_{e,R} path e , R in O ( 1 ) O(1) O ( 1 ) time.
To apply e e e in E ‾ path e , R \overline{E}_{\operatorname{path}_{e,R}} E path e , R in constant time, we maintain the adjacency information with a hash table Adj a , x \operatorname{Adj}_{a,x} Adj a , x of size U R U_R U R for every leaf a a a and every vertex x x x , using chaining to resolve collisions. The algorithm maintains an independent random function f f f from V V V to [ Δ / 2 R ] [\Delta/2^R] [ Δ/ 2 R ] , each entry sampled lazily. Since Δ / 2 R ≤ Δ ≤ n − 1 \Delta/2^R \le\Delta\le n-1 Δ/ 2 R ≤ Δ ≤ n − 1 , each value of f f f fits in an O ( log n ) O(\log n) O ( log n ) -bit word and can be sampled and accessed in O ( 1 ) O(1) O ( 1 ) time. Each time we apply e e e , we insert or delete v v v in Adj a , u , f ( v ) \operatorname{Adj}_{a,u,f(v)} Adj a , u , f ( v ) , and insert or delete u u u in Adj a , v , f ( u ) \operatorname{Adj}_{a,v,f(u)} Adj a , v , f ( u ) . The length of Adj a , u , f ( v ) \operatorname{Adj}_{a,u,f(v)} Adj a , u , f ( v ) is constant in expectation: indeed, an edge ( x , y ) ∈ E ( G ) (x,y)\in E(G) ( x , y ) ∈ E ( G ) belongs to Adj a , u , f ( v ) \operatorname{Adj}_{a,u,f(v)} Adj a , u , f ( v ) only when x = u x=u x = u , B ( x , y ) = B e B_{(x,y)}=B_e B ( x , y ) = B e and f ( y ) = f ( v ) f(y)=f(v) f ( y ) = f ( v ) . The first condition ensures that there are at most Δ \Delta Δ edges other than e e e that can enter Adj a , u , f ( v ) \operatorname{Adj}_{a,u,f(v)} Adj a , u , f ( v ) , and the remaining two conditions hold with probability 1 / 2 R × 2 R / Δ = 1 / Δ 1/2^R \times2^R/\Delta=1/\Delta 1/ 2 R × 2 R /Δ = 1/Δ for every such edge.
For every vertex w w w and leaf a a a , we store a linked list of the pairs in F \mathcal{F} F whose clusters contain ( w , a ) (w,a) ( w , a ) . This allows us to enumerate the linked lists at ( u , path e , R ) (u,\operatorname{path}_{e,R}) ( u , path e , R ) and ( v , path e , R ) (v,\operatorname{path}_{e,R}) ( v , path e , R ) for initial Search calls. According to the proof of Lemma 14 , these lists also include all pairs in F \mathcal{F} F whose cluster or status as a seed failure can change after the update.
During a Search( w , b ) (w,b) ( w , b ) call, we need to check whether ( w , b ) (w,b) ( w , b ) is a seed failure. We first introduce a subroutine that returns the adjacency list of w w w in E ‾ b \overline{E}_b E b when deg E ‾ b ( w ) ≤ U dep ( b ) \deg_{\overline{E}_b}(w)\le U_{\operatorname{dep}(b)} deg E b ( w ) ≤ U dep ( b ) and returns fail when deg E ‾ b ( w ) > U dep ( b ) \deg_{\overline{E}_b}(w)>U_{\operatorname{dep}(b)} deg E b ( w ) > U dep ( b ) . Since E ‾ b = ⋃ a ∈ L T ( b ) E ‾ a \overline{E}_b=\bigcup_{a\in\mathcal{L}_T(b)}\overline{E}_a E b = ⋃ a ∈ L T ( b ) E a , we iterate through a ∈ L T ( b ) a\in\mathcal{L}_T(b) a ∈ L T ( b ) and the hash table Adj a , w \operatorname{Adj}_{a,w} Adj a , w to construct the adjacency list. Once the adjacency list is longer than U dep ( b ) U_{\operatorname{dep}(b)} U dep ( b ) , we return fail; if the list always has length at most U dep ( b ) U_{\operatorname{dep}(b)} U dep ( b ) , we return the final list. The process iterates through ∣ L T ( b ) ∣ Δ / 2 R = Δ / 2 dep ( b ) = O ( U dep ( b ) ) |\mathcal{L}_{T}(b)|\Delta/2^{R}=\Delta/2^{\operatorname{dep}(b)}=O(U_{\operatorname{dep}(b)}) ∣ L T ( b ) ∣Δ/ 2 R = Δ/ 2 dep ( b ) = O ( U dep ( b ) ) buckets. Since extracting each item takes O ( 1 ) O(1) O ( 1 ) time, the total work performed by this process is O ( U dep ( b ) ) O(U_{\operatorname{dep}(b)}) O ( U dep ( b ) ) .
With the process above, we can check whether ( w , b ) (w,b) ( w , b ) is a seed failure in O ~ ( U dep ( b ) ) \widetilde{O}(U_{\operatorname{dep}(b)}) O ( U dep ( b ) ) time by gathering the adjacency list of w w w in E ˉ b \bar{E}_{b} E ˉ b . If the process fails, ( w , b ) (w,b) ( w , b ) is immediately a seed failure; otherwise, we perform the remaining checks in O ~ ( U dep ( b ) ) \widetilde{O}(U_{\operatorname{dep}(b)}) O ( U dep ( b ) ) time. The process also allows the algorithm to identify all pairs in the cluster of ( w , b ) (w,b) ( w , b ) and update the linked lists by a straightforward BFS within exp ( O ( log 4 U dep ( b ) ) ) \exp(O(\log^{4} U_{\operatorname{dep}(b)})) exp ( O ( log 4 U dep ( b ) )) time.
Cost Analysis for the Discovery Stage We have argued that maintaining E ˉ a \bar{E}_{a} E ˉ a takes O ( 1 ) O(1) O ( 1 ) time; it remains to consider the Search calls. Say a Search( w , b ) (w,b) ( w , b ) call succeeds if ( w , b ) (w,b) ( w , b ) is a seed failure in T n e w \mathcal{T}^{\mathrm{new}} T new , and fails otherwise.
For every seed failure ( w , b ) (w,b) ( w , b ) in either T o l d \mathcal{T}^{\mathrm{old}} T old or T n e w \mathcal{T}^{\mathrm{new}} T new , we can always find a critical failure ( w , c ) (w,c) ( w , c ) such that c c c is an ancestor of b b b . Take one of maximum depth and call it the corresponding critical failure of ( w , b ) (w,b) ( w , b ) .
Lemma 22. For every successful call Search( w , b ) (w,b) ( w , b ) , the vertex ⟨ w , c ⟩ \langle w,c\rangle ⟨ w , c ⟩ associated with its corresponding critical failure ( w , c ) (w,c) ( w , c ) is connected in G ^ \widehat{G} G to ⟨ u , path e , i ⟩ \langle u,\operatorname{path}_{e,i}\rangle ⟨ u , path e , i ⟩ for some 0 ≤ i < R 0\leq i<R 0 ≤ i < R . The same conclusion holds for every failed initial call Search( w , b ) (w,b) ( w , b ) with ( w , b ) ∈ F o l d (w,b)\in\mathcal{F}^{\mathrm{old}} ( w , b ) ∈ F old .
Proof. First, notice that ⟨ w , c ⟩ ∈ G ^ \langle w,c\rangle\in\widehat{G} ⟨ w , c ⟩ ∈ G for every critical failure ( w , c ) (w,c) ( w , c ) . We induct on the forest of Search calls to prove the statement, where the parent of a noninitial Search( w , b ) (w,b) ( w , b ) call is the first successful Search( x , c ) (x,c) ( x , c ) call that generates it. For the base case, consider a successful initial Search( w , b ) (w,b) ( w , b ) call. Then ( w , b ) (w,b) ( w , b ) is a seed failure in T n e w \mathcal{T}^{\mathrm{new}} T new , and the old cluster of ( w , b ) (w,b) ( w , b ) contains either ( u , path e , R ) (u,\operatorname{path}_{e,R}) ( u , path e , R ) or ( v , path e , R ) (v,\operatorname{path}_{e,R}) ( v , path e , R ) . This means that the distance between u u u and w w w in E ˉ b U \bar{E}_{b}^{U} E ˉ b U is at most L dep ( b ) + 1 L_{\operatorname{dep}(b)}+1 L dep ( b ) + 1 . Its corresponding critical failure ( w , c ) (w,c) ( w , c ) satisfies u ∈ R w , c u\in R_{w,c} u ∈ R w , c and L dep ( b ) ≤ L dep ( c ) L_{\operatorname{dep}(b)}\leq L_{\operatorname{dep}(c)} L dep ( b ) ≤ L dep ( c ) . Finally, b b b is an ancestor of path e , R \operatorname{path}_{e,R} path e , R and c c c is an ancestor of b b b , so c = path e , dep ( c ) c=\operatorname{path}_{e,\operatorname{dep}(c)} c = path e , dep ( c ) , and ⟨ w , c ⟩ \langle w,c\rangle ⟨ w , c ⟩ has the connectivity required by the lemma. The statement for a failed initial call Search( w , b ) (w,b) ( w , b ) with ( w , b ) ∈ F o l d (w,b)\in\mathcal{F}^{\mathrm{old}} ( w , b ) ∈ F old is the same as above, except that ( w , b ) (w,b) ( w , b ) is a seed failure in T o l d \mathcal{T}^{\mathrm{old}} T old rather than T n e w \mathcal{T}^{\mathrm{new}} T new .
For the induction step, suppose a successful noninitial Search( w , b ) (w,b) ( w , b ) call is generated by Search( x , s ) (x,s) ( x , s ) . The induction hypothesis shows that the vertex ⟨ x , s ′ ⟩ \langle x,s'\rangle ⟨ x , s ′ ⟩ associated with the corresponding critical failure ( x , s ′ ) (x,s') ( x , s ′ ) of ( x , s ) (x,s) ( x , s ) is connected to ⟨ u , path e , i ⟩ \langle u,\operatorname{path}_{e,i}\rangle ⟨ u , path e , i ⟩ in G ^ \widehat{G} G for some i ∈ [ 0 , R − 1 ] i\in[0,R-1] i ∈ [ 0 , R − 1 ] . By the algorithm description, either w = x w=x w = x and b = P ( s ) b=\mathsf{P}(s) b = P ( s ) , or ( w , b ) (w,b) ( w , b ) is in the new cluster of ( x , s ) (x,s) ( x , s ) . In both cases, the distance between w w w and x x x in E ˉ s U ⊆ E ˉ s ′ U \bar{E}_{s}^{U}\subseteq\bar{E}_{s'}^{U} E ˉ s U ⊆ E ˉ s ′ U is at most L dep ( s ) ≤ ρ dep ( s ′ ) L_{\operatorname{dep}(s)}\leq\rho_{\operatorname{dep}(s')} L dep ( s ) ≤ ρ dep ( s ′ ) , meaning that ⟨ x , s ′ ⟩ \langle x,s'\rangle ⟨ x , s ′ ⟩ is connected to ⟨ w , s ′ ⟩ \langle w,s'\rangle ⟨ w , s ′ ⟩ by horizontal edges in G ^ \widehat{G} G . Let ( w , c ) (w,c) ( w , c ) be the corresponding critical failure of ( w , b ) (w,b) ( w , b ) . Then c c c is comparable to s ′ s' s ′ since b b b is, and ⟨ w , s ′ ⟩ \langle w,s'\rangle ⟨ w , s ′ ⟩ and ⟨ w , c ⟩ \langle w,c\rangle ⟨ w , c ⟩ are connected by a vertical edge. This finishes the induction. □
Lemma 23. The discovery stage has O ( 1 ) O(1) O ( 1 ) expected worst-case update time.
Proof. Fix the random choices for the updated edge. Let S d S_{d} S d count the number of successful Search( w , b ) (w,b) ( w , b ) calls with dep ( b ) = d \operatorname{dep}(b)=d dep ( b ) = d . By Lemma 22 , each is associated with a vertex ⟨ w , c ⟩ \langle w,c\rangle ⟨ w , c ⟩ counted by N r N_{r} N r for some r ≤ min ( d , R − 1 ) r\leq\min(d,R-1) r ≤ min ( d , R − 1 ) . A fixed vertex ⟨ w , c ⟩ \langle w,c\rangle ⟨ w , c ⟩ counted by N r N_{r} N r contributes at most 2 d − r 2^{d-r} 2 d − r to S d S_{d} S d . Therefore, by Corollary 7,
E [ S d ] ≤ ∑ r = 0 min ( d , R − 1 ) 2 d − r exp ( − Ω ( τ r ) ) = exp ( − Ω ( τ d ) ) . \mathbb{E}[S_{d}]\leq\sum_{r=0}^{\min(d,R-1)}2^{d-r}\exp(-\Omega(\tau_{r}))=\exp(-\Omega(\tau_{d})). E [ S d ] ≤ r = 0 ∑ m i n ( d , R − 1 ) 2 d − r exp ( − Ω ( τ r )) = exp ( − Ω ( τ d )) .
Charge the work on every failed noninitial call to the successful call that generates it. A successful Search( w , b ) (w,b) ( w , b ) call at depth d d d generates at most exp ( O ( log 4 U d ) ) \exp(O(\log^{4}U_{d})) exp ( O ( log 4 U d )) Search( x , s ) (x,s) ( x , s ) calls with U d e p ( s ) = O ( U d ) U_{\mathrm{dep}}(s)=O(U_d) U dep ( s ) = O ( U d ) , so finding these pairs, filtering out seed failures among them, and maintaining the linked lists take exp ( O ( log 4 U d ) ) \exp(O(\log^{4} U_d)) exp ( O ( log 4 U d )) work in total. Consequently, the total expected work for successful calls is at most
∑ d = 0 R exp ( O ( log 4 U d ) − Ω ( τ d ) ) = O ( 1 ) \sum_{d=0}^{R} \exp(O(\log^{4} U_d)-\Omega(\tau_d))=O(1) d = 0 ∑ R exp ( O ( log 4 U d ) − Ω ( τ d )) = O ( 1 )
since τ d ≫ log 4 U d \tau_d\gg\log^{4} U_d τ d ≫ log 4 U d , the sequence τ d \tau_d τ d decreases geometrically, and τ R \tau_R τ R is sufficiently large. For the failed initial Search( w , b ) (w,b) ( w , b ) calls, the cases in which ( w , b ) = ( u , p a t h e , R ) (w,b)=(u,\mathrm{path}_{e,R}) ( w , b ) = ( u , path e , R ) or ( w , b ) = ( v , p a t h e , R ) (w,b)=(v,\mathrm{path}_{e,R}) ( w , b ) = ( v , path e , R ) take O ( 1 ) O(1) O ( 1 ) time since we can keep track of vertex degrees in E ˉ p a t h e , R \bar{E}_{\mathrm{path}_{e,R}} E ˉ path e , R 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 G ^ \widehat{G} G .
Lemma 24. For every internal node a a a of depth d d d and every x ∈ ( ⋃ i ∈ [ 0 , m d ] D a , i ) ∪ D a ⋆ x\in\left(\bigcup_{i\in[0,m_d]}D_{a,i}\right)\cup D_a^\star x ∈ ( ⋃ i ∈ [ 0 , m d ] D a , i ) ∪ D a ⋆ , there is a critical failure ( w , b ) (w,b) ( w , b ) such that b b b is an ancestor of a a a , ⟨ w , b ⟩ \langle w,b\rangle ⟨ w , b ⟩ is connected in G ^ \widehat{G} G to ⟨ u , p a t h e , d ′ ⟩ \langle u,\mathrm{path}_{e,d'}\rangle ⟨ u , path e , d ′ ⟩ for some d ′ ∈ [ 0 , R − 1 ] d'\in[0,R-1] d ′ ∈ [ 0 , R − 1 ] , and dist E ˉ b ∪ ( w , x ) ≤ 1 + L d e p ( b ) + ∑ j = d e p ( b ) d e p ( a ) 2 m j ≤ ρ d e p ( b ) \operatorname{dist}_{\bar{E}_{b}^{\cup}}(w,x)\le1+L_{\mathrm{dep}(b)}+\sum_{j=\mathrm{dep}(b)}^{\mathrm{dep}(a)}2m_j\le\rho_{\mathrm{dep}(b)} dist E ˉ b ∪ ( w , x ) ≤ 1 + L dep ( b ) + ∑ j = dep ( b ) dep ( a ) 2 m j ≤ ρ dep ( b ) . Consequently, ⟨ x , b ⟩ \langle x,b\rangle ⟨ x , b ⟩ is connected to ⟨ u , p a t h e , d ′ ⟩ \langle u,\mathrm{path}_{e,d'}\rangle ⟨ u , path e , d ′ ⟩ in G ^ \widehat{G} G .
Proof. We induct on dep ( a ) \operatorname{dep}(a) dep ( a ) . First consider D a , 0 D_{a,0} D a , 0 . A vertex x x x is included for one of three reasons:
( x , a ) ∈ F o l d ⊕ F n e w (x,a)\in\mathcal{F}^{\mathrm{old}}\oplus\mathcal{F}^{\mathrm{new}} ( x , a ) ∈ F old ⊕ F new . From Lemma 22 , the vertex ⟨ x , b ⟩ \langle x,b\rangle ⟨ x , b ⟩ associated with its corresponding critical failure ( x , b ) (x,b) ( x , b ) is connected to ⟨ u , p a t h e , d ′ ⟩ \langle u,\mathrm{path}_{e,d'}\rangle ⟨ u , path e , d ′ ⟩ in G ^ \widehat{G} G for some d ′ ∈ [ 0 , R − 1 ] d'\in[0,R-1] d ′ ∈ [ 0 , R − 1 ] , and b b b is an ancestor of a a a , so it satisfies the claim.
a ≠ r T a\ne r_T a = r T and x ∈ D P ( a ) ⋆ x\in D_{\mathrm{P}(a)}^\star x ∈ D P ( a ) ⋆ . From the induction hypothesis we get the desired critical failure ( w , b ) (w,b) ( w , b ) with distance bound 1 + L d e p ( b ) + ∑ j = d e p ( b ) d e p ( a ) − 1 2 m j 1+L_{\mathrm{dep}(b)}+\sum_{j=\mathrm{dep}(b)}^{\mathrm{dep}(a)-1}2m_j 1 + L dep ( b ) + ∑ j = dep ( b ) dep ( a ) − 1 2 m j .
x ∈ { u , v } x\in\{u,v\} x ∈ { u , v } and a a a is along the path from s e s_e s e to p a t h e , R \mathrm{path}_{e,R} path e , R . Either u u u or v v v belongs to V ˉ s e o l d \bar{V}_{s_e}^{\mathrm{old}} V ˉ s e old , and from Lemma 12 , we know that there is a seed failure ( w ⋆ , a ⋆ ) (w^\star,a^\star) ( w ⋆ , a ⋆ ) in T o l d \mathcal{T}^{\mathrm{old}} T old whose cluster contains ( u , a ) (u,a) ( u , a ) or ( v , a ) (v,a) ( v , a ) . As ( u , v ) (u,v) ( u , v ) is the updated edge and a a a is on its routing path, the distance between w ⋆ w^\star w ⋆ and x x x in E ˉ a ⋆ ∪ \bar{E}_{a^\star}^{\cup} E ˉ a ⋆ ∪ is at most L d e p ( a ⋆ ) + 1 L_{\mathrm{dep}(a^\star)}+1 L dep ( a ⋆ ) + 1 . Let ( w ⋆ , b ) (w^\star,b) ( w ⋆ , b ) be the corresponding critical failure of ( w ⋆ , a ⋆ ) (w^\star,a^\star) ( w ⋆ , a ⋆ ) . Then ⟨ w ⋆ , b ⟩ \langle w^\star,b\rangle ⟨ w ⋆ , b ⟩ is connected to ⟨ u , b ⟩ \langle u,b\rangle ⟨ u , b ⟩ in G ^ \widehat{G} G , so it satisfies the claim.
The argument above gives a critical failure ( w , b ) (w,b) ( w , b ) satisfying all the conditions and the tighter distance bound dist E ˉ b ∪ ( w , x ) ≤ 1 + L d e p ( b ) + ∑ j = d e p ( b ) d e p ( a ) − 1 2 m j \operatorname{dist}_{\bar{E}_{b}^{\cup}}(w,x)\le1+L_{\mathrm{dep}(b)}+\sum_{j=\mathrm{dep}(b)}^{\mathrm{dep}(a)-1}2m_j dist E ˉ b ∪ ( w , x ) ≤ 1 + L dep ( b ) + ∑ j = dep ( b ) dep ( a ) − 1 2 m j . It proves the base case for the following induction statement on i i i : For every x ∈ D a , i x\in D_{a,i} x ∈ D a , i , there is a critical failure ( w , b ) (w,b) ( w , b ) satisfying all conditions in the lemma statement and a tighter distance bound
dist E ˉ b ∪ ( w , x ) ≤ 1 + 2 i + L d e p ( b ) + ∑ j = d e p ( b ) d e p ( a ) − 1 2 m j ≤ 1 + L d e p ( b ) + ∑ j = d e p ( b ) d e p ( a ) 2 m j . \operatorname{dist}_{\bar{E}_{b}^{\cup}}(w,x)\le1+2i+L_{\mathrm{dep}(b)}+\sum_{j=\mathrm{dep}(b)}^{\mathrm{dep}(a)-1}2m_j\le1+L_{\mathrm{dep}(b)}+\sum_{j=\mathrm{dep}(b)}^{\mathrm{dep}(a)}2m_j. dist E ˉ b ∪ ( w , x ) ≤ 1 + 2 i + L dep ( b ) + j = dep ( b ) ∑ dep ( a ) − 1 2 m j ≤ 1 + L dep ( b ) + j = dep ( b ) ∑ dep ( a ) 2 m j .
For the induction step, D a , i D_{a,i} D a , i is within the two-hop neighborhood of D a , i − 1 D_{a,i-1} D a , i − 1 for every i ∈ [ 1 , m d e p ( a ) ] i\in[1,m_{\mathrm{dep}(a)}] i ∈ [ 1 , m dep ( a ) ] in J a J_a J a . Notice that the underlying edge set of J a J_a J a is E a o l d ∪ E a n e w E_a^{\mathrm{old}}\cup E_a^{\mathrm{new}} E a old ∪ E a new , rather than E ˉ a ∪ \bar{E}_a^{\cup} E ˉ a ∪ . For vertices in D a , i − 1 D_{a,i-1} D a , i − 1 , apply the induction hypothesis directly. For other vertices x x x , take a shortest path ( x , y , z ) (x,y,z) ( x , y , z ) to D a , i − 1 D_{a,i-1} D a , i − 1 in J a J_a J a , and set y = z y=z y = z if the path has length one. If it lies entirely in E ˉ a ∪ \bar{E}_a^{\cup} E ˉ a ∪ , then the induction step holds trivially. If not, then either ( x , y ) (x,y) ( x , y ) or ( y , z ) (y,z) ( y , z ) belongs to ( E a o l d ∪ E a n e w ) ∖ E ˉ a ∪ (E_a^{\mathrm{old}} \cup E_a^{\mathrm{new}})\setminus\bar{E}_a^{\cup} ( E a old ∪ E a new ) ∖ E ˉ a ∪ , so that edge deviates from its routing path. Let a ′ a' a ′ be the highest ancestor of a a a such that either ( x , y ) (x,y) ( x , y ) or ( y , z ) (y,z) ( y , z ) belongs to ( E a ′ o l d ∪ E a ′ n e w ) ∖ E ˉ a ′ ∪ (E_{a'}^{\mathrm{old}} \cup E_{a'}^{\mathrm{new}})\setminus\bar{E}_{a'}^{\cup} ( E a ′ old ∪ E a ′ new ) ∖ E ˉ a ′ ∪ . Then some p ∈ { x , y , z } p \in\{x,y,z\} p ∈ { x , y , z } belongs to V ˉ P ( a ′ ) o l d ∪ V ˉ P ( a ′ ) n e w \bar{V}_{P(a')}^{\mathrm{old}} \cup\bar{V}_{P(a')}^{\mathrm{new}} V ˉ P ( a ′ ) old ∪ V ˉ P ( a ′ ) new . By Lemma 12 , there is a seed failure ( w , a ′ ′ ) (w,a'') ( w , a ′′ ) in either transcript whose cluster contains ( p , P ( a ′ ) ) (p,P(a')) ( p , P ( a ′ )) . Take its corresponding critical failure ( w , b ) (w,b) ( w , b ) .
We know that b b b is an ancestor of a a a , and the distance between w w w and p p p in E ˉ b ∪ \bar{E}_b^{\cup} E ˉ b ∪ is at most L d e p ( b ) L_{\mathrm{dep}(b)} L dep ( b ) . Additionally, ( x , y ) (x,y) ( x , y ) and ( y , z ) (y,z) ( y , z ) belong to E ˉ b ∪ \bar{E}_b^{\cup} E ˉ b ∪ by the choice of a ′ a' a ′ , so x , y , z x,y,z x , y , z are in the affected region of ( w , b ) (w,b) ( w , b ) , and the distance between w w w and x x x in E ˉ b ∪ \bar{E}_b^{\cup} E ˉ b ∪ is at most L d e p ( b ) + 2 ≤ 1 + 2 i + L d e p ( b ) L_{\mathrm{dep}(b)}+2 \le1+2i+L_{\mathrm{dep}(b)} L dep ( b ) + 2 ≤ 1 + 2 i + L dep ( b ) . Finally, we show that ⟨ w , b ⟩ \langle w,b\rangle ⟨ w , b ⟩ is connected to ⟨ u , path e , d ′ ⟩ \langle u,\operatorname{path}_{e,d'}\rangle ⟨ u , path e , d ′ ⟩ in G ^ \hat{G} G ^ for some d ′ ∈ [ 0 , R − 1 ] d' \in[0,R-1] d ′ ∈ [ 0 , R − 1 ] . The vertex ⟨ w , b ⟩ \langle w,b\rangle ⟨ w , b ⟩ is connected to ⟨ z , b ⟩ \langle z,b\rangle ⟨ z , b ⟩ by a horizontal edge, whereas the induction hypothesis gives an ancestor b ′ b' b ′ of a a a such that ⟨ z , b ′ ⟩ \langle z,b'\rangle ⟨ z , b ′ ⟩ is connected to ⟨ u , path e , d ′ ⟩ \langle u,\operatorname{path}_{e,d'}\rangle ⟨ u , path e , d ′ ⟩ . Since b b b and b ′ b' b ′ are comparable, there is a vertical edge between ⟨ z , b ⟩ \langle z,b\rangle ⟨ z , b ⟩ and ⟨ z , b ′ ⟩ \langle z,b'\rangle ⟨ z , b ′ ⟩ .
It remains to consider D a ⋆ D_a^\star D a ⋆ . Fix x ∈ D a ⋆ x \in D_a^\star x ∈ D a ⋆ and a shortest path x 0 , x 1 , … , x t x_0,x_1,\ldots,x_t x 0 , x 1 , … , x t in E a b a d , n e w E_a^{\mathrm{bad,new}} E a bad , new from D a , m d e p ( a ) D_{a,m_{\mathrm{dep}(a)}} D a , m dep ( a ) to x x x . The case t = 0 t=0 t = 0 is trivial; hence, consider t ≥ 1 t \ge1 t ≥ 1 . From the argument above, there is some ancestor b 0 ′ b'_0 b 0 ′ of a a a such that ⟨ x 0 , b 0 ′ ⟩ \langle x_0,b'_0\rangle ⟨ x 0 , b 0 ′ ⟩ is connected to ⟨ u , path e , d ′ ⟩ \langle u,\operatorname{path}_{e,d'}\rangle ⟨ u , path e , d ′ ⟩ for some d ′ ∈ [ 0 , R − 1 ] d' \in[0,R-1] d ′ ∈ [ 0 , R − 1 ] .
For each j ≥ 1 j \ge1 j ≥ 1 , let a j a_j a j be the highest ancestor of a a a such that the edge ( x j − 1 , x j ) (x_{j-1},x_j) ( x j − 1 , x j ) enters E a j b a d , n e w E_{a_j}^{\mathrm{bad,new}} E a j bad , new . Such an a j a_j a j exists since a a a is a candidate. We know that x j ∈ V ˉ a j n e w x_j \in\bar{V}_{a_j}^{\mathrm{new}} x j ∈ V ˉ a j new , so we can apply Lemma 12 to find a seed failure ( w j , b j ) ∈ F n e w (w_j,b_j) \in F^{\mathrm{new}} ( w j , b j ) ∈ F new whose new cluster contains ( x j , a j ) (x_j,a_j) ( x j , a j ) and consider its corresponding critical failure ( w j , b j ′ ) (w_j,b'_j) ( w j , b j ′ ) . By the choice of a j a_j a j , ( x j − 1 , x j ) (x_{j-1},x_j) ( x j − 1 , x j ) belongs to E ˉ b j ′ ∪ \bar{E}_{b'_j}^{\cup} E ˉ b j ′ ∪ , so the distance between w j w_j w j and either endpoint of ( x j − 1 , x j ) (x_{j-1},x_j) ( x j − 1 , x j ) is at most L d e p ( b j ′ ) + 1 L_{\mathrm{dep}(b'_j)}+1 L dep ( b j ′ ) + 1 , meaning that ⟨ x j − 1 , b j ′ ⟩ \langle x_{j-1},b'_j\rangle ⟨ x j − 1 , b j ′ ⟩ and ⟨ x j , b j ′ ⟩ \langle x_j,b'_j\rangle ⟨ x j , b j ′ ⟩ are connected by horizontal edges in G ^ \hat{G} G ^ . At the same time, ⟨ x j − 1 , b j ′ ⟩ \langle x_{j-1},b'_j\rangle ⟨ x j − 1 , b j ′ ⟩ is connected to ⟨ x j − 1 , b j − 1 ′ ⟩ \langle x_{j-1},b'_{j-1}\rangle ⟨ x j − 1 , b j − 1 ′ ⟩ by a vertical edge since they are both ancestors of a a a . Consequently, ( w t , b t ′ ) (w_t,b'_t) ( w t , b t ′ ) is a critical failure such that ⟨ w t , b t ′ ⟩ \langle w_t,b'_t\rangle ⟨ w t , b t ′ ⟩ is connected to ⟨ u , path e , d ′ ⟩ \langle u,\operatorname{path}_{e,d'}\rangle ⟨ u , path e , d ′ ⟩ , and the distance between w t w_t w t and x x x in E ˉ b t ′ ∪ \bar{E}_{b'_t}^{\cup} E ˉ b t ′ ∪ is at most L d e p ( b t ′ ) + 1 L_{\mathrm{dep}(b'_t)}+1 L dep ( b t ′ ) + 1 . This proves the claim.
The following corollary is immediate from Lemma 24 and corollary 7.
Corollary 8. Define Z d = ∑ dep ( a ) = d ∣ D a ⋆ ∪ ( ⋃ i ∈ [ 0 , m d ] D a , i ) ∣ Z_d=\sum_{\operatorname{dep}(a)=d}\left|D_a^\star\cup\left(\bigcup_{i\in[0,m_d]}D_{a,i}\right)\right| Z d = ∑ dep ( a ) = d D a ⋆ ∪ ( ⋃ i ∈ [ 0 , m d ] D a , i ) . Then E [ Z d ] = exp ( − Ω ( τ d ) ) \mathbb{E}[Z_d]=\exp(-\Omega(\tau_d)) E [ Z d ] = exp ( − Ω ( τ d )) . The statement also holds conditional on the randomness of the updated edge.
Proof. From Lemma 24 , every pair ( x , a ) (x,a) ( x , a ) with dep ( a ) = d \operatorname{dep}(a)=d dep ( a ) = d and x ∈ D a ⋆ ∪ ( ⋃ i ∈ [ 0 , m d ] D a , i ) x\in D_a^\star\cup\left(\bigcup_{i\in[0,m_d]}D_{a,i}\right) x ∈ D a ⋆ ∪ ( ⋃ i ∈ [ 0 , m d ] D a , i ) corresponds to a vertex ⟨ x , b ⟩ \langle x,b\rangle ⟨ x , b ⟩ in G ^ \hat{G} G ^ connected to ⟨ u , path e , d ′ ⟩ \langle u,\operatorname{path}_{e,d'}\rangle ⟨ u , path e , d ′ ⟩ for some ancestor b b b of a a a . Each such vertex ⟨ x , b ⟩ \langle x,b\rangle ⟨ x , b ⟩ counts toward N dep ( b ) N_{\operatorname{dep}(b)} N dep ( b ) in Corollary 7. Each vertex ⟨ x , b ⟩ \langle x,b\rangle ⟨ x , b ⟩ with dep ( b ) = d ′ \operatorname{dep}(b)=d' dep ( b ) = d ′ contributes at most 2 d − d ′ 2^{d-d'} 2 d − d ′ pairs to Z d Z_d Z d , so the expected value of Z d Z_d Z d is bounded by
∑ d ′ = 0 d 2 d − d ′ exp ( − Ω ( τ d ′ ) ) = exp ( − Ω ( τ d ) ) . \sum_{d'=0}^{d}2^{d-d'}\exp(-\Omega(\tau_{d'}))=\exp(-\Omega(\tau_d)). d ′ = 0 ∑ d 2 d − d ′ exp ( − Ω ( τ d ′ )) = exp ( − Ω ( τ d )) .
Lemma 25. The expected work in the repair stage is O ( 1 ) O(1) O ( 1 ) .
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 E a α E_a^\alpha E a α is 2 R − dep ( a ) U R = O ( U dep ( a ) ) 2^{R-\operatorname{dep}(a)}U_R=O(U_{\operatorname{dep}(a)}) 2 R − dep ( a ) U R = O ( U dep ( a ) ) for α ∈ { o l d , n e w } \alpha\in\{\mathrm{old},\mathrm{new}\} α ∈ { old , new } . This follows from E a α = ⋃ b ∈ L τ ( a ) E b α E_a^\alpha=\bigcup_{b\in L_\tau(a)}E_b^\alpha E a α = ⋃ b ∈ L τ ( a ) E b α and Corollary 6. Thus, the maximum degree of J a J_a J a is O ( U dep ( a ) ) O(U_{\operatorname{dep}(a)}) O ( U dep ( a ) ) .
In the pre-shattering part, for every node a a a of depth d d d , i ∈ [ 0 , m d ] i\in[0,m_d] i ∈ [ 0 , m d ] , and x ∈ D a , i x\in D_{a,i} x ∈ D a , i , σ a , i n e w ( x ) \sigma_{a,i}^{\mathrm{new}}(x) σ a , i new ( x ) is computed. If x ∉ V ˉ a , i n e w x\notin\bar{V}_{a,i}^{\mathrm{new}} x ∈ / V ˉ a , i new , then σ a , i n e w ( x ) \sigma_{a,i}^{\mathrm{new}}(x) σ a , i new ( x ) is maintained implicitly, and we spend O ( 1 ) O(1) O ( 1 ) work to mark it as implicit; otherwise, we collect the set of vertices and local information in its two-hop neighborhood in poly ( U dep ( a ) ) \operatorname{poly}(U_{\operatorname{dep}(a)}) poly ( U dep ( a ) ) time to construct σ a , i n e w ( x ) \sigma_{a,i}^{\mathrm{new}}(x) σ a , i new ( x ) . We also need to take into account work to compute s e s_e s e . Since x ∈ V ˉ a o l d x \in\bar{V}^{\mathrm{old}}_a x ∈ V ˉ a old implies x ∈ V ˉ b o l d x \in\bar{V}^{\mathrm{old}}_b x ∈ V ˉ b old for internal nodes b b b inside the subtree of a a a , we can find s e s_e s e by tracing upward along the routing path. Testing whether x ∈ V ˉ a o l d x \in\bar{V}^{\mathrm{old}}_a x ∈ V ˉ a old can be done by checking σ a , m dep ( a ) o l d ( x ) \sigma^{\mathrm{old}}_{a,m_{\operatorname{dep}(a)}}(x) σ a , m dep ( a ) old ( x ) in O ( 1 ) O(1) O ( 1 ) time, so the total time to find s e s_e s e is O ( 1 + R − dep ( s e ) ) = O ( U dep ( s e ) ) O(1+R-\operatorname{dep}(s_e))=O(U_{\operatorname{dep}(s_e)}) O ( 1 + R − dep ( s e )) = O ( U dep ( s e ) ) .
To skip repairs on nodes a a a with empty D a , 0 D_{a,0} D a , 0 , we maintain an array of lists Q 0 , Q 1 , … , Q R − 1 Q_0,Q_1,\ldots,Q_{R-1} Q 0 , Q 1 , … , Q R − 1 in which Q i Q_i Q i contains the set of nodes a a a with D a , 0 ≠ ∅ D_{a,0}\ne\varnothing D a , 0 = ∅ and dep ( a ) = i \operatorname{dep}(a)=i dep ( a ) = i . We also maintain the smallest index k k k such that Q k ≠ ∅ Q_k\ne\varnothing Q k = ∅ . Each pair ( x , a ) ∈ F o l d ⊕ F n e w (x,a)\in\mathcal{F}^{\mathrm{old}}\oplus\mathcal{F}^{\mathrm{new}} ( x , a ) ∈ F old ⊕ F new adds a a a to Q dep ( a ) Q_{\operatorname{dep}(a)} Q dep ( a ) , and the two endpoints of e e e add s e s_e s e to Q dep ( s e ) Q_{\operatorname{dep}(s_e)} Q dep ( s e ) . Finally, we go through Q k , Q k + 1 , … , Q R − 1 Q_k,Q_{k+1},\ldots,Q_{R-1} Q k , Q k + 1 , … , Q R − 1 for the repair. This incurs an additional cost of O ( R − k ) = O ( U k ) O(R-k)=O(U_k) O ( R − k ) = O ( U k ) , dominated by the previous poly ( U k ) \operatorname{poly}(U_k) poly ( U k ) cost.
In the post-shattering part, each vertex in D a ⋆ D_a^\star D a ⋆ participates in computing the new post-shattering bipartition. The total work is the number of vertices, ∣ D a ⋆ ∣ \lvert D_a^\star\rvert ∣ D a ⋆ ∣ , plus the number of edges in the affected components. For x ∈ D a ⋆ x\in D_a^\star x ∈ D a ⋆ , if the number of edges incident to x x x in E a b a d , n e w E_a^{\mathrm{bad,new}} E a bad , new is nonzero, then x ∈ V ˉ a n e w x\in\bar{V}_a^{\mathrm{new}} x ∈ V ˉ a new and the degree of x x x in E a b a d , n e w E_a^{\mathrm{bad,new}} E a bad , new is O ( U d ) O(U_d) O ( U d ) . In sum, the total work in the post-shattering part is O ( U d ∣ D a ⋆ ∣ ) O(U_d\lvert D_a^\star\rvert) O ( U d ∣ D a ⋆ ∣) .
Combining the two parts, we know that each vertex counted in Z d Z_d Z d , defined in Corollary 8, generates poly ( U d ) \operatorname{poly}(U_d) poly ( U d ) work. From Corollary 8, E [ Z d ] = exp ( − Ω ( τ d ) ) \mathbb{E}[Z_d]=\exp(-\Omega(\tau_d)) E [ Z d ] = exp ( − Ω ( τ d )) , so the expected total work is
O ( 1 ) + ∑ d = 0 R − 1 exp ( O ( log U d ) − Ω ( τ d ) ) = O ( 1 ) O(1)+\sum_{d=0}^{R-1}\exp(O(\log U_d)-\Omega(\tau_d))=O(1) O ( 1 ) + d = 0 ∑ R − 1 exp ( O ( log U d ) − Ω ( τ d )) = O ( 1 )
since τ d ≫ log U d \tau_d\gg\log U_d τ d ≫ log U d , the sequence τ i \tau_i τ i decreases geometrically, and τ R \tau_R τ R is large enough.
We are ready for the final theorem.
Theorem 4. There is a randomized algorithm that maintains a proper ( 1 + O ( ϵ ) ) Δ (1+O(\epsilon))\Delta ( 1 + O ( ϵ )) Δ edge coloring for a dynamic graph with maximum degree Δ ≥ Δ ϵ \Delta\ge\Delta_\epsilon Δ ≥ Δ ϵ . Against an oblivious adversary, each edge insertion or deletion takes poly ( 1 / ϵ ) \operatorname{poly}(1/\epsilon) poly ( 1/ ϵ ) expected worst-case time.
Proof. If Δ ≤ exp ( Δ ϵ ) \Delta\le\exp(\Delta_\epsilon) Δ ≤ exp ( Δ ϵ ) , apply Lemma 9 directly. Otherwise, use the dynamic algorithm in this section to maintain the partition P R = { E a ∣ a ∈ L T } \mathcal{P}_R=\{E_a\mid a\in\mathcal{L}_T\} P R = { E a ∣ a ∈ L T } , and apply Lemma 9 to each subgraph with disjoint palettes. This application uses the facts that U R ∈ [ exp ( Δ ϵ ) / 2 , exp ( Δ ϵ ) ] U_R\in[\exp(\Delta_\epsilon)/2,\exp(\Delta_\epsilon)] U R ∈ [ exp ( Δ ϵ ) /2 , exp ( Δ ϵ )] and every subgraph in P R \mathcal{P}_R P R always has maximum degree at most U R U_R U R according to Lemmas 14 and 19 and corollary 6. This results in a coloring of size ( 1 + O ( ϵ ) ) U R 2 R = ( 1 + O ( ϵ ) ) Δ (1+O(\epsilon))U_R2^R=(1+O(\epsilon))\Delta ( 1 + O ( ϵ )) U R 2 R = ( 1 + O ( ϵ )) Δ as U R = ( 1 + O ( ϵ ) ) Δ / 2 R U_R=(1+O(\epsilon))\Delta/2^R U R = ( 1 + O ( ϵ )) Δ/ 2 R .
By Lemmas 23 and 25, maintaining P R \mathcal{P}_R P R takes O ( 1 ) O(1) O ( 1 ) expected work and produces O ( 1 ) O(1) O ( 1 ) expected edge updates, so the total expected cost of the Lemma 9 instances is poly ( 1 / ϵ ) \operatorname{poly}(1/\epsilon) poly ( 1/ ϵ ) . This means that the whole algorithm has poly ( 1 / ϵ ) \operatorname{poly}(1/\epsilon) poly ( 1/ ϵ ) expected work.
Proof of the Component Size Upper Bound
In this section, we prove Lemma 21 . Recall the definition of G ^ ( V ^ , E ^ ) \widehat{G}(\widehat{V},\widehat{E}) G ( V , E ) : it has vertex set
V ^ = { ⟨ x , a ⟩ : x ∈ V ( R w , a ) for some critical failure ( w , a ) } . \widehat{V}=\{\langle x,a\rangle:x\in V(\mathcal{R}_{w,a})\text{ for some critical failure }(w,a)\}. V = {⟨ x , a ⟩ : x ∈ V ( R w , a ) for some critical failure ( w , a )} .
For each affected region R w , a \mathcal{R}_{w,a} R w , a , there is a horizontal edge in E ^ \widehat{E} E between each pair of vertices ⟨ x , a ⟩ , ⟨ y , a ⟩ \langle x,a\rangle,\langle y,a\rangle ⟨ x , a ⟩ , ⟨ y , a ⟩ for which x x x and y y y belong to V ( R w , a ) V(\mathcal{R}_{w,a}) V ( R w , a ) . There is also a vertical edge in E ^ \widehat{E} E between ⟨ x , a ⟩ \langle x,a\rangle ⟨ x , a ⟩ and ⟨ x , b ⟩ \langle x,b\rangle ⟨ x , b ⟩ whenever a ≠ b a\ne b a = b are comparable and both vertices belong to V ^ \widehat{V} V .
Fix the updated edge e = ( u , v ) e=(u,v) e = ( u , v ) and condition on all random choices for e e e . In the rest of this section, for a node c c c and d ∈ [ 0 , R ] d\in[0,R] d ∈ [ 0 , R ] , define A d ( c ) A_d(c) A d ( c ) to be c c c when dep ( c ) ≤ d \operatorname{dep}(c)\le d dep ( c ) ≤ d and to be the depth-d d d ancestor of c c c when dep ( c ) > d \operatorname{dep}(c)>d dep ( c ) > d .
A Witness for Each Vertex in the Connected Component
Let H \mathcal{H} H be a graph whose vertices are the critical failures in the instance. Two distinct critical failures ( x , c ) (x,c) ( x , c ) and ( y , b ) (y,b) ( y , b ) are adjacent in H \mathcal{H} H if c c c and b b b are comparable and
V ( R x , c ) ∩ V ( R y , b ) ≠ ∅ . V(R_{x,c}) \cap V(R_{y,b}) \ne\emptyset. V ( R x , c ) ∩ V ( R y , b ) = ∅.
Lemma 26. If ⟨ x , a ⟩ \langle x,a\rangle ⟨ x , a ⟩ and ⟨ y , b ⟩ \langle y,b\rangle ⟨ y , b ⟩ are in the same connected component of G ^ \widehat{G} G , then there is a sequence of critical failures
( z 1 , c 1 ) , ( z 2 , c 2 ) , … , ( z ℓ , c ℓ ) (z_1,c_1),(z_2,c_2),\ldots,(z_\ell,c_\ell) ( z 1 , c 1 ) , ( z 2 , c 2 ) , … , ( z ℓ , c ℓ ) such that c 1 = a c_1=a c 1 = a , c ℓ = b c_\ell=b c ℓ = b , x ∈ V ( R z 1 , c 1 ) x \in V(R_{z_1,c_1}) x ∈ V ( R z 1 , c 1 ) , y ∈ V ( R z ℓ , c ℓ ) y \in V(R_{z_\ell,c_\ell}) y ∈ V ( R z ℓ , c ℓ ) , and neighboring failures are adjacent in H \mathcal{H} H .
Proof. If ⟨ x , a ⟩ = ⟨ y , b ⟩ \langle x,a\rangle= \langle y,b\rangle ⟨ x , a ⟩ = ⟨ y , b ⟩ , choose any critical failure ( z , a ) (z,a) ( z , a ) whose affected region contains x x x . Otherwise, choose a path P = ( ⟨ p 1 , c 1 ⟩ , ⟨ p 2 , c 2 ⟩ , … , ⟨ p ℓ , c ℓ ⟩ ) P = (\langle p_1,c_1\rangle,\langle p_2,c_2\rangle,\ldots,\langle p_\ell,c_\ell\rangle) P = (⟨ p 1 , c 1 ⟩ , ⟨ p 2 , c 2 ⟩ , … , ⟨ p ℓ , c ℓ ⟩) in G ^ \widehat{G} G from ⟨ x , a ⟩ \langle x,a\rangle ⟨ x , a ⟩ to ⟨ y , b ⟩ \langle y,b\rangle ⟨ y , b ⟩ . Associate a critical failure ( z i , c i ) (z_i,c_i) ( z i , c i ) with each 1 ≤ i ≤ ℓ 1 \le i \le\ell 1 ≤ i ≤ ℓ . When i ≠ ℓ i \ne\ell i = ℓ and c i = c i + 1 c_i = c_{i+1} c i = c i + 1 , ( z i , c i ) (z_i,c_i) ( z i , c i ) is a critical failure that introduces the horizontal edge between ⟨ p i , c i ⟩ \langle p_i,c_i\rangle ⟨ p i , c i ⟩ and ⟨ p i + 1 , c i + 1 ⟩ \langle p_{i+1},c_{i+1}\rangle ⟨ p i + 1 , c i + 1 ⟩ in G ^ \widehat{G} G ; otherwise, it is a critical failure that introduces ⟨ p i , c i ⟩ \langle p_i,c_i\rangle ⟨ p i , c i ⟩ .
We claim that the sequence ( z 1 , c 1 ) , … , ( z ℓ , c ℓ ) (z_1,c_1),\ldots,(z_\ell,c_\ell) ( z 1 , c 1 ) , … , ( z ℓ , c ℓ ) satisfies the statement. From the definition, c 1 = a c_1 = a c 1 = a , c ℓ = b c_\ell= b c ℓ = b , x ∈ V ( R z 1 , c 1 ) x \in V(R_{z_1,c_1}) x ∈ V ( R z 1 , c 1 ) , and y ∈ V ( R z ℓ , c ℓ ) y \in V(R_{z_\ell,c_\ell}) y ∈ V ( R z ℓ , c ℓ ) . For every 1 ≤ i < ℓ 1 \le i < \ell 1 ≤ i < ℓ , if c i = c i + 1 c_i = c_{i+1} c i = c i + 1 , then p i + 1 ∈ V ( R z i , c i ) ∩ V ( R z i + 1 , c i + 1 ) p_{i+1} \in V(R_{z_i,c_i}) \cap V(R_{z_{i+1},c_{i+1}}) p i + 1 ∈ V ( R z i , c i ) ∩ V ( R z i + 1 , c i + 1 ) and the two failures are adjacent in H \mathcal{H} H ; otherwise, c i c_i c i and c i + 1 c_{i+1} c i + 1 are comparable, and p i ∈ V ( R z i , c i ) ∩ V ( R z i + 1 , c i + 1 ) p_i \in V(R_{z_i,c_i}) \cap V(R_{z_{i+1},c_{i+1}}) p i ∈ V ( R z i , c i ) ∩ V ( R z i + 1 , c i + 1 ) . Consecutive equal failures can be suppressed, and all remaining neighboring failures are adjacent in H \mathcal{H} H , giving the required sequence.
We now define a witness certifying that ⟨ y , b ⟩ \langle y,b\rangle ⟨ y , b ⟩ lies in the same component of G ^ \widehat{G} G as ⟨ x , a ⟩ \langle x,a\rangle ⟨ x , a ⟩ .
Definition 9 (Witness). For x , y ∈ V ( G ) x,y \in V(G) x , y ∈ V ( G ) and a , b ∈ T ∖ L T a,b \in T \setminus L_T a , b ∈ T ∖ L T , a witness of length ℓ ≥ 1 \ell\ge1 ℓ ≥ 1 from ⟨ x , a ⟩ \langle x,a\rangle ⟨ x , a ⟩ to ⟨ y , b ⟩ \langle y,b\rangle ⟨ y , b ⟩ consists of pairs ( z i , c i ) ∈ V ( G ) × ( T ∖ L T ) (z_i,c_i) \in V(G) \times(T \setminus L_T) ( z i , c i ) ∈ V ( G ) × ( T ∖ L T ) for i ∈ [ ℓ ] i \in[\ell] i ∈ [ ℓ ] , vertices w 0 , … , w ℓ ∈ V ( G ) w_0,\ldots,w_\ell\in V(G) w 0 , … , w ℓ ∈ V ( G ) , and two simple paths P i L , P i R P_i^L,P_i^R P i L , P i R for every i ∈ [ ℓ ] i \in[\ell] i ∈ [ ℓ ] . Write d i = dep ( c i ) d_i = \operatorname{dep}(c_i) d i = dep ( c i ) , T i = P i L ∪ P i R T_i = P_i^L \cup P_i^R T i = P i L ∪ P i R , and F i = E ( T i ) F_i = E(T_i) F i = E ( T i ) . The following properties hold for every i ∈ [ ℓ ] i \in[\ell] i ∈ [ ℓ ] :
c 1 = a c_1 = a c 1 = a , c ℓ = b c_\ell= b c ℓ = b , w 0 = x w_0 = x w 0 = x , w ℓ = y w_\ell= y w ℓ = y , c i c_i c i and c i + 1 c_{i+1} c i + 1 are comparable when i < ℓ i < \ell i < ℓ .
( z i , c i ) (z_i,c_i) ( z i , c i ) is a critical failure.
P i L P_i^L P i L is a z i z_i z i –w i − 1 w_{i-1} w i − 1 path and P i R P_i^R P i R is a z i z_i z i –w i w_i w i path in E ˉ c i ∪ \bar{E}^{\cup}_{c_i} E ˉ c i ∪ , each of length at most ρ d i \rho d_i ρ d i .
T i T_i T i 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 i , j ∈ [ ℓ ] i,j \in[\ell] i , j ∈ [ ℓ ] with ∣ i − j ∣ > 1 |i-j| > 1 ∣ i − j ∣ > 1 :
If c i c_i c i and c j c_j c j are comparable, then z j ∉ V ( T i ) z_j \notin V(T_i) z j ∈ / V ( T i ) .
If c i = c j c_i = c_j c i = c j , then dist E ˉ c i ∪ ( z i , z j ) > 1 \operatorname{dist}_{\bar{E}^{\cup}_{c_i}}(z_i,z_j) > 1 dist E ˉ c i ∪ ( z i , z j ) > 1 .
F i ∩ F j = ∅ F_i \cap F_j = \emptyset F i ∩ F j = ∅ .
Figure 1 provides an illustration of a possible witness satisfying properties one through four.
Figure 1. A possible witness of length four from ⟨ x , a ⟩ \langle x,a\rangle ⟨ x , a ⟩ to ⟨ y , b ⟩ \langle y,b\rangle ⟨ y , b ⟩
Next, we show that a witness necessarily exists whenever a pair of vertices lies in the same connected component.
Lemma 27. If ⟨ x , a ⟩ \langle x,a\rangle ⟨ x , a ⟩ and ⟨ y , b ⟩ \langle y,b\rangle ⟨ y , b ⟩ are in the same connected component of G ^ \widehat{G} G , then there is a witness from ⟨ x , a ⟩ \langle x,a\rangle ⟨ x , a ⟩ to ⟨ y , b ⟩ \langle y,b\rangle ⟨ y , b ⟩ .
Proof. By Lemma 26 , there is a path in H \mathcal{H} H from a critical failure ( z 1 , a ) (z_1,a) ( z 1 , a ) whose affected region contains x x x to a critical failure ( z ℓ , b ) (z_\ell,b) ( z ℓ , b ) whose affected region contains y y y . Choosing a shortest path ( z 1 , c 1 ) , … , ( z ℓ , c ℓ ) (z_1,c_1),\ldots,(z_\ell,c_\ell) ( z 1 , c 1 ) , … , ( z ℓ , c ℓ ) and setting w 0 = x w_0=x w 0 = x and w ℓ = y w_\ell=y w ℓ = y gives properties 1 and 2.
For each i < ℓ i<\ell i < ℓ , choose any w i ∈ V ( R z i , c i ) ∩ V ( R z i + 1 , c i + 1 ) w_i\in V(\mathcal{R}_{z_i,c_i})\cap V(\mathcal{R}_{z_{i+1},c_{i+1}}) w i ∈ V ( R z i , c i ) ∩ V ( R z i + 1 , c i + 1 ) . For each i i i , fix a shortest-path tree of R z i , c i \mathcal{R}_{z_i,c_i} R z i , c i rooted at z i z_i z i , and let P i L P_i^L P i L and P i R P_i^R P i R be its paths to w i − 1 w_{i-1} w i − 1 and w i w_i w i . Because R z i , c i \mathcal{R}_{z_i,c_i} R z i , c i has radius ρ d i \rho_{d_i} ρ d i , these paths satisfy property 3. Their union is a tree in which only the branching point can have degree three, proving property 4.
Suppose ∣ i − j ∣ > 1 |i-j|>1 ∣ i − j ∣ > 1 and c i , c j c_i,c_j c i , c j are comparable. If V ( R z i , c i ) V(\mathcal{R}_{z_i,c_i}) V ( R z i , c i ) and V ( R z j , c j ) V(\mathcal{R}_{z_j,c_j}) V ( R z j , c j ) intersect, then ( z i , c i ) (z_i,c_i) ( z i , c i ) and ( z j , c j ) (z_j,c_j) ( z j , c j ) are adjacent in H \mathcal{H} H , contradicting the minimality of the path in H \mathcal{H} H . Since T i ⊆ R z i , c i T_i\subseteq\mathcal{R}_{z_i,c_i} T i ⊆ R z i , c i and z j ∈ V ( R z j , c j ) z_j\in V(\mathcal{R}_{z_j,c_j}) z j ∈ V ( R z j , c j ) , this proves property 5. This also shows that F i ∩ F j = ∅ F_i\cap F_j=\varnothing F i ∩ F j = ∅ when c i c_i c i and c j c_j c j are comparable; for noncomparable c i c_i c i and c j c_j c j , E ‾ c i ∪ \overline{E}_{c_i}^{\cup} E c i ∪ and E ‾ c j ∪ \overline{E}_{c_j}^{\cup} E c j ∪ are disjoint. This gives property 7. Finally, if c i = c j c_i=c_j c i = c j and the centers were equal or adjacent in E ‾ c i ∪ \overline{E}_{c_i}^{\cup} E c i ∪ , 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 ⟨ w , a ⟩ \langle w,a\rangle ⟨ w , a ⟩ .
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 ⟨ u , a ⟩ \langle u,a\rangle ⟨ u , a ⟩ and W = ( ( z i , c i ) i = 1 ℓ , ( w i ) i = 0 ℓ , ( P i L , P i R ) i = 1 ℓ ) W=((z_i,c_i)_{i=1}^{\ell},(w_i)_{i=0}^{\ell},(P_i^L,P_i^R)_{i=1}^{\ell}) W = (( z i , c i ) i = 1 ℓ , ( w i ) i = 0 ℓ , ( P i L , P i R ) i = 1 ℓ ) for ℓ ≥ 1 \ell\geq1 ℓ ≥ 1 . Write d i = dep ( c i ) d_i=\operatorname{dep}(c_i) d i = dep ( c i ) , T i = P i L ∪ P i R T_i=P_i^L\cup P_i^R T i = P i L ∪ P i R , and F i = E ( T i ) F_i=E(T_i) F i = E ( T i ) . For d ∈ [ 0 , R ] d\in[0,R] d ∈ [ 0 , R ] , the descriptor W W W is a d d d -witness ending at ⟨ w ℓ , c ℓ ⟩ \langle w_\ell,c_\ell\rangle ⟨ w ℓ , c ℓ ⟩ if the following properties hold for every i ∈ [ ℓ ] i\in[\ell] i ∈ [ ℓ ] :
c 1 = a c_1=a c 1 = a , w 0 = u w_0=u w 0 = u , c i c_i c i and c i + 1 c_{i+1} c i + 1 are comparable for i < ℓ i<\ell i < ℓ .
If d i < d d_i<d d i < d , then ( z i , c i ) (z_i,c_i) ( z i , c i ) is a critical failure.
P i L P_i^L P i L is a simple z i z_i z i –w i − 1 w_{i-1} w i − 1 path and P i R P_i^R P i R is a simple z i z_i z i –w i w_i w i path in E ‾ A d ( c i ) ∪ \overline{E}_{A_d(c_i)}^{\cup} E A d ( c i ) ∪ , each of length at most ρ d i \rho_{d_i} ρ d i .
T i T_i T i 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 i , j ∈ [ ℓ ] i,j\in[\ell] i , j ∈ [ ℓ ] with ∣ i − j ∣ > 1 |i-j|>1 ∣ i − j ∣ > 1 :
If c i c_i c i and c j c_j c j are comparable, then z j ∉ V ( T i ) z_j\notin V(T_i) z j ∈ / V ( T i ) .
If c i = c j c_i=c_j c i = c j and d i ≤ d d_i\leq d d i ≤ d , then dist E ‾ c i ∪ ( z i , z j ) > 1 \operatorname{dist}_{\overline{E}_{c_i}^{\cup}}(z_i,z_j)>1 dist E c i ∪ ( z i , z j ) > 1 .
F i ∩ F j = ∅ F_i\cap F_j=\varnothing F i ∩ F j = ∅ .
By comparing the definitions, a witness is an R R R -witness. The next two lemmas explain the usefulness of the partial witness definition.
Lemma 28. If W W W is a d d d -witness for some d ∈ [ 1 , R ] d\in[1,R] d ∈ [ 1 , R ] , then it is also a ( d − 1 ) (d-1) ( d − 1 ) -witness.
Proof. Only properties 2, 3, and 6 depend on d d d . Properties 2 and 6 become weaker when d d d decreases. For property 3, A d − 1 ( c i ) A_{d-1}(c_i) A d − 1 ( c i ) is an ancestor of A d ( c i ) A_d(c_i) A d ( c i ) , so E ‾ A d ( c i ) ∪ ⊆ E ‾ A d − 1 ( c i ) ∪ \overline{E}_{A_d(c_i)}^{\cup}\subseteq\overline{E}_{A_{d-1}(c_i)}^{\cup} E A d ( c i ) ∪ ⊆ E A d − 1 ( c i ) ∪ . Hence property 3 also becomes weaker.
Lemma 29. Relative to the fixed randomness of the updated edge e e e , whether W \mathcal{W} W is a d d d -witness depends only on the randomness of all other edges at levels before d d d . In particular, whether it is a 0 0 0 -witness does not depend on the randomness.
Proof. Only properties 2, 3, and 6 depend on the edge randomness. If d i < d d_i<d d i < d , whether ( z i , c i ) (z_i,c_i) ( z i , c i ) is critical is determined by the seed failure tests at ( z i , c i ) (z_i,c_i) ( z i , c i ) and at ( z i , P ( c i ) ) (z_i,P(c_i)) ( z i , P ( c i )) when c i ≠ r T c_i\ne r_T c i = r T , which depend on randomness at levels at most d i < d d_i<d d i < d . The graph E ‾ A d ( c i ) ∪ \overline{E}^{\cup}_{A_d(c_i)} E A d ( c i ) ∪ in property 3 is determined by the random directions on each edge at levels smaller than d d d . Finally, when property 6 applies, d i ≤ d d_i\le d d i ≤ d , and E ‾ c i ∪ \overline{E}^{\cup}_{c_i} E c i ∪ depends only on the direction randomness at levels smaller than d i ≤ d d_i\le d d i ≤ d . Thus all three properties depend only on levels smaller than d d d . □ \square □
For a fixed descriptor W \mathcal{W} W and d ∈ [ 0 , R − 1 ] d\in[0,R-1] d ∈ [ 0 , R − 1 ] , define
I d = { i ∈ [ ℓ ] : d i = d } , I d + = { i ∈ [ ℓ ] : d i > d } , M d = ∣ ( ⋃ i ∈ I d + F i ) ∖ { e } ∣ . \begin{aligned}
I_d &= \{i\in[\ell]:d_i=d\},\\
I_d^+ &= \{i\in[\ell]:d_i>d\},\\
M_d &= \left|\left(\bigcup_{i\in I_d^+}F_i\right)\setminus\{e\}\right|.
\end{aligned} I d I d + M d = { i ∈ [ ℓ ] : d i = d } , = { i ∈ [ ℓ ] : d i > d } , = i ∈ I d + ⋃ F i ∖ { e } .
We next bound the probability that a d d d -witness is also a ( d + 1 ) (d+1) ( d + 1 ) -witness.
Lemma 30. For every descriptor W \mathcal{W} W and every d ∈ [ 0 , R − 1 ] d\in[0,R-1] d ∈ [ 0 , R − 1 ] such that W \mathcal{W} W has nonzero probability of being a d d d -witness,
Pr [ W is a ( d + 1 ) -witness ∣ W is a d -witness ] ≤ exp ( − Ω ( τ d ∣ I d ∣ ) ) 2 − M d . \Pr[\mathcal{W}\text{ is a }(d+1)\text{-witness}\mid\mathcal{W}\text{ is a }d\text{-witness}]\le\exp(-\Omega(\tau_d|I_d|))2^{-M_d}. Pr [ W is a ( d + 1 ) -witness ∣ W is a d -witness ] ≤ exp ( − Ω ( τ d ∣ I d ∣ )) 2 − M d . Proof. By Lemma 29, the event that W \mathcal{W} W is a d d d -witness depends only on levels before d d d . We condition on any randomness from those levels under which it is a d d d -witness and prove a uniform bound over the conditioning.
For every i ∈ I d + i\in I_d^+ i ∈ I d + , property 3 at level d + 1 d+1 d + 1 requires every edge in F i F_i F i to be routed from A d ( c i ) A_d(c_i) A d ( c i ) to A d + 1 ( c i ) A_{d+1}(c_i) A d + 1 ( c i ) . 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 M d M_d M d mutually independent requirements on the random directions. With probability 2 − M d 2^{-M_d} 2 − M d , all requirements are fulfilled.
Partition I d I_d I d by the parity of the index and let S S S be a larger class, so ∣ S ∣ ≥ ∣ I d ∣ / 2 |S|\ge|I_d|/2 ∣ S ∣ ≥ ∣ I d ∣/2 . For i ∈ S i\in S i ∈ S , let E i \mathcal{E}_i E i be the event that ( z i , c i ) (z_i,c_i) ( z i , c i ) is a critical failure. For distinct i , j ∈ S i,j\in S i , j ∈ S , we have ∣ i − j ∣ > 1 |i-j|>1 ∣ i − j ∣ > 1 . As a result, property 6 ensures that the distance between z i z_i z i and z j z_j z j is greater than one when c i = c j c_i=c_j c i = c j , and their incident edges in E ‾ c i ∪ \overline{E}^{\cup}_{c_i} E c i ∪ are disjoint. If c i ≠ c j c_i\ne c_j c i = c j , E ‾ c i ∪ \overline{E}^{\cup}_{c_i} E c i ∪ and E ‾ c j ∪ \overline{E}^{\cup}_{c_j} E c j ∪ are always disjoint because two nodes are at the same depth. Therefore, the events { E i : i ∈ S } \{\mathcal{E}_i:i\in S\} { E i : i ∈ S } depend on disjoint sets of level-d d d random choices and are mutually independent. By Lemma 20 ,
Pr [ ⋂ i ∈ S E i ] ≤ exp ( − Ω ( τ d ∣ S ∣ ) ) = exp ( − Ω ( τ d ∣ I d ∣ ) ) . \Pr\left[\bigcap_{i\in S}\mathcal{E}_i\right]\le\exp(-\Omega(\tau_d|S|))=\exp(-\Omega(\tau_d|I_d|)). Pr [ i ∈ S ⋂ E i ] ≤ exp ( − Ω ( τ d ∣ S ∣ )) = exp ( − Ω ( τ d ∣ I d ∣ )) . It remains to account for dependencies between the routing requirements and the critical failures. We claim that for each i ∈ S i\in S i ∈ S , all but six routing requirements are independent of E i \mathcal{E}_i E i . To see this, if an edge in F j F_j F j with d j > d d_j>d d j > d is incident to z i z_i z i in E ‾ c i ∪ \overline{E}^{\cup}_{c_i} E c i ∪ , then c j c_j c j is a descendant of c i c_i c i , and property 5 implies ∣ j − i ∣ ≤ 1 |j-i|\le1 ∣ j − i ∣ ≤ 1 . Since d i = d d_i=d d i = d , we have j ≠ i j\ne i j = i , so this edge can only come from F i − 1 ∪ F i + 1 F_{i-1}\cup F_{i+1} F i − 1 ∪ F i + 1 . The claim follows because property 4 bounds the degree of z i z_i z i in each of these two edge sets by three.
After discarding at most 6 ∣ S ∣ 6|S| 6∣ S ∣ routing requirements, the remaining requirements and the critical failure events are mutually independent. As a result, the probability that W \mathcal{W} W becomes a ( d + 1 ) (d+1) ( d + 1 ) -witness is at most
exp ( − Ω ( τ d ∣ I d ∣ ) ) 2 − M d + 6 ∣ S ∣ = exp ( − Ω ( τ d ∣ I d ∣ ) ) 2 − M d . \exp(-\Omega(\tau_d|I_d|))2^{-M_d+6|S|}=\exp(-\Omega(\tau_d|I_d|))2^{-M_d}. exp ( − Ω ( τ d ∣ I d ∣ )) 2 − M d + 6∣ S ∣ = exp ( − Ω ( τ d ∣ I d ∣ )) 2 − M d . □ \square □
For an edge g ∈ ⋃ i F i g \in\bigcup_i F_i g ∈ ⋃ i F i , define its witness depth by d W ( g ) = max { d i : g ∈ F i } d_W(g)=\max\{d_i:g \in F_i\} d W ( g ) = max { d i : g ∈ F i } . Applying Lemma 30 successively gives the following corollary.
Corollary 9. There is an absolute constant C 2 > 0 C_2>0 C 2 > 0 such that, for every fixed 0-witness W \mathcal{W} W ,
Pr [ W is a witness ] ≤ ( ∏ i = 1 ℓ exp ( − C 2 τ d i ) ) ( ∏ g ∈ ( ⋃ i = 1 ℓ F i ) ∖ { e } 2 − d W ( g ) ) . \Pr[\mathcal{W}\text{ is a witness}] \leq\left(\prod_{i=1}^{\ell}\exp(-C_2\tau d_i)\right)\left(\prod_{g\in\left(\bigcup_{i=1}^{\ell}F_i\right)\setminus\{e\}}2^{-d_W(g)}\right). Pr [ W is a witness ] ≤ ( i = 1 ∏ ℓ exp ( − C 2 τ d i ) ) g ∈ ( ⋃ i = 1 ℓ F i ) ∖ { e } ∏ 2 − d W ( g ) .
Proof. The statement is immediate when the probability is zero; otherwise, the probability that W \mathcal{W} W is a d d d -witness is always nonzero for every d ∈ [ 0 , R ] d\in[0,R] d ∈ [ 0 , R ] according to Lemma 28 . By Lemmas 28 and 29, the probability that W \mathcal{W} W is a witness is the product of Pr [ W is an i -witness ∣ W is an ( i − 1 ) -witness ] \Pr[\mathcal{W}\text{ is an }i\text{-witness}\mid\mathcal{W}\text{ is an }(i-1)\text{-witness}] Pr [ W is an i -witness ∣ W is an ( i − 1 ) -witness ] for every 1 ≤ i ≤ R 1\leq i\leq R 1 ≤ i ≤ R . Applying Lemma 30 bounds this probability by
∏ d = 0 R − 1 exp ( − C 2 τ d ∣ I d ∣ ) 2 − M d = ( ∏ i = 1 ℓ exp ( − C 2 τ d i ) ) ( ∏ g ∈ ( ⋃ i F i ) ∖ { e } 2 − d W ( g ) ) . \prod_{d=0}^{R-1}\exp(-C_2\tau d|I_d|)2^{-M_d}=\left(\prod_{i=1}^{\ell}\exp(-C_2\tau d_i)\right)\left(\prod_{g\in\left(\bigcup_i F_i\right)\setminus\{e\}}2^{-d_W(g)}\right). d = 0 ∏ R − 1 exp ( − C 2 τ d ∣ I d ∣ ) 2 − M d = ( i = 1 ∏ ℓ exp ( − C 2 τ d i ) ) g ∈ ( ⋃ i F i ) ∖ { e } ∏ 2 − d W ( g ) .
Counting Witnesses
Lemma 31. Fix x ∈ V ( G ) x\in V(G) x ∈ V ( G ) , a ∈ T ∖ L T a\in T\setminus L_T a ∈ T ∖ L T , and the randomness of the updated edge, and write d ′ = dep ( a ) d'=\operatorname{dep}(a) d ′ = dep ( a ) . For every d < R d<R d < R , the expected number of R R R -witnesses from ⟨ w , a ⟩ \langle w,a\rangle ⟨ w , a ⟩ to vertices ⟨ x , b ⟩ \langle x,b\rangle ⟨ x , b ⟩ with dep ( b ) = d \operatorname{dep}(b)=d dep ( b ) = d is exp ( − Ω ( τ d ′ + τ d ) ) \exp(-\Omega(\tau d'+\tau d)) exp ( − Ω ( τ d ′ + τ d )) .
Proof. We enumerate all 0-witnesses from ⟨ w , a ⟩ \langle w,a\rangle ⟨ w , a ⟩ to ⟨ x , b ⟩ \langle x,b\rangle ⟨ x , b ⟩ and sum the bound in Corollary 9. Fix the length ℓ \ell ℓ of the witness and the depth sequence d 1 , … , d ℓ d_1,\ldots,d_\ell d 1 , … , d ℓ with d 1 = d ′ d_1=d' d 1 = d ′ and d ℓ = d d_\ell=d d ℓ = d . We have c 1 = a c_1=a c 1 = a and w 0 = w w_0=w w 0 = w . Suppose c i c_i c i and w i − 1 w_{i-1} w i − 1 have been chosen. We enumerate P i L P_i^L P i L from w i − 1 w_{i-1} w i − 1 to z i z_i z i , then enumerate P i R P_i^R P i R from z i z_i z i to w i w_i w i , and compute the product in Corollary 9 incrementally for every possible witness along the way.
We extend P i L P_i^L P i L and P i R P_i^R P i R by one edge at a time. By property 7, an edge in P i L P_i^L P i L or P i R P_i^R P i R does not belong to ⋃ j < i − 1 F j \bigcup_{j<i-1}F_j ⋃ j < i − 1 F j . As a result, the new edge is either the updated edge e e e , one of at most six edges in F i − 1 ∪ F i F_{i-1}\cup F_i F i − 1 ∪ F i according to property 4, or an edge that has not appeared before. In the last case, we have at most Δ \Delta Δ choices, and, denoting this edge by g g g , we need to charge 2 − d i 2^{-d_i} 2 − d i since d W ( g ) d_W(g) d W ( g ) grows from zero to d i d_i d i . When an edge reappears at a larger depth, we omit its additional routing penalty for an upper bound. Each extension therefore contributes a multiplicative Δ / 2 d i + 7 = O ( U d i ) \Delta/2^{d_i}+7=O(U_{d_i}) Δ/ 2 d i + 7 = O ( U d i ) to the sum of probabilities. There are at most ( ρ d i + 1 ) 2 (\rho_{d_i}+1)^2 ( ρ d i + 1 ) 2 choices for the two path lengths and at most 2 ρ d i 2\rho_{d_i} 2 ρ d i extensions. Since ρ d i = O ( log 3 U d i ) \rho_{d_i}=O(\log^3 U_{d_i}) ρ d i = O ( log 3 U d i ) , the weighted number of choices for T i T_i T i , z i z_i z i , and w i w_i w i is at most
( ρ d i + 1 ) 2 O ( U d i ) 2 ρ d i = exp ( O ( log 4 U d i ) ) . (\rho_{d_i}+1)^2O(U_{d_i})^{2\rho_{d_i}}=\exp(O(\log^4 U_{d_i})). ( ρ d i + 1 ) 2 O ( U d i ) 2 ρ d i = exp ( O ( log 4 U d i )) .
For i < ℓ i<\ell i < ℓ , we additionally need to choose a node c i + 1 c_{i+1} c i + 1 of depth d i + 1 d_{i+1} d i + 1 comparable with c i c_i c i . If d i + 1 ≤ d i d_{i+1}\leq d_i d i + 1 ≤ d i , the choice is unique. Otherwise, the number of choices is 2 d i + 1 − d i ≤ 2 R − d i ≤ Δ / 2 d i ≤ U d i 2^{d_{i+1}-d_i}\leq2^{R-d_i}\leq\Delta/2^{d_i}\leq U_{d_i} 2 d i + 1 − d i ≤ 2 R − d i ≤ Δ/ 2 d i ≤ U d i . Finally, accounting for the critical-failure probability exp ( − Ω ( τ d i ) ) \exp(-\Omega(\tau d_i)) exp ( − Ω ( τ d i )) in the weight and multiplying over 1 ≤ i ≤ ℓ 1\leq i\leq\ell 1 ≤ i ≤ ℓ , we conclude that the sum of probabilities over all 0-witnesses with the fixed length and depth sequence is
∏ i = 1 ℓ exp ( − Ω ( τ d i ) + O ( log 4 U d i ) ) ≤ ∏ i = 1 ℓ exp ( − Ω ( τ d i ) ) . \prod_{i=1}^{\ell}\exp(-\Omega(\tau d_i)+O(\log^4 U_{d_i}))\leq\prod_{i=1}^{\ell}\exp(-\Omega(\tau d_i)). i = 1 ∏ ℓ exp ( − Ω ( τ d i ) + O ( log 4 U d i )) ≤ i = 1 ∏ ℓ exp ( − Ω ( τ d i )) .
Summing over all possible depth sequences d 2 , d 3 , … , d ℓ − 1 d_2, d_3, \ldots, d_{\ell-1} d 2 , d 3 , … , d ℓ − 1 , the total sum of probabilities for all 0 0 0 -witnesses of length ℓ \ell ℓ is exp ( − Ω ( τ d ′ + τ d ) ) C ℓ − 2 \exp(-\Omega(\tau_{d'}+\tau_d))C^{\ell-2} exp ( − Ω ( τ d ′ + τ d )) C ℓ − 2 , where C = ∑ h = 0 R − 1 exp ( − Ω ( τ h ) ) ≤ 1 / 2 C=\sum_{h=0}^{R-1}\exp(-\Omega(\tau_h))\le1/2 C = ∑ h = 0 R − 1 exp ( − Ω ( τ h )) ≤ 1/2 when ϵ \epsilon ϵ is small enough. As a consequence, summing over all lengths ℓ ≥ 2 \ell\ge2 ℓ ≥ 2 gives an expected number of witnesses at most exp ( − Ω ( τ d ′ + τ d ) ) \exp(-\Omega(\tau_{d'}+\tau_d)) exp ( − Ω ( τ d ′ + τ d )) . When ℓ = 1 \ell=1 ℓ = 1 , necessarily d ′ = d d'=d d ′ = d , and its contribution is at most exp ( − Ω ( τ d ) ) \exp(-\Omega(\tau_d)) exp ( − Ω ( τ d )) . This proves the claim.
Proof of Lemma 21 . Fix ⟨ w , a ⟩ \langle w,a\rangle ⟨ w , a ⟩ and d ∈ [ 0 , R − 1 ] d\in[0,R-1] d ∈ [ 0 , R − 1 ] , and write d ′ = dep ( a ) d'=\operatorname{dep}(a) d ′ = dep ( a ) . For every ⟨ x , b ⟩ ∈ K ^ ( ⟨ w , a ⟩ ) \langle x,b\rangle\in\widehat{K}(\langle w,a\rangle) ⟨ x , b ⟩ ∈ K (⟨ w , a ⟩) with dep ( b ) = d \operatorname{dep}(b)=d dep ( b ) = d , Lemma 27 supplies an R R R -witness from ⟨ w , a ⟩ \langle w,a\rangle ⟨ w , a ⟩ to ⟨ x , b ⟩ \langle x,b\rangle ⟨ x , b ⟩ . Witnesses ending at distinct vertices are distinct; thus, the number of depth-d d d vertices in the component is at most the number of R R R -witnesses ending at depth d d d . Taking expectations and applying Lemma 31 proves the conditional bound. Averaging over the choices fixed for e e e proves the unconditional bound.
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 § 7 . We have verified all parts and assume responsibility for the content.