The Exact Stabilization Time of Self-Stabilizing Coloring: Mean, Variance, and Distribution#
Abstract#
Keywords: self-stabilization, graph coloring, stabilization time, random daemon, average-case analysis, random permutations, random graphs
1 Introduction#
A self-stabilizing algorithm reaches a legitimate configuration (for a given specification) from any initial one and remains legitimate afterwards [Alt+19, Dij74, Dol00]. At each step a daemon chooses which of the enabled processes move. The stabilization time is the number of moves to legitimacy, in the worst case over the initial configuration and the daemon’s choices.
We consider the classical self-stabilizing -coloring rule on a graph whose vertices are the processes, each holding a color from a palette of at least colors, being the maximum degree [Alt+19, Dol00, GT00, HJS03]. A process whose color is shared by a neighbor is enabled and, when activated, recolors itself with any color absent from its neighborhood (such a color always exists). Under the central daemon of Dijkstra’s original paper [Dij74] (exactly one enabled process per step), the worst case is easy: a recolored process is never in conflict again, so every process moves at most once [HJS03]. For any , the longest execution, over initial configurations and schedules, makes moves, where and is the number of connected components of . In other words, the worst case sees nothing of beyond . We wonder what the graph determines once the daemon’s choices are random. Beyond the worst case, self-stabilization mostly studies the expected stabilization time of randomized algorithms, Herman’s token ring being the classic example [Her90]: the expectation is over their coins, under a synchronous or worst-case daemon. Here, in contrast, we analyze a deterministic algorithm under a random daemon.
To study typical behavior, we consider the random version of the central daemon that draws the next mover uniformly among the enabled processes. The stabilization time of a deterministic algorithm then becomes a random variable [DTY15, Yam+12]. Observe that the random central daemon is a scheduling abstraction, not a centralized algorithm: each process reads only its neighbors’ colors, and every step is one recoloring by a process in conflict. Counted in recolorings, the stabilization time has the same law when each process is activated by the ticks of its own rate-1 Poisson clock (Proposition 1). Our objective is the law of this random variable: its mean and variance on every graph and from every initial configuration, its full distribution on several families of graphs.
The key to our approach is as follows: draw a uniformly random ordering of the processes, and let the daemon always serve the enabled process that comes first in it. The execution has the same law as under the random central daemon, and the ordering alone decides which processes move. We call a process a peak when it comes after every neighbor that shares its initial color. A process recolors if and only if it is not a peak, so the stabilization time is exactly minus the number of peaks of a random ordering, whatever free color each move picks.
From a monochrome start (one common color), the peaks are the local maxima of a random labeling of the graph, an object probability and combinatorics know well: on a path they are the peaks of a random permutation [DB62, Eli16], on a general graph their number is a standard example for Stein’s method [BRS89], and its expectation is the Caro-Wei bound on the independence number [Car79, Wei81]. We recall the classical results where they are used (Section 3, Section 5). To our knowledge, the link between peaks and stabilization time is new, and all our contributions follow from it.
The mean alone says little: from a monochrome start, on a graph without isolated vertices, it lies between and , always within a factor two of the worst case (Proposition 3). We therefore study the whole distribution, and the more we know of the graph, the finer the prediction. The mean needs only the degree distribution (Theorem 1). The variance needs only, for each pair of processes at distance at most two, the sizes of their common and private neighborhoods, in particular the triangles (Theorem 3, Eq. (6)). The law needs the whole graph. The approach is general: the same proofs cover every graph and every initial configuration, whether monochrome, uniformly random with any number of colors, or fixed, through the subgraph of initially conflicting edges (Proposition 2); the monochrome start is the slowest for every ordering of the processes.
On graphs of bounded degree, the stabilization time is concentrated within order of its mean, and is asymptotically normal as soon as its variance grows linearly (Corollary 2). For a monochrome start, the extremes are explicit (Section 4): the variance vanishes exactly on disjoint unions of cliques, never exceeds , and is maximized by the star for every . Finally, on five families of graphs, we push the analysis to the law itself whenever possible (Section 5). Besides paths and cycles, these include three random models: uniform random trees, Erdős-Rényi graphs and their bipartite version. Random graphs are a common testbed for simulations in self-stabilization, yet they are rarely analyzed, a recent exception being [GZ23].
Related work. Stabilization time of self-stabilizing coloring. Self-stabilizing vertex coloring was first studied for feasibility on particular graph classes [GK93, SS93], then on arbitrary graphs with explicit stabilization bounds. Gradinariu and Tixeuil [GT00] give deterministic -coloring algorithms that stabilize in moves under an unfair daemon, and a randomized one that stabilizes in expected steps of the distributed daemon, a step possibly moving many processes, the expectation being over the algorithm’s coin flips, against the worst schedule. Hedetniemi, Jacobs and Srimani [HJS03] give two algorithms for the central daemon, one reaching a Grundy coloring in a number of moves linear in the number of edges, the other a -coloring in at most moves. Bernard, Devismes, Paroux, Potop-Butucaru and Tixeuil [Ber+10] analyze a probabilistic coloring algorithm on anonymous networks with one-way links under the unfair distributed daemon. The algorithm’s expected stabilization time, again over its coins and from the worst initial configuration and schedule, goes from moves with colors down to as the palette grows. Other work on the problem is worst-case too: unidirectional coloring [Ber+09], transformers from local or synchronous to self-stabilizing algorithms [Joh+24, LSW09], dynamic and locally iterative coloring [BEG22, FYZ25]. Two notions of expected stabilization time coexist. In the randomized algorithms above the expectation is over the algorithm’s coins, under a fixed or adversarial daemon [DIM95], whereas in our work the algorithm is deterministic and the expectation is over a random daemon, possibly also over a random initial configuration or a random graph, so that for a given algorithm it is at most the worst case.
Average-case analyses in self-stabilization. The most studied case is Herman’s randomized token circulation on rings [Her90], whose expected stabilization time under synchrony has been bounded with increasing precision [FMP04, FZ15, Kie+11, Nak05]. Fribourg, Messika and Picaronny [FMP04, FMP06] use coupling to bound two measures of randomized self-stabilizing algorithms: the expected stabilization time and the time after which stabilization has occurred with probability at least . Both bounds are worst case over the initial configuration, with the probability taken over the algorithm’s coins. Modeling the algorithm as a Markov decision process whose policies are the daemon’s choices, Fribourg and Messika [FM05] extend these bounds to arbitrary daemons, and Beauquier, Johnen and Messika [BJM06] reduce the expected stabilization time against the best or the worst daemon to a stochastic shortest-path problem. Exhaustive, symbolic or synthesis-based methods compute such recovery measures on bounded instances [ABT15, Fag+18, FB15, FBT13, Vol+22]. Turau bounds the mean time to repair a single fault for randomized coloring under synchrony [Tur18]. Instead of solving a Markov chain or decision process, or exploring bounded instances, we reduce the stabilization time to the number of peaks of a random ordering. Speculative stabilization [DG13] designs algorithms to be fast under a more likely daemon while keeping the worst-case guarantee, whereas here the algorithm is fixed and we measure how long its typical executions take. Closer to ours in spirit, Burman et al. [Bur+21] analyze leader election in population protocols under the uniform random pairwise scheduler, which is a random daemon, and Giakkoupis and Ziccardi [GZ23] give graph-dependent bounds for a synchronous randomized maximal-independent-set process from arbitrary initial states: expected rounds on cliques and trees, polylogarithmic rounds with high probability on .
Organization. Section 2 fixes the model. Section 3 gives the reduction and the mean and variance theorems, Section 4 the extremal results, Section 5 treats the five families, and Section 6 discusses the other daemons and what is left open. The body proves Lemma 1, Theorem 4, Theorem 5 and the short corollaries, and sketches the other proofs. The complete proofs, the variance formulas of the -colored tree and of the two random-graph families, the Poisson Galton-Watson tree, the figures and the numerical checks are in the appendix, which keeps the section order of the body. The AI-disclosure section follows the references.
2 Model#
The rule and the terminology below are standard in self-stabilization [Alt+19, Dij74, Dol00], and self-stabilizing -coloring under a central daemon goes back to [GT00, HJS03]. Up to its palette, the rule below is the second algorithm of [HJS03].
Network. The network is an undirected graph with vertices. Two vertices are neighbors if . The neighborhood of is , its degree , and is the maximum degree. Each vertex hosts a process, and we identify the two.
State, guard, action. Each process holds a color drawn from a palette of size . We consider the classical self-stabilizing coloring rule with the conflict (or clash) guard: a process is enabled iff it shares its color with at least one neighbor. When activated, an enabled process recolors itself with any color absent from its neighborhood. We take the palette large enough that a free color always exists, , so an enabled process always has a color to move to. A configuration is legitimate iff no process is enabled, that is, iff the coloring is proper.
Daemon. We use the central (sequential) daemon, under which exactly one enabled process executes its action at each step, in its random version: the process is drawn uniformly at random among the enabled ones. The stabilization time is the number of activations, which is also the number of steps, until the configuration is legitimate. We write when the dependence on matters. By Lemma 1 below, does not depend on which free color a process picks. The random central daemon is our model, but two scheduler-free settings give the same number of recolorings in law (Proposition 1): a daemon that draws at each step a process uniformly among all , enabled or not, and a network in which every process wakes up at the ticks of its own Poisson clock of rate and moves if it is enabled, reading its neighbors and writing its color in one atomic step (composite atomicity).
Rounds. Rounds carry no information here: the set of enabled processes only shrinks along an execution (Lemma 1), so every execution from a non-legitimate configuration takes exactly one round (a round ends once every process enabled at its start has moved or ceased to be enabled), under any central daemon.
Initial configuration and colors. The algorithm may start from any configuration. Two reference distributions give explicit averaged formulas: the monochrome configuration, where all processes start with the same color, and the random configuration, where each process starts with an independent uniform color among colors (not necessarily a proper coloring). Here , and is the monochrome case. The palette size guarantees a free color and nothing else, so depends on only through this inequality, while enters our formulas through the probability that a given edge is initially in conflict.1
Variants. The choice of guard matters, the choice of action does not. Under the Grundy-type guard, where a process is enabled as soon as its color is not the smallest one absent from its neighborhood, a process may move several times and our analysis does not apply. Under the other daemons the law of is not covered: the order of the moves is no longer uniform (locally central), or neighbors may move together (synchronous, distributed). Section 6 discusses these cases.
3 General theorems for the mean and the variance#
Throughout, the vertices carry an initial coloring (fixed, monochrome, or i.i.d. uniform among colors) and a uniform random labeling by distinct integers, which the next lemma links to the daemon. Equivalently, the labels are i.i.d. uniform on , since only their relative order matters, and the proofs use this version. A vertex is a peak if its label is larger than the label of every neighbor sharing its color (in the ordering of the introduction, a large label is a late turn). A vertex with no same-colored neighbor is a peak. The number of peaks is written , , or according to what is fixed (the size, the labeling, the graph).
3.1 The reduction lemma#
Fix an initial coloring, a palette and a free-color recoloring policy that depends only on the current configuration and on internal coins independent of the labeling. Let be a labeling of by distinct integers and consider the smallest-label schedule, which at each step activates the enabled vertex of smallest label.
- Each vertex is activated at most once, and a vertex that is not enabled never becomes enabled.
- A vertex is activated if and only if it is not a peak of the initial coloring under . The schedule therefore performs moves, being the number of peaks.
- If is a uniform random labeling, the smallest-label schedule has the law of the random central daemon, so that in law, being the number of peaks of a uniform random labeling.
Proof. (1) A move recolors its process with a color absent from the neighborhood, so it never creates a conflict: a process that has moved has no conflict and never regains one, and a process without conflict never acquires one. Writing for the set of processes activated before step and for the set of enabled ones, consists of the processes outside that have a same-colored neighbor outside , and , where is the process activated at step .
(2) If is a peak, every same-colored neighbor of has a smaller label and, as long as holds its initial color, is enabled until it acts. Under the smallest-label schedule acts before and recolors away from ’s color, so once all of them have acted has no conflict and is never activated. If is not a peak, it has a same-colored neighbor of larger label. The two stay in conflict until one of them acts, cannot act first, and the schedule stops after at most moves by (1), so acts.
(3) The history of the schedule before step , that is, the activated processes and the colors they chose, determines . Given the policy’s coins, independent of , this history is the event that for all and all . Since for every by (1), permuting the labels of among themselves leaves this event unchanged. Conditionally on the history, the relative order of the labels of is therefore uniform, and the process of smallest label in , the one the schedule activates, is uniform on . This is one step of the random central daemon, and the two executions have the same law by induction on .
The policy entered the proof only through “picks a free color”, and the daemon only through the uniform order of first activations, which two scheduler-free models share.
The proof (Appendix A) labels every process by the rank of its first draw or first tick, a uniform random permutation, and observes that a process moves at its first activation iff it is not a peak, and never again.
Let be an initial configuration and its conflict graph, the spanning subgraph of whose edges join two vertices with the same color under , and let be the number of local maxima of a labeling on , its independence number and its number of connected components.
- in law: every monochrome result of this paper applies to once is replaced by , and in particular with the number of neighbors of sharing its color (Theorem 1 below).
- for every labeling, so under a common labeling the monochrome configuration stabilizes last: it has the largest for every .
- Over all central and locally central daemons (the latter activate at each step a set of pairwise non-adjacent enabled processes), random or not, the number of moves from takes exactly the values . The worst case over configurations and schedules is .
Parts (1) and (2) are Lemma 1 read on and the fact that a local maximum of is one of its spanning subgraph . The comparison in (2) is in law, not in variance: on , recoloring one vertex of the smaller side raises the variance from to . For (3), labeling the processes of any execution in activation order makes it a smallest-label schedule by Lemma 1(1). A step of a locally central daemon can be serialized without changing the moves, and the sets of local maxima of labelings are exactly the independent sets that meet every component (Appendix A).
With the number of initially conflicting processes, the worst case reads , counting the components of that have an edge. The folklore bound of moves (in each conflict component at least one process never moves) is thus tight exactly when there is one such component. The best schedule needs moves (NP-hard to compute) and the worst (linear time). By part (1) the random daemon exceeds the best schedule on average by exactly , the slack of the Caro-Wei bound.
The peaks of a monochrome labeling are also a known object elsewhere: the vertices selected in the first round of the random-priority algorithm for maximal independent set [ABI86, Lub86, Mét+11]. The same random order drives the greedy algorithms whose parallel depth is studied by [BFS12] and [FN20], where every vertex eventually acts and the depth is the quantity of interest, whereas here the quantity is the number of moves.
3.2 The mean#
Let be a graph on vertices, possibly random, and let be the probability that a uniformly random vertex has degree (averaged over when is random). Give every vertex an independent uniform color among . The expected number of peaks is
The proof (Appendix A) conditions on the degree of a uniform vertex and on its number of same-colored neighbors, which it beats with probability . The mean depends on the graph only through its degree distribution . The factor is the probability that a given edge is initially in conflict: for the mean, a -coloring on behaves like the monochrome case on the random subgraph where each edge is kept with probability (on a forest the kept edges are independent and the equality holds in law, see Section 5.2). We write for the peak probability of a degree- vertex, so that .
3.3 The variance#
By Lemma 1, , and , so the variance follows from the second factorial moment . Whether two vertices are both peaks depends on how their neighborhoods overlap, so the variance, unlike the mean, sees more of the graph than degrees. For an ordered pair of distinct vertices , let be the number of neighbors of that are neither nor a neighbor of , the symmetric count for , and the number of common neighbors. In the monochrome case only non-adjacent pairs contribute, since two adjacent vertices of the same color are never both peaks.
In the monochrome case, the two vertices of an ordered non-adjacent pair with parameters are both peaks with probability
and those of an adjacent pair never are. With the probability that a random ordered pair is non-adjacent with parameters ,
The proof (Appendix A) conditions on the uniform labels of : a private neighbor of ranks below with probability , a common neighbor below both with probability , and is the integral of over the unit square. With colors the same computation applies to , the probability that a given neighbor of a vertex of label fails to beat it (wrong color, or same color and lower label). Then is uniform on . A common neighbor beats neither of two same-colored vertices with probability , and neither of two differently colored ones with probability .
With every vertex colored uniformly among colors, the two vertices of an ordered pair with parameters are both peaks with probability if non-adjacent and if adjacent, where (resp. ) is the probability that and are both peaks and received the same color (resp. distinct colors):
Then, with the probability that a random ordered pair is adjacent with parameters ,
The variance is therefore a sum over the pairs at distance at most two,
and it sees the profile of these pairs, in particular the triangle count, and nothing else: the cycle and two disjoint triangles, both -regular, have the same mean and variances and . The maximum degree nevertheless bounds the fluctuations.
Let have maximum degree , with a fixed initial configuration or a uniform random -coloring.
- For every , .
- The Kolmogorov distance (the supremum distance between distribution functions) between the law of and the standard normal law is at most for an absolute constant . Along a sequence of graphs of bounded degree, is therefore asymptotically normal whenever , in particular when is of order .
The proof (Appendix A) is the bounded differences inequality [McD89], the rank and color of a vertex influencing at most peak indicators, and the normal approximation theorem for sums of variables with a dependency graph (a graph on the summands in which families with no edge between them are independent) [BR89, Rin94], indicators at distance at least depending on disjoint sets of variables. The number of local maxima of a random labeling is a standard example of this method [BRS89, Gol05].
4 Extremal graphs#
Fix the number of vertices . We work in the monochrome regime (), where a peak is a local maximum. By Proposition 2 the statements apply to any fixed configuration, once the graph is replaced by its conflict graph restricted to the initially conflicting processes and by their number. The statements about the mean extend to every , while those about the variance are specific to , a single edge having positive variance once . We use repeatedly that (Theorem 1, the Caro-Wei bound) and that the peaks form an independent set containing the vertex of largest label, so . Throughout, is a fixed graph and the randomness is the labeling (randomized analogues in Appendix B).
4.1 Extremes of the mean#
The proof (Appendix B) is the termwise bound , and the same for , which is decreasing.
4.2 Zero variance#
4.3 Maximal variance: the star#
At the other end the variance can be of order . On the star the stabilization time is essentially the rank of the center’s label, so it does not concentrate at all. To avoid clashing with the peak count , we write for the star on vertices (one center, leaves), that is, the complete bipartite graph .
On the monochrome star , for and . Hence
A leaf is a peak iff its label exceeds the center’s, so is the label rank of the center, except that the rank also gives (Appendix B). Since every leaf is compared with the same center, is almost uniform on . The matching upper bound for general graphs comes from a classification of the pairwise covariances, computed from Theorem 2 (proof in Appendix B).
Let be distinct vertices with peak indicators . If and are adjacent, . If they are non-adjacent with parameters , then
The proof (Appendix B) sorts the vertices into leaves (degree one) and the others, bounds the variance through Lemma 2 in terms of the number of leaves and of the largest number of leaves at a single vertex, and compares the bound with the star: it falls short of the star’s variance for every unless the graph is the star itself, and exhaustive enumeration settles . Isolated vertices are peaks of every labeling, so a graph that has some is compared with a smaller star.
5 Applications to graph families#
The mean of each family comes from Theorem 1 alone and the variance from Theorem 3 through the local formula Eq. (6), and only has triangles, that is, adjacent pairs with common neighbors. On paths, cycles and random trees the variance grows linearly in and, from a monochrome start, the law is asymptotically normal. In the two Erdős-Rényi models at fixed , the expected number of peaks stays bounded and the peak count converges in law without normalization. The companion code checks the formulas below numerically (Appendix G).
5.1 Path and cycle#
The cycle () is -regular, and the path () has two vertices of degree and of degree . Both are triangle-free for . Monochrome, they are the classical settings of peaks in permutations [CS74, DB62], the simplest consecutive pattern [Eli16, EN12], and in cyclic permutations [Dom+22]. The monochrome means, variances and central limit theorems below are classical [FKL22, WS96], the -colored statements are new.
Under a uniform random -coloring,
Under a uniform random -coloring, with for the cycle and for the path,
This follows from Eq. (6) by a census of the pairs at distance one and two (Appendix C). The two families share the leading coefficient and differ by a constant boundary term, exactly as for the mean.
Beyond the moments, the path and the cycle have explicit laws, read off generating functions as follows. We root each path at an endpoint, so that labeled monochrome paths correspond bijectively to permutations. For a family of labeled, possibly colored, graphs let , the labels of a labeled graph serving as , and write for the coefficient of in . Then , which gives the law of and of .
The generating function of monochrome paths (permutations by peaks, a peak being a local maximum with endpoints included) is
the solution of the Riccati equation , [Ent69, Zhu16]. The generating functions of -colored paths and of monochrome oriented cycles are
and that of -colored oriented cycles is
Cycles are oriented, which does not change the peak count, and the series describe for . Up to the factor due to the endpoints, is the generating function of interior peaks (OEIS A008303). counts cyclic peaks [Eli16, Ent69]. Opening a cycle at its minimum is the idea of [ES21], whose theorem does not cover peaks. The -colored series are derived in Appendix C.
This is Corollary 2 with : the variance coefficient of Corollary 4 is positive for every (it is at and its numerator has derivative ), and the Kolmogorov distance to the Gaussian is . For the monochrome path this is the theorem of Warren and Seneta [WS96].
5.2 Random trees#
We take the uniform random rooted labeled tree on vertices (a Cayley tree, not to be confused with the infinite regular tree). There are such trees. A peak depends only on the labeling, not on the root, so the law of the peak count is the same for the unrooted labeled trees. Let , with , be the Cayley tree function [Drm09, FS09]. Marking every peak by , the generating function of monochrome trees by their peak count is
Monochrome, the number of rooted labeled trees of size with exactly peaks is , where is the Stirling number of the second kind, so
This is Theorem 5.2.1 of [Sei11], stated there for local minima. The law is the classical law of the number of leaves of a uniform rooted labeled tree [FS09, Rén59], and Eq. (14) is the leaf generating function, the solution of . See [Pan21] for the law of other small patterns in rooted trees.
This is Corollary 5.2.2 of [Sei11], which also gives a direct bijection. The moments follow, and the mean and the variance are explicit under a random coloring as well.
Monochrome, and , so
Under a uniform random -coloring, since the degree of a fixed vertex of a uniform labeled tree is ,
and
The monochrome moments are read off Eq. (14). The -colored mean combines Theorem 1 with the degree law of a vertex of a Cayley tree, and the -colored variance Theorem 3 with the joint degree law of two vertices at distance one or two. The exact value of this variance is a double integral (Proposition 10 in Appendix D).
This is the classical central limit theorem for the number of leaves of a conditioned Galton-Watson tree [Drm09], imported through Proposition 5 as in [Sei11] (Corollary 5.2.3). Appendix D also treats the Poisson Galton-Watson tree, which gives the Cayley tree once conditioned on its size (Proposition 11).
The Cayley analysis extends to rooted labeled trees with an arbitrary offspring distribution, and the -colored law to a functional equation (Proposition 12 in Appendix D), which Lagrange inversion solves in the Cayley case.
Under a uniform random -coloring of the uniform random rooted labeled tree on vertices, with and the monochrome generating function Eq. (14),
Each non-root vertex has its parent’s color with probability , independently of the others: the conflicting edges are a random subset of the tree edges, and the -colored peak count is in law the monochrome peak count of this random forest. The trees containing a given spanning forest with component sizes number [Moo70, Pit99], and summing over the forests gives (Appendix D).
5.3 Erdős-Rényi 𝐺(𝑛,𝑝)#
In [JŁR00] a uniform vertex has degree . The peak count has an explicit generating function. List the vertices by decreasing label, let be the number of vertices preceding the -th one that share its color, and attribute each edge to its endpoint of smaller label: the -th vertex is a peak iff none of its edges to these vertices is present, and these edge sets are disjoint for distinct , so that, given the colors, the -th vertex is a peak independently of the others with probability . Marking peaks by , . Monochrome, , so has probability generating function
With colors, . Conditioning instead on the color composition , which is multinomial, gives the product of the monochrome series of the color classes,
These series, and all random-graph formulas below, describe the joint law over the graph, the coloring and the labeling (Appendix E).
Under a uniform random -coloring and a palette ,
The mean is . The variance is in Appendix E in two closed forms: a direct one, from the same reading of the series (Proposition 13), and one that averages Theorem 3 over the multinomial neighborhood profile of a random pair (Proposition 14), which the bipartite computation reuses. At fixed the expected number of peaks tends to and the variance tends to a constant, instead of growing linearly in .
Monochrome, with independent, being the indicator that the vertex with exactly higher-labeled vertices is a peak. As :
- For fixed , converges in distribution to the non-degenerate integer-valued law of , with probability generating function and mean , so that the stabilization time is minus an random quantity that never becomes deterministic.
- For with , converges to a standard normal law, with and .
With initial colors, is replaced by the sum of independent copies of itself in the first regime, and in the second the normal limit persists, with and .
The proof (Appendix E) reads the factorization of Eq. (20) as a sum of independent indicators, applies Borel-Cantelli at fixed and the central limit theorem for , and conditions on the color classes for .
5.4 Bipartite graphs#
For the bipartite Erdős-Rényi model , a uniform vertex lies in the first side (degree ) with probability and in the second side (degree ) with probability , where .
Under a uniform random -coloring and a palette ,
The proofs are in Appendix F, with the variance, which follows from the same averaging over the multinomial neighborhood counts as for , split according to the sides of the pair (Proposition 15). The peak count again has a product structure, now conditional on how the two sides and the colors interleave in the label order.
List the vertices by decreasing label and let be the number of vertices preceding the -th one that lie on the other side of the bipartition and share its color. Conditionally on the sequence of sides and colors, the -th vertex is a peak independently of the others with probability , so , the outer expectation being over the uniform interleaving of and sides and over the colors. If is fixed and , then, monochrome, converges in distribution to an almost surely finite random variable , with
In the regime the law should again be Gaussian, but the interleaving contributes to the variance at the same order as the conditional fluctuations, and we leave this regime open.
6 Conclusion and future work#
Everything here follows from Lemma 1, which holds for every initial configuration and makes the monochrome one the slowest for every labeling. We leave open the central limit theorem for the -colored tree, which the linear variance Eq. (18) and the -th power in Eq. (19) suggest, and the regime of the bipartite model.
On the model side, the Grundy-type guard and the daemons beyond the central one change the dynamics. Under the locally central daemon the executions, once serialized, and the range of the number of moves are the same as under the central daemon (Proposition 2), but a random locally central daemon no longer induces a uniform order, and its mean number of moves is open. Under the synchronous daemon and an adversarial distributed daemon the deterministic rule does not stabilize in anonymous networks, which is why the algorithms of [GT00] and [Ber+10] use identifiers or coins. Since it converges whenever the moves are serialized, it is weak-stabilizing, and under a randomized distributed daemon it stabilizes with probability one [DTY15]. The law of its number of moves is then open. Finally, the reduction needs only that a process which has moved never moves again and never enables a neighbor. Under the Grundy-type guard a process may move several times, and what replaces the peak count for such rules is open.
Bibliography#
- [ABI86] Noga Alon, László Babai, and Alon Itai. 1986. A fast and simple randomized parallel algorithm for the maximal independent set problem. Journal of Algorithms 7, 4 (1986), 567–583. https://doi.org/10.1016/0196-6774(86)90019-2
- [ABT15] Saba Aflaki, Borzoo Bonakdarpour, and Sébastien Tixeuil. 2015. Automated Analysis of Impact of Scheduling on Performance of Self-stabilizing Protocols. In Stabilization, Safety, and Security of Distributed Systems - 17th International Symposium, SSS 2015, Edmonton, AB, Canada, August 18-21, 2015, Proceedings (Lecture Notes in Computer Science), 2015. Springer, 156–170. https://doi.org/10.1007/978-3-319-21741-3_11
- [Alt+19] Karine Altisen, Stéphane Devismes, Swan Dubois, and Franck Petit. 2019. Introduction to Distributed Self-Stabilizing Algorithms. Morgan & Claypool. https://doi.org/10.2200/S00908ED1V01Y201903DCT015
- [BEG22] Leonid Barenboim, Michael Elkin, and Uri Goldenberg. 2022. Locally-iterative distributed (Δ+1)-coloring and applications. J. ACM 69, 1 (2022), 5:1–5:26. https://doi.org/10.1145/3486625
- [Ber+09] Samuel Bernard, Stéphane Devismes, Maria Gradinariu Potop-Butucaru, and Sébastien Tixeuil. 2009. Optimal deterministic self-stabilizing vertex coloring in unidirectional anonymous networks. In 23rd IEEE International Symposium on Parallel and Distributed Processing, IPDPS 2009, Rome, Italy, May 23-29, 2009, 2009. IEEE, 1–8. https://doi.org/10.1109/IPDPS.2009.5161053
- [Ber+10] Samuel Bernard, Stéphane Devismes, Katy Paroux, Maria Potop-Butucaru, and Sébastien Tixeuil. 2010. Probabilistic Self-stabilizing Vertex Coloring in Unidirectional Anonymous Networks. In Distributed Computing and Networking, 11th International Conference, ICDCN 2010, Kolkata, India, January 3-6, 2010. Proceedings (Lecture Notes in Computer Science), 2010. Springer, 167–177. https://doi.org/10.1007/978-3-642-11322-2_19
- [BFS12] Guy E. Blelloch, Jeremy T. Fineman, and Julian Shun. 2012. Greedy sequential maximal independent set and matching are parallel on average. In Proceedings of the 24th ACM Symposium on Parallelism in Algorithms and Architectures (SPAA 2012), 2012. ACM, 308–317. https://doi.org/10.1145/2312005.2312058
- [BJM06] Joffroy Beauquier, Colette Johnen, and Stéphane Messika. 2006. Brief Announcement: Computing Automatically the Stabilization Time Against the Worst and the Best Schedules. In Distributed Computing, 20th International Symposium, DISC 2006, Stockholm, Sweden, September 18-20, 2006, Proceedings (Lecture Notes in Computer Science), 2006. Springer, 543–547. https://doi.org/10.1007/11864219_40
- [BR89] Pierre Baldi and Yosef Rinott. 1989. On normal approximations of distributions in terms of dependency graphs. The Annals of Probability 17, 4 (1989), 1646–1650. https://doi.org/10.1214/aop/1176991178
- [BRS89] Pierre Baldi, Yosef Rinott, and Charles Stein. 1989. A normal approximation for the number of local maxima of a random function on a graph. In Probability, Statistics, and Mathematics: Papers in Honor of Samuel Karlin. Academic Press, 59–81. https://doi.org/10.1016/b978-0-12-058470-3.50012-4
- [Bur+21] Janna Burman, Ho-Lin Chen, Hsueh-Ping Chen, David Doty, Thomas Nowak, Eric E. Severson, and Chuan Xu. 2021. Time-Optimal Self-Stabilizing Leader Election in Population Protocols. In PODC '21: ACM Symposium on Principles of Distributed Computing, Virtual Event, Italy, July 26-30, 2021, 2021. ACM, 33–44. https://doi.org/10.1145/3465084.3467898
- [Car79] Yair Caro. 1979. New results on the independence number. Technical Report, Tel Aviv University.
- [CS74] Leonard Carlitz and Richard Scoville. 1974. Enumeration of permutations by rises, falls, rising maxima and falling maxima. Acta Mathematica Hungarica 25, 3–4 (1974), 269–277.
- [DB62] Florence N. David and David E. Barton. 1962. Combinatorial Chance. Charles Griffin, London.
- [DG13] Swan Dubois and Rachid Guerraoui. 2013. Introducing speculation in self-stabilization: an application to mutual exclusion. In Proceedings of the 2013 ACM Symposium on Principles of Distributed Computing (PODC 2013), 2013. ACM, 290–298. https://doi.org/10.1145/2484239.2484246
- [Dij74] Edsger W. Dijkstra. 1974. Self-stabilizing systems in spite of distributed control. Communications of the ACM 17, 11 (1974), 643–644. https://doi.org/10.1145/361179.361202
- [DIM95] Shlomi Dolev, Amos Israeli, and Shlomo Moran. 1995. Analyzing Expected Time by Scheduler-Luck Games. IEEE Trans. Software Eng. 21, 5 (1995), 429–439. https://doi.org/10.1109/32.387472
- [Dol00] Shlomi Dolev. 2000. Self-Stabilization. MIT Press.
- [Dom+22] Rachel Domagalski, Sergi Elizalde, Jinting Liang, Quinn Minnich, Bruce E Sagan, Jamie Schmidt, and Alexander Sietsema. 2022. Cyclic pattern containment and avoidance. Advances in Applied Mathematics 135, (2022), 102320.
- [Drm09] Michael Drmota. 2009. Random Trees: An Interplay between Combinatorics and Probability. Springer Vienna, Vienna. https://doi.org/10.1007/978-3-211-75357-6
- [DTY15] Stéphane Devismes, Sébastien Tixeuil, and Masafumi Yamashita. 2015. Weak vs. self vs. probabilistic stabilization. International Journal of Foundations of Computer Science 26, 3 (2015), 293–319. https://doi.org/10.1142/s0129054115500173
- [Eli16] Sergi Elizalde. 2016. A survey of consecutive patterns in permutations. In Recent trends in combinatorics. Springer, 601–618.
- [EN12] Sergi Elizalde and Marc Noy. 2012. Clusters, generating functions and asymptotics for consecutive patterns in permutations. Advances in Applied Mathematics 49, 3–5 (2012), 351–374. https://doi.org/10.1016/j.aam.2012.08.003
- [Ent69] R. C. Entringer. 1969. Enumeration of permutations of (1,...,n) by number of maxima. Duke Mathematical Journal 36, 3 (1969), 575–579. https://doi.org/10.1215/S0012-7094-69-03669-2
- [ES21] Sergi Elizalde and Bruce Sagan. 2021. Consecutive patterns in circular permutations. arXiv preprint arXiv:2107.04717 (2021).
- [Fag+18] Fathiyeh Faghih, Borzoo Bonakdarpour, Sébastien Tixeuil, and Sandeep S. Kulkarni. 2018. Automated Synthesis of Distributed Self-Stabilizing Protocols. Log. Methods Comput. Sci. 14, 1 (2018). https://doi.org/10.23638/LMCS-14(1:12)2018
- [FB15] Fathiyeh Faghih and Borzoo Bonakdarpour. 2015. SMT-Based Synthesis of Distributed Self-Stabilizing Systems. ACM Trans. Auton. Adapt. Syst. 10, 3 (2015), 21:1–21:26. https://doi.org/10.1145/2767133
- [FBT13] Narges Fallahi, Borzoo Bonakdarpour, and Sébastien Tixeuil. 2013. Rigorous Performance Evaluation of Self-Stabilization Using Probabilistic Model Checking. In IEEE 32nd Symposium on Reliable Distributed Systems, SRDS 2013, Braga, Portugal, 1-3 October 2013, 2013. IEEE Computer Society, 153–162. https://doi.org/10.1109/SRDS.2013.24
- [FKL22] Jason Fulman, Gene B. Kim, and Sangchul Lee. 2022. Central Limit Theorem for Peaks of a Random Permutation in a Fixed Conjugacy Class of . Annals of Combinatorics 26, 1 (2022), 97–123. https://doi.org/10.1007/s00026-021-00561-4
- [FM05] Laurent Fribourg and Stéphane Messika. 2005. Brief announcement: coupling for Markov decision processes - application to self-stabilization with arbitrary schedulers. In Proceedings of the Twenty-Fourth Annual ACM Symposium on Principles of Distributed Computing, PODC 2005, Las Vegas, NV, USA, July 17-20, 2005, 2005. ACM, 322. https://doi.org/10.1145/1073814.1073875
- [FMP04] Laurent Fribourg, Stéphane Messika, and Claudine Picaronny. 2004. Coupling and Self-stabilization. In Distributed Computing, 18th International Conference, DISC 2004, Amsterdam, The Netherlands, October 4-7, 2004, Proceedings (Lecture Notes in Computer Science), 2004. Springer, 201–215. https://doi.org/10.1007/978-3-540-30186-8_15
- [FMP06] Laurent Fribourg, Stéphane Messika, and Claudine Picaronny. 2006. Coupling and self-stabilization. Distributed Comput. 18, 3 (2006), 221–232. https://doi.org/10.1007/S00446-005-0142-7
- [FN20] Manuela Fischer and Andreas Noever. 2020. Tight analysis of parallel randomized greedy MIS. ACM Transactions on Algorithms 16, 1 (2020), 6:1–6:13. https://doi.org/10.1145/3326165
- [FS09] Philippe Flajolet and Robert Sedgewick. 2009. Analytic Combinatorics. Cambridge University Press, Cambridge. https://doi.org/10.1017/CBO9780511801655
- [FYZ25] Xinyu Fu, Yitong Yin, and Chaodong Zheng. 2025. Locally-iterative (Δ+1)-coloring in sublinear (in Δ) rounds. Theor. Comput. Sci. 1052, (2025), 115456. https://doi.org/10.1016/J.TCS.2025.115456
- [FZ15] Yuan Feng and Lijun Zhang. 2015. A nearly optimal upper bound for the self-stabilization time in Herman's algorithm. Distributed Comput. 28, 4 (2015), 233–244. https://doi.org/10.1007/S00446-015-0241-Z
- [GK93] Sukumar Ghosh and Mehmet Hakan Karaata. 1993. A Self-Stabilizing Algorithm for Coloring Planar Graphs. Distributed Comput. 7, 1 (1993), 55–59. https://doi.org/10.1007/BF02278856
- [Gol05] Larry Goldstein. 2005. Berry-Esseen bounds for combinatorial central limit theorems and pattern occurrences, using zero and size biasing. Journal of Applied Probability 42, 3 (2005), 661–683. https://doi.org/10.1239/jap/1127322019
- [GT00] Maria Gradinariu and Sébastien Tixeuil. 2000. Self-stabilizing Vertex Coloration and Arbitrary Graphs. In Proceedings of the 4th International Conference on Principles of Distributed Systems, OPODIS 2000, Paris, France, December 20-22, 2000 (Studia Informatica Universalis), 2000. Suger, Saint-Denis, rue Catulienne, France, 55–70.
- [GZ23] George Giakkoupis and Isabella Ziccardi. 2023. Distributed Self-Stabilizing MIS with Few States and Weak Communication. In Proceedings of the 2023 ACM Symposium on Principles of Distributed Computing, PODC 2023, Orlando, FL, USA, June 19-23, 2023, 2023. ACM, 310–320. https://doi.org/10.1145/3583668.3594581
- [Her90] Ted Herman. 1990. Probabilistic Self-Stabilization. Inf. Process. Lett. 35, 2 (1990), 63–67. https://doi.org/10.1016/0020-0190(90)90107-9
- [Hiv+07] F. Hivert, S. Nechaev, G. Oshanin, and O. Vasilyev. 2007. On the distribution of surface extrema in several one- and two-dimensional random landscapes. Journal of Statistical Physics 126, 2 (2007), 243–279.
- [HJS03] Stephen T. Hedetniemi, David Pokrass Jacobs, and Pradip K. Srimani. 2003. Linear time self-stabilizing colorings. Inf. Process. Lett. 87, 5 (2003), 251–255. https://doi.org/10.1016/S0020-0190(03)00299-0
- [Hoe63] Wassily Hoeffding. 1963. Probability inequalities for sums of bounded random variables. Journal of the American Statistical Association 58, 301 (1963), 13–30. https://doi.org/10.1080/01621459.1963.10500830
- [JŁR00] Svante Janson, Tomasz Łuczak, and Andrzej Ruciński. 2000. Random Graphs. Wiley, New York. https://doi.org/10.1002/9781118032718
- [Joh+24] Colette Johnen, Stéphane Devismes, Frédéric Mazoit, and David Ilcinkas. 2024. Asynchronous Self-stabilization Made Fast, Simple, and Energy-efficient. In Proceedings of the 43rd ACM Symposium on Principles of Distributed Computing, PODC 2024, Nantes, France, June 17-21, 2024, 2024. ACM, 538–548. https://doi.org/10.1145/3662158.3662803
- [Kie+11] Stefan Kiefer, Andrzej S. Murawski, Joël Ouaknine, James Worrell, and Lijun Zhang. 2011. On Stabilization in Herman's Algorithm. In Automata, Languages and Programming - 38th International Colloquium, ICALP 2011, Zurich, Switzerland, July 4-8, 2011, Proceedings, Part II (Lecture Notes in Computer Science), 2011. Springer, 466–477. https://doi.org/10.1007/978-3-642-22012-8_37
- [LSW09] Christoph Lenzen, Jukka Suomela, and Roger Wattenhofer. 2009. Local Algorithms: Self-stabilization on Speed. In Stabilization, Safety, and Security of Distributed Systems, 11th International Symposium, SSS 2009, Lyon, France, November 3-6, 2009. Proceedings (Lecture Notes in Computer Science), 2009. Springer, 17–34. https://doi.org/10.1007/978-3-642-05118-0_2
- [Lub86] Michael Luby. 1986. A Simple Parallel Algorithm for the Maximal Independent Set Problem. SIAM J. Comput. 15, 4 (1986), 1036–1053. https://doi.org/10.1137/0215074
- [McD89] Colin McDiarmid. 1989. On the method of bounded differences. Surveys in Combinatorics, 1989 (London Mathematical Society Lecture Note Series 141) (1989), 148–188. https://doi.org/10.1017/cbo9781107359949.008
- [Mét+11] Yves Métivier, John Michael Robson, Nasser Saheb-Djahromi, and Akka Zemmari. 2011. An optimal bit complexity randomized distributed MIS algorithm. Distributed Computing 23, 5–6 (2011), 331–340. https://doi.org/10.1007/s00446-010-0121-5
- [Moo70] John W. Moon. 1970. Counting Labelled Trees. Canadian Mathematical Congress, Montreal.
- [Nak05] Toshio Nakata. 2005. On the expected time for Herman's probabilistic self-stabilizing algorithm. Theor. Comput. Sci. 349, 3 (2005), 475–483. https://doi.org/10.1016/J.TCS.2005.05.022
- [Pan21] Alois Panholzer. 2021. Consecutive permutation patterns in trees and mappings. Journal of Combinatorics 12, 1 (2021), 17–54.
- [Pit99] Jim Pitman. 1999. Coalescent Random Forests. Journal of Combinatorial Theory, Series A 85, 2 (1999), 165–193. https://doi.org/10.1006/jcta.1998.2919
- [Rén59] Alfréd Rényi. 1959. Some remarks on the theory of trees. Publications of the Mathematical Institute of the Hungarian Academy of Sciences 4, (1959), 73–85.
- [Rin94] Yosef Rinott. 1994. On normal approximation rates for certain sums of dependent random variables. Journal of Computational and Applied Mathematics 55, 2 (1994), 135–143. https://doi.org/10.1016/0377-0427(94)90016-7
- [Sei11] Georg Seitz. 2011. Analysis of Various Parameters in Labelled Trees and Tree-Like Structures. PhD thesis, Technische Universität Wien. Retrieved from https://repositum.tuwien.at/handle/20.500.12708/10695
- [SS93] Sumit Sur and Pradip K. Srimani. 1993. A self-stabilizing algorithm for coloring bipartite graphs. Inf. Sci. 69, 3 (1993), 219–227. https://doi.org/10.1016/0020-0255(93)90121-2
- [Tur18] Volker Turau. 2018. Computing Fault-Containment Times of Self-Stabilizing Algorithms Using Lumped Markov Chains. Algorithms 11, 5 (2018), 58. https://doi.org/10.3390/A11050058
- [Vol+22] Matthias Volk, Borzoo Bonakdarpour, Joost-Pieter Katoen, and Saba Aflaki. 2022. Synthesizing optimal bias in randomized self-stabilization. Distributed Comput. 35, 1 (2022), 37–57. https://doi.org/10.1007/S00446-021-00408-4
- [Wei81] Victor K. Wei. 1981. A lower bound on the stability number of a simple graph. Technical Memorandum 81-11217-9, Bell Laboratories.
- [WS96] Di Warren and Eugene Seneta. 1996. Peaks and Eulerian numbers in a random sequence. Journal of Applied Probability 33, 1 (1996), 101–114. https://doi.org/10.2307/3215267
- [Yam+12] Yukiko Yamauchi, Sébastien Tixeuil, Shuji Kijima, and Masafumi Yamashita. 2012. Brief Announcement: Probabilistic Stabilization under Probabilistic Schedulers. In Distributed Computing - 26th International Symposium, DISC 2012, Salvador, Brazil, October 16-18, 2012. Proceedings (Lecture Notes in Computer Science), 2012. Springer, 413–414. https://doi.org/10.1007/978-3-642-33651-5_34
- [Zhu16] Yan Zhuang. 2016. Counting permutations by runs. Journal of Combinatorial Theory, Series A 142, (2016), 147–176.
AI disclosure#
We disclose that Claude (Anthropic) was used as an assistive tool during the preparation of this manuscript. Under the authors’ direction, it helped with editing and drafting parts of the text, with the companion verification code, and with checking and writing up some derivations. The authors reviewed and verified all AI-assisted output and take full responsibility for the content of this paper.
Appendix#
The appendix mirrors the structure of the paper. Appendices A and B restate the results whose proofs were deferred, keeping their numbers, and the other appendices refer to the body statements by number. All add the results that the body only mentions.
A Proofs for Section 3#
Proof of Theorem 1. By linearity, for a uniformly random vertex . Condition on the degree of being . The neighbors of each share ’s color independently with probability , so the number of same-colored neighbors is . Given , the labels of and these neighbors are in uniform random relative order, so is the maximum with probability . Hence
In the monochrome case, the two vertices of an ordered non-adjacent pair with parameters are both peaks with probability
and those of an adjacent pair never are. With the probability that a random ordered pair is non-adjacent with parameters ,
Proof of Theorem 3. Realize the labeling by i.i.d. uniform ranks and condition on the ranks and on the colors of and . A neighbor of prevents from being a peak iff it has the color of and a rank above , an event of probability , independently across neighbors, so each private neighbor of leaves a peak with probability , and each private neighbor of leaves a peak with probability . A common neighbor leaves both and peaks with probability when and share a color (it needs another color, or a rank below both) and when they do not (it must avoid two disjoint events of probabilities and ). Given the colors and the ranks, both are therefore peaks with probability in the first case and in the second. As are uniform on , the variables are uniform on with density each, and the two cases have probabilities and : this is Eq. (4). Two adjacent vertices of the same color are never both peaks, and adjacency does not enter the second case, so adjacent pairs contribute only. Summing over ordered pairs with the weights and gives Eq. (5). In the original variables, with parametrizing the half of the square where (Jacobian ) and , in ,
For the integrals of Eq. (26) evaluate to
On the path the second factorial moment reproduces for .
B Proofs for Section 4#
Randomized analogues of the extremal graphs. On a random graph the mean simply averages over the degree law (Theorem 1), and the extremal graphs of Section 4 have immediate randomized analogues: a uniform random perfect matching for the minimal mean, a uniform random partition of the vertices into a fixed number of cliques for zero variance (the stabilization time stays , so it is still deterministic even though the graph is genuinely random once ), and a star with a uniformly random center for the maximal variance.
Proof of Lemma 2. Adjacent vertices are never both peaks, so there . For non-adjacent with parameters (, ), draw i.i.d. uniform values (equivalent to a random labeling) and condition on the values of : a private neighbor of must fall below , one of below , and a common neighbor below , so
Proof of Theorem 6. We first prove the statement among graphs without isolated vertices, for every . For the only such graph is the edge , and for the statement was checked by exhaustive enumeration of all labeled graphs without isolated vertices (Appendix G). Let and let be a graph on vertices without isolated vertices, other than . Call a vertex of degree a leaf and its unique neighbor its hub. Write for the number of leaves at , for the number of leaves, for the number of vertices of degree at least , and . The star is the graph with . If then is a perfect matching and by Theorem 4, so let . We bound class by class with Lemma 2, writing for .
Diagonal. is for a leaf and at most for a vertex of degree at least : at most in all.
Two leaves. Two leaves at the same hub have parameters and covariance . Two leaves at distinct hubs have no common neighbor and covariance , unless they form an isolated edge, with negative covariance. The ordered pairs of leaves at a common hub number .
A leaf and a vertex of degree at least 2. Let be a leaf at and a vertex of degree at least . The pair is non-adjacent, and has a common neighbor iff is adjacent to . Its parameters are then and its covariance . Every neighbor of that is not a leaf at has degree at least , so these unordered pairs number (a hub of degree at least is one of the vertices and has at most such neighbors, and a hub of degree has none), and they contribute at most to the sum over ordered pairs.
Two vertices of degree at least 2. If non-adjacent with a common neighbor, their covariance is at most by Lemma 2 (they are not two leaves at the same hub). The ordered non-adjacent pairs among these vertices number , where counts the edges between them. A vertex of degree at least carrying no leaf has at least two such edges and at most vertices carry a leaf, so .
Adjacent pairs have negative covariance, and we keep only the two ordered pairs formed by a leaf and its hub , which contribute together when has degree at least . The two vertices of an isolated edge are each other’s hub, and the edge contributes for its two leaves once . In all, the kept pairs contribute at most .
Adding up,
to be compared with , the value of the same decomposition on the star (it is Eq. (7)).
Case . Then and since is not the star, and Eq. (29) gives .
Case . The right-hand side of Eq. (29) increases with , so may be replaced by , after which minus the right-hand side equals
As a function of a real variable, is concave on and on (its only non-linear terms are and , and the second is convex, which is why the interval is split), so on each interval it is at least the smaller of its values at the endpoints:
At these are , and , all positive. For , increases with from , and . Hence for every integer , that is .
Isolated vertices. Let and let have isolated vertices. They are peaks of every labeling, so equals the variance on the graph obtained by deleting them, which has no isolated vertex: either is empty and , or has vertices and by the above. By Eq. (7), , which increases strictly with (its increments are ), so in both cases.
The companion code checks this result on various families of graphs, including all graphs on vertices.
C Path and cycle: proofs and derivations#
Degree-driven means. The path and cycle are two cases of a general pattern: by Theorem 1 the mean depends on the graph through its degrees alone, so it is a simple closed form the moment the degree sequence is known. For a graph on vertices with leaves and vertices of degree , the monochrome mean is
and for general the two terms become and . Taking gives the -regular graphs. The cycle is and the path is , while the -regular trees have (though does not force a tree). The variance is not degree-driven this way: it depends on the joint degrees of neighboring vertices through Theorem 3, so no comparable closed form holds for it.
Proof of Corollary 4. By Eq. (6) only the pairs at distance one and two contribute. On the cycle with every vertex is a peak with probability , its two neighbors form with it ordered pairs with parameters and its two vertices at distance two pairs with parameters , so
Proof of Theorem 7. Monochrome path. Removing the smallest value of a permutation of size at least splits it either at an end (leaving one permutation) or in the interior (leaving two independent ones). The removed element is never a peak, and its neighbors beat it, so their peak status is unchanged once they become endpoints of the pieces, while the permutation of size is a peak. This gives the Riccati equation with , whose solution is Eq. (11) [Ent69, Zhu16]. The probability generating function of follows by marking non-peaks, . Coefficient extraction gives and, for , , in agreement with Corollary 3 and Corollary 4.
-colored path. Under a uniform -coloring a vertex is a peak when it exceeds its same-color neighbors only, so the path breaks at every color change into maximal monochromatic runs whose peaks are independent. Each run is a monochrome path, counted by , and consecutive runs carry distinct colors. Summing over the number of runs gives , whose value at is , i.e. , the number of labeled -colored paths.
Monochrome oriented cycle. The cycle of length is a loop and its vertex is not a peak, by convention. In an oriented cycle of size at least , removing the minimum-labeled vertex, which is never a peak, produces an oriented path whose endpoints keep their peak status, hence , which integrates to the closed form of Eq. (12). In particular the peak count of has the law of that of , which transfers the monochrome moments and the central limit theorem of the path to the cycle. The mean and variance (for ) of the series are those of in Corollary 3 and Corollary 4.
-colored oriented cycle. Let (resp. ) count -colored paths whose first and last vertices have the same (resp. distinct) colors. Any path is in one of the two cases, and a path with same-color ends is either monochrome, or decomposes uniquely as a path with distinct-color ends followed by a monochrome path of the color of its starting point, so
hence
A -colored oriented cycle of size contributes . Otherwise, removing the vertex of label leaves a -colored path whose ends keep their peak status, and the removed vertex is a peak in the cycle iff its color differs from the colors of both ends of this path: when the ends share a color, colors make it a peak and one does not, whereas when they differ, do and two do not. This is Eq. (13), which collapses to at . The cycles of length and , a loop and a double edge, are outside the simple-graph model. Their terms are the normalizations that make the differential equations hold, and the series describe for .
The companion code checks all four series.
D Random trees: proofs and derivations#
The companion code checks the moments of Corollary 6.
The -colored mean. By Theorem 1, with the degree of a uniform vertex and . The number of labeled trees on vertices in which a given vertex has degree is , so and , which is Eq. (17). Since uniformly on and , the mean is . In closed form, with , and , the integral of Eq. (17) is
so that times this bracket. At the bracket equals and the formula reduces to .
The -colored variance. By Corollary 1 only the pairs at distance at most two contribute to the covariance, and in a tree the neighborhood profile of such a pair is read off the degrees of its two vertices: with the parameters of Section 3, , and when is an edge or when and are at distance two (then ), beyond.
In the uniform random labeled tree on vertices, for two fixed distinct vertices and all real :
- : the vector is multinomial with trials and probabilities .
- and are adjacent with probability , and then : is the sum of a multinomial vector with trials and probabilities and of a vector uniform on .
- and are at distance two with probability , and then : is the sum of a multinomial vector with trials and probabilities and of a vector uniform on .
Proof. Let be the Cayley tree function of Section 5.2, with , the exponential generating function of rooted labeled trees. A tree with an ordered pair of distinct distinguished vertices is the path () together with a rooted tree hanging from each . Mark by (resp. ) the children of the root of the tree hanging from (resp. ), that is, the (resp. ) neighbors of (resp. ) off the path. A rooted tree whose root has its children marked by has generating function . Summing over all , keeping only, or keeping only gives, for all pairs, adjacent pairs and pairs at distance two,
and in the last two cases . Since , each is with , and . The Lagrange inversion formula [FS09] then gives
Proof. By Theorem 3, in the variables of Eq. (4), two vertices with parameters are both peaks with probability if non-adjacent and if adjacent, while . Split the ordered pairs of distinct vertices into adjacent pairs (), pairs at distance two () and the others, which are both peaks with probability by Corollary 1. Summing over all pairs and correcting the first two classes,
Every term is a bracket with independent of , so the expectation over the tree can be taken inside the bracket, where Lemma 3 gives in each class: this is Eq. (39). For the asymptotics write and . Uniformly for bounded , , so and with , ,
The value of sharpens Eq. (17) to , whose constant is at as in Eq. (16). In the slope, and are the probabilities that a Poisson variable of mean equals and , so . Numerically and , and , so that the variance and the mean of become equivalent as grows.
For the Galton-Watson tree with offspring, the probability generating function of the number of peaks is
Proof. Write for Eq. (14), so that over the rooted labeled trees of size . A Poisson Galton-Watson tree has total-progeny law and, conditioned on its size and given a uniform random vertex labeling, is a uniform rooted labeled tree (a Cayley tree) [Drm09]. As a peak depends only on the relative order of labels, its peak probability generating function is therefore
The Poisson tree is critical, so its size, and with it its peak count, has infinite mean. Conditioning on the size returns the exact law of Theorem 8 and the finite moments of Corollary 6. By Proposition 5 this is also the leaf probability generating function of the Poisson tree.
General rooted trees. Consider rooted labeled plane trees (ordered children) carrying a weight on each node of out-degree , with , so that the unmarked generating function obeys the classical . For the Cayley weights this is the uniform unordered labeled tree. To mark peaks we use a catalytic variable that records the holes of a node (the slots where a further child could be inserted), so a node of out-degree with holes weighs and a full child-and-hole set has generating function .
Let be the generating function of weighted rooted labeled trees in which marks the nodes, the peaks and the holes. It is characterized by
and the monochrome peak generating function is . For it is Eq. (14). If is a probability generating function of mean at most , other than , then is the peak probability generating function of the Galton-Watson tree with offspring law . Under a uniform -coloring, the generating function of trees whose root has a prescribed color satisfies
Proof. Letting mark nodes, peaks and holes, removing the smallest-labeled node gives Eq. (44): the removed node is either the root (first two terms, according to whether it is a peak, which happens iff it has no children) or an internal node whose removal turns its parent slot into a hole (last term). The quantity of interest is . For the Cayley weights , i.e. , a hole behaves like a marked child slot at a single node and with as in Eq. (14), which satisfies the equation and reduces at to Eq. (14). If is a probability generating function of mean at most , other than (so that the tree is almost surely finite), then is well defined for and is the peak probability generating function of the Galton-Watson tree with offspring law . The Poisson case recovers Proposition 11. Unlike the Cayley case, peaks and leaves are not equidistributed in general: for the full binary offspring law the tree on three vertices has peak generating function and leaf generating function .
For the random coloring, consider a -colored general rooted tree with holes and keep only the vertices of some fixed color, say red. The connected component containing the root is a monochrome (red) general rooted tree with holes, in which each hole either was already a hole in the original tree, or held the root of a -colored subtree whose root is one of the non-red colors. Since a hole and such an attached non-red subtree play the same structural role at a red vertex, a child slot that does not affect the red vertex’s peak status, the two combine additively in the holes variable. Writing for the generating function of -colored general rooted trees with a red root and no hole, this gives Eq. (45), and summing over the root colors gives . In the Cayley case , which Lagrange inversion solves (Theorem 10).
Proof of Theorem 10. Orient the edges away from the root (peaks do not depend on it) and condition on the set of initially conflicting edges. Each non-root vertex has the color of its parent with probability , independently of the others, so for every , and a vertex is a peak iff it is a local maximum of the forest , whose components are monochrome: given with components of sizes , . The rooted trees containing a given spanning forest with these components number , that is roots times the unrooted count [Moo70, Pit99], which is the weighted Cayley formula over the trees on the contracted components, at . Summing over the trees containing , then over the spanning forests with components,
A binary-tree observation. On rooted full binary plane trees with labeled vertices, the number of labelings with exactly one peak appears to be , the sequence OEIS A395382: we checked the identity for but have not proved it.
E Erdős-Rényi graphs: proofs and variance#
The same reading gives the second factorial moment in a few lines.
On with colors, with , , and ,
Random graph and fixed graph. The generating functions Eq. (20) and Eq. (21) and every random-graph formula of the paper describe the joint law over the graph, the coloring and the labeling. For a fixed graph the peak indicators are dependent, and the joint variance is the mean, over the graph, of the variance on a fixed graph, plus the variance, over the graph, of the mean on a fixed graph. Only the first term measures the fluctuations of the stabilization time on one fixed network. The second measures the differences between networks.
Palette on random graphs. On the maximum degree is random, so the condition concerns the palette relative to a random quantity. Taking always satisfies it. More economically, for constant one has with high probability [JŁR00], so any palette meets with probability . On that event holds exactly and the excluded draws contribute a vanishing correction. When stays bounded, this fails: the mean degree is constant but , so the palette must grow at least that fast. The peak statistic , and hence every mean and variance formula, is defined for any with no palette constraint. The bound is only what ties it to the algorithm’s recoloring count.
Variance through the second factorial moment theorem. Unlike the triangle-free families, has triangles, so its variance exercises the full Theorem 3, and the computation below is the one that the bipartite model reuses (Appendix F). Averaging over the random graph makes the neighborhood profile of a pair explicit: for a random ordered pair , each of the other vertices is independently a common neighbor with probability , a private neighbor of (resp. ) with probability , or neither with probability , so is multinomial. Since and are expectations of products whose exponents are exactly , this multinomial average collapses the sum of Eq. (5) into closed forms.
On with colors, write , , . The variance of the stabilization time is with as in Eq. (22) and
where, with , and are the closed forms
Proof. Adjacency of and is independent of the other vertices, so a pair is adjacent with probability (contributing only, by Theorem 3) and non-adjacent with probability (contributing ), hence . Taking the multinomial expectation of Eq. (26) and using leaves an integrand affine in each variable, which , applied once for and twice for , evaluates to the closed forms above (the two symmetric terms coincide because multiplies both private counts). In integral form,
At fixed the mean degree grows with , so the expected number of peaks stays bounded and the variance tends to a constant rather than growing linearly (visible in Figure 2). The closed forms track this limit exactly. The companion code checks these formulas.
F Bipartite graphs: proofs and variance#
Variance. Same-side pairs (both in the first side, or both in the second) are non-adjacent and have their common and private neighbors among the opposite side, so they reuse the integrals and of Eq. (48) with the exponent replaced by the opposite-side size. Cross pairs (one endpoint on each side) can have no common neighbor, so . Their private-neighbor counts are independent binomials, and adjacency occurs with probability .
The companion code checks this formula.
Proof of Proposition 9. Conditional independence. Attribute each edge to its endpoint of smaller label. Ordering the vertices by decreasing label, the -th vertex is a peak iff none of its edges to the opposite-side vertices of larger label that share its color is present. These edge sets are disjoint for distinct , so conditionally on the sequence of sides and colors the peak indicators are independent with the stated probabilities, which gives the stated generating function.
Limit at fixed , monochrome. Write with the indicator that the vertex of -th largest label is a peak. Given the sides, counts the vertices of the opposite side among the vertices of larger label. The sequence of sides is a uniform arrangement of first-side and second-side symbols, so for a first-side vertex is hypergeometric (a sample of size without replacement from the other vertices, of which lie on the second side), with mean , and symmetrically. By Hoeffding’s comparison of sampling without and with replacement for convex functions [Hoe63], for a first-side vertex and for a second-side one. Both are bounded by with for all and all , since . Hence uniformly in : the tail of beyond the top vertices is negligible in probability, uniformly in . For fixed the top sides converge in law to i.i.d. Bernoulli() draws, so converges in law to its i.i.d. counterpart. Letting gives , where, given i.i.d. sides with , the are independent Bernoulli. The limit is almost surely finite since its mean is. The mean follows: a first-side vertex at position has , so , and summing over with weight , plus the symmetric term, gives .
colors. Conditionally on the colors, the color classes induce vertex-disjoint bipartite subgraphs with independent edge sets, each with sides of sizes and in probability, hence with the same side proportion in the limit. The conditionally independent peak counts converge jointly to independent copies of .
G Numerical checks#
Two independent programs were used. The first runs the actual recoloring dynamics under the random central daemon (an event loop that draws a uniformly random enabled process at each step and recolors it with a random free color) and records the number of moves. It does not use Lemma 1 and serves to check it. The second is a peak-oracle sampler: by Lemma 1 one sample of the stabilization time needs only a coloring and a labeling, not a run of the dynamics, which makes large campaigns cheap. On fourteen test graphs (at most seven vertices, listed with the companion code), the law of the move count under the first agrees with the exact law of , computed by enumeration, for initial colors. In addition, every generating function and closed form of the paper was compared with exact enumeration for small sizes:
- the mean and the second factorial moment (Theorem 1, Theorem 3) against enumeration on the test graphs at ,
- the path series Eq. (11) and the cycle series for , and their -colored versions (Theorem 7) for at and at ,
- the mean and second factorial moment (Proposition 13, hence Proposition 14) against enumeration over all graphs on at most five vertices at ,
- the catalytic equation Eq. (44), solved as a series: against Eq. (14) for the Cayley weights, and against the enumeration of rooted trees on vertices for three other weight systems, monochrome and through the fixed point Eq. (45) for ,
- the binary-tree count for , by enumeration of the labelings for and beyond with the hook-length formula (a labeling has a single peak iff its labels decrease away from its maximum),
- the law of the star (Proposition 4) for ,
- the exact-maximizer statement (Theorem 6) and Theorem 4 by exhaustive enumeration of all graphs on vertices, the bound Eq. (29) on those without isolated vertices and on random and structured graphs up to , and, as a consistency check, a simulated-annealing search for , which finds no graph above the star.
The following were also checked:
- the -colored tree mean Eq. (17) against a Monte Carlo over Prüfer sequences (),
- the pair laws of Lemma 3 against the exhaustive enumeration of labeled trees for ,
- the -colored tree variance (Proposition 10) against exact enumeration over trees, labelings and colorings () and a Prüfer Monte Carlo (),
- the -colored tree law Eq. (19) against the same enumeration (, ),
- the limit laws of Proposition 7 and Proposition 9 against the empirical laws at large , and, monochrome, the exact law of in Proposition 7 against both regimes,
- the statements of Proposition 2 against the actual dynamics from fixed configurations and against the two ends of the range of the move count, attained by explicit labelings, on random graphs with twelve vertices.
The figures below plot the closed forms against the peak-oracle Monte Carlo across for all five families, monochrome (Figure 1, Figure 2) and under a random -coloring (Figure 3, Figure 4). Each point averages samples and agreement is within sampling error throughout. Figure 5 compares the exact law of the monochrome path with its Gaussian limit at . The simulation code, the closed-form implementations and the code of every check above and of the figures are in the companion notebook of the Python package tinto, version 0.1.0, docs/companion/exact_stabilization_time.ipynb, archived by Software Heritage as swh:1:rev:79d72a3026ff486616ef0ba83b70e192de339cee. Its current version, executed, is in the documentation of tinto, balouf.github.io/tinto.
- 1On a random graph is random, but always works, and the peak statistic itself needs no palette constraint (Appendix E).