% Generated from the Typst sources of the paper (web edition) by a private
% script of the repository: do not edit, regenerate.
```{title} Research report
```
# The Exact Stabilization Time of Self-Stabilizing Coloring: Mean, Variance, and Distribution
```{raw} html
Élie de PanafieuiDNokia Bell Labs, Paris-Saclay, France
Fabien MathieuiDSwapcard, Paris, France Sorbonne Université, CNRS, LIP6, F-75005 Paris, France
Maria Potop-ButucaruiDSorbonne Université, CNRS, LIP6, F-75005 Paris, France
Sébastien TixeuiliDSorbonne Université, CNRS, LIP6, F-75005 Paris, France Institut Universitaire de France, Paris, France
```
## Abstract
```{raw} html
The worst-case stabilization time of a self-stabilizing algorithm usually says little about its typical behavior beyond the order of magnitude. This paper revisits the classical self-stabilizing -coloring algorithm with vertices activated at random, one at a time (the random central daemon). Considering the number of color changes as a random variable, we study its mean, variance and, on several families of graphs, its exact distribution. The analysis rests on a reduction: a vertex changes color, at most once, exactly when it is not a local maximum of a uniformly random labeling of the vertices, maxima being taken among the neighbors that share its initial color (the monochrome initial configuration is the slowest case). What can be predicted depends on what is known of the graph. The degree distribution (the view at distance one) gives the mean. The variance needs the view at distance two, in particular the triangles, and the full law needs the whole graph. We give closed-form results, from monochrome and from uniformly random initial configurations, on paths, cycles, random trees, Erdős-Rényi graphs and bipartite random graphs. From a monochrome start, the mean stays within a factor two of the worst case, whereas the variance ranges from zero (disjoint cliques) to order (the star on vertices).
Keywords: self-stabilization, graph coloring, stabilization time, random daemon, average-case analysis, random permutations, random graphs
We thank Stephan Wagner for bibliographic references on random trees.
```
{#introduction}
## 1 Introduction
```{raw} html
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.
```
{#sec-model}
## 2 Model
```{raw} html
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.
```
{#sec-general}
## 3 General theorems for the mean and the variance
```{raw} html
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).
```
{#the-reduction-lemma}
### 3.1 The reduction lemma
```{raw} html
Lemma 1 (Reduction).
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.
Proposition 1 (Scheduler-free readings).The number of moves has the law of Lemma 1 in each of the two following models. (1) At each step a process is drawn uniformly among all processes and moves if it is enabled, doing nothing otherwise. The number of steps until legitimacy is then the time needed to draw distinct processes, being the rank of the last non-peak in the order of first draws ( if the initial configuration is legitimate). Its mean given is , with the -th harmonic number, and since the mean number of steps is at most , with equality on the monochrome clique. (2) Every process carries an independent Poisson clock of rate and moves at each of its ticks at which it is enabled. The time until legitimacy is the first tick of the last non-peak, in the order of first ticks.
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.
Proposition 2 (Fixed initial configuration).
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.
```
{#the-mean}
### 3.2 The mean
```{raw} html
Theorem 1 (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
(1)
and hence the mean stabilization time is . For this gives the monochrome case .
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 .
```
{#the-variance}
### 3.3 The variance
```{raw} html
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.
Theorem 2 (Second factorial moment, monochrome).
In the monochrome case, the two vertices of an ordered non-adjacent pair with parameters are both peaks with probability
(2)
and those of an adjacent pair never are. With the probability that a random ordered pair is non-adjacent with parameters ,
(3)
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 .
Theorem 3 (Second factorial moment).
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):
(4)
Then, with the probability that a random ordered pair is adjacent with parameters ,
(5)
At one has and , recovering Theorem 2. Both integrals are elementary, and their values as finite sums are given in Appendix A, where the theorem is proved.
Corollary 1 (Pairs without common neighbor).At both integrands factorize, with as in Theorem 1: and . Two non-adjacent vertices without common neighbor are thus independent peaks, for every , and the covariance of two peak indicators vanishes beyond distance two. If is triangle-free, adjacent pairs have and contribute each.
The variance is therefore a sum over the pairs at distance at most two,
(6)
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.
Corollary 2 (Concentration and normal approximation).
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].
```
{#sec-extremal}
## 4 Extremal graphs
```{raw} html
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).
```
{#extremes-of-the-mean}
### 4.1 Extremes of the mean
```{raw} html
Proposition 3 (Mean extremes).Among graphs on vertices with no isolated vertex, is minimized by the perfect matching (for even , the graph of disjoint edges, every vertex of degree ), at , and maximized by the clique , at . Hence . For odd the minimum is , attained by a path on three vertices together with a perfect matching of the other vertices. The extremal graphs are the same for every .
The proof (Appendix B) is the termwise bound , and the same for , which is decreasing.
```
{#zero-variance}
### 4.2 Zero variance
```{raw} html
Theorem 4 (Zero variance).In the monochrome case, if and only if is a disjoint union of cliques, in which case deterministically, being the number of connected components.
Proof. If is a disjoint union of cliques, every labeling of a clique has a unique local maximum, so under any labeling. Conversely, a graph that is not such a union contains an induced path . Give the three largest labels and fix the others. Every other vertex has the same peak status in all such labelings, while ranking below both and gives two peaks among and ranking it above both gives one, so is not constant.
```
{#maximal-variance-the-star}
### 4.3 Maximal variance: the star
```{raw} html
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 .
Proposition 4 (Star law and variance).
On the monochrome star , for and . Hence
(7)
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).
Lemma 2 (Pairwise covariance).
Let be distinct vertices with peak indicators . If and are adjacent, . If they are non-adjacent with parameters , then
(8)
that is divided by the number of vertices at distance at most one from or from . Hence when ; when , which is at and at most otherwise; when and ; and when . In particular always, with equality exactly when and are two leaves hanging from the same vertex.
Theorem 5 (Variance upper bound).For every graph on vertices, monochrome, . Hence the maximum variance over -vertex graphs is , with sharp leading constant , attained to leading order by the star ( on by Eq. (7)).
Proof. Write . Each , so the first sum is at most . In the second, adjacent ordered pairs contribute negatively and, by Lemma 2, each of the at most ordered pairs contributes at most , so the sum is at most . Adding, . The star’s variance Eq. (7) has the same leading term , so the constant is sharp.
Theorem 6 (Exact variance maximizer).For every , among all graphs on vertices, is maximized by the star and by no other graph.
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.
```
{#sec-families}
## 5 Applications to graph families
```{raw} html
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).
```
{#path-and-cycle}
### 5.1 Path and cycle
```{raw} html
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.
Corollary 3 (Path and cycle, mean).
Under a uniform random -coloring,
(9)
In the monochrome case () these are and , and for three colors the path gives .
Under a uniform random -coloring, with for the cycle and for the path,
(10)
In the monochrome case these are and .
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 .
Theorem 7 (Path and cycle, full law).
The generating function of monochrome paths (permutations by peaks, a peak being a local maximum with endpoints included) is
(11)
the solution of the Riccati equation , [Ent69, Zhu16]. The generating functions of -colored paths and of monochrome oriented cycles are
(12)
and that of -colored oriented cycles is
(13)
where and , rational in and given in Appendix C, count -colored paths whose two endpoints have the same, respectively distinct, colors.
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.
Corollary 5 (Central limit theorem on the path and the cycle).On the path and on the cycle, for every , converges in distribution to a standard normal law, with the mean and variance of Corollary 3 and Corollary 4.
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].
```
{#sec-trees}
### 5.2 Random trees
```{raw} html
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
(14)
Theorem 8 (Random tree, exact law).
Monochrome, the number of rooted labeled trees of size with exactly peaks is , where is the Stirling number of the second kind, so
(15)
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.
Proposition 5 (Peaks and leaves).On a uniform random rooted labeled tree the number of peaks and the number of leaves (nodes with no children) have the same distribution.
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.
Corollary 6 (Random tree, mean and variance).
Monochrome, and , so
(16)
Under a uniform random -coloring, since the degree of a fixed vertex of a uniform labeled tree is ,
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).
Theorem 9 (Central limit theorem on the random tree).Monochrome, on the uniform random labeled tree converges in distribution to a standard normal law as , with and given by Corollary 6.
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.
Theorem 10 (Random tree, exact law under a -coloring).
Under a uniform random -coloring of the uniform random rooted labeled tree on vertices, with and the monochrome generating function Eq. (14),
(19)
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).
```
{#erdos-renyi-g-n-p}
### 5.3 Erdős-Rényi 𝐺(𝑛,𝑝)
```{raw} html
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
(20)
With colors, . Conditioning instead on the color composition , which is multinomial, gives the product of the monochrome series of the color classes,
(21)
These series, and all random-graph formulas below, describe the joint law over the graph, the coloring and the labeling (Appendix E).
Proposition 6 (Erdős-Rényi, mean).
Under a uniform random -coloring and a palette ,
(22)
Moreover the mean at equals the mean at : for the mean, though not for the variance, a random -coloring at edge probability behaves like the monochrome case at edge probability .
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 .
Proposition 7 (Erdős-Rényi, limiting law).
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 .
```
{#bipartite-graphs}
### 5.4 Bipartite graphs
```{raw} html
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 .
Proposition 8 (Bipartite Erdős-Rényi, mean).
Under a uniform random -coloring and a palette ,
(23)
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.
Proposition 9 (Bipartite Erdős-Rényi, generating function and limit law).
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
(24)
and with initial colors the limit is the sum of independent copies of .
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.
```
{#sec-conclusion}
## 6 Conclusion and future work
```{raw} html
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}
## Bibliography
```{raw} html
[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
[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.
[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
[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
[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
[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
[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.
[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
[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}
## AI disclosure
```{raw} html
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}
## Appendix
```{raw} html
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.
```
{#sec-app-general}
## A Proofs for Section 3
```{raw} html
Proposition 1 (restated).Under a daemon drawing uniformly among all processes, with null activations, and under independent Poisson clocks, the number of moves has the law .
Proof of Proposition 1. Label every process by the rank of its first draw, or of its first tick. This gives a uniform random permutation. At the first activation of a process , its same-colored neighbors of smaller label have been activated earlier, while still held its initial color, hence in conflict, and have moved away from that color, while those of larger label still hold it. So moves at its first activation iff it is not a peak, and never again by Lemma 1(1). The configuration becomes legitimate when the last non-peak is activated for the first time, since every initially conflicting edge has a non-peak endpoint and moves never create conflicts. In model (1) the gaps between successive first draws are independent of the order in which the processes first appear, so given that order the number of steps until the -th distinct process is drawn has mean . The last process drawn carries the largest label and is always a peak, so , with on the monochrome clique, where every other process is a non-peak.
Proposition 2 (restated).For an initial configuration with conflict graph : (1) in law, hence ; (2) for every labeling; (3) over all central and locally central daemons the number of moves takes exactly the values .
Proof of Proposition 2. (1) Under two neighbors are in conflict exactly when they are adjacent in , and a peak is a local maximum of , so this is Lemma 1 with the definition unfolded, and the mean follows from . (2) A vertex whose label exceeds those of its neighbors in exceeds those of its neighbors in the subgraph . (3) Every execution under a central daemon is the smallest-label schedule of some labeling: label the processes activated in the execution in activation order and the others arbitrarily above . By Lemma 1(1) an activated process is never enabled again, so at step the enabled process of smallest label is the one labeled , and the execution has moves for that labeling. A step of a locally central daemon activates pairwise non-adjacent processes and can be serialized in any order without changing the moves, so the same holds for these daemons. Conversely every labeling yields an execution. Local maxima form an independent set meeting every component (each component contains its largest label), so , and every independent set meeting every component is the set of local maxima of some labeling: give the largest labels to and let the other labels decrease with the distance to . Removing vertices one at a time from a maximum independent set, inside the components where it has at least two, gives such sets of every size between and . Finally , with equality for the monochrome configuration.
Theorem 1 (restated).Under a uniform -coloring the expected number of peaks is given by Eq. (1).
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
(25)
Averaging over with weights and multiplying by gives Eq. (1).
Theorem 2 (restated).
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 2. Assign i.i.d. uniform ranks. Since the peak condition depends only on relative order, these have the same law as a uniform random labeling. Condition on the ranks of : each of the private neighbors of must rank below , each of the private neighbors of below , and each of the common neighbors below , so , and splitting on and evaluates this to . Summing over pairs with weights and using Lemma 1 gives Eq. (3).
Theorem 3 (restated).The joint peak probabilities of a pair with parameters under a uniform -coloring are the double integrals and of Eq. (4), and the second factorial moment is given by Eq. (5).
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 ,
Proof. Expand the binomials in Eq. (26) and integrate term by term. (At the factor is read as when .)
Corollary 2 (restated).On a graph of maximum degree , , and the Kolmogorov distance between the standardized stabilization time and the normal law is at most .
Proof of Corollary 2. Realize the labeling by i.i.d. uniform ranks and the colors by independent variables , and group into one variable per vertex. The peak count is a function of these independent variables, and changing one of them changes the peak status of and of its neighbors only, hence by at most , so (1) is the bounded differences inequality [McD89]. For (2), the indicator that is a peak depends only on the variables of and its neighbors, so two families of indicators whose vertices are pairwise at distance at least depend on disjoint sets of independent variables and are independent. The graph joining pairs at distance at most , of maximum degree at most , is thus a dependency graph for the indicators, and the normal approximation theorem for sums of bounded variables with a dependency graph [BR89, Rin94] bounds the Kolmogorov distance by a constant times with (one plus the maximum degree of the dependency graph) and . Since by the Efron-Stein inequality applied to the same variables, and , the first term dominates the other two, and . The bound tends to exactly when . For a slower growth of the variance it says nothing, and we do not claim normality there.
On the path the second factorial moment reproduces for .
```
{#sec-app-extremal}
## B Proofs for Section 4
```{raw} html
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.
Proposition 3 (restated).Among graphs on vertices without isolated vertices, ranges from (perfect matching, even) or ( odd) to (clique). The extremal graphs are the same for every .
Proof of Proposition 3. From and the strict decrease of in : every degree obeys , so , and summing gives . The right bound is met iff every (the perfect matching, even), whence , and the left bound iff every (the clique ), whence . For odd at least one vertex has degree at least , since the number of odd-degree vertices is even, so , with equality for a path on three vertices plus a perfect matching of the other vertices. For general the same termwise argument applies to , because is strictly decreasing: .
Theorem 4 (restated).Monochrome, iff is a disjoint union of cliques.
Proof of Theorem 4. If is a disjoint union of cliques then, since every labeling of a clique has a unique local maximum, each clique contributes exactly one peak under any labeling, so and are constant (isolated vertices are cliques of size , each its own component). Conversely, a graph is a disjoint union of cliques iff it contains no induced path on three vertices. So if is not such a union it has vertices with and . Fix any assignment of the smallest labels to , and give the three largest labels. The peak status of every vertex outside is then identical in all such labelings: such a vertex ranks below , hence is a non-peak if adjacent to any of them and otherwise sees only the fixed outside labels. Among , is a peak iff (its only possibly-larger neighbor), likewise iff , and iff it exceeds both and . Ranking below both and gives peaks, and ranking above both gives . The two labelings are equally likely and give peak counts differing by , so is non-constant and .
Proposition 4 (restated).On the monochrome star, for and , with the mean and variance of Eq. (7).
Proof of Proposition 4. By Lemma 1, . On the star a leaf is a peak iff its label exceeds the center’s (its only neighbor), and the center is a peak iff it holds the maximum label. Let be the label rank of the center. For the leaves above the center are the peaks, so . For the center is the unique peak and . As is uniform on , the value arises from both and , giving the stated law. The moments and their expansion are a direct computation.
Lemma 2 (restated).For distinct vertices with peak indicators , , with the finer classification stated in the body.
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
(28)
the square being split along its diagonal: on the inner integral is , on it is . Subtracting over the common denominator gives Eq. (8), the numerator being . The rest is read off Eq. (8). The covariance vanishes with . For the three factors of the denominator are at least , and , with equality iff , whence the bound , which is at , at and decreases afterwards (there ). For and one of the first two factors is at least and the third at least , whence . For the denominator is . Equality in thus requires and : two leaves with the same single neighbor.
Theorem 6 (restated).For every , among all graphs on vertices, is maximized by the star and by no other graph.
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,
(29)
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
(30)
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:
(31)
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.
```
{#sec-app-path-cycle}
## C Path and cycle: proofs and derivations
```{raw} html
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
(32)
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
(33)
and evaluating the integrals of Eq. (4) at these parameters gives the stated coefficient. On the path with the two endpoints are peaks with probability , the four ordered adjacent pairs they belong to have parameters or and the four ordered pairs at distance two or . The other adjacent pairs and other pairs at distance two are as on the cycle. The difference with the cycle is the stated boundary term. At , , and , so . The monochrome moments of the path are classical [Hiv+07, WS96].
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
(34)
hence
(35)
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.
```
{#sec-app-trees}
## D Random trees: proofs and derivations
```{raw} html
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
(36)
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.
Lemma 3 (Pairs of vertices in a Cayley tree).
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,
(37)
and in the last two cases . Since , each is with , and . The Lagrange inversion formula [FS09] then gives
(38)
All pairs play the same role, and there are trees with an ordered pair of distinct vertices. Dividing by this number gives , hence (1), and restricted to adjacent pairs and to pairs at distance two. At these give the probabilities and , and dividing by them gives the conditional expectations of (2) and (3). The descriptions as a multinomial vector plus a uniform vector are read off these products.
Proposition 10 (Random tree, variance under a -coloring).
Write and . Under a uniform random -coloring of the uniform random labeled tree on vertices,
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,
(40)
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 , ,
(41)
Then , the first term vanishes, and the elementary integrals give and , whence .
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.
Proof of Theorem 9. By Proposition 5 the peak count has the same law as the number of leaves of a uniform random labeled tree. The number of leaves, and more generally the number of vertices of any fixed degree, of a uniform random labeled tree (equivalently a Galton-Watson tree conditioned on its size) obeys a central limit theorem [Drm09]. Its variance is of order by Corollary 6, so the limit is nondegenerate. Since is affine in , it is asymptotically normal with the stated centering and scaling.
Proposition 11 (Poisson Galton-Watson tree).
For the Galton-Watson tree with offspring, the probability generating function of the number of peaks is
(42)
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
(43)
Since , this equals . Equivalently, it is Eq. (14) composed with the Poisson size generating function . It converges for , where the argument has modulus at most , the radius of convergence of .
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 .
Proposition 12 (General rooted trees and Galton-Watson trees).
Let be the generating function of weighted rooted labeled trees in which marks the nodes, the peaks and the holes. It is characterized by
(44)
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
(45)
and the generating function of all -colored trees is .
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,
(46)
The factor roots the component , and rooted labeled trees by peaks have the exponential generating function , so the inner sum is . Since , the sum over is , which is Eq. (19). At , and [FS09] give . Alternatively, with the fixed point of Proposition 12 reads , and Lagrange inversion gives . As counts the colored trees whose root has a prescribed color, , the same formula. Expanded, the right-hand side of Eq. (19) is a polynomial in , whose value at is , the monochrome law of Theorem 8.
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.
```
{#sec-app-er}
## E Erdős-Rényi graphs: proofs and variance
```{raw} html
Proof of Proposition 6. List the vertices by decreasing label as in Section 5, so that the -th vertex has the -th largest label. It is a peak with probability with , that is . Summing over gives and . This expression depends on and only through , so the mean under a uniform -coloring at edge probability equals the monochrome mean at edge probability . Indeed, a vertex of larger label than the -th prevents it from being a peak iff it shares its color and is adjacent to it, an event of probability , as in the monochrome case at . This equality fails for the variance, which depends on pairs of vertices. The conflicting edges form separate random graphs, one per color class, not a single : two vertices of distinct colors never interact. For instance, at , , the variance is , against monochrome at .
The same reading gives the second factorial moment in a few lines.
Proposition 13 (Erdős-Rényi, second factorial moment).
On with colors, with , , and ,
(47)
At this is , the second factorial moment of the independent sum of Proposition 7.
Proof. Given the colors the peak indicators are independent, so , the expectation being over the colors. If the -th and -th vertices share their color (probability ), each of the vertices of larger label than the -th is counted in both and with probability , whence a factor each; each of the vertices in between is counted in with probability , whence a factor ; and the -th vertex itself is counted in , whence the factor . If their colors differ (probability ), a vertex of larger label than the -th is counted once with probability , whence a factor , the vertices in between contribute each and the -th vertex . Summing the geometric series over gives Eq. (47).
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.
Proposition 14 (Erdős-Rényi, variance).
On with colors, write , , . The variance of the stabilization time is with as in Eq. (22) and
(48)
where, with , and are the closed forms
(49)
with , , , , and (so ). This is the joint variance over the random graph, the random coloring, and the random labeling.
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,
(50)
Proof of Proposition 7. The factorization of Eq. (20) is the probability generating function of the independent sum . For fixed , , so by Borel-Cantelli only finitely many equal almost surely and , whose mean is . When with the summands are bounded and diverges, so Lindeberg’s condition holds and is asymptotically normal. With colors, condition on the color classes: they induce vertex-disjoint subgraphs with independent edge sets, a class of size carries a peak count distributed as Eq. (20) with replaced by , and all class sizes tend to infinity almost surely (with in the second regime), so the conditionally independent counts converge jointly to independent copies of the monochrome limit. In the second regime the fluctuation of the conditional mean must be compared with the conditional variance, which is in probability, while, by the Berry-Esseen bound for independent bounded indicators, the conditional law is within Kolmogorov distance of the normal law, uniformly over the class sizes. Writing for the class sizes, the conditional mean is , so its deviation from is and, by Cauchy-Schwarz, with . Now , a difference of -th powers of two numbers at distance , hence at most for and . Therefore , which tends to when , and the conditionally Gaussian limit is Gaussian.
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.
```
{#sec-app-bip}
## F Bipartite graphs: proofs and variance
```{raw} html
Proof of Proposition 8. As in Eq. (22), with on the first side and on the second, weighted by and : integrate term by term.
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 .
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 .
```
{#sec-app-numerics}
## G Numerical checks
```{raw} html
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 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.
Figure 1: Mean stabilization time: closed forms (lines) against Monte Carlo (markers), monochrome initial coloring, for the path, cycle, random tree, and balanced bipartite . The path and cycle lines coincide, the two means differing by .Figure 2: Variance of the stabilization time: closed forms (lines) against Monte Carlo (markers), monochrome initial coloring. For the bounded-degree families (path, cycle, tree) the variance grows linearly in . For the fixed-density random-graph families and bipartite , whose mean degree grows so that the peak count stays bounded, it tends to a constant.Figure 3: Mean stabilization time under a random -coloring: closed forms (lines) against Monte Carlo (markers), for the path, cycle, random tree, and balanced bipartite .Figure 4: Variance under a random -coloring: closed forms (lines) against Monte Carlo (markers), for the path, cycle, random tree (exact double integral of Proposition 10, with slope by Eq. (18)), and balanced bipartite .Figure 5: Empirical law of the stabilization time on the monochrome path at (Monte Carlo, markers) against the Gaussian limit of Corollary 5 (mean , variance ).
1On a random graph is random, but always works, and the peak statistic itself needs no palette constraint (Appendix E).