Introduction
Random walks are a central tool in the analysis of networks. They provide mathematical models for diffusion [1 ] , community detection [2 ] , search [3 ] and ranking nodes [4 ] . Networks exploration can be obtained via metrics such as hitting times [5 , 6 , 7 , 8 ] , commute times, cover times, and effective resistances [9 , 10 , 11 ] . These quantities describe how a walker moves through a graph and how the topology of the graph affects accessibility between vertices. In many situations, however, the full random-walk trajectory contains many redundant steps. A walker may return several times to already visited vertices before reaching a target. If the goal is to extract the effective route followed by the walker, it is natural to erase these redundant excursions. This is the principle of the Loop-Erased Random Walk (LERW): starting from an ordinary random-walk path, loops are removed in chronological order, leaving a self-avoiding path [12 , 13 ] . LERW were introduced and developed as fundamental objects in probability theory. Lawler’s work established LERW as a canonical method for producing self-avoiding paths from random walks [12 ] . The importance of LERW increased further through its connection with uniform spanning trees. In particular, the loop-erased path between two vertices has the same distribution as the unique path connecting these vertices in a uniform spanning tree. This connection is the basis of Wilson’s algorithm, which generates uniform spanning trees efficiently by using loop-erased random walks [14 ] . The relationship between LERW, uniform spanning trees, and spanning forests has since become a major theme in probability on graphs and networks [11 , 15 , 16 ] . A large part of the theoretical literature on LERW has focused on infinite graphs, lattices, and scaling limits. In the planar case, Lawler, Schramm, and Werner proved the conformal invariance of loop-erased random walks and uniform spanning trees, connecting these objects to Schramm–Loewner evolution [17 ] . Other works have studied LERW and spanning trees on lattices and more general graph structures, emphasizing their probabilistic and geometric properties [11 , 13 ] . These studies provide a deep theoretical foundation, but many questions remain when one moves from regular lattices to arbitrary finite graphs and empirical network models. The spanning-tree point of view is particularly useful because it turns questions about random trajectories into questions about paths in random trees. Edge-inclusion probabilities in random spanning trees can be described by determinantal formulas involving transfer-current kernels [18 , 19 ] . This gives exact probability weights for events involving sets of edges, rather than relying only on empirical sampling. In the present work, we exploit this determinantal structure to compute metrics associated with loop-erased random walks on finite graphs. In particular, the probability of a simple path appearing as the loop-erased trajectory can be expressed through the determinant of the corresponding transfer-current submatrix.
The aim of this work is to use this framework to study loop-erased random walks on finite graphs from a quantitative and applicative perspective. We focus on two complementary observables. The first one is the Mean First Passage Time (MFPT) of the loop-erased random walk. Unlike the usual first passage time, which counts all steps taken by the original random walk before reaching a target, the loop-erased version measures the length of the self-avoiding path that remains after all loops have been removed. It therefore gives an effective exploration length between two vertices. The second observable is the distribution of erased loop sizes . During the loop-erasure procedure, each return to an already visited vertex creates a loop that is removed from the trajectory. The size of this erased loop measures the scale of the redundant excursion. This distribution gives information that is different from the length of the final loop-erased path: it describes what the random walk explored and then discarded. Previous works have studied erased-loop statistics mainly in lattice and low-dimensional settings. Dhar and Dhar investigated the distribution of erased-loop sizes for loop-erased random walks, and Agrawal and Dhar extended this study to two- and three-dimensional systems [20 , 21 ] . These works show that erased loops contain important information about the geometry of the underlying space and about the redundant parts of random-walk exploration. In contrast, the present study considers erased-loop statistics on arbitrary finite graphs and relates them to spanning-tree probabilities. This provides a finite-graph framework that is suitable for network applications and allows both theoretical computation and numerical validation. The complete graph case connects the study of LERW to classical results on random labeled trees. The distance between two vertices in a uniformly random labeled tree was studied by Meir and Moon, and related enumerative results are collected in Moon’s work on labeled trees [22 , 23 ] . These results allow explicit formulas and asymptotic expressions for the mean length of loop-erased paths on complete graphs. Cycle graphs, on the other hand, provide a simple setting in which the role of global cyclic structure can be isolated using elementary graph-theoretic arguments [24 ] . Together, these graph classes serve as reference models for understanding how density and cyclic structure affect LERW observables.
From an applied network perspective, loop-erased quantities provide a complementary description of graph exploration. Shortest-path distances ignore the random exploration process, while ordinary hitting times include all repeated visits and local oscillations. Loop-erased paths lie between these two viewpoints: they are generated by random exploration, but they retain only the self-avoiding effective route. The erased-loop distribution adds further information by quantifying the scale of the redundant cyclic excursions produced by the graph topology. This is particularly relevant for networks with short loops, motifs, and local subgraph structure. Network motifs were introduced as simple building blocks of complex networks [25 ] , and later models incorporated arbitrary distributions of subgraphs or short loops into random graph constructions [26 , 27 ] . Such structures can strongly influence the loops encountered and erased by a random walk. For computational purposes, the present approach combines exact spanning-tree probabilities with graph-search procedures. The enumeration of candidate paths and cycles is related to classical depth-first search methods and algorithms for listing paths and cycles in graphs [28 , 29 , 30 ] . Although the number of simple paths can grow rapidly with graph size, the proposed method is effective for sparse networks, small graphs, and motif-based structures where the relevant paths can be enumerated or sampled. In this sense, the method differs from a purely Monte Carlo treatment: simulations may be used to generate candidate paths or to validate the results, but the path weights themselves are obtained from the transfer-current kernel.
A possible application-oriented interpretation concerns agents exploring an initially unknown environment. A foraging animal or an autonomous robot may reach a target after repeated visits to the same locations. If its visited route has been recorded, chronological loop erasure provides a self-avoiding path that can be followed in reverse towards the starting point, avoiding the deleted excursions. This interpretation is conceptual: loop erasure neither identifies a globally shortest path nor establishes that biological navigators implement this algorithm. It requires sufficient route memory and reliable retracing of previously traversed edges. The retained-path length and erased-loop statistics thus quantify different aspects of such exploration-derived navigation.
The contribution of this paper is therefore twofold. Building on the known connection between LERW and spanning trees and on the transfer-current theorem, we express the mean first passage time of loop-erased random walks on finite graphs. The resulting expression returns the expected length of the loop-erased path as a weighted sum over simple paths, where the weights are exact determinantal probabilities obtained from the spanning-tree kernel. Second, We use the established Dhar–Dhar correspondence [20 ] to express erased-loop size statistics through the same kernel. Our finite-graph treatment includes a sampled-path estimator with a captured-mass error bound, explicit specializations to complete and cycle graphs, and decompositions for motif-based networks. The mean loop-erased path length describes the part of the random-walk trajectory that is kept, while the erased-loop size distribution describes the loops removed. Numerical comparisons with Monte Carlo simulations are presented throughout the paper to support the theoretical findings.
MFPT OF LERW ON AN ARBITRARY GRAPH
Let G = ( V , E ) G=(V,E) G = ( V , E ) be a finite, connected, simple, undirected graph, and let u , v ∈ V u,v \in V u , v ∈ V be two distinct vertices. Consider a random walk ( X t ) t ≥ 0 (X_t)_{t\geq0} ( X t ) t ≥ 0 on G G G , started at u u u , and stopped upon first hitting v v v . Its hitting time is defined by
τ v : = inf { t ≥ 0 : X t = v } . \tau_v := \inf\{t \geq0 : X_t = v\}. τ v := inf { t ≥ 0 : X t = v } .
The stopped random walk trajectory is then the, possibly self-intersecting, path
ω = ( X 0 , X 1 , … , X τ v ) . \omega= (X_0,X_1,\ldots,X_{\tau_v}). ω = ( X 0 , X 1 , … , X τ v ) .
Applying chronological loop erasure to ω \omega ω , that is, erasing loops in the order in which they are formed, yields a self-avoiding path from u u u to v v v , denoted by LE ( ω ) \operatorname{LE}(\omega) LE ( ω ) . This path is called the loop-erased random walk, or LERW, from u u u to v v v [12 ] . In the unweighted case, the passage time of the LERW is simply its length, namely the number of edges in the loop-erased path
T u , v L E R W : = ∣ LE ( ω ) ∣ E . T_{u,v}^{\mathrm{LERW}} := |\operatorname{LE}(\omega)|_E. T u , v LERW := ∣ LE ( ω ) ∣ E .
where ∣ A ∣ E |A|_E ∣ A ∣ E denotes the number of elements of E E E belonging to A ⊆ E A \subseteq E A ⊆ E .
The same definition is kept even if G G G is endowed with edge weights c : E → ( 0 , ∞ ) c:E \to(0,\infty) c : E → ( 0 , ∞ ) . The mean first passage time for the loop-erased random walk is therefore
MFPT L E R W ( u , v ) : = E [ T u , v L E R W ] , \operatorname{MFPT}^{\mathrm{LERW}}(u,v) := \mathbb{E}\left[T_{u,v}^{\mathrm{LERW}}\right], MFPT LERW ( u , v ) := E [ T u , v LERW ] ,
and by introducing the probability, P ( LE ( ω ) = γ ) \mathbb{P}(\operatorname{LE}(\omega)=\gamma) P ( LE ( ω ) = γ ) , that the loop erased walk of ω \omega ω is given by γ ∈ Γ ( u , v ) \gamma\in\Gamma(u,v) γ ∈ Γ ( u , v ) , the set of all simple paths from u u u to v v v , we can obtain
MFPT L E R W ( u , v ) = ∑ γ ∈ Γ ( u , v ) ∣ γ ∣ E P ( LE ( ω ) = γ ) . (1) \operatorname{MFPT}^{\mathrm{LERW}}(u,v) = \sum_{\gamma\in\Gamma(u,v)} |\gamma|\mathbb{E}_{\mathbb{P}}(\operatorname{LE}(\omega)=\gamma). \tag*{(1)} MFPT LERW ( u , v ) = γ ∈ Γ ( u , v ) ∑ ∣ γ ∣ E P ( LE ( ω ) = γ ) . (1)
One can introduce the matrix Y Y Y indexed by (oriented) edges of the graph, called the “transfer-current” or “spanning-tree kernel”, with the following determinantal property [11 , 18 , 19 ] : for any finite set of (distinct) edges S ⊆ E S\subseteq E S ⊆ E ,
P ( S ⊆ T ) = det ( Y S , S ) , \mathbb{P}(S\subseteq T)=\det(Y_{S,S}), P ( S ⊆ T ) = det ( Y S , S ) ,
where T T T is a random spanning tree drawn from the spanning-tree measure (uniform in the unweighted case, and weighted by ∏ e ∈ T c e \prod_{e\in T}c_e ∏ e ∈ T c e in the conductance-weighted case), and Y S , S Y_{S,S} Y S , S denotes the submatrix of Y Y Y restricted to the edges in S S S . A standard and convenient construction of such a kernel is obtained as follows: choose an arbitrary orientation of edges and let B B B be the incidence matrix
B ( i , ℓ ) = { − 1 if ℓ = [ i , ∗ ] 1 if ℓ = [ ∗ , i ] 0 otherwise (2) B(i,\ell)=
\begin{cases}
-1 & \text{if }\ell=[i,*]\\
1 & \text{if }\ell=[*,i]\\
0 & \text{otherwise}
\end{cases} \tag*{(2)} B ( i , ℓ ) = ⎩ ⎨ ⎧ − 1 1 0 if ℓ = [ i , ∗ ] if ℓ = [ ∗ , i ] otherwise (2)
where ℓ = [ i , j ] \ell=[i,j] ℓ = [ i , j ] denotes the oriented edge with tail i i i and head j j j . Let C = diag ( c e ) C=\operatorname{diag}(c_e) C = diag ( c e ) , i.e., the diagonal matrix with the edge weights on the diagonal, and let
L : = B C B T L:=BCB^{\mathsf{T}} L := B C B T
be the weighted Laplace matrix. By using the Moore–Penrose pseudoinverse L † L^{\dagger} L † , we can define
Y : = C 1 / 2 B T L † B C 1 / 2 . (3) Y:=C^{1/2}B^{\mathsf{T}}L^{\dagger}BC^{1/2}. \tag*{(3)} Y := C 1/2 B T L † B C 1/2 . (3)
Consider the unique simple path between u u u and v v v inside a spanning tree T T T , say Path T ( u , v ) \operatorname{Path}_{T}(u,v) Path T ( u , v ) . In a tree, the event “Path T ( u , v ) = γ \operatorname{Path}_{T}(u,v)=\gamma Path T ( u , v ) = γ ” is exactly the event “all edges of γ \gamma γ are present”:
{ Path T ( u , v ) = γ } = { E ( γ ) ⊆ T } , \{\operatorname{Path}_{T}(u,v)=\gamma\}=\{E(\gamma)\subseteq T\}, { Path T ( u , v ) = γ } = { E ( γ ) ⊆ T } ,
because γ \gamma γ already connects u u u to v v v , and a tree cannot contain an alternative u u u –v v v route without creating a cycle. The crucial link is that the LERW path from u u u to v v v has the same distribution law than the u u u –v v v path in T T T under the spanning-tree measure produced by loop-erasing random-walk segments [13 , 15 , 17 ] . Therefore, for each simple path γ \gamma γ , it holds true
P ( LE ( ω ) = γ ) = P ( Path T ( u , v ) = γ ) (4) \mathbb{P}(\operatorname{LE}(\omega)=\gamma)=\mathbb{P}(\operatorname{Path}_{T}(u,v)=\gamma) \tag*{(4)} P ( LE ( ω ) = γ ) = P ( Path T ( u , v ) = γ ) (4)
= P ( E ( γ ) ⊆ T ) = det ( Y E ( γ ) , E ( γ ) ) . (5) =\mathbb{P}(E(\gamma)\subseteq T)
=\det(Y_{E(\gamma),E(\gamma)}). \tag*{(5)} = P ( E ( γ ) ⊆ T ) = det ( Y E ( γ ) , E ( γ ) ) . (5)
Let E ( γ ) E(\gamma) E ( γ ) be the set of edges of the simple path γ \gamma γ and define
the weight
p γ : = det ( Y E ( γ ) , E ( γ ) ) . (6) p_{\gamma}:=\det\left(Y_{E(\gamma),E(\gamma)}\right). \tag*{(6)} p γ := det ( Y E ( γ ) , E ( γ ) ) . (6)
Then the MFPT of the LERW (1) can be rewritten as
MFPT L E R W ( u , v ) = ∑ γ ∈ Γ ( u , v ) p γ ∣ γ ∣ E . (7) \operatorname{MFPT}^{\mathrm{LERW}}(u,v)=\sum_{\gamma\in\Gamma(u,v)}p_{\gamma}|\gamma|_{E}. \tag*{(7)} MFPT LERW ( u , v ) = γ ∈ Γ ( u , v ) ∑ p γ ∣ γ ∣ E . (7)
Figure 1.
The estimator returned by Algorithm 1 is not necessarily unbiased for a finite number of sampled trajectories, since undiscovered paths are excluded from the normalized weighted average. However, the cumulative probability mass M N = ∑ γ ∈ G N p γ M_N=\sum_{\gamma\in\mathcal{G}_N}p_{\gamma} M N = ∑ γ ∈ G N p γ provides a direct measure of the completeness of the discovered path set. In Appendix C, we establish the deterministic error bound
∣ MFPT L E R W ( u , v ) − MFPT ^ N L E R W ( u , v ) ∣ ≤ ( 1 − M N ) ( ∣ V ∣ − 1 − d G ( u , v ) ) \left|\operatorname{MFPT}^{\mathrm{LERW}}(u,v)-\widehat{\operatorname{MFPT}}_{N}^{\mathrm{LERW}}(u,v)\right|
\leq(1-M_N)(|V|-1-d_G(u,v)) MFPT LERW ( u , v ) − MFPT N LERW ( u , v ) ≤ ( 1 − M N ) ( ∣ V ∣ − 1 − d G ( u , v ))
where d G ( u , v ) d_G(u,v) d G ( u , v ) is the length of the shortest path between u u u and v i n G v in G v in G . We also derive an interval containing the exact MFPT and prove that the estimator converges almost surely to the exact value as N → ∞ N\to\infty N → ∞ . Let us observe that this procedure does not estimate the MFPT by taking the empirical average of the sampled LERW lengths. Instead, sampling is used only to discover candidate simple paths γ \gamma γ . Each discovered path is then assigned its theoretical probability weight p γ p_{\gamma} p γ through the determinant of the kernel Y Y Y . During Step 2, one may also monitor the cumulative mass ∑ γ ∈ G p γ \sum_{\gamma\in\mathcal{G}}p_{\gamma} ∑ γ ∈ G p γ , which provides an estimate of the fraction of total probability already captured by the currently discovered paths. Furthermore, the LERW-based path generation can be replaced by an explicit enumeration of simple paths, for
Algorithm 1: MFPTL E R W ( u , v ) ^{\mathrm{LERW}}(u,v) LERW ( u , v )
Kernel precomputation. Form the weighted Laplacian L : = B C B T L:=BCB^{\mathsf{T}} L := B C B T , compute its Moore–Penrose pseudoinverse L † L^{\dagger} L † , and define the edge kernel
Y : = C 1 / 2 B T L † B C 1 / 2 . Y:=C^{1/2}B^{\mathsf{T}}L^{\dagger}BC^{1/2}. Y := C 1/2 B T L † B C 1/2 .
Candidate LERW paths. For i = 1 , … , N i=1,\ldots,N i = 1 , … , N : simulate a random walk from u u u until the first hitting time of v v v ; apply loop erasure to obtain a simple path γ \gamma γ . Store each distinct γ \gamma γ in a set G \mathcal{G} G .
Determinantal weights. For each γ ∈ G \gamma\in\mathcal{G} γ ∈ G : extract its edge set E ( γ ) E(\gamma) E ( γ ) , form the principal submatrix Y E ( γ ) , E ( γ ) Y_{E(\gamma),E(\gamma)} Y E ( γ ) , E ( γ ) , and set
p γ = det ( Y E ( γ ) , E ( γ ) ) . p_{\gamma}=\det\left(Y_{E(\gamma),E(\gamma)}\right). p γ = det ( Y E ( γ ) , E ( γ ) ) .
MFPT estimate. Return
MFPT ^ L E R W ( u , v ) = ∑ γ ∈ G p γ ∣ γ ∣ E ∑ γ ∈ G p γ . \widehat{\operatorname{MFPT}}^{\mathrm{LERW}}(u,v)=
\frac{\sum_{\gamma\in\mathcal{G}}p_{\gamma}|\gamma|_{E}}
{\sum_{\gamma\in\mathcal{G}}p_{\gamma}}. MFPT LERW ( u , v ) = ∑ γ ∈ G p γ ∑ γ ∈ G p γ ∣ γ ∣ E .
Figure 1 (PDF p. 4). Mean First Passage Time of Loop Erased Random Walks between the different pairs of nodes of a Watts-Strogatz graph [31 ] with 15 nodes, a rewiring probability of 0.1, and a mean degree of 4. The number of samples in the Monte Carlo approach is 40000. On the x-axis, we have the MFPT obtained with the algorithm 1 and on the y-axis, we have the MFPT obtained with an MC-MC approach with empirical average.
instance using a depth-first search (DFS) strategy [29 ] . We know that the number of paths can grow exponentially as the size of the graph increases; however this method performs very well on large sparse networks, where it is possible to efficiently enumerate the paths between two nodes, as well as on small networks. For the numerical comparisons against the first bisector, we report the maximum absolute deviation
ε max = max i ∣ y i − x i ∣ , (8) \varepsilon_{\max} = \max_i \lvert y_i - x_i \rvert, \tag*{(8)} ε m a x = i max ∣ y i − x i ∣ , (8)
where x i x_i x i and y i y_i y i are the coordinates of the plotted points. We apply this method to a Watts-Strogatz graph [31 ] with 15 nodes, a rewiring probability of 0.1, and a mean degree of 4. The results obtained by using the algorithm 1 are shown in Fig. 1 and compared with those obtained with an MC-MC approach relying on the computation of empirical averages. The two approaches agree closely, with ε max = 3.6 × 10 − 2 \varepsilon_{\max} = 3.6 \times10^{-2} ε m a x = 3.6 × 1 0 − 2 . Another application is on a toy example of weighted graph shown in the inset of Figure 2 . Let us recall that in the weighted graph, C 1 / 2 ≠ I C^{1/2} \ne I C 1/2 = I , the edge conductances modify the random-walk transition probabilities and hence the distribution of loop-erased paths. If passage cost is of interest, an independent traversal-cost function t e t_e t e must be specified and inserted in the path sum. The results are reported in the main panel of Figure 2 ; the largest absolute discrepancy between the two estimates is ε max = 9.6 × 10 − 2 \varepsilon_{\max} = 9.6 \times10^{-2} ε m a x = 9.6 × 1 0 − 2 . The computational cost depends on Laplacian pseudoinverse computation and, most importantly, the number of distinct simple paths examined; spanning trees need not be explicitly enumerated. We have to enumerate paths between nodes and this can require exponential time in the worst case, since the number of such paths may itself be exponential. This approach is therefore especially effective for small graphs or sparse networks. Having quantified the effective part of the random walk that remains after loop erasure, we now turn to the complementary question: what is removed during this procedure? In the next section, we study the distribution of erased loop sizes and show that it can be described using the same spanning-tree and transfer-current framework.
Figure 2. Main Panel shows the Mean First Passage Time of Loop Erased Random Walks between the different pairs of nodes of a weighted graph. The number of samples in the Monte Carlo approach is 40000. On the x-axis, we have the MFPT obtained with the algorithm 1 and on the y-axis, we have the MFPT obtained with an MC-MC approach with empirical average. Inset shows the example of weighted graph we used. Weights are reported on each link whose thickness increases as the weight gets larger.
Distribution of erased loops sizes of LERW on an arbitrary graph
Let G = ( V , E ) G=(V,E) G = ( V , E ) be a finite connected, simple, undirected, unweighted graph.
Definition 1 (Spanning Forest). A spanning forest of G G G is a subgraph F = ( V , E F ) F=(V,E_F) F = ( V , E F ) such that E F ⊆ E E_F \subseteq E E F ⊆ E , F F F is acyclic.
Definition 2 (k k k -Component Spanning Forest and spanning tree). A spanning forest F F F of G G G is called a k k k -component spanning forest if F F F has exactly k k k connected components, counting isolated vertices as single-vertex components. A
spanning tree of G G G is a 1 1 1 -component spanning forest of G G G . We denote by
T ( G ) : = { spanning trees of G } \mathcal{T}(G) := \{\text{spanning trees of }G\} T ( G ) := { spanning trees of G }
the set of all spanning trees of G G G .
Definition 3 (k k k -Excess Subgraph and spanning unicycle). A subgraph H = ( V , E H ) H=(V,E_H) H = ( V , E H ) of G G G is called a k k k -excess subgraph [32 ] if there exists a spanning tree T = ( V , E T ) T=(V,E_T) T = ( V , E T ) of G G G such that
E H = E T ∪ X , E_H = E_T \cup X, E H = E T ∪ X , where X ⊆ E ∖ E T X \subseteq E \setminus E_T X ⊆ E ∖ E T and ∣ X ∣ = k |X|=k ∣ X ∣ = k . A spanning unicycle is a 1 1 1 -excess subgraph of G G G . We denote by
U k ( G ) : = { k -excess subgraphs of G } \mathcal{U}_k(G) := \{k\text{-excess subgraphs of }G\} U k ( G ) := { k -excess subgraphs of G } the set of all k k k -excess subgraphs of G G G .
Fix a vertex o ∈ V o \in V o ∈ V . Let ( X n ) n ≥ 0 (X_n)_{n\geq0} ( X n ) n ≥ 0 be a random walk on G G G started at o o o . For N ≥ 0 N \geq0 N ≥ 0 , denote by
ω N = ( X 0 , X 1 , … , X N ) \omega_N=(X_0,X_1,\ldots,X_N) ω N = ( X 0 , X 1 , … , X N )
the random walk path up to time N N N . As already observed, given a finite path ω = ( v 0 , … , v N ) \omega=(v_0,\ldots,v_N) ω = ( v 0 , … , v N ) , its loop-erasure, denoted LE ( ω ) \operatorname{LE}(\omega) LE ( ω ) , is obtained by chronologically removing loops: whenever v i = v j v_i=v_j v i = v j with i < j i<j i < j , delete the segment ( v i + 1 , … , v j ) (v_{i+1},\ldots,v_j) ( v i + 1 , … , v j ) and continue. The resulting path is self-avoiding. Denote by
η N : = LE ( ω N ) \eta_N:=\operatorname{LE}(\omega_N) η N := LE ( ω N )
the loop-erased random walk (LERW) up to time N N N . The LERW determines a spanning tree structure in the following sense. If we let N N N to grow and stop the process when the walk first visits all vertices, the loop-erased path construction induces a spanning tree (see Wilson’s algorithm) [14 ] . Thus LERW and spanning trees are probabilistically equivalent objects on finite graphs. Fix ℓ ≥ 2 \ell\geq2 ℓ ≥ 2 . We study the probability that the ( N + 1 ) (N+1) ( N + 1 ) -th step of the random walk creates a loop of size ℓ \ell ℓ that is erased by the loop-erasure.
Definition 4 (Loop of size ℓ \ell ℓ ). Let G = ( V , E ) G=(V,E) G = ( V , E ) be a finite, connected, simple, undirected graph, and let ( X n ) n ≥ 0 (X_n)_{n\geq0} ( X n ) n ≥ 0 be a random walk on G G G , started at a vertex o ∈ V o\in V o ∈ V . For N ≥ 0 N\geq0 N ≥ 0 , denote by
ω N = ( X 0 , X 1 , … , X N ) \omega_N=(X_0,X_1,\ldots,X_N) ω N = ( X 0 , X 1 , … , X N ) the random-walk trajectory up to time N N N , and by
η N = LE ( ω N ) = ( Y 0 ( N ) , … , Y m N ( N ) ) \eta_N=\operatorname{LE}(\omega_N)=(Y_0^{(N)},\ldots,Y_{m_N}^{(N)}) η N = LE ( ω N ) = ( Y 0 ( N ) , … , Y m N ( N ) ) its chronological loop erasure. At step N + 1 N+1 N + 1 , a loop of size ℓ \ell ℓ is formed and erased if the new vertex X N + 1 X_{N+1} X N + 1 already belongs to η N \eta_N η N , say
X N + 1 = Y j ( N ) X_{N+1}=Y_j^{(N)} X N + 1 = Y j ( N ) for some 0 ≤ j ≤ m N 0\leq j\leq m_N 0 ≤ j ≤ m N . Its size is
ℓ = m N − j + 1. \ell=m_N-j+1. ℓ = m N − j + 1. On a simple graph, ℓ ≥ 2 \ell\geq2 ℓ ≥ 2 .
Let P N ( ℓ ) P_N(\ell) P N ( ℓ ) denote the probability that step N + 1 N+1 N + 1 creates and erases a loop of size ℓ \ell ℓ . We define the long-time erased-loop probability by
P ( ℓ ) = lim N → ∞ P N ( ℓ ) , P(\ell)=\lim_{N\to\infty}P_N(\ell), P ( ℓ ) = N → ∞ lim P N ( ℓ ) ,
whenever this limit exists. This measures the expected frequency per random-walk step of erased loops of size ℓ \ell ℓ . The correspondence below is understood with the long-time convention of [20 ] . Let T T T be a uniformly random spanning tree of G G G , and let e = { u , v } e=\{u,v\} e = { u , v } be an edge chosen uniformly at random from E ( G ) E(G) E ( G ) . We define
P s t ( ℓ ) = Pr ( d T ( u , v ) + 1 = ℓ ) , P_{\mathrm{st}}(\ell)=\Pr(d_T(u,v)+1=\ell), P st ( ℓ ) = Pr ( d T ( u , v ) + 1 = ℓ ) ,
where d T ( u , v ) d_T(u,v) d T ( u , v ) denotes the distance between u u u and v v v in T T T . For e ∉ T e\notin T e ∈ / T , the quantity d T ( u , v ) + 1 d_T(u,v)+1 d T ( u , v ) + 1 is the length of the unique cycle formed by adding e e e to T T T . If e ∈ T e\in T e ∈ T , then d T ( u , v ) = 1 d_T(u,v)=1 d T ( u , v ) = 1 , and we assign the value ℓ = 2 \ell=2 ℓ = 2 by convention. We have then the following theorem.
Theorem 5 (Dhar–Dhar correspondence [20 ] ). For a finite connected simple undirected unweighted graph G G G , with the long-time erased-loop convention of [20 ] ,
P ( ℓ ) = P s t ( ℓ ) ℓ . (9) P(\ell)=\frac{P_{\mathrm{st}}(\ell)}{\ell}. \tag*{(9)} P ( ℓ ) = ℓ P st ( ℓ ) . (9)
Hence P ( ℓ ) P(\ell) P ( ℓ ) is determined entirely by spanning tree edge inclusion probabilities. The established correspondence and its use here are discussed in Appendix D. The question now is how to determine P s t ( ℓ ) P_{\mathrm{st}}(\ell) P st ( ℓ ) . To achieve this goal, let us consider separately the cases ℓ > 2 \ell>2 ℓ > 2 and ℓ = 2 \ell=2 ℓ = 2 .
Case ℓ > 2 \ell>2 ℓ > 2
Let C ⊂ G C\subset G C ⊂ G be a fixed simple cycle of length ℓ > 2 \ell>2 ℓ > 2 with
E ( C ) = { e 1 , … , e ℓ } . E(C)=\{e_1,\ldots,e_\ell\}. E ( C ) = { e 1 , … , e ℓ } .
Let T ( G ) \mathcal{T}(G) T ( G ) denote the set of spanning trees of G G G , and define P s t ( ℓ ) P_{\mathrm{st}}(\ell) P st ( ℓ ) as the edge-sampled probability of a fundamental cycle of length ℓ \ell ℓ . For a fixed cycle C C C , consider the event
∣ E ( T ) ∩ E ( C ) ∣ = ℓ − 1 , |E(T)\cap E(C)|=\ell-1, ∣ E ( T ) ∩ E ( C ) ∣ = ℓ − 1 ,
that is, T T T contains all but one edge of C C C . Equivalently,
E ( T ) ∩ E ( C ) = E ( C ) ∖ { e } for some e ∈ E ( C ) . E(T)\cap E(C)=E(C)\setminus\{e\}\quad\text{for some }e\in E(C). E ( T ) ∩ E ( C ) = E ( C ) ∖ { e } for some e ∈ E ( C ) .
If this occurs, then adding the missing edge e e e to T T T creates exactly one cycle, namely C C C . Indeed, since T T T is a tree, adding any edge produces a unique cycle, and here that cycle must be C C C . Hence
U : = T ∪ { e } U:=T\cup\{e\} U := T ∪ { e }
is a spanning unicycle whose unique cycle is C C C . Conversely, let U U U be a spanning unicycle whose unique cycle is C C C . Removing any edge e ∈ E ( C ) e\in E(C) e ∈ E ( C ) yields a spanning tree
T = U ∖ { e } ∈ T ( G ) , T=U\setminus\{e\}\in\mathcal{T}(G), T = U ∖ { e } ∈ T ( G ) ,
and this tree contains exactly ℓ − 1 \ell-1 ℓ − 1 edges of C C C . Moreover, each unicycle U U U with cycle C C C corresponds to exactly ℓ \ell ℓ pairs ( T , e ) (T,e) ( T , e ) , since there are ℓ \ell ℓ possible edges in C C C that can be removed. Therefore,
P s t ( ℓ ) = 1 ∣ E ∣ ∣ T ( G ) ∣ ∑ C : ∣ C ∣ = ℓ # { T ∈ T ( G ) : ∣ E ( T ) ∩ E ( C ) ∣ = ℓ − 1 } . P_{\mathrm{st}}(\ell)=\frac{1}{|E||\mathcal{T}(G)|}\sum_{\substack{C:|C|=\ell}}\#\left\{T\in\mathcal{T}(G):\ |E(T)\cap E(C)|=\ell-1\right\}. P st ( ℓ ) = ∣ E ∣∣ T ( G ) ∣ 1 C : ∣ C ∣ = ℓ ∑ # { T ∈ T ( G ) : ∣ E ( T ) ∩ E ( C ) ∣ = ℓ − 1 } .
Case ℓ = 2 \ell=2 ℓ = 2 . Let u ≠ v u\ne v u = v be two distinct vertices and let
C = { ( u , v ) , ( v , u ) } . C=\{(u,v),(v,u)\}. C = {( u , v ) , ( v , u )} .
A cycle of length 2 2 2 corresponds to traversing the same edge in opposite directions (in the directed sense), rather than to a simple undirected cycle. In this case,
∣ E ( T ) ∩ E ( C ) ∣ = 1 |E(T)\cap E(C)|=1 ∣ E ( T ) ∩ E ( C ) ∣ = 1
meaning that T T T contains the undirected edge ( u , v ) (u,v) ( u , v ) . If we “add” this edge again, no new physical cycle is created; the length-two case is the backtracking convention. Hence
P s t ( 2 ) = ∑ C : ∣ C ∣ = 2 # { T ∈ T ( G ) : ∣ E ( T ) ∩ E ( C ) ∣ = 1 } ∣ T ( G ) ∣ . P_{\mathrm{st}}(2)=\frac{\sum_{C:|C|=2}\#\left\{T\in\mathcal{T}(G):\ |E(T)\cap E(C)|=1\right\}}{|\mathcal{T}(G)|}. P st ( 2 ) = ∣ T ( G ) ∣ ∑ C : ∣ C ∣ = 2 # { T ∈ T ( G ) : ∣ E ( T ) ∩ E ( C ) ∣ = 1 } .
For each spanning tree T ∈ T ( G ) T\in\mathcal{T}(G) T ∈ T ( G ) , let
E ∖ E ( T ) = { e ∈ E ( G ) : e ∉ E ( T ) } E\setminus E(T)=\{e\in E(G):e\notin E(T)\} E ∖ E ( T ) = { e ∈ E ( G ) : e ∈ / E ( T )}
denote the set of non-tree edges (chords). If e = ( u , v ) ∈ E ∖ E ( T ) e=(u,v)\in E\setminus E(T) e = ( u , v ) ∈ E ∖ E ( T ) , then adding e e e to T T T creates a unique cycle, called the fundamental cycle of e e e with respect to T T T . Its length is
∣ C T ( e ) ∣ = d T ( u , v ) + 1 , |C_T(e)|=d_T(u,v)+1, ∣ C T ( e ) ∣ = d T ( u , v ) + 1 ,
where d T ( u , v ) d_T(u,v) d T ( u , v ) is the graph distance between u u u and v v v in T T T . This identity extends to all edges e = ( u , v ) ∈ E e=(u,v)\in E e = ( u , v ) ∈ E : if e ∈ E ( T ) e\in E(T) e ∈ E ( T ) , we may interpret it as producing a cycle of length 2 2 2 . Hence, for every ℓ ≥ 2 \ell\ge2 ℓ ≥ 2 ,
1 { ∣ C T ( e ) ∣ = ℓ } = 1 { d T ( u , v ) = ℓ − 1 } . \mathbf{1}_{\{|C_T(e)|=\ell\}}=\mathbf{1}_{\{d_T(u,v)=\ell-1\}}. 1 { ∣ C T ( e ) ∣ = ℓ } = 1 { d T ( u , v ) = ℓ − 1 } .
Now consider the following two-stage experiment:
With the backtracking convention when e ∈ T e\in T e ∈ T , the event L T ( e ) = ℓ L_T(e)=\ell L T ( e ) = ℓ is precisely { d T ( u , v ) = ℓ − 1 } \{d_T(u,v)=\ell-1\} { d T ( u , v ) = ℓ − 1 } . Therefore,
P s t ( ℓ ) = 1 ∣ T ( G ) ∣ ∑ T ∈ T ( G ) 1 ∣ E ∣ ∑ e = ( u , v ) ∈ E 1 { ∣ C T ( e ) ∣ = ℓ } . P_{\mathrm{st}}(\ell)=\frac{1}{|\mathcal{T}(G)|}\sum_{T\in\mathcal{T}(G)}\frac{1}{|E|}\sum_{e=(u,v)\in E}\mathbf{1}_{\{|C_T(e)|=\ell\}}. P st ( ℓ ) = ∣ T ( G ) ∣ 1 T ∈ T ( G ) ∑ ∣ E ∣ 1 e = ( u , v ) ∈ E ∑ 1 { ∣ C T ( e ) ∣ = ℓ } .
By using ∣ C T ( e ) ∣ = ℓ |C_T(e)|=\ell ∣ C T ( e ) ∣ = ℓ if and only if d T ( u , v ) = ℓ − 1 d_T(u,v)=\ell-1 d T ( u , v ) = ℓ − 1 , we obtain
P s t ( ℓ ) = 1 ∣ T ( G ) ∣ ∑ T ∈ T ( G ) 1 ∣ E ∣ ∑ ( u , v ) ∈ E 1 { d T ( u , v ) = ℓ − 1 } = 1 ∣ E ∣ ∑ ( u , v ) ∈ E 1 ∣ T ( G ) ∣ ∑ T ∈ T ( G ) 1 { d T ( u , v ) = ℓ − 1 } . \begin{aligned}
P_{\mathrm{st}}(\ell)=\frac{1}{|\mathcal{T}(G)|}\sum_{T\in\mathcal{T}(G)}\frac{1}{|E|}\sum_{(u,v)\in E}\mathbf{1}_{\{d_T(u,v)=\ell-1\}} \\
&=\frac{1}{|E|}\sum_{(u,v)\in E}\frac{1}{|\mathcal{T}(G)|}\sum_{T\in\mathcal{T}(G)}\mathbf{1}_{\{d_T(u,v)=\ell-1\}}.
\end{aligned} P st ( ℓ ) = ∣ T ( G ) ∣ 1 T ∈ T ( G ) ∑ ∣ E ∣ 1 ( u , v ) ∈ E ∑ 1 { d T ( u , v ) = ℓ − 1 } = ∣ E ∣ 1 ( u , v ) ∈ E ∑ ∣ T ( G ) ∣ 1 T ∈ T ( G ) ∑ 1 { d T ( u , v ) = ℓ − 1 } .
Particularly, we have
P s t ( 2 ) = 1 ∣ T ( G ) ∣ ∑ T ∈ T ( G ) 1 ∣ E ∣ ∑ ( u , v ) ∈ E 1 { d T ( u , v ) = 1 } (10) P_{\mathrm{st}}(2)=\frac{1}{|\mathcal{T}(G)|}\sum_{T\in\mathcal{T}(G)}\frac{1}{|E|}\sum_{(u,v)\in E}\mathbf{1}_{\{d_T(u,v)=1\}} \tag*{(10)} P st ( 2 ) = ∣ T ( G ) ∣ 1 T ∈ T ( G ) ∑ ∣ E ∣ 1 ( u , v ) ∈ E ∑ 1 { d T ( u , v ) = 1 } (10)
= 1 ∣ T ( G ) ∣ ∑ T ∈ T ( G ) ∣ V ∣ − 1 ∣ E ∣ (11) =\frac{1}{|\mathcal{T}(G)|}\sum_{T\in\mathcal{T}(G)}\frac{|V|-1}{|E|} \tag*{(11)} = ∣ T ( G ) ∣ 1 T ∈ T ( G ) ∑ ∣ E ∣ ∣ V ∣ − 1 (11)
= ∣ V ∣ − 1 ∣ E ∣ . (12) =\frac{|V|-1}{|E|}. \tag*{(12)} = ∣ E ∣ ∣ V ∣ − 1 . (12)
From that we get
P ( 2 ) = ∣ V ∣ − 1 2 ∣ E ∣ . (13) P(2)=\frac{|V|-1}{2|E|}. \tag*{(13)} P ( 2 ) = 2∣ E ∣ ∣ V ∣ − 1 . (13)
We use now the property of the matrix Y Y Y defined in (3) , the relations (4) and the definition (6) . Recall that for e = ( u , v ) ∈ E e=(u,v)\in E e = ( u , v ) ∈ E and a spanning tree T T T , the fundamental cycle created by adding e e e satisfies
∣ C T ( e ) ∣ = ℓ ⟺ d T ( u , v ) = ℓ − 1. |C_T(e)|=\ell\ \Longleftrightarrow\ d_T(u,v)=\ell-1. ∣ C T ( e ) ∣ = ℓ ⟺ d T ( u , v ) = ℓ − 1.
In a tree, the graph distance d T ( u , v ) d_T(u,v) d T ( u , v ) equals the length of the unique simple path between u u u and v v v , that is,
d T ( u , v ) = ∣ Path T ( u , v ) ∣ . d_T(u,v)=|\operatorname{Path}_T(u,v)|. d T ( u , v ) = ∣ Path T ( u , v ) ∣.
Therefore,
1 { d T ( u , v ) = ℓ − 1 } = ∑ δ ∈ Γ ℓ − 1 ( u , v ) 1 { Path T ( u , v ) = δ } , \mathbf{1}_{\{d_T(u,v)=\ell-1\}}=\sum_{\delta\in\Gamma_{\ell-1}(u,v)}\mathbf{1}_{\{\operatorname{Path}_T(u,v)=\delta\}}, 1 { d T ( u , v ) = ℓ − 1 } = δ ∈ Γ ℓ − 1 ( u , v ) ∑ 1 { Path T ( u , v ) = δ } ,
where Γ ℓ − 1 ( u , v ) \Gamma_{\ell-1}(u,v) Γ ℓ − 1 ( u , v ) denotes the set of simple u u u –v v v paths of length ℓ − 1 \ell-1 ℓ − 1 in G G G . Taking expectation with respect to the uniform spanning tree measure, we obtain
∑ T ∈ T ( G ) 1 { d T ( u , v ) = ℓ − 1 } ∣ T ( G ) ∣ = ∑ δ ∈ Γ ℓ − 1 ( u , v ) P ( Path T ( u , v ) = δ ) . \frac{\sum_{T\in\mathcal{T}(G)}\mathbf{1}_{\{d_T(u,v)=\ell-1\}}}{|\mathcal{T}(G)|}
=\sum_{\delta\in\Gamma_{\ell-1}(u,v)}\mathbb{P}(\operatorname{Path}_T(u,v)=\delta). ∣ T ( G ) ∣ ∑ T ∈ T ( G ) 1 { d T ( u , v ) = ℓ − 1 } = δ ∈ Γ ℓ − 1 ( u , v ) ∑ P ( Path T ( u , v ) = δ ) .
By using the determinantal formula
P ( Path T ( u , v ) = δ ) = det Y E ( δ ) , E ( δ ) = p δ , \mathbb{P}(\operatorname{Path}_T(u,v)=\delta)=\det Y_{E(\delta),E(\delta)}=p_\delta, P ( Path T ( u , v ) = δ ) = det Y E ( δ ) , E ( δ ) = p δ ,
we finally obtain
P s t ( ℓ ) = 1 ∣ E ∣ ∑ ( u , v ) ∈ E ∑ δ ∈ Γ ℓ − 1 ( u , v ) p δ . (14) P_{\mathrm{st}}(\ell)=\frac{1}{|E|}\sum_{(u,v)\in E}\sum_{\delta\in\Gamma_{\ell-1}(u,v)}p_\delta. \tag*{(14)} P st ( ℓ ) = ∣ E ∣ 1 ( u , v ) ∈ E ∑ δ ∈ Γ ℓ − 1 ( u , v ) ∑ p δ . (14)
We can then derive
P ( ℓ ) = 1 ℓ ∣ E ∣ ∑ ( u , v ) ∈ E ∑ δ ∈ Γ ℓ − 1 ( u , v ) p δ . (15) P(\ell)=\frac{1}{\ell|E|}\sum_{(u,v)\in E}\sum_{\delta\in\Gamma_{\ell-1}(u,v)}p_\delta. \tag*{(15)} P ( ℓ ) = ℓ ∣ E ∣ 1 ( u , v ) ∈ E ∑ δ ∈ Γ ℓ − 1 ( u , v ) ∑ p δ . (15)
We define π ( ℓ ) \pi(\ell) π ( ℓ ) as the proportion of loop of size ℓ \ell ℓ erased. We hence have the following corollary to Theorem 5.
Corollary 6. For any unweighted, simple, undirected, connected graph G G G ,
π ( ℓ ) = 1 ℓ ∑ ( u , v ) ∈ E ∑ δ ∈ Γ ℓ − 1 ( u , v ) p δ ∑ k ≥ 2 1 k ∑ ( u , v ) ∈ E ∑ β ∈ Γ k − 1 ( u , v ) p β . (16) \pi(\ell)=\frac{\frac{1}{\ell}\sum_{(u,v)\in E}\sum_{\delta\in\Gamma_{\ell-1}(u,v)}p_\delta}{\sum_{k\ge2}\frac{1}{k}\sum_{(u,v)\in E}\sum_{\beta\in\Gamma_{k-1}(u,v)}p_\beta}. \tag*{(16)} π ( ℓ ) = ∑ k ≥ 2 k 1 ∑ ( u , v ) ∈ E ∑ β ∈ Γ k − 1 ( u , v ) p β ℓ 1 ∑ ( u , v ) ∈ E ∑ δ ∈ Γ ℓ − 1 ( u , v ) p δ . (16)
Proof. Since P ( ℓ ) P(\ell) P ( ℓ ) is the stationary probability that a newly added step creates and erases a loop of size ℓ \ell ℓ , this does not directly give the proportion of a loop of size ℓ \ell ℓ erased, π ( ℓ ) \pi(\ell) π ( ℓ ) , because some new steps do not create a loop. We need to normalize. So we have
π ( ℓ ) = P ( ℓ ) ∑ k ≥ 2 P ( k ) = 1 ∣ E ∣ ∑ ( u , v ) ∈ E ∑ δ ∈ Γ ℓ − 1 ( u , v ) p δ ∑ k ≥ 2 1 k ∣ E ∣ ∑ ( u , v ) ∈ E ∑ β ∈ Γ k − 1 ( u , v ) p β = 1 ℓ ∑ ( u , v ) ∈ E ∑ δ ∈ Γ ℓ − 1 ( u , v ) p δ ∑ k ≥ 2 1 k ∑ ( u , v ) ∈ E ∑ β ∈ Γ k − 1 ( u , v ) p β . \begin{aligned}
\pi(\ell)=\frac{P(\ell)}{\sum_{k\ge2}P(k)} \\
&=\frac{\frac{1}{|E|}\sum_{(u,v)\in E}\sum_{\delta\in\Gamma_{\ell-1}(u,v)}p_\delta}{\sum_{k\ge2}\frac{1}{k|E|}\sum_{(u,v)\in E}\sum_{\beta\in\Gamma_{k-1}(u,v)}p_\beta} \\
&=\frac{\frac{1}{\ell}\sum_{(u,v)\in E}\sum_{\delta\in\Gamma_{\ell-1}(u,v)}p_\delta}{\sum_{k\ge2}\frac{1}{k}\sum_{(u,v)\in E}\sum_{\beta\in\Gamma_{k-1}(u,v)}p_\beta}.
\end{aligned} π ( ℓ ) = ∑ k ≥ 2 P ( k ) P ( ℓ ) = ∑ k ≥ 2 k ∣ E ∣ 1 ∑ ( u , v ) ∈ E ∑ β ∈ Γ k − 1 ( u , v ) p β ∣ E ∣ 1 ∑ ( u , v ) ∈ E ∑ δ ∈ Γ ℓ − 1 ( u , v ) p δ = ∑ k ≥ 2 k 1 ∑ ( u , v ) ∈ E ∑ β ∈ Γ k − 1 ( u , v ) p β ℓ 1 ∑ ( u , v ) ∈ E ∑ δ ∈ Γ ℓ − 1 ( u , v ) p δ .
That concludes the proof.
We used Eq. (16) to compute the distribution of erased loops on a Watts–Strogatz graph with 10 nodes, a rewiring probability of 0.5, and a mean degree of 4. The resulting distribution is shown in the main panel of Figure 3 . To validate the theoretical prediction, we compared it with empirical frequencies obtained by counting the sizes of erased loops generated by loop-erased random walks. The comparison is presented in the inset of Figure 3 . The theoretical distribution closely matches the empirical frequencies obtained from simulations, showing that formula 16 accurately captures the distribution of erased loop sizes in this network model (ε max = 1.5 × 10 − 3 \varepsilon_{\max}=1.5\times10^{-3} ε m a x = 1.5 × 1 0 − 3 in the inset).
Figure 3. Main panel shows the distribution of erased loops obtained with the relation 16 on a Watts–Strogatz graph with 10 nodes, a rewiring probability of 0.5 and a mean degree of 4. Inset shows the comparison between Frequencies obtained by the relation 16 and Frequencies observed with true loop erase random walk on this graph. On the y-axis, we have the frequency obtained with the formula 16 and on the x-axis, we have the frequency obtained by counting size of erased loops.
Case of complete graphs
Definition 7 (Complete graph). The complete graph on n n n vertices [24 ] , denoted by K n K_n K n , is a simple graph with a set
V ( K n ) = { v 1 , … , v n } V(K_n)=\{v_1,\ldots,v_n\} V ( K n ) = { v 1 , … , v n } and edge set
E ( K n ) = { { v i , v j } : 1 ≤ i < j ≤ n } . E(K_n)=\{\{v_i,v_j\}:1\le i<j\le n\}. E ( K n ) = {{ v i , v j } : 1 ≤ i < j ≤ n } . Similarly, every pair of distinct vertices is joined by an edge.
Let us now introduce Theorem 8 from [22 , 23 ] (for the sake of completeness a proof is given in Appendix E) useful in the scope of this work; in particular, we are interested in the following result 9 obtained as a corollary of the former theorem.
Theorem 8. Fix two distinct labels u , v ∈ [ n ] u,v\in[n] u , v ∈ [ n ] . For a tree T n T_n T n , let S n = S ( T n ; u , v ) S_n=S(T_n;u,v) S n = S ( T n ; u , v ) be the number of vertices on the unique u u u –v v v path (so the graph distance is d ( u , v ) = S n − 1 d(u,v)=S_n-1 d ( u , v ) = S n − 1 ). Assume T n T_n T n is chosen uniformly from the n n − 2 n^{n-2} n n − 2 labeled trees on [ n ] [n] [ n ] . For 2 ≤ k ≤ n 2\le k\le n 2 ≤ k ≤ n ,
P { S n = k } = k ( n − 2 ) ! ( n − k ) ! n k − 1 = k n − 1 ⋅ ( n ) k n k , (17) \mathbb{P}\{S_n=k\}=\frac{k(n-2)!}{(n-k)!n^{k-1}}=\frac{k}{n-1}\cdot\frac{(n)_k}{n^k}, \tag*{(17)} P { S n = k } = ( n − k )! n k − 1 k ( n − 2 )! = n − 1 k ⋅ n k ( n ) k , (17) where ( n ) k = n ( n − 1 ) ⋯ ( n − k + 1 ) (n)_k=n(n-1)\cdots(n-k+1) ( n ) k = n ( n − 1 ) ⋯ ( n − k + 1 ) is the falling factorial. Moreover, as n → ∞ n\to\infty n → ∞ ,
E [ S n ] n ⟶ π 2 . \frac{\mathbb{E}[S_n]}{\sqrt{n}}\longrightarrow\sqrt{\frac{\pi}{2}}. n E [ S n ] ⟶ 2 π .
Corollary (MFPT for LERW on K n K_n K n ). Let K n K_n K n be the complete graph with n n n vertices. For two vertices i i i and j j j , the mean first passage time (MFPT) of the loop-erased random walk (LERW) from i i i to j j j satisfies
MFPT L E R W ( i , j ) = ∑ k = 0 n − 2 ( n − 2 ) ! n k ( n − 2 − k ) ! . (18) \operatorname{MFPT}^{\mathrm{LERW}}(i,j)=\sum_{k=0}^{n-2}\frac{(n-2)!}{n^k(n-2-k)!}. \tag*{(18)} MFPT LERW ( i , j ) = k = 0 ∑ n − 2 n k ( n − 2 − k )! ( n − 2 )! . (18)
Proof. Let i ≠ j i\ne j i = j be two vertices of K n K_n K n and let T n T_n T n be a uniform labelled tree on [ n ] [n] [ n ] . The (unique) i i i –j j j path in T n T_n T n has vertex-length S n = S ( T n ; i , j ) S_n=S(T_n;i,j) S n = S ( T n ; i , j ) and edge-length
d ( i , j ) = S n − 1. d(i,j)=S_n-1. d ( i , j ) = S n − 1.
By Theorem 8, for k = 2 , … , n k=2,\ldots,n k = 2 , … , n ,
P { S n = k } = k n − 1 ⋅ ( n ) k n k . \mathbb{P}\{S_n=k\}=\frac{k}{n-1}\cdot\frac{(n)_k}{n^k}. P { S n = k } = n − 1 k ⋅ n k ( n ) k .
Hence
E [ d ( i , j ) ] = ∑ k = 2 n ( k − 1 ) P { S n = k } (19) \mathbb{E}[d(i,j)] = \sum_{k=2}^{n} (k-1)\mathbb{P}\{S_n=k\} \tag*{(19)} E [ d ( i , j )] = k = 2 ∑ n ( k − 1 ) P { S n = k } (19)
= ∑ k = 2 n ( k − 1 ) k n − 1 ( n k ) n k . (20) = \sum_{k=2}^{n} (k-1)\frac{k}{n-1}\frac{\binom{n}{k}}{n^k}. \tag*{(20)} = k = 2 ∑ n ( k − 1 ) n − 1 k n k ( k n ) . (20)
Using ( n ) k = n ( n − 1 ) ( n − 2 ) k − 2 (n)_k=n(n-1)(n-2)_{k-2} ( n ) k = n ( n − 1 ) ( n − 2 ) k − 2 , we rewrite (19) as
E [ d ( i , j ) ] = ∑ k = 2 n ( k − 1 ) k ( n − 2 ) k − 2 n k − 1 . \mathbb{E}[d(i,j)] = \sum_{k=2}^{n}(k-1)k\frac{(n-2)_{k-2}}{n^{k-1}}. E [ d ( i , j )] = k = 2 ∑ n ( k − 1 ) k n k − 1 ( n − 2 ) k − 2 .
Set j = k − 2 j=k-2 j = k − 2 so that j = 0 , … , n − 2 j=0,\ldots,n-2 j = 0 , … , n − 2 and define
a j : = ( n − 2 ) j n j . a_j:=\frac{(n-2)_j}{n^j}. a j := n j ( n − 2 ) j .
Then a j + 1 = n − 2 − j n a j a_{j+1}=\frac{n-2-j}{n}a_j a j + 1 = n n − 2 − j a j , hence
a j − a j + 1 = j + 2 n a j , a_j-a_{j+1}=\frac{j+2}{n}a_j, a j − a j + 1 = n j + 2 a j ,
from which we get
( j + 1 ) ( j + 2 ) n a j = ( j + 1 ) ( a j − a j + 1 ) . \frac{(j+1)(j+2)}{n}a_j=(j+1)(a_j-a_{j+1}). n ( j + 1 ) ( j + 2 ) a j = ( j + 1 ) ( a j − a j + 1 ) .
Therefore
E [ d ( i , j ) ] = ∑ j = 0 n − 2 ( j + 1 ) ( j + 2 ) n a j = ∑ j = 0 n − 2 ( j + 1 ) ( a j − a j + 1 ) . \begin{aligned}
\mathbb{E}[d(i,j)]=\sum_{j=0}^{n-2}\frac{(j+1)(j+2)}{n}a_j \\
&=\sum_{j=0}^{n-2}(j+1)(a_j-a_{j+1}).
\end{aligned} E [ d ( i , j )] = j = 0 ∑ n − 2 n ( j + 1 ) ( j + 2 ) a j = j = 0 ∑ n − 2 ( j + 1 ) ( a j − a j + 1 ) .
Summation by parts (telescoping) yields
∑ j = 0 n − 2 ( j + 1 ) ( a j − a j + 1 ) = ∑ j = 0 n − 2 a j − ( n − 1 ) a n − 1 . \sum_{j=0}^{n-2}(j+1)(a_j-a_{j+1})=\sum_{j=0}^{n-2}a_j-(n-1)a_{n-1}. j = 0 ∑ n − 2 ( j + 1 ) ( a j − a j + 1 ) = j = 0 ∑ n − 2 a j − ( n − 1 ) a n − 1 .
Since ( n − 2 ) n − 1 = 0 (n-2)_{n-1}=0 ( n − 2 ) n − 1 = 0 , we have a n − 1 = 0 a_{n-1}=0 a n − 1 = 0 , and thus
E [ d ( i , j ) ] = ∑ j = 0 n − 2 a j = ∑ j = 0 n − 2 ( n − 2 ) j n j . \mathbb{E}[d(i,j)]=\sum_{j=0}^{n-2}a_j=\sum_{j=0}^{n-2}\frac{(n-2)_j}{n^j}. E [ d ( i , j )] = j = 0 ∑ n − 2 a j = j = 0 ∑ n − 2 n j ( n − 2 ) j .
Finally, by using ( n − 2 ) j = ( n − 2 ) ! ( n − 2 − j ) ! (n-2)_j=\frac{(n-2)!}{(n-2-j)!} ( n − 2 ) j = ( n − 2 − j )! ( n − 2 )! , we obtain
MFPT L E R W ( i , j ) = E [ d ( i , j ) ] = ∑ j = 0 n − 2 ( n − 2 ) ! n j ( n − 2 − j ) ! , \operatorname{MFPT}^{\mathrm{LERW}}(i,j)=\mathbb{E}[d(i,j)]=\sum_{j=0}^{n-2}\frac{(n-2)!}{n^j(n-2-j)!}, MFPT LERW ( i , j ) = E [ d ( i , j )] = j = 0 ∑ n − 2 n j ( n − 2 − j )! ( n − 2 )! ,
which is exactly the claimed formula.
We can refine the leading asymptotic obtained from Theorem 8 by expanding the exact sum (18) for large n n n . Set
b n ( j ) = ( n − 2 ) j n j , 0 ≤ j ≤ n − 2. b_n(j)=\frac{(n-2)_j}{n^j},\qquad0\leq j\leq n-2. b n ( j ) = n j ( n − 2 ) j , 0 ≤ j ≤ n − 2.
For j = x n j=x\sqrt{n} j = x n , uniformly for x x x in any fixed compact subset of [ 0 , ∞ ) [0,\infty) [ 0 , ∞ ) , Taylor expansion gives
log b n ( j ) = ∑ r = 0 j − 1 log ( 1 − r + 2 n ) = − j ( j + 3 ) 2 n − j ( 2 j 2 + 9 j + 13 ) 12 n 2 + O ( j 2 n 2 + j 4 n 3 ) = − x 2 2 − 1 n ( 3 x 2 + x 3 6 ) + O ( n − 1 ) . \begin{aligned}
\log b_n(j)=\sum_{r=0}^{j-1}\log\left(1-\frac{r+2}{n}\right) \\
&=-\frac{j(j+3)}{2n}-\frac{j(2j^2+9j+13)}{12n^2}+O\left(\frac{j^2}{n^2}+\frac{j^4}{n^3}\right) \\
&=-\frac{x^2}{2}-\frac{1}{\sqrt{n}}\left(\frac{3x}{2}+\frac{x^3}{6}\right)+O(n^{-1}).
\end{aligned} log b n ( j ) = r = 0 ∑ j − 1 log ( 1 − n r + 2 ) = − 2 n j ( j + 3 ) − 12 n 2 j ( 2 j 2 + 9 j + 13 ) + O ( n 2 j 2 + n 3 j 4 ) = − 2 x 2 − n 1 ( 2 3 x + 6 x 3 ) + O ( n − 1 ) .
Consequently,
b n ( j ) = e − x 2 / 2 [ 1 − 1 n ( 3 x 2 + x 3 6 ) + O ( n − 1 ) ] . b_n(j)=e^{-x^2/2}\left[1-\frac{1}{\sqrt{n}}\left(\frac{3x}{2}+\frac{x^3}{6}\right)+O(n^{-1})\right]. b n ( j ) = e − x 2 /2 [ 1 − n 1 ( 2 3 x + 6 x 3 ) + O ( n − 1 ) ] .
Summing by an Euler–Maclaurin [33 ] approximation (with the tails controlled by Gaussian bounds), we obtain
∑ j = 0 n − 2 b n ( j ) = n ∫ 0 ∞ e − x 2 / 2 d x + 1 2 \sum_{j=0}^{n-2}b_n(j)=\sqrt{n}\int_{0}^{\infty}e^{-x^2/2}\,dx+\frac{1}{2} j = 0 ∑ n − 2 b n ( j ) = n ∫ 0 ∞ e − x 2 /2 d x + 2 1
− ∫ 0 ∞ e − x 2 / 2 ( 3 x 2 + x 3 6 ) d x + O ( n − 1 / 2 ) = π n 2 + 1 2 − 3 2 − 1 3 + O ( n − 1 / 2 ) . \begin{aligned}
-\int_{0}^{\infty}e^{-x^2/2}\left(\frac{3x}{2}+\frac{x^3}{6}\right)\,dx+O(n^{-1/2}) \\
&=\sqrt{\frac{\pi n}{2}}+\frac{1}{2}-\frac{3}{2}-\frac{1}{3}+O(n^{-1/2}).
\end{aligned} − ∫ 0 ∞ e − x 2 /2 ( 2 3 x + 6 x 3 ) d x + O ( n − 1/2 ) = 2 π n + 2 1 − 2 3 − 3 1 + O ( n − 1/2 ) .
Thus the correct constant-order refinement is
MFPT L E R W ( i , j ) = π n 2 − 4 3 + O ( n − 1 / 2 ) . (21) \operatorname{MFPT}^{\mathrm{LERW}}(i,j)=\sqrt{\frac{\pi n}{2}}-\frac{4}{3}+O(n^{-1/2}). \tag*{(21)} MFPT LERW ( i , j ) = 2 π n − 3 4 + O ( n − 1/2 ) . (21)
In particular, the leading asymptotic is MFPT L E R W ( i , j ) ∼ π n / 2 \operatorname{MFPT}^{\mathrm{LERW}}(i,j)\sim\sqrt{\pi n/2} MFPT LERW ( i , j ) ∼ π n /2 .
In Figure 4 , we used the exact formula 18, the asymptotic formula 21 and a Monte Carlo approach to compute the MFPT between two nodes of different complete graphs. The results obtained using the different approaches show very good agreement. The corresponding absolute errors relative to the exact MFPT are presented in Appendix § 10 , Figure 21 . In particular, the error associated with the asymptotic approximation decreases as the graph size increases, tending to zero in the large-graph limit, while the Monte Carlo estimates remain close to the exact values. In the complete graph K n K_n K n , the number of edges is
Figure 4. Mean First Passage Time of Loop Erased Random Walks between two pairs of nodes of complete graphs.
Figure 21. Absolute errors of the Monte Carlo estimate and the asymptotic approximation of Eq. (21) , both measured relative to the exact MFPT of Eq. (18) , as functions of the complete-graph size n n n .
∣ E ( K n ) ∣ = n ( n − 1 ) 2 . (22) \lvert E(K_n)\rvert=\frac{n(n-1)}{2}. \tag*{(22)} ∣ E ( K n )∣ = 2 n ( n − 1 ) . (22)
Therefore the probability that a spanning tree contains exactly ℓ − 1 \ell-1 ℓ − 1 edges of some simple cycle of length ℓ \ell ℓ in the complete graph K n K_n K n is,
P s t ( ℓ , K n ) = 2 n ( n − 1 ) ∑ ( u , v ) ∈ E ∑ δ ∈ Γ ℓ − 1 ( u , v ) p δ . (23) P_{\mathrm{st}}(\ell,K_n)=\frac{2}{n(n-1)}\sum_{(u,v)\in E}\sum_{\delta\in\Gamma_{\ell-1}(u,v)}p_\delta. \tag*{(23)} P st ( ℓ , K n ) = n ( n − 1 ) 2 ( u , v ) ∈ E ∑ δ ∈ Γ ℓ − 1 ( u , v ) ∑ p δ . (23)
From the theorem 8 we obtain
P s t ( ℓ , K n ) = 2 n ( n − 1 ) ∑ ( u , v ) ∈ E P { S n = ℓ } (24) P_{\mathrm{st}}(\ell,K_n)=\frac{2}{n(n-1)}\sum_{(u,v)\in E}\mathbb{P}\{S_n=\ell\} \tag*{(24)} P st ( ℓ , K n ) = n ( n − 1 ) 2 ( u , v ) ∈ E ∑ P { S n = ℓ } (24)
= P { S n = ℓ } = ℓ n − 1 ⋅ ( n ) ℓ n ℓ . (25) =\mathbb{P}\{S_n=\ell\}=\frac{\ell}{n-1}\cdot\frac{(n)_\ell}{n^\ell}. \tag*{(25)} = P { S n = ℓ } = n − 1 ℓ ⋅ n ℓ ( n ) ℓ . (25)
Thus the stationary probability that a newly added step creates and erases a loop of size ℓ \ell ℓ is
P ( ℓ , K n ) = 1 n − 1 ⋅ ( n ) ℓ n ℓ . (26) P(\ell,K_n)=\frac{1}{n-1}\cdot\frac{(n)_\ell}{n^\ell}. \tag*{(26)} P ( ℓ , K n ) = n − 1 1 ⋅ n ℓ ( n ) ℓ . (26)
This is the well-known solution of the classical birthday problem [34 ] . Consequently, the proportion of loop of size ℓ \ell ℓ erased π K n ( ℓ ) \pi_{K_n}(\ell) π K n ( ℓ ) is
π K n ( ℓ ) = 1 n − 1 ⋅ ( n ) ℓ n ℓ ∑ k ≥ 2 1 n − 1 ⋅ ( n ) k n k = ( n ) ℓ n ℓ ∑ k ≥ 2 ( n ) k n k . (27) \pi_{K_n}(\ell)=\frac{\frac{1}{n-1}\cdot\frac{(n)_\ell}{n^\ell}}{\sum_{k\ge2}\frac{1}{n-1}\cdot\frac{(n)_k}{n^k}}=\frac{\frac{(n)_\ell}{n^\ell}}{\sum_{k\ge2}\frac{(n)_k}{n^k}}. \tag*{(27)} π K n ( ℓ ) = ∑ k ≥ 2 n − 1 1 ⋅ n k ( n ) k n − 1 1 ⋅ n ℓ ( n ) ℓ = ∑ k ≥ 2 n k ( n ) k n ℓ ( n ) ℓ . (27)
We may therefore write
π K n ( ℓ ) = a n ( ℓ ) ∑ k = 2 n a n ( k ) , (28) \pi_{K_n}(\ell)=\frac{a_n(\ell)}{\sum_{k=2}^{n}a_n(k)}, \tag*{(28)} π K n ( ℓ ) = ∑ k = 2 n a n ( k ) a n ( ℓ ) , (28)
where we define
a n ( ℓ ) = ( n ) ℓ n ℓ = ∏ i = 0 ℓ − 1 ( 1 − i n ) . (29) a_n(\ell)=\frac{(n)_\ell}{n^\ell}=\prod_{i=0}^{\ell-1}\left(1-\frac{i}{n}\right). \tag*{(29)} a n ( ℓ ) = n ℓ ( n ) ℓ = i = 0 ∏ ℓ − 1 ( 1 − n i ) . (29)
We now study the asymptotic behavior of a n ( ℓ ) a_n(\ell) a n ( ℓ ) , retaining the finite-size terms that affect the approximation. Taking
logarithms and using log ( 1 − z ) = − z − z 2 / 2 + O ( z 3 ) \log(1-z)=-z-z^2/2+O(z^3) log ( 1 − z ) = − z − z 2 /2 + O ( z 3 ) gives
log a n ( ℓ ) = ∑ j = 0 ℓ − 1 log ( 1 − j n ) = − ℓ ( ℓ − 1 ) 2 n − ℓ ( ℓ − 1 ) ( 2 ℓ − 1 ) 12 n 2 + O ( ℓ 4 n 3 ) . (30) \begin{aligned}
\log a_n(\ell)&=\sum_{j=0}^{\ell-1}\log\left(1-\frac{j}{n}\right)\\
&=-\frac{\ell(\ell-1)}{2n}-\frac{\ell(\ell-1)(2\ell-1)}{12n^2}+O\left(\frac{\ell^4}{n^3}\right). \tag*{(30)}
\end{aligned} log a n ( ℓ ) = j = 0 ∑ ℓ − 1 log ( 1 − n j ) = − 2 n ℓ ( ℓ − 1 ) − 12 n 2 ℓ ( ℓ − 1 ) ( 2 ℓ − 1 ) + O ( n 3 ℓ 4 ) . (30)
The expansion is valid with the stated error for ℓ = o ( n ) \ell=o(n) ℓ = o ( n ) ; the remainder is o ( 1 ) o(1) o ( 1 ) for ℓ = o ( n 3 / 4 ) \ell=o(n^{3/4}) ℓ = o ( n 3/4 ) . In the principal scaling regime ℓ = O ( n ) \ell=O(\sqrt{n}) ℓ = O ( n ) , the remainder is O ( n − 1 ) O(n^{-1}) O ( n − 1 ) . Dropping the quadratic correction yields a n ( ℓ ) ∼ exp [ − ℓ 2 / ( 2 n ) ] a_n(\ell)\sim\exp[-\ell^2/(2n)] a n ( ℓ ) ∼ exp [ − ℓ 2 / ( 2 n )] when ℓ = O ( n ) \ell=O(\sqrt{n}) ℓ = O ( n ) .
The exact normalizer in (27) is
Z n = ∑ k = 2 n a n ( k ) . Z_n=\sum_{k=2}^{n}a_n(k). Z n = k = 2 ∑ n a n ( k ) .
To obtain its constant-order correction, set k = x n k=x\sqrt{n} k = x n . Then
a n ( k ) = e − x 2 / 2 [ 1 + 1 n ( x 2 − x 3 6 ) + O ( n − 1 ) ] a_n(k)=e^{-x^2/2}\left[1+\frac{1}{\sqrt{n}}\left(\frac{x}{2}-\frac{x^3}{6}\right)+O(n^{-1})\right] a n ( k ) = e − x 2 /2 [ 1 + n 1 ( 2 x − 6 x 3 ) + O ( n − 1 ) ]
uniformly for x x x in compact intervals. The Riemann-sum expansion, including the endpoint term, yields
∑ k = 0 n a n ( k ) = n ∫ 0 ∞ e − x 2 / 2 d x + 1 2 + ∫ 0 ∞ e − x 2 / 2 ( x 2 − x 3 6 ) d x + O ( n − 1 / 2 ) = π n 2 + 2 3 + O ( n − 1 / 2 ) . \sum_{k=0}^{n} a_n(k) = \sqrt{n}\int_{0}^{\infty} e^{-x^2/2}\,dx + \frac{1}{2}
+ \int_{0}^{\infty} e^{-x^2/2}\left(\frac{x}{2}-\frac{x^3}{6}\right)\,dx + O(n^{-1/2})
= \sqrt{\frac{\pi n}{2}}+\frac{2}{3}+O(n^{-1/2}). k = 0 ∑ n a n ( k ) = n ∫ 0 ∞ e − x 2 /2 d x + 2 1 + ∫ 0 ∞ e − x 2 /2 ( 2 x − 6 x 3 ) d x + O ( n − 1/2 ) = 2 π n + 3 2 + O ( n − 1/2 ) .
Because a n ( 0 ) = a n ( 1 ) = 1 a_n(0)=a_n(1)=1 a n ( 0 ) = a n ( 1 ) = 1 , the required asymptotic behavior normalizer is
Z n = π n 2 − 4 3 + O ( n − 1 / 2 ) . (31) Z_n=\sqrt{\frac{\pi n}{2}}-\frac{4}{3}+O(n^{-1/2}). \tag*{(31)} Z n = 2 π n − 3 4 + O ( n − 1/2 ) . (31)
This normalizer is identical, at finite n n n , to the MFPT sum in (18), even though their first two asymptotic terms agree. For ℓ = ⌊ x n ⌋ \ell=\lfloor x\sqrt{n}\rfloor ℓ = ⌊ x n ⌋ with fixed x > 0 x>0 x > 0 we obtain the refined finite n n n approximation
π K n ( ℓ ) ≈ exp [ − ℓ ( ℓ − 1 ) 2 n − ℓ ( ℓ − 1 ) ( 2 ℓ − 1 ) 12 n 2 ] π n / 2 − 4 / 3 . (32) \pi K_n(\ell)\approx
\frac{\exp\left[-\frac{\ell(\ell-1)}{2n}-\frac{\ell(\ell-1)(2\ell-1)}{12n^2}\right]}
{\sqrt{\pi n/2}-4/3}. \tag*{(32)} π K n ( ℓ ) ≈ π n /2 − 4/3 exp [ − 2 n ℓ ( ℓ − 1 ) − 12 n 2 ℓ ( ℓ − 1 ) ( 2 ℓ − 1 ) ] . (32)
For ℓ = O ( n ) \ell=O(\sqrt{n}) ℓ = O ( n ) , the relative error in this refined approximation is O ( n − 1 ) O(n^{-1}) O ( n − 1 ) ; neither asymptotic formula is intended to be uniformly accurate for all 2 ≤ ℓ ≤ n 2\leq\ell\leq n 2 ≤ ℓ ≤ n . We used formula (27) to compute the distribution of erased loops on different complete graphs. The results are presented in Figure 5 . In Figure 6 , we compare the theoretical distribution obtained from this formula and the empirical distribution obtained by counting the sizes of erased loops produced by loop-erased random walks.
Figure 5. Distribution of erased loops obtained with the relation 27 on different complete graphs.
Figure 6. Comparison between Frequencies obtained by the relation (27) and Frequencies observed with true loop erase random walk on K 8 K_8 K 8 . On the y-axis, we have the frequency obtained with the exact formula (27) and on the x-axis, we have the frequency obtained by counting size of erased loops.
The comparison gives ε max = 2.2 × 10 − 4 \varepsilon_{\max}=2.2\times10^{-4} ε m a x = 2.2 × 1 0 − 4 , providing a quantitative check of the proposed formula. In addition, Figure 7 shows that the asymptotic relation (32) provides a good approximation for large complete graphs. As the size of the graph increases, the asymptotic expression becomes increasingly accurate and closely matches the exact distribution.
Figure 7. Comparison between distribution of erased loops obtained with the exact relation (27) and the asymptotic relation (32) on the complete graph K 500 K_{500} K 500 .
Case of cycle graphs
Definition 10 (Cycle graph). For an integer n ≥ 3 n\geq3 n ≥ 3 , the cycle graph C n C_n C n [24 ] is the simple graph with vertex set
V ( C n ) = { v 1 , v 2 , … , v n } , V(C_n)=\{v_1,v_2,\ldots,v_n\}, V ( C n ) = { v 1 , v 2 , … , v n } , and edge set
E ( C n ) = { { v 1 , v 2 } , { v 2 , v 3 } , … , { v n − 1 , v n } , { v n , v 1 } } . E(C_n)=\{\{v_1,v_2\},\{v_2,v_3\},\ldots,\{v_{n-1},v_n\},\{v_n,v_1\}\}. E ( C n ) = {{ v 1 , v 2 } , { v 2 , v 3 } , … , { v n − 1 , v n } , { v n , v 1 }} . Equivalently, C n C_n C n is a single simple cycle of length n n n . In particular, every vertex has degree 2, and
∣ V ( C n ) ∣ = n , ∣ E ( C n ) ∣ = n . |V(C_n)|=n,\qquad|E(C_n)|=n. ∣ V ( C n ) ∣ = n , ∣ E ( C n ) ∣ = n .
Theorem 11 (Number of spanning trees of C n C_n C n ). Let C n C_n C n be the cycle graph with n ≥ 3 n\geq3 n ≥ 3 , and denote by T ( C n ) \mathcal{T}(C_n) T ( C n ) the set of spanning trees of C n C_n C n . Then
∣ T ( C n ) ∣ = n . |\mathcal{T}(C_n)|=n. ∣ T ( C n ) ∣ = n . Proof. A spanning tree of a connected graph on n n n vertices
must contain exactly n − 1 n-1 n − 1 edges. In C n C_n C n there is exactly one cycle (the whole graph). Therefore, to obtain a spanning tree from C n C_n C n , we must break this unique cycle by deleting one edge. After removing one edge, the graph remains connected and becomes a simple path on n n n vertices, hence a spanning tree. Conversely, removing any single edge of C n C_n C n indeed produces a connected acyclic graph (a path), so every choice of an edge yields a spanning tree. Since C n C_n C n has n n n edges, there are n n n possible choices, hence
∣ T ( C n ) ∣ = ∣ E ( C n ) ∣ = n . |\mathcal{T}(C_n)|=|E(C_n)|=n. ∣ T ( C n ) ∣ = ∣ E ( C n ) ∣ = n .
Theorem 12 (MFPT for LERW on C n C_n C n as a function of the distance). Let C n C_n C n be the cycle graph with n ≥ 3 n \ge3 n ≥ 3 . For two vertices i i i and j j j , let
be the length of the shortest path between i i i and j j j in C n C_n C n . Then the mean first passage time (MFPT) of the loop-erased random walk (LERW) from i i i to j j j satisfies
MFPT L E R W ( i , j ) = 2 k ( n − k ) n . (33) \operatorname{MFPT}^{\mathrm{LERW}}(i,j)=\frac{2k(n-k)}{n}. \tag*{(33)} MFPT LERW ( i , j ) = n 2 k ( n − k ) . (33) Proof. On a cycle, between two distinct vertices i i i and j j j there are exactly two simple (self-avoiding) paths: one of length k k k and the other of length n − k n-k n − k . The loop-erasure mechanism forces the trajectory to be compatible with one of these two simple paths once the walk is “projected” onto a spanning tree description. Now recall that the spanning trees of C n C_n C n are obtained by deleting exactly one edge. Fix i i i and j j j . Consider the two arcs connecting i i i to j j j : the short arc of length k k k , the long arc of length n − k n-k n − k . If the deleted edge lies on the long arc, then the unique simple path between i i i and j j j in the resulting spanning tree is the short arc (length k k k ). There are exactly ( n − k ) (n-k) ( n − k ) edges on the long arc, hence ( n − k ) (n-k) ( n − k ) spanning trees for which the i i i -j j j path has length k k k . Similarly, if the deleted edge lies on the short arc, then the unique path between i i i and j j j in the spanning tree is the long arc (length n − k n-k n − k ). There are k k k edges on the short arc, hence k k k spanning trees for which the i i i -j j j path has length n − k n-k n − k . Therefore, when spanning trees are sampled uniformly from T ( C n ) \mathcal{T}(C_n) T ( C n ) , the i i i -j j j distance in the tree equals k k k with probability n − k n \frac{n-k}{n} n n − k and equals n − k n-k n − k with probability k n \frac{k}{n} n k . Plugging these two contributions into the LERW MFPT expression for the cycle yields
MFPT L E R W ( i , j ) = 2 k ( n − k ) n . \operatorname{MFPT}^{\mathrm{LERW}}(i,j)=\frac{2k(n-k)}{n}. MFPT LERW ( i , j ) = n 2 k ( n − k ) .
Theorem 13. Let the cycle graph C n C_n C n (with n ≥ 3 n \ge3 n ≥ 3 ). Then the average mean first passage time of LERW between two distinct vertices i i i and j j j of C n C_n C n is
MFPT ‾ L E R W = n + 1 3 . \overline{\operatorname{MFPT}}^{\mathrm{LERW}}=\frac{n+1}{3}. MFPT LERW = 3 n + 1 . Proof. From the previous result, if d ( i , j ) = k d(i,j)=k d ( i , j ) = k then
MFPT L E R W ( i , j ) = 2 k ( n − k ) n . \operatorname{MFPT}^{\mathrm{LERW}}(i,j)=\frac{2k(n-k)}{n}. MFPT LERW ( i , j ) = n 2 k ( n − k ) . So to compute the average over all unordered pairs { i , j } \{i,j\} { i , j } , we must weight by the number of pairs at each distance k k k .
Case 1: n n n odd. Write n = 2 m + 1 n=2m+1 n = 2 m + 1 , so the possible distances are k = 1 , 2 , … , m k=1,2,\ldots,m k = 1 , 2 , … , m . For each fixed k ∈ { 1 , … , m } k\in\{1,\ldots,m\} k ∈ { 1 , … , m } , every vertex i i i has exactly two vertices at distance k k k (one in each direction along the cycle), hence the number of ordered pairs ( i , j ) (i,j) ( i , j ) with d ( i , j ) = k d(i,j)=k d ( i , j ) = k is 2 n 2n 2 n . Therefore the number of unordered pairs { i , j } \{i,j\} { i , j } at distance k k k is
N k = 2 n 2 = n . N_k=\frac{2n}{2}=n. N k = 2 2 n = n . Thus,
∑ 1 ≤ i < j ≤ n MFPT L E R W ( i , j ) = ∑ k = 1 m N k 2 k ( n − k ) n \sum_{1\le i<j\le n}\operatorname{MFPT}^{\mathrm{LERW}}(i,j)
=\sum_{k=1}^{m}N_k\frac{2k(n-k)}{n} 1 ≤ i < j ≤ n ∑ MFPT LERW ( i , j ) = k = 1 ∑ m N k n 2 k ( n − k ) = ∑ k = 1 m 2 k ( n − k ) . =\sum_{k=1}^{m}2k(n-k). = k = 1 ∑ m 2 k ( n − k ) . Let us now compute
∑ k = 1 m 2 k ( n − k ) = 2 ( n ∑ k = 1 m k − ∑ k = 1 m k 2 ) . \sum_{k=1}^{m}2k(n-k)=2\left(n\sum_{k=1}^{m}k-\sum_{k=1}^{m}k^2\right). k = 1 ∑ m 2 k ( n − k ) = 2 ( n k = 1 ∑ m k − k = 1 ∑ m k 2 ) . Using
∑ k = 1 m k = m ( m + 1 ) 2 and ∑ k = 1 m k 2 = m ( m + 1 ) ( 2 m + 1 ) 6 , \sum_{k=1}^{m}k=\frac{m(m+1)}{2}
\qquad\text{and}\qquad
\sum_{k=1}^{m}k^2=\frac{m(m+1)(2m+1)}{6}, k = 1 ∑ m k = 2 m ( m + 1 ) and k = 1 ∑ m k 2 = 6 m ( m + 1 ) ( 2 m + 1 ) , we get
∑ 1 ≤ i < j ≤ n MFPT L E R W ( i , j ) = 2 m ( m + 1 ) ( n 2 − 2 m + 1 6 ) \sum_{1\le i<j\le n}\operatorname{MFPT}^{\mathrm{LERW}}(i,j)
=2m(m+1)\left(\frac{n}{2}-\frac{2m+1}{6}\right) 1 ≤ i < j ≤ n ∑ MFPT LERW ( i , j ) = 2 m ( m + 1 ) ( 2 n − 6 2 m + 1 ) = ( n − 1 ) n ( n + 1 ) 6 . =\frac{(n-1)n(n+1)}{6}. = 6 ( n − 1 ) n ( n + 1 ) . Finally, the number of unordered pairs is ( n 2 ) = n ( n − 1 ) 2 \binom{n}{2}=\frac{n(n-1)}{2} ( 2 n ) = 2 n ( n − 1 ) , so the average is
MFPT ‾ L E R W = ( n − 1 ) n ( n + 1 ) 6 2 n ( n − 1 ) = n + 1 3 . \overline{\operatorname{MFPT}}^{\mathrm{LERW}}
=\frac{(n-1)n(n+1)}{6}\frac{2}{n(n-1)}
=\frac{n+1}{3}. MFPT LERW = 6 ( n − 1 ) n ( n + 1 ) n ( n − 1 ) 2 = 3 n + 1 . Case 2: n n n even. Write n = 2 m n=2m n = 2 m . The possible distances are k = 1 , 2 , … , m k=1,2,\ldots,m k = 1 , 2 , … , m . For k = 1 , … , m − 1 k=1,\ldots,m-1 k = 1 , … , m − 1 , each vertex has exactly two vertices at distance k k k , so as before the number of unordered pairs at distance k k k is N k = n N_k=n N k = n . For k = m = n / 2 k=m=n/2 k = m = n /2 , each vertex has exactly one opposite vertex at distance m m m , hence the number of ordered pairs is n n n and the number of unordered pairs is
N m = n 2 = m . N_m=\frac{n}{2}=m. N m = 2 n = m .
Therefore
∑ 1 ≤ i < j ≤ n MFPT L E R W ( i , j ) = ∑ k = 1 m − 1 2 k n ( n − k ) n + 2 m 2 ( n − m ) n = ∑ k = 1 m − 1 2 k ( 2 m − k ) + m 2 . \begin{aligned}
\sum_{1\le i<j\le n} \operatorname{MFPT}^{\mathrm{LERW}}(i,j)
= \sum_{k=1}^{m-1} \frac{2kn(n-k)}{n} + \frac{2m^2(n-m)}{n} \\
&= \sum_{k=1}^{m-1} 2k(2m-k) + m^2.
\end{aligned} 1 ≤ i < j ≤ n ∑ MFPT LERW ( i , j ) = k = 1 ∑ m − 1 n 2 k n ( n − k ) + n 2 m 2 ( n − m ) = k = 1 ∑ m − 1 2 k ( 2 m − k ) + m 2 .
Compute the first sum
∑ k = 1 m − 1 2 k ( 2 m − k ) = 2 ( 2 m ∑ k = 1 m − 1 k − ∑ k = 1 m − 1 k 2 ) . \sum_{k=1}^{m-1} 2k(2m-k)
= 2\left(2m\sum_{k=1}^{m-1} k-\sum_{k=1}^{m-1} k^2\right). k = 1 ∑ m − 1 2 k ( 2 m − k ) = 2 ( 2 m k = 1 ∑ m − 1 k − k = 1 ∑ m − 1 k 2 ) .
By recalling that
∑ k = 1 m − 1 k = ( m − 1 ) m 2 and ∑ k = 1 m − 1 k 2 = ( m − 1 ) m ( 2 m − 1 ) 6 , \sum_{k=1}^{m-1} k=\frac{(m-1)m}{2}
\qquad\text{and}\qquad
\sum_{k=1}^{m-1} k^2=\frac{(m-1)m(2m-1)}{6}, k = 1 ∑ m − 1 k = 2 ( m − 1 ) m and k = 1 ∑ m − 1 k 2 = 6 ( m − 1 ) m ( 2 m − 1 ) ,
we obtain
∑ k = 1 m − 1 2 k ( 2 m − k ) = ( m − 1 ) m ( 4 m + 1 ) 3 . \sum_{k=1}^{m-1} 2k(2m-k)=\frac{(m-1)m(4m+1)}{3}. k = 1 ∑ m − 1 2 k ( 2 m − k ) = 3 ( m − 1 ) m ( 4 m + 1 ) .
Hence
∑ 1 ≤ i < j ≤ n MFPT L E R W ( i , j ) = ( m − 1 ) m ( 4 m + 1 ) 3 + m 2 = m ( 4 m 2 − 1 ) 3 . \begin{aligned}
\sum_{1\le i<j\le n} \operatorname{MFPT}^{\mathrm{LERW}}(i,j)
=\frac{(m-1)m(4m+1)}{3}+m^2 \\
&=\frac{m(4m^2-1)}{3}.
\end{aligned} 1 ≤ i < j ≤ n ∑ MFPT LERW ( i , j ) = 3 ( m − 1 ) m ( 4 m + 1 ) + m 2 = 3 m ( 4 m 2 − 1 ) .
Now ( n 2 ) = ( 2 m 2 ) = m ( 2 m − 1 ) \binom{n}{2}=\binom{2m}{2}=m(2m-1) ( 2 n ) = ( 2 2 m ) = m ( 2 m − 1 ) , so
MFPT ‾ L E R W = m ( 4 m 2 − 1 ) / 3 m ( 2 m − 1 ) = 2 m + 1 3 = n + 1 3 . \overline{\operatorname{MFPT}}^{\mathrm{LERW}}
=\frac{m(4m^2-1)/3}{m(2m-1)}
=\frac{2m+1}{3}
=\frac{n+1}{3}. MFPT LERW = m ( 2 m − 1 ) m ( 4 m 2 − 1 ) /3 = 3 2 m + 1 = 3 n + 1 .
In both cases, we conclude that
MFPT ‾ L E R W = n + 1 3 . \overline{\operatorname{MFPT}}^{\mathrm{LERW}}=\frac{n+1}{3}. MFPT LERW = 3 n + 1 .
In Figure 8 , we used the exact formula (33) and a Monte Carlo approach to compute the MFPT between two nodes of cycle graph C 10 C_{10} C 10 . The empirical estimate MFPT ‾ M C L E R W \overline{\operatorname{MFPT}}_{\mathrm{MC}}^{\mathrm{LERW}} MFPT MC LERW closely follows the exact MFPT, with ε max = 3.6 × 10 − 2 \varepsilon_{\max}=3.6\times10^{-2} ε m a x = 3.6 × 1 0 − 2 .
Figure 8. Mean First Passage Time of Loop Erased Random Walks between different pairs of nodes of cycle graph C 10 C_{10} C 10 . On the x-axis, we have the MFPT obtained with the algorithm 1 and on the y-axis, we have the MFPT obtained with an MC-MC approach with empirical average.
In the cycle graph C n C_n C n , every spanning tree is obtained by deleting exactly one edge from the unique cycle. As a consequence, each spanning tree is a simple path on n n n vertices. This linear structure severely restricts the possible fundamental cycles that can be formed. If we consider an edge that already belongs to the tree, it corresponds to a loop of size 2, which represents the trivial backtracking along a tree edge. On the other hand, there is exactly one non-tree edge, namely the edge removed from the original cycle. Adding this missing edge reconnects the two endpoints of the path. This operation reconstructs the unique global cycle of the graph. The length of this cycle is precisely n n n . Therefore, in C n C_n C n , erased loops can only have size 2 or size
n n n . We obtain then
P s t ( 2 , C n ) = n − 1 n and P ( 2 , C n ) = n − 1 2 n . P_{\mathrm{st}}(2,C_n)=\frac{n-1}{n}
\qquad\text{and}\qquad
P(2,C_n)=\frac{n-1}{2n}. P st ( 2 , C n ) = n n − 1 and P ( 2 , C n ) = 2 n n − 1 .
We also get
P s t ( n , C n ) = 1 ∣ E ∣ ∑ ( u , v ) ∈ E 1 ∣ T ( G ) ∣ ∑ T ∈ T ( G ) 1 { d T ( u , v ) = n − 1 } = 1 n ∑ ( u , v ) ∈ E 1 n ∑ T ∈ T ( G ) 1 { d T ( u , v ) = n − 1 } = 1 n ∑ ( u , v ) ∈ E n n = 1 n . \begin{aligned}
P_{\mathrm{st}}(n,C_n)
=\frac{1}{|E|}\sum_{(u,v)\in E}\frac{1}{|\mathcal{T}(G)|}
\sum_{T\in\mathcal{T}(G)}\mathbf{1}_{\{d_T(u,v)=n-1\}} \\
&=\frac{1}{n}\sum_{(u,v)\in E}\frac{1}{n}
\sum_{T\in\mathcal{T}(G)}\mathbf{1}_{\{d_T(u,v)=n-1\}} \\
&=\frac{1}{n}\sum_{(u,v)\in E}\frac{n}{n}=\frac{1}{n}.
\end{aligned} P st ( n , C n ) = ∣ E ∣ 1 ( u , v ) ∈ E ∑ ∣ T ( G ) ∣ 1 T ∈ T ( G ) ∑ 1 { d T ( u , v ) = n − 1 } = n 1 ( u , v ) ∈ E ∑ n 1 T ∈ T ( G ) ∑ 1 { d T ( u , v ) = n − 1 } = n 1 ( u , v ) ∈ E ∑ n n = n 1 .
From that,
P ( n , C n ) = 1 n 2 . P(n,C_n)=\frac{1}{n^2}. P ( n , C n ) = n 2 1 .
This gives the proportion of loop of size 2 erased, π C n ( 2 ) \pi_{C_n}(2) π C n ( 2 )
π C n ( 2 ) = n − 1 2 n n − 1 2 n + 1 n 2 = n − 1 2 n n 2 − n + 2 2 n 2 = n 2 − n n 2 − n + 2 . (34) \pi_{C_n}(2)
=\frac{\frac{n-1}{2n}}{\frac{n-1}{2n}+\frac{1}{n^2}}
=\frac{\frac{n-1}{2n}}{\frac{n^2-n+2}{2n^2}}
=\frac{n^2-n}{n^2-n+2}. \tag*{(34)} π C n ( 2 ) = 2 n n − 1 + n 2 1 2 n n − 1 = 2 n 2 n 2 − n + 2 2 n n − 1 = n 2 − n + 2 n 2 − n . (34)
and the proportion of loop of size n n n erased, π C n ( n ) \pi_{C_n}(n) π C n ( n )
π C n ( n ) = 1 n 2 n − 1 2 n + 1 n 2 = 1 n 2 n 2 − n + 2 2 n 2 = 2 n 2 − n + 2 . (35) \pi_{C_n}(n)
=\frac{\frac{1}{n^2}}{\frac{n-1}{2n}+\frac{1}{n^2}}
=\frac{\frac{1}{n^2}}{\frac{n^2-n+2}{2n^2}}
=\frac{2}{n^2-n+2}. \tag*{(35)} π C n ( n ) = 2 n n − 1 + n 2 1 n 2 1 = 2 n 2 n 2 − n + 2 n 2 1 = n 2 − n + 2 2 . (35)
We can observe that
lim n → ∞ π C n ( n ) = lim n → ∞ 2 n 2 − n + 2 = 0 \lim_{n \to\infty} \pi_{C_n}(n) = \lim_{n \to\infty} \frac{2}{n^2-n+2}=0 n → ∞ lim π C n ( n ) = n → ∞ lim n 2 − n + 2 2 = 0
and
lim n → ∞ π C n ( 2 ) = lim n → ∞ n 2 − n n 2 − n + 2 = 1. \lim_{n \to\infty} \pi_{C_n}(2) = \lim_{n \to\infty} \frac{n^2-n}{n^2-n+2}=1. n → ∞ lim π C n ( 2 ) = n → ∞ lim n 2 − n + 2 n 2 − n = 1.
We used formula (35) to compute the distribution of erased loops on different cycle graphs. The results are presented in Figure 9 . From this figure, we can clearly observe a limiting effect. As the size of the cycle graph increases, the probability that an erased loop has size two becomes increasingly dominant. In other words, for large cycle graphs, most erased loops correspond to simple backtracking events. This behavior is consistent with the theoretical predictions obtained from the analytical formula. To validate the accuracy of the formula, we compared these theoretical results with empirical measurements obtained by directly counting the sizes of erased loops generated by loop-erased random walks. The comparison is shown in Figure 10 . The maximum discrepancy in Figure 10 is ε max = 1.0 × 10 − 6 \varepsilon_{\max}=1.0 \times10^{-6} ε m a x = 1.0 × 1 0 − 6 . Therefore, the proposed formula accurately captures the distribution of erased loop sizes on cycle graphs. This comparison provides a numerical check of the proposed spanning-tree model; the exact agreement with the dynamic erasure process requires the correspondence discussed in Appendix D.
Figure 9. Distribution of erased loops obtained with the relation (35) on different cycle graphs.
Figure 10. Comparison between Frequencies obtained by the relation (35) and Frequencies observed with true loop erase random walk on different cycle graphs. On the y-axis, we have the frequency obtained with the exact formula (35) and on the x-axis, we have the frequency obtained by counting size of erased loops.
Motif-Based Network Case
We build a graph G = ( V , E ) G=(V,E) G = ( V , E ) by gluing together small subgraphs called motifs [25 , 26 ] . Each motif σ ∈ M \sigma\in\mathcal{M} σ ∈ M lives on a subset of vertices V ( σ ) ⊆ V V(\sigma) \subseteq V V ( σ ) ⊆ V and contributes its own internal edge set E ( σ ) ⊆ ( V ( σ ) 2 ) E(\sigma) \subseteq\binom{V(\sigma)}{2} E ( σ ) ⊆ ( 2 V ( σ ) ) . The full graph is obtained by taking the union of all motif edges
E = ⋃ σ ∈ M E ( σ ) . E=\bigcup_{\sigma\in\mathcal{M}} E(\sigma). E = σ ∈ M ⋃ E ( σ ) .
Motifs may share vertices, but they cannot share edges. Furthermore, the edges belonging to them are simply the original edges of G G G . A convenient way to encode how motifs are attached is the bipartite factor graph
B = ( V ∪ M , E B ) , ( u , σ ) ∈ E B ⟺ u ∈ V ( σ ) . \mathcal{B}=(V\cup\mathcal{M},E_{\mathcal{B}}), \qquad(u,\sigma)\in E_{\mathcal{B}} \Longleftrightarrow u\in V(\sigma). B = ( V ∪ M , E B ) , ( u , σ ) ∈ E B ⟺ u ∈ V ( σ ) .
So B \mathcal{B} B has two types of nodes: original vertices and motif-nodes; an edge in B \mathcal{B} B simply means “vertex u u u belongs to motif σ \sigma σ ”. In what follows we assume that this factor graph B \mathcal{B} B is a tree. This is a crucial structural assumption: it means motifs are connected together without creating additional loops between motifs. As a consequence, any cycle in G G G must be contained entirely inside a single motif; cycles cannot be formed by walking through several motifs.
Let us first consider the case where all the motifs are cycles.
Definition 14. A motif σ \sigma σ is a cycle motif of length ℓ ≥ 3 \ell\ge3 ℓ ≥ 3 [27 ] if its vertices can be ordered V ( σ ) = { v 1 , … , v ℓ } V(\sigma)=\{v_1,\ldots,v_\ell\} V ( σ ) = { v 1 , … , v ℓ } such
that
E ( σ ) = { { v i , v i + 1 } : i = 1 , … , ℓ } , v ℓ + 1 ≡ v 1 . E(\sigma)=\{\{v_i,v_{i+1}\}:i=1,\ldots,\ell\},\qquad v_{\ell+1}\equiv v_1. E ( σ ) = {{ v i , v i + 1 } : i = 1 , … , ℓ } , v ℓ + 1 ≡ v 1 .
For convenience, a single edge not belonging to any longer cycle is treated as a “cycle motif of length 2”. In panel (a) of Figure 11 we show few examples of cycle motifs.
Figure 11. Motifs: (a) The cycle motifs of three nodes, four nodes and five nodes. (b) The clique motifs of three nodes, four nodes and five nodes.
Let
S u : = { σ ∈ M : u ∈ V ( σ ) } S_u:=\{\sigma\in\mathcal{M}:u\in V(\sigma)\} S u := { σ ∈ M : u ∈ V ( σ )}
be the motifs incident to a vertex u u u . The degree splits motif-by-motif
k u = ∑ σ ∈ S u k u ( σ ) , k_u=\sum_{\sigma\in S_u}k_u^{(\sigma)}, k u = σ ∈ S u ∑ k u ( σ ) ,
where k u ( σ ) k_u^{(\sigma)} k u ( σ ) is the degree of u u u inside σ \sigma σ . If σ \sigma σ is a cycle C ℓ C_\ell C ℓ and u ∈ V ( σ ) u\in V(\sigma) u ∈ V ( σ ) then k u ( σ ) = 2 k_u^{(\sigma)}=2 k u ( σ ) = 2 , hence if u u u belongs to c u c_u c u cycles (and to no other motifs) then k u = 2 c u k_u=2c_u k u = 2 c u . If motifs are edge-disjoint (no edge is repeated across motifs), then each cycle C ℓ σ C_{\ell_\sigma} C ℓ σ contributes exactly ℓ σ \ell_\sigma ℓ σ edges, and therefore
∣ E ( G ) ∣ = ∑ σ ∈ M ∣ E ( σ ) ∣ , |E(G)|=\sum_{\sigma\in\mathcal{M}}|E(\sigma)|, ∣ E ( G ) ∣ = σ ∈ M ∑ ∣ E ( σ ) ∣ ,
where ∣ E ( σ ) ∣ = ℓ σ |E(\sigma)|=\ell_\sigma ∣ E ( σ ) ∣ = ℓ σ for a genuine cycle motif, whereas an isolated-edge motif has ∣ E ( σ ) ∣ = 1 |E(\sigma)|=1 ∣ E ( σ ) ∣ = 1 . The convention ℓ σ = 2 \ell_\sigma=2 ℓ σ = 2 for immediate backtracking refers to an erased-loop size, not to two physical graph edges.
Theorem 15 (Spanning trees of a cycle-motif tree). Let G G G be connected and built from cycle motifs (and isolated edges as 2-cycles), with edge-disjoint motifs and a factor graph that is a tree. Let C ⊆ M C\subseteq\mathcal{M} C ⊆ M be the set of cycle motifs with length ≥ 3 \ge3 ≥ 3 . Then the number of spanning trees satisfies
∣ T ( G ) ∣ = ∏ σ ∈ C ℓ σ . |\mathcal{T}(G)|=\prod_{\sigma\in C}\ell_\sigma. ∣ T ( G ) ∣ = σ ∈ C ∏ ℓ σ .
Proof. Only genuine cycles create choices. For each σ ∈ C \sigma\in C σ ∈ C , choose exactly one edge of σ \sigma σ to be deleted. There are ℓ σ \ell_\sigma ℓ σ options for motif σ \sigma σ , so the number of global choices is ∏ σ ∈ C ℓ σ \prod_{\sigma\in C}\ell_\sigma ∏ σ ∈ C ℓ σ . Deleting one edge from each σ ∈ C \sigma\in C σ ∈ C breaks the unique cycle in that motif while keeping it connected, and isolated edges remain unchanged. Because the factor graph is a tree, no cycle can use edges from multiple motifs. Therefore, after breaking every genuine cycle, the resulting graph is connected and acyclic, hence a spanning tree. Conversely, any spanning tree cannot contain all edges of any cycle motif σ ∈ C \sigma\in C σ ∈ C (otherwise it would contain a cycle). It also cannot remove two or more edges from σ \sigma σ (that would disconnect the motif). So it removes exactly one edge from each σ ∈ C \sigma\in C σ ∈ C , yielding a unique choice. This gives a bijection between spanning trees and choices, and the product formula follows. □
This class of graphs is easy to handle because all cycles are local (inside motifs), and the tree-like factor structure prevents “global” cycles from appearing when motifs are glued. An example of this kind of graph is presented in Figure 12 together with its factor graph.
Figure 12. An example of graph with cycle motifs (a) and its factor graph (b). The nodes in yellow are cut vertices. In the factor graph the red diamond nodes are the nodes representing the cycle motifs. The circle nodes are the nodes of the original graph. We can observe that the factor graph is bipartite.
Now, let T T T be a uniformly random spanning tree of G G G and d T ( u , v ) d_T(u,v) d T ( u , v ) the distance between u u u and v v v inside T T T . Using the indicator of whether an edge lies on the unique u u u –v v v path in T T T ,
d T ( u , v ) = ∑ e ∈ E 1 { e is on the u ↔ v path in T } , d_T(u,v)=\sum_{e\in E}\mathbb{1}\{e\text{ is on the }u\leftrightarrow v\text{ path in }T\}, d T ( u , v ) = e ∈ E ∑ 1 { e is on the u ↔ v path in T } ,
and therefore
E [ d T ( u , v ) ] = ∑ e ∈ E P ( e is on the u ↔ v path in T ) . \mathbb{E}[d_T(u,v)]=\sum_{e\in E}\mathbb{P}(e\text{ is on the }u\leftrightarrow v\text{ path in }T). E [ d T ( u , v )] = e ∈ E ∑ P ( e is on the u ↔ v path in T ) .
Fix an undirected edge e = { a , b } e=\{a,b\} e = { a , b } and orient it as e = ( a , b ) e=(a,b) e = ( a , b ) . Let N ( u , a ∣ b , v ) N(u,a\mid b,v) N ( u , a ∣ b , v ) be the number of spanning trees in which the u u u –v v v path uses e e e in direction a → b a\to b a → b , and define $N(u,b\mid a , v ) a, v) a , v ) similarly. Define the signed current
i e : = N ( u , a ∣ b , v ) − N ( u , b ∣ a , v ) ∣ T ∣ . i_e := \frac{N(u,a \mid b,v)-N(u,b \mid a,v)}{|\mathcal{T}|}. i e := ∣ T ∣ N ( u , a ∣ b , v ) − N ( u , b ∣ a , v ) .
Theorem 16 (Expected tree distance as an ℓ 1 \ell^1 ℓ 1 current). Under the same assumptions (cycle motifs, edge-disjoint, factor graph a tree), for any u , v ∈ V u,v\in V u , v ∈ V ,
E [ d T ( u , v ) ] = ∑ e ∈ E ∣ i e ∣ . \mathbb{E}[d_T(u,v)] = \sum_{e\in E}|i_e|. E [ d T ( u , v )] = e ∈ E ∑ ∣ i e ∣.
Proof. Define, for an oriented edge e = ( a , b ) e=(a,b) e = ( a , b ) , a signed indicator X e ( T ) ∈ { − 1 , 0 , 1 } X_e(T)\in\{-1,0,1\} X e ( T ) ∈ { − 1 , 0 , 1 } equal to + 1 +1 + 1 if the u u u –v v v path in T T T uses e e e as a → b a\to b a → b , − 1 -1 − 1 if it uses it as b → a b\to a b → a , and 0 0 0 otherwise. Then ∣ X e ( T ) ∣ = 1 { e is on the path } |X_e(T)|=1\{e\text{ is on the path}\} ∣ X e ( T ) ∣ = 1 { e is on the path } , so
E [ d T ( u , v ) ] = ∑ e ∈ E E [ ∣ X e ( T ) ∣ ] . \mathbb{E}[d_T(u,v)] = \sum_{e\in E}\mathbb{E}[|X_e(T)|]. E [ d T ( u , v )] = e ∈ E ∑ E [ ∣ X e ( T ) ∣ ] .
By uniformity, E [ X e ( T ) ] = i e \mathbb{E}[X_e(T)]=i_e E [ X e ( T )] = i e . Now use the tree-like motif structure. Because motifs are edge-disjoint and the factor graph is a tree, removing the (unique) motif containing e e e separates the global structure into two sides. If the u u u –v v v path uses e e e , its direction is determined by which side contains u u u and which contains v v v . So the two orientations cannot both occur among spanning trees: one of N ( u , a ∣ b , v ) N(u,a\mid b,v) N ( u , a ∣ b , v ) and N ( u , b ∣ a , v ) N(u,b\mid a,v) N ( u , b ∣ a , v ) is zero. Hence
∣ i e ∣ = N ( u , a ∣ b , v ) + N ( u , b ∣ a , v ) ∣ T ∣ = P ( e is on the u ↔ v path ) , |i_e|=\frac{N(u,a\mid b,v)+N(u,b\mid a,v)}{|\mathcal{T}|}
=\mathbb{P}(e\text{ is on the }u\leftrightarrow v\text{ path}), ∣ i e ∣ = ∣ T ∣ N ( u , a ∣ b , v ) + N ( u , b ∣ a , v ) = P ( e is on the u ↔ v path ) ,
and summing over e e e gives the result.
Finally, let L = D − A L=D-A L = D − A be the Laplacian matrix, and let φ \varphi φ be a solution to
L φ = b u v , L\varphi=b_{uv}, L φ = b uv ,
which is defined up to an additive constant, and where b u v ∈ R n b_{uv}\in\mathbb{R}^n b uv ∈ R n (with n = ∣ V ∣ n=|V| n = ∣ V ∣ ) is the vector defined by ( b u v ) u = 1 (b_{uv})_u=1 ( b uv ) u = 1 , ( b u v ) v = − 1 (b_{uv})_v=-1 ( b uv ) v = − 1 , and ( b u v ) x = 0 (b_{uv})_x=0 ( b uv ) x = 0 for all other vertices x x x , i.e. i e i_e i e is the potential drop across the edge [9 , 10 , 16 ] . Then, for an edge e = ( a , b ) e=(a,b) e = ( a , b ) , we have
i e = φ ( b ) − φ ( a ) , i_e=\varphi(b)-\varphi(a), i e = φ ( b ) − φ ( a ) ,
This means that the MFPT is given by
MFPT L E R W ( u , v ) = ∑ ( a , b ) ∈ E ∣ φ ( b ) − φ ( a ) ∣ . (36) \operatorname{MFPT}_{\mathrm{LERW}}(u,v)=\sum_{(a,b)\in E}|\varphi(b)-\varphi(a)|. \tag*{(36)} MFPT LERW ( u , v ) = ( a , b ) ∈ E ∑ ∣ φ ( b ) − φ ( a ) ∣. (36)
This formula is fundamental because it turns a probabilistic quantity, the expected length of a loop-erased random walk, into a deterministic quantity computed from the graph potential. Rather than averaging over many random walks or summing over all possible self-avoiding paths, the MFPT L E R W \operatorname{MFPT}_{\mathrm{LERW}} MFPT LERW is obtained by adding the absolute potential drops along the edges. Thus the complexity of the problem is reduced from a path-based computation to an edge-based computation. This gives a clear interpretation of the LERW MFPT: it measures the total amount of effective
u u u –v v v flow carried by the graph. Edges with larger values of ∣ φ ( b ) − φ ( a ) ∣ |\varphi(b)-\varphi(a)| ∣ φ ( b ) − φ ( a ) ∣ are more relevant for the loop-erased trajectory, while edges with small potential drops contribute little. Consequently, the formula identifies which parts of the graph are most important for the effective passage from u u u to v v v . It provides an exact and practical way to compute the MFPT, and it is particularly valuable for large graphs built from cycle motifs where enumerating all possible loop-erased paths would be computationally expensive.
We can now consider the case where all the motifs are complete graphs, i.e., cliques.
Definition 17. A motif σ \sigma σ is a clique motif of size r ≥ 2 r\ge2 r ≥ 2 if it induces a complete graph K r K_r K r
∣ V ( σ ) ∣ = r , E ( σ ) = { { x , y } : x , y ∈ V ( σ ) , x ≠ y } . |V(\sigma)|=r,\qquad E(\sigma)=\{\{x,y\}:x,y\in V(\sigma),\ x\ne y\}. ∣ V ( σ ) ∣ = r , E ( σ ) = {{ x , y } : x , y ∈ V ( σ ) , x = y } .
When r = 2 r=2 r = 2 this is just a single edge.
We consider graphs obtained as unions of clique motifs, assuming motifs are edge-disjoint and the factor graph between vertices and motifs is a tree. See panel (b) in Figure 11 for few examples of clique motifs and Figure 13 for an example of graph obtained as union of clique motifs and its factor graph.
Figure 13. An example of graph with clique motifs (a) and its factor graph (b). The nodes in yellow are cut vertices. In the factor graph the blue triangle nodes are the nodes representing the clique motifs. The circle nodes are the nodes of the original graph. We can observe that the factor graph is bipartite.
Definition 18 (Tree of cliques / block graph). A connected graph G G G is a tree of cliques if every motif is a clique K r σ K_{r_\sigma} K r σ , motifs are edge-disjoint, and the vertex–motif factor graph is a tree.
This implies that different cliques intersect in at most one vertex, and any cycle in G G G is contained in a single clique. For a vertex u u u , the degree decomposes as
k u = ∑ σ ∈ S u k u ( σ ) , k u ( σ ) = r σ − 1 if σ ≃ K r σ . k_u=\sum_{\sigma\in S_u}k_u^{(\sigma)},\qquad k_u^{(\sigma)}=r_\sigma-1\text{ if }\sigma\simeq K_{r_\sigma}. k u = σ ∈ S u ∑ k u ( σ ) , k u ( σ ) = r σ − 1 if σ ≃ K r σ .
Also, each clique contributes ( r σ 2 ) \binom{r_\sigma}{2} ( 2 r σ ) edges, so
∣ E ( G ) ∣ = ∑ σ ∈ M ( r σ 2 ) . |E(G)|=\sum_{\sigma\in\mathcal{M}}\binom{r_\sigma}{2}. ∣ E ( G ) ∣ = σ ∈ M ∑ ( 2 r σ ) .
Theorem 19 (Spanning trees of a tree of cliques). If G G G is a tree of cliques, then
∣ T ( G ) ∣ = ∏ σ ∈ M ∣ T ( K r σ ) ∣ = ∏ σ ∈ M r σ r σ − 2 . |\mathcal{T}(G)|=\prod_{\sigma\in\mathcal{M}}|\mathcal{T}(K_{r_\sigma})|=\prod_{\sigma\in\mathcal{M}}r_\sigma^{r_\sigma-2}. ∣ T ( G ) ∣ = σ ∈ M ∏ ∣ T ( K r σ ) ∣ = σ ∈ M ∏ r σ r σ − 2 . Proof. Inside each clique σ ≃ K r σ \sigma\simeq K_{r_\sigma} σ ≃ K r σ there are ∣ T ( K r σ ) ∣ = r σ r σ − 2 |\mathcal{T}(K_{r_\sigma})|=r_\sigma^{r_\sigma-2} ∣ T ( K r σ ) ∣ = r σ r σ − 2 spanning trees. Choose independently one spanning tree inside each motif, and take their union. Because motifs attach through a tree of shared cut-vertices, the union stays connected; because different motifs share at most one vertex, no cycle can be formed by combining edges from different motifs. Hence the union is a spanning tree of G G G . Conversely, any spanning tree of G G G restricts to a spanning tree inside each clique (there are no other edges), so it induces exactly one local choice per motif. This is a bijection, giving the product formula.
Let V V V be the vertex set and let B \mathcal{B} B be a family of motifs (blocks). Each block b ∈ B b\in\mathcal{B} b ∈ B is a subgraph on V ( b ) ⊂ V V(b)\subset V V ( b ) ⊂ V . We assume blocks are glued through shared cut-vertices so that the bipartite factor graph
T = ( V ∪ B , E ) , ( v , b ) ∈ E ⟺ v ∈ V ( b ) , T=(V\cup\mathcal{B},E),\qquad(v,b)\in E\Longleftrightarrow v\in V(b), T = ( V ∪ B , E ) , ( v , b ) ∈ E ⟺ v ∈ V ( b ) ,
is a tree. Then for any u , v ∈ V u,v\in V u , v ∈ V there is a unique alternating path in T T T
u = v 0 − b 0 − v 1 − b 1 − ⋯ − b m − 1 − v m = v . u=v_0-b_0-v_1-b_1-\cdots-b_{m-1}-v_m=v. u = v 0 − b 0 − v 1 − b 1 − ⋯ − b m − 1 − v m = v .
We model the mean first passage time from u u u to v v v as the sum of the expected crossing times of the successive blocks along that unique route
MFPT L E R W ( u , v ) = ∑ i = 0 m − 1 τ b i ( v i → v i + 1 ) , (37) \operatorname{MFPT}^{\mathrm{LERW}}(u,v)=\sum_{i=0}^{m-1}\tau_{b_i}(v_i\to v_{i+1}), \tag*{(37)} MFPT LERW ( u , v ) = i = 0 ∑ m − 1 τ b i ( v i → v i + 1 ) , (37)
where τ b ( x → y ) \tau_b(x\to y) τ b ( x → y ) is the MFPT inside block b b b from entry vertex x x x to exit vertex y y y for the simple random walk restricted to b b b . With the tree incidence structure, there is no ambiguity about which sequence of blocks is used, so this additive decomposition is natural: each block contributes exactly one local passage.
Let b = C n b=C_n b = C n . For x , y ∈ V ( b ) x,y\in V(b) x , y ∈ V ( b ) define the cyclic distance
k = d C n ( x , y ) = min ( δ , n − δ ) , (38) k=d_{C_n}(x,y)=\min(\delta,n-\delta), \tag*{(38)} k = d C n ( x , y ) = min ( δ , n − δ ) , (38)
where δ \delta δ is the distance along one chosen cyclic ordering. For a simple random walk on C n C_n C n ,
τ C n ( x → y ) = 2 k ( n − k ) n . (39) \tau_{C_n}(x\to y)=\frac{2k(n-k)}{n}. \tag*{(39)} τ C n ( x → y ) = n 2 k ( n − k ) . (39)
Let b = K n b=K_n b = K n . By symmetry, the MFPT from any x x x to any y ≠ x y\ne x y = x depends only on n n n ,
τ K n ( x → y ) = τ K n ( n ) , x ≠ y . (40) \tau_{K_n}(x\to y)=\tau_{K_n}(n),\qquad x\ne y. \tag*{(40)} τ K n ( x → y ) = τ K n ( n ) , x = y . (40)
A convenient closed form is
τ K n ( n ) = ∑ r = 0 n − 2 ( n − 2 ) ! n r ( n − 2 − r ) ! . (41) \tau_{K_n}(n)=\sum_{r=0}^{n-2}\frac{(n-2)!}{n^r(n-2-r)!}. \tag*{(41)} τ K n ( n ) = r = 0 ∑ n − 2 n r ( n − 2 − r )! ( n − 2 )! . (41)
If every block is a cycle C n i C_{n_i} C n i , then from (37) and (39),
MFPT L E R W ( u , v ) = ∑ i = 0 m − 1 2 k i ( n i − k i ) n i , (42) \operatorname{MFPT}^{\mathrm{LERW}}(u,v)=\sum_{i=0}^{m-1}\frac{2k_i(n_i-k_i)}{n_i}, \tag*{(42)} MFPT LERW ( u , v ) = i = 0 ∑ m − 1 n i 2 k i ( n i − k i ) , (42)
where n i = ∣ V ( b i ) ∣ n_i=|V(b_i)| n i = ∣ V ( b i ) ∣ and k i = d C n i ( v i , v i + 1 ) k_i=d_{C_{n_i}}(v_i,v_{i+1}) k i = d C n i ( v i , v i + 1 ) .
If every block is a clique K n i K_{n_i} K n i , then from (37) and (41),
MFPT L E R W ( u , v ) = ∑ i = 0 m − 1 ∑ r = 0 n i − 2 ( n i − 2 ) ! n i r ( n i − 2 − r ) ! . (43) \operatorname{MFPT}^{\mathrm{LERW}}(u,v)=\sum_{i=0}^{m-1}\sum_{r=0}^{n_i-2}\frac{(n_i-2)!}{n_i^r(n_i-2-r)!}. \tag*{(43)} MFPT LERW ( u , v ) = i = 0 ∑ m − 1 r = 0 ∑ n i − 2 n i r ( n i − 2 − r )! ( n i − 2 )! . (43)
The factor graph being a tree forces a unique block sequence from u u u to v v v . The global MFPT is then just the sum of the expected times needed to move from the entry cut-vertex to the exit cut-vertex inside each visited motif. We consider a small graph built on cycle motifs for which the mean first-passage time between any ordered pair of nodes can be computed exactly. We evaluate the MFPT for all distinct node pairs with three different approaches. The Exact one corresponds to the factor graph approach with the formula (42). The Current method represents the MFPT computed with the formula of theorem 16. Finally, the MC–MC curve is obtained by Monte Carlo simulation, where the MFPT is estimated as the empirical average of many loop-erased random walk lengths. Figure 14 displays the MFPT values for all node pairs. We observe that the points are on the first bisector, showing that the current implementation exactly reproduces the analytical MFPT and is consistent with Monte Carlo estimates. The maximum deviations in the analytical and Monte Carlo panels are ε max l e f t = 0 \varepsilon_{\max}^{\mathrm{left}}=0 ε m a x left = 0 and ε max r i g h t = 3.8 × 10 − 2 \varepsilon_{\max}^{\mathrm{right}}=3.8\times10^{-2} ε m a x right = 3.8 × 1 0 − 2 , respectively. This supports the numerical consistency of the methods on elementary cycle motifs.
Figure 14. Mean First Passage Time of Loop Erased Random Walks between different pairs of nodes of a graph built with cycle motifs. On the left panel, on the y-axis, we have the MFPT obtained with the formula of the theorem 16 and on the x-axis, we have the MFPT obtained with the formula (42). On the right panel, on the y-axis, we have the MFPT obtained with an MC-MC approach with empirical average and on the x-axis, we have again the MFPT obtained with the formula (42).
We now apply the proposed factorization-based method to a graph built with cycle and clique motifs. See an example of this kind of graph in Figure 15 . For a set of distinct ordered node pairs, we compute the mean firstpassage time (MFPT) of loop-erased random walks. The MC–MC curve is obtained by direct Monte Carlo simulation. The Factor curve corresponds to the MFPT computed using the factor-tree decomposition of the graph, where the total MFPT between two nodes is expressed as a sum of local contributions along the unique path between their corresponding blocks (41),(39). Figure 16 shows the MFPT values for all considered node pairs. The factor-based MFPT follows the MFPT find with the MC-MC closely, with ε max = 1.6 × 10 − 2 \varepsilon_{\max}=1.6 \times10^{-2} ε m a x = 1.6 × 1 0 − 2 . This result validates the accuracy of the factorization approach on graphs of intermediate size while significantly reducing the computational effort compared to full Monte Carlo estimation.
Figure 15. An example of graph with both cycle and clique motifs (a) and its factor graph (b). The nodes in yellow are cut vertices. In the factor graph the blue triangle nodes are the nodes representing the clique motifs and the red diamond nodes are the nodes representing the cycle motifs. The clique motifs of three nodes are the same as the cycle motifs of three nodes, so we could have used the red diamond to represent them. This is the same for edge motif. The circle nodes are the nodes of the original graph. We can observe that the factor graph is bipartite.
Figure 16. Mean First Passage Time of Loop Erased Random Walks between the different pairs of nodes of a graph built by gluing cycle and clique motifs. On the x-axis, we have the MFPT obtained with the global formula(37) with the use of local formulas and factorization and on the y-axis, we have the MFPT obtained with an MC-MC approach with empirical average.
Now we will establish formulas for the distributions of erased loops for motif based networks. By using the results obtained in the previous sections, we now derive a simplified expression for the distribution of erased loops in networks constructed from motifs. In the motif-based framework introduced in this section, the graph G G G is constructed by gluing together a family of motifs σ ∈ M \sigma\in\mathcal{M} σ ∈ M . Each motif σ \sigma σ contributes a set of internal edges E ( σ ) E(\sigma) E ( σ ) and the full edge set satisfies
E ( G ) = ⋃ σ ∈ M E ( σ ) . E(G)=\bigcup_{\sigma\in\mathcal{M}}E(\sigma). E ( G ) = σ ∈ M ⋃ E ( σ ) .
We assume that motifs are edge-disjoint and that the associated vertex–motif factor graph is a tree. Under this structural assumption, any cycle in G G G must lie entirely inside a single motif. In particular, loops created by the loop-erased random walk cannot involve edges belonging to multiple motifs. This property allows us to decompose the global loop distribution into independent contributions coming from the different motifs.
For each motif σ \sigma σ , we define a local distribution π σ ( ℓ ) \pi_\sigma(\ell) π σ ( ℓ ) , representing the proportion of loops of size ℓ \ell ℓ that are generated inside the motif σ \sigma σ . These local distributions can be computed explicitly for the motifs studied in the previous sections. In the spanning-tree edge-sampling representation, an edge is chosen uniformly from E ( G ) E(G) E ( G ) , so the chance that it belongs to motif σ \sigma σ is ∣ E ( σ ) ∣ / ∣ E ( G ) ∣ |E(\sigma)|/|E(G)| ∣ E ( σ ) ∣/∣ E ( G ) ∣ . However, the local distribution π σ ( ℓ ) \pi_\sigma(\ell) π σ ( ℓ ) is already conditioned on the occurrence of a loop. Therefore, edge counts alone are not the correct weights for mixing these conditional distributions. Define the local unnormalized event probabilities and loop-creation probabilities by
P σ ( ℓ ) = P s t , σ ( ℓ ) ℓ , q σ = ∑ k ≥ 2 P σ ( k ) , π σ ( ℓ ) = P σ ( ℓ ) q σ . P_\sigma(\ell)=\frac{P_{\mathrm{st},\sigma}(\ell)}{\ell},\qquad q_\sigma=\sum_{k\geq2}P_\sigma(k),\qquad\pi_\sigma(\ell)=\frac{P_\sigma(\ell)}{q_\sigma}. P σ ( ℓ ) = ℓ P st , σ ( ℓ ) , q σ = k ≥ 2 ∑ P σ ( k ) , π σ ( ℓ ) = q σ P σ ( ℓ ) .
Because the spanning-tree measure factorizes across the blocks of a tree-like factor graph, the global unnormalized distribution is
P G ( ℓ ) = ∑ σ ∈ M ∣ E ( σ ) ∣ ∣ E ( G ) ∣ P σ ( ℓ ) . P_G(\ell)=\sum_{\sigma\in\mathcal{M}}\frac{|E(\sigma)|}{|E(G)|}P_\sigma(\ell). P G ( ℓ ) = σ ∈ M ∑ ∣ E ( G ) ∣ ∣ E ( σ ) ∣ P σ ( ℓ ) .
Normalizing only after summing the contributions yields
π G ( ℓ ) = ∑ σ ∈ M ∣ E ( σ ) ∣ q σ π σ ( ℓ ) ∑ σ ∈ M ∣ E ( σ ) ∣ q σ . (44) \pi_G(\ell)=\frac{\sum_{\sigma\in\mathcal{M}}|E(\sigma)|q_\sigma\pi_\sigma(\ell)}
{\sum_{\sigma\in\mathcal{M}}|E(\sigma)|q_\sigma}. \tag*{(44)} π G ( ℓ ) = ∑ σ ∈ M ∣ E ( σ ) ∣ q σ ∑ σ ∈ M ∣ E ( σ ) ∣ q σ π σ ( ℓ ) . (44)
The simpler edge-weighted average is valid only if all q σ q_\sigma q σ coincide. Equation (44) applies to the explicitly defined spanning-tree loop-size model; comparison to dynamically erased loops requires the correspondence assumed in Theorem 5.
Suppose that the graph G G G is constructed exclusively from cycle motifs. Let
M = { C n 1 , C n 2 , … , C n m } \mathcal{M}=\{C_{n_1},C_{n_2},\ldots,C_{n_m}\} M = { C n 1 , C n 2 , … , C n m }
be the set of cycle motifs, where C n i C_{n_i} C n i denotes a cycle of length n i n_i n i . Since each cycle contributes exactly n i n_i n i edges, we have
∣ E ( C n i ) ∣ = n i . |E(C_{n_i})|=n_i. ∣ E ( C n i ) ∣ = n i .
For a cycle C n i C_{n_i} C n i , the local loop-creation probability is
q C n i = n i − 1 2 n i + 1 n i 2 . q_{C_{n_i}}=\frac{n_i-1}{2n_i}+\frac{1}{n_i^2}. q C n i = 2 n i n i − 1 + n i 2 1 .
Using the corrected conditional-mixture weights gives
π ( ℓ ) = ∑ i = 1 m n i q C n i ∑ j = 1 m n j q C n j π C n i ( ℓ ) . (45) \pi(\ell)=\sum_{i=1}^{m}\frac{n_iq_{C_{n_i}}}{\sum_{j=1}^{m}n_jq_{C_{n_j}}}\pi_{C_{n_i}}(\ell). \tag*{(45)} π ( ℓ ) = i = 1 ∑ m ∑ j = 1 m n j q C n j n i q C n i π C n i ( ℓ ) . (45)
In particular, since cycles only generate loops of size 2 or n i n_i n i , the global probabilities are
π ( 2 ) = ∑ i = 1 m n i q C n i ∑ j = 1 m n j q C n j n i 2 − n i n i 2 − n i + 2 , (46) \pi(2)=\sum_{i=1}^{m}\frac{n_iq_{C_{n_i}}}{\sum_{j=1}^{m}n_jq_{C_{n_j}}}\frac{n_i^2-n_i}{n_i^2-n_i+2}, \tag*{(46)} π ( 2 ) = i = 1 ∑ m ∑ j = 1 m n j q C n j n i q C n i n i 2 − n i + 2 n i 2 − n i , (46)
π ( ℓ ) ∣ ℓ ≥ 3 = ∑ i = 1 m n i q C n i ∑ j = 1 m n j q C n j 2 n i 2 − n i + 2 1 { ℓ = n i } . (47) \pi(\ell)\big|_{\ell\geq3}=\sum_{i=1}^{m}\frac{n_iq_{C_{n_i}}}{\sum_{j=1}^{m}n_jq_{C_{n_j}}}\frac{2}{n_i^2-n_i+2}\mathbf{1}_{\{\ell=n_i\}}. \tag*{(47)} π ( ℓ ) ℓ ≥ 3 = i = 1 ∑ m ∑ j = 1 m n j q C n j n i q C n i n i 2 − n i + 2 2 1 { ℓ = n i } . (47)
Thus, in a network composed only by cycles, erased loops correspond either to local backtracking events (ℓ = 2 \ell=2 ℓ = 2 ) or to the traversal of the entire cycle motif.
Assume now that the network is constructed exclusively from clique motifs
M = { K r 1 , K r 2 , … , K r m } , \mathcal{M}=\{K_{r_1},K_{r_2},\ldots,K_{r_m}\}, M = { K r 1 , K r 2 , … , K r m } ,
where K r i K_{r_i} K r i denotes a clique with r i r_i r i vertices.
Each clique contributes
∣ E ( K r i ) ∣ = ( r i 2 ) = r i ( r i − 1 ) 2 |E(K_{r_i})|=\binom{r_i}{2}=\frac{r_i(r_i-1)}{2} ∣ E ( K r i ) ∣ = ( 2 r i ) = 2 r i ( r i − 1 )
edges to the network.
From Section 3, the loop-size distribution inside a clique K n K_n K n is given by
π K n ( ℓ ) = a n ( ℓ ) ∑ k ≥ 2 a n ( k ) , \pi_{K_n}(\ell)=\frac{a_n(\ell)}{\sum_{k\geq2}a_n(k)}, π K n ( ℓ ) = ∑ k ≥ 2 a n ( k ) a n ( ℓ ) ,
where
a n ( ℓ ) = ( n ) ℓ n ℓ = ∏ i = 0 ℓ − 1 ( 1 − i n ) . a_n(\ell)=\frac{(n)_\ell}{n^\ell}=\prod_{i=0}^{\ell-1}\left(1-\frac{i}{n}\right). a n ( ℓ ) = n ℓ ( n ) ℓ = i = 0 ∏ ℓ − 1 ( 1 − n i ) .
Here the local event probability is
q K r = 1 r − 1 ∑ k = 2 r ( r k ) r k . q_{K_r}=\frac{1}{r-1}\sum_{k=2}^{r}\frac{\binom{r}{k}}{r^k}. q K r = r − 1 1 k = 2 ∑ r r k ( k r ) .
Using the corrected conditional-mixture weights, the global distribution becomes
π ( ℓ ) = ∑ i = 1 m ( r i 2 ) q K r i ∑ j = 1 m ( r j 2 ) q K r j π K r i ( ℓ ) . (48) \pi(\ell)=\sum_{i=1}^{m}\frac{\binom{r_i}{2}q_{K_{r_i}}}{\sum_{j=1}^{m}\binom{r_j}{2}q_{K_{r_j}}}\pi_{K_{r_i}}(\ell). \tag*{(48)} π ( ℓ ) = i = 1 ∑ m ∑ j = 1 m ( 2 r j ) q K r j ( 2 r i ) q K r i π K r i ( ℓ ) . (48)
Substituting the explicit expression of π K r i ( ℓ ) \pi_{K_{r_i}}(\ell) π K r i ( ℓ ) gives
π ( ℓ ) = ∑ i = 1 m ( r i 2 ) q K r i ∑ j = 1 m ( r j 2 ) q K r j a r i ( ℓ ) ∑ k ≥ 2 a r i ( k ) , (49) \pi(\ell)=\sum_{i=1}^{m}\frac{\binom{r_i}{2}q_{K_{r_i}}}{\sum_{j=1}^{m}\binom{r_j}{2}q_{K_{r_j}}}\frac{a_{r_i}(\ell)}{\sum_{k\geq2}a_{r_i}(k)}, \tag*{(49)} π ( ℓ ) = i = 1 ∑ m ∑ j = 1 m ( 2 r j ) q K r j ( 2 r i ) q K r i ∑ k ≥ 2 a r i ( k ) a r i ( ℓ ) , (49)
with
a r i ( ℓ ) = ∏ j = 0 ℓ − 1 ( 1 − j r i ) . a_{r_i}(\ell)=\prod_{j=0}^{\ell-1}\left(1-\frac{j}{r_i}\right). a r i ( ℓ ) = j = 0 ∏ ℓ − 1 ( 1 − r i j ) .
Hence, when the network is composed entirely of clique motifs, the loop-size distribution is a weighted mixture of the birthday-type distributions generated inside each clique.
We used formula (44) to compute the distribution of erased loops on a graph buit by gluing cliques and cycles.
The results are presented in the main panel of Figure 17 . To validate the accuracy of the formula, we compared these theoretical results with empirical measurements obtained by directly counting the sizes of erased loops generated by loop-erased random walks. The comparison is shown in the inset of Figure 17 . The largest difference in the inset of Figure 17 is ε max = 5.8 × 10 − 2 \varepsilon_{\max}=5.8\times10^{-2} ε m a x = 5.8 × 1 0 − 2 . Therefore, the proposed formula accurately captures the distribution of erased loop sizes on this kind of graphs. This comparison provides a numerical check of the proposed spanning-tree model; the exact agreement with the dynamic erasure process requires the correspondence discussed in Appendix § 13 .
Figure 17. Main panel shows the distribution of erased loops obtained with the relation (44). Inset shows the comparison between Frequencies obtained by the relation (44) and Frequencies observed with true loop erase random walk. On the y-axis, we have the frequency obtained with the exact formula (44) and on the x-axis, we have the frequency obtained by counting size of erased loops.
Networks with Tree-Like Factor Graph
This section extends the motif-based framework to general networks by using their factor graph decomposition. See Figure 18 where the motifs are not necessarily cycles or cliques. The approach captures the mean first passage structure of a more complex graph through its biconnected components [24 ] .
Figure 18. An example of graph where motifs are not clique or cycle (a) and its factor graph (b). The nodes in yellow are cut vertices. In the factor graph the blue square nodes are the nodes representing the motifs. The circle nodes are the nodes of the original graph. We can observe that the factor graph is bipartite.
Definition 20. Let G = ( V , E ) G=(V,E) G = ( V , E ) be a finite, connected, undirected graph. A vertex a ∈ V a\in V a ∈ V is called a cut vertex (or articulation point) [24 , 28 ] if removing it disconnects the graph, i.e.
κ ( G − a ) > κ ( G ) , \kappa(G-a)>\kappa(G), κ ( G − a ) > κ ( G ) , where κ ( ⋅ ) \kappa(\cdot) κ ( ⋅ ) denotes the number of connected components.
We can see cut vertices in the yellow color in Figure 12 , Figure 13 , Figure 15 and Figure 18 .
Definition 21. A block (or biconnected component) [24 , 28 ] of G G G is a maximal subgraph b b b that is 2-vertex-connected (no cut vertex). Equivalently, b b b is maximal among subgraphs in which every pair of vertices has two internally vertex-disjoint paths.
Let B \mathcal{B} B be the family of all blocks of G G G and V ( b ) ⊆ V V(b)\subseteq V V ( b ) ⊆ V the vertex set of block b b b . The way blocks are attached is encoded by the bipartite factor graph
T = ( V ∪ B , E T ) , ( v , b ) ∈ E T ⟺ v ∈ V ( b ) . T=(V\cup\mathcal{B},E_T),\qquad(v,b)\in E_T\Longleftrightarrow v\in V(b). T = ( V ∪ B , E T ) , ( v , b ) ∈ E T ⟺ v ∈ V ( b ) .
Nodes of T T T are of two types: vertices of G G G and block-nodes. An edge ( v , b ) (v,b) ( v , b ) indicates that vertex v v v belongs to block b b b . When G G G is connected, T T T is a tree—connected and acyclic known as the factor graph. Let Art ( G ) \operatorname{Art}(G) Art ( G ) denotes the set of all cut vertices of G G G . In this representation
x ∈ Art ( G ) ⟺ ∣ { b ∈ B : x ∈ V ( b ) } ∣ ≥ 2 x\in\operatorname{Art}(G)\Longleftrightarrow\lvert\{b\in\mathcal{B}:x\in V(b)\}\rvert\ge2 x ∈ Art ( G ) ⟺ ∣{ b ∈ B : x ∈ V ( b )}∣ ≥ 2
⟺ deg T ( x ) ≥ 2. \Longleftrightarrow\deg_T(x)\ge2. ⟺ deg T ( x ) ≥ 2.
Such vertices are called the attachment points of the decomposition.
In practice to construct T T T , one first computes the set of biconnected components B \mathcal{B} B of G G G (e.g. via a DFS-based algorithm such as Tarjan’s algorithm [28 ] ). Then one builds the bipartite graph T T T by creating one node for every v ∈ V v\in V v ∈ V and one node for every block b ∈ B b\in\mathcal{B} b ∈ B , and adding an edge ( v , b ) (v,b) ( v , b ) whenever v ∈ V ( b ) v\in V(b) v ∈ V ( b ) . This produces exactly the factor tree representation described above. Assume now that G G G is decomposed into blocks B \mathcal{B} B and that the factor graph T = ( V ∪ B , E T ) T=(V\cup\mathcal{B},E_T) T = ( V ∪ B , E T ) is a tree. Fix two distinct vertices u , v ∈ V u,v\in V u , v ∈ V . Because T T T is a tree, there is a unique alternating path
u = v 0 − b 0 − v 1 − b 1 − ⋯ − b m − 1 − v m = v in T , u=v_0-b_0-v_1-b_1-\cdots-b_{m-1}-v_m=v\quad\text{in }T, u = v 0 − b 0 − v 1 − b 1 − ⋯ − b m − 1 − v m = v in T ,
which identifies the unique sequence of blocks that must be crossed to go from u u u to v v v , and the intermediate vertices v 1 , … , v m − 1 v_1,\ldots,v_{m-1} v 1 , … , v m − 1 are precisely the attachment (cut) vertices [30 ] . The procedure is described in Algorithm B.3. In addition, for the simple case in which blocks are motifs (e.g., cycles or cliques), we introduce Algorithm B.1 and its reverse counterpart, Algorithm B.2.
For each block b ∈ B b\in\mathcal{B} b ∈ B , define a local mean first passage time
τ b ( x → y ) , x , y ∈ V ( b ) , \tau_b(x\to y),\qquad x,y\in V(b), τ b ( x → y ) , x , y ∈ V ( b ) ,
as the MFPT to go from x x x to y y y for the random-walk model restricted to the subgraph induced by V ( b ) V(b) V ( b ) (with the same transition structure/weights as in G G G ). This local quantity can be computed exactly for special motif families (cycles, cliques), or numerically/algorithmically for general blocks (e.g. via spanning-tree/LERW kernels).
In the tree-like setting, the global MFPT from u u u to v v v can be modeled as the sum of the successive expected crossing times of the blocks along the unique route in T T T
MFPT L E R W ( u , v ) = ∑ i = 0 m − 1 τ b i ( v i → v i + 1 ) . (50) \operatorname{MFPT}^{\mathrm{LERW}}(u,v)=\sum_{i=0}^{m-1}\tau_{b_i}(v_i\to v_{i+1}). \tag*{(50)} MFPT LERW ( u , v ) = i = 0 ∑ m − 1 τ b i ( v i → v i + 1 ) . (50)
The intuition is that the factor tree structure removes any ambiguity about the order in which blocks are visited: there is exactly one block sequence from u u u to v v v in T T T . Hence the passage from u u u to v v v decomposes into m m m local passages, each occurring inside a single block between two well-defined boundary vertices (entry v i v_i v i and exit v i + 1 v_{i+1} v i + 1 ).
This decomposition provides a natural generalization of the motif-based framework: each block plays the role of a “super-motif,” and the factor tree specifies how these local structures connect hierarchically. The additivity in (50) follows from the acyclic nature of T T T , which guarantees that each block contributes exactly one traversal term and no revisiting occurs. This principle underlies all higher-level MFPT computations in modular or tree-like networks. This factorized approach reduces the effective dimensionality of the problem by working at the level of blocks rather than individual elements, which significantly lowers computational complexity for large networks.
We generate a graph by gluing Watts–Strogatz communities: 10 communities of size 12 (total 120 nodes), each with mean degree k = 4 k = 4 k = 4 and rewiring probability p = 0.1 p = 0.1 p = 0.1 , connected through gateway nodes. For every ordered node pair ( u , v ) (u, v) ( u , v ) , we estimate the MFPT in two ways. First, the MC-MC values are obtained by Monte Carlo simulation: for each pair, we sample many random walks from u u u until hitting v v v , apply loop-erasure, and approximate the MFPT by the empirical mean of LERW lengths (with a step cap). Second, the Factor values uses the proposed factorization approach: the graph is decomposed into a factor tree (block–articulation structure), and the MFPT between u u u and v v v is computed as a sum of local contributions along the unique path in this tree. Inside each block, these local expectations are computed exactly via the transfer matrix approach presented in the first section. Figure 19 plots the MFPT values for the first 50 distinct node pairs (indexed on the x-axis). The factorization result closely follows the one obtained with the MC-MC (ε max = 2.5 × 10 − 1 \varepsilon_{\max} = 2.5 \times10^{-1} ε m a x = 2.5 × 1 0 − 1 ).
Figure 19. Mean First Passage Time of Loop Erased Random Walks between different pairs of nodes of a graph built by gluing Watts–Strogatz communities: 10 communities of size 12 (total 120 nodes), each with mean degree k = 4 k = 4 k = 4 and rewiring probability p = 0.1 p = 0.1 p = 0.1 , connected through gateway nodes. On the x-axis, we have the MFPT obtained with the algorithm 1 with factorization approach and on the y-axis, we have the MFPT obtained with an MC-MC approach with empirical average.
For the same reason as the previous section the global distribution of erased loops can be written as a weighted mixture of the local block distributions,
π G ( ℓ ) = ∑ b ∈ B ∣ E ( b ) ∣ q b π b ( ℓ ) ∑ b ∈ B ∣ E ( b ) ∣ q b , q b = ∑ k ≥ 2 P b ( k ) . (51) \pi_G(\ell) = \frac{\sum_{b\in B} \lvert E(b)\rvert q_b\pi_b(\ell)}{\sum_{b\in B} \lvert E(b)\rvert q_b}, \qquad q_b = \sum_{k\geq2} P_b(k). \tag*{(51)} π G ( ℓ ) = ∑ b ∈ B ∣ E ( b )∣ q b ∑ b ∈ B ∣ E ( b )∣ q b π b ( ℓ ) , q b = k ≥ 2 ∑ P b ( k ) . (51)
We used formula (51) to compute the distribution of erased loops on a graph by gluing Watts–Strogatz communities: 10 communities of size 12 (total 120 nodes), each with mean degree k = 4 k = 4 k = 4 and rewiring probability p = 0.1 p = 0.1 p = 0.1 , connected through gateway nodes. The results are presented in the main panel of Figure 20 . To validate the accuracy of the formula, we compared these theoretical results with empirical measurements obtained by directly counting the sizes of the erased loops generated by loop-erased random walks. The comparison is shown in the inset of Figure 20 . For the inset of Fig. 20, we obtain ε max = 9.6 × 10 − 3 \varepsilon_{\max} = 9.6 \times10^{-3} ε m a x = 9.6 × 1 0 − 3 . Therefore, the proposed formula accurately captures the distribution of erased loop sizes on this kind of graphs. This comparison provides a numerical check of the proposed spanning-tree model; the exact agreement with the dynamic erasure process requires the correspondence discussed in Appendix D.
Figure 20. Main panel shows the distribution of erased loops obtained with the relation (51) on a graph by gluing Watts–Strogatz communities: 10 communities of size 12 (total 120 nodes), each with mean degree k = 4 k = 4 k = 4 and rewiring probability p = 0.1 p = 0.1 p = 0.1 , connected through gateway nodes. Inset shows the comparison between Frequencies obtained by the relation (51) and Frequencies observed with true loop erase random walk on this graph. On the y-axis, we have the frequency obtained with the exact formula (44) and on the x-axis, we have the frequency obtained by counting size of erased loops.
Conclusion
In this work, we studied loop-erased random walks on finite graphs through their connection with uniform spanning trees. The goal was to describe two complementary aspects of the loop-erasure process. The first is the mean first passage time (MFPT) of the loop-erased random walk, which measures the length of the effective self-avoiding path that remains after all loops have been removed. The second is the distribution of erased loop sizes, which describes the redundant excursions produced by the random walk before they are erased. Together, these two quantities give a more complete description of random exploration on graphs: one describes the part of the trajectory that is kept, while the other describes the part that is removed.
The first contribution of this work is a general method for computing the LERW MFPT on arbitrary finite graphs. Using the transfer-current kernel, we expressed the probability of each simple path in terms of spanning-tree probabilities. This provides an exact framework in which the MFPT is computed from theoretical path weights, rather than only from empirical averages. The numerical comparisons with Monte Carlo simulations show very good agreement, both for unweighted and weighted graphs. This confirms that the transfer-current approach gives a reliable way to quantify effective random-walk exploration. The second contribution is the derivation of a general formula for the distribution of erased loop sizes. This result shows that the probability of erasing a loop of a given size is also determined by spanning-tree probabilities. Thus, the same mathematical framework describes both sides of the loop-erasure process: the effective path that remains and the loops that are removed. This is important because these two observables contain different information. The MFPT measures the length of the effective route, while the loop-size distribution measures the cyclic redundancy generated by the graph structure.
We applied the general theory to several classes of graphs. For complete graphs, we obtained explicit formulas for both the LERW MFPT and the erased-loop distribution. The results show that the typical loop-erased path length grows like the square root of the graph size. The erased-loop distribution has the same scaling and is closely related to the classical birthday problem. Thus, the complete graph provides a useful reference case for dense networks, where many alternative routes exist between two vertices. For cycle graphs, the behavior is very different. Because the graph contains only one global cycle, the possible erased loops are strongly restricted. In large cycle graphs, almost all erased loops have size two, corresponding to simple backtracking events. This contrast with the complete graph case shows that LERW observables are sensitive to the topology of the graph. They can therefore distinguish between dense graphs with many possible loops and sparse cyclic graphs where the loop structure is much more constrained.
We also considered motif-based networks. In these
graphs, the local structure of the motifs determines the global loop-erasure behavior. The MFPT can be decomposed along the sequence of motifs connecting two vertices, and the erased-loop distribution can be written as a mixture of the local distributions inside the motifs. This gives a clear interpretation: local building blocks control the effective random-walk behavior of the whole network. The numerical simulations again confirm the theoretical predictions. A particularly important case is given by graphs built from cycle motifs. When the motifs are connected in a tree-like way, the path from one vertex to another crosses a unique sequence of motifs. In this situation, the global LERW MFPT can be computed by summing local contributions inside the crossed motifs. Equivalently, it can be obtained by summing the potential drops. This is a key simplification because the global problem is reduced to smaller computations on elementary cycle blocks. Therefore, graphs with cycle motifs form a special class where the theory is not only exact, but also computationally efficient and easy to interpret.
Overall, these results show that loop-erased random walks provide a meaningful way to study exploration on finite graphs. They give an intermediate point of view between shortest paths and ordinary random walks. Shortest paths ignore the random exploration process, while ordinary random walks keep all repeated visits. Loop-erased random walks keep only the effective route, and the erased-loop distribution adds complementary information by describing the loops that were removed. Together, these quantities provide a richer description of graph exploration and of the role played by cycles in the network. From the perspective of exploration in unknown environments, a loop-erased trajectory may also serve as a recorded return route: after locating a target, an agent capable of remembering visited positions can traverse the retained self-avoiding route in reverse rather than initiate a new random search. This needs not be a shortest route and is not, by itself, an implemented robotic navigation algorithm. Testing such a strategy with finite memory, localization errors, and changes in the environment would be an interesting future extension. Several perspectives follow naturally from this work. A first direction is to improve the computational part of the method. Although the transfer-current formula gives exact weights, the enumeration of simple paths may become expensive on large dense graphs. Future work could use importance sampling, path truncation, or more efficient graph-search algorithms to reduce the computational cost. Finally, the motif-based procedure is an efficient method for studying large networks built from repeated local structures and could lead to possible applications in network design. By choosing suitable motifs and connections between them, one could control the typical effective path length or the size of loops produced during exploration. This could be useful for designing networks where one wants to balance efficient navigation with controlled redundancy. In conclusion, this work shows that the combination of loop-erased random walks, spanning trees, and transfer-current methods provides a powerful framework for studying finite graphs. It gives exact formulas, clear interpretations, and strong agreement with simulations. The special case of cycle-motif graphs is especially important, because it shows that the global LERW MFPT can be obtained by summing local potential contributions. This opens several directions for future work, both theoretical and applied.
ACKNOWLEDGMENTS
Computational resources have been provided by the Consortium des Équipements de Calcul Intensif (CÉCI), funded by the Fonds de la Recherche Scientifique de Belgique (F.R.S.-FNRS) under Grant No. 2.5020.11 and by the Walloon Region. K.F. research is funded by ARC project "EMOTIONS".
Appendices
ABSOLUTE ERRORS FOR COMPLETE GRAPHS
Figure 21 compares the absolute deviations of the Monte Carlo estimate and the asymptotic approximation from the exact MFPT on complete graphs.
Algorithms
In this appendix we schematically present the algorithms introduced in the main text.
Algorithm C.1: Construction of the factor graph T T T from motifs (cycle, clique) based graph G G G
Input. An undirected graph G = ( V , E ) G = (V, E) G = ( V , E ) whose biconnected components are cliques and/or simple cycles.
Output. A bipartite factor graph T T T (blocks ↔ \leftrightarrow ↔ vertices).
Initialization. Create an empty graph T T T . For each vertex v ∈ V v \in V v ∈ V , add a node v v v to T T T with attribute kind = vertex.
Biconnected decomposition. Compute the set of biconnected components
B = { B 1 , … , B m } \mathcal{B} = \{B_1,\ldots,B_m\} B = { B 1 , … , B m } of G G G .
Block type identification. For each block B i ∈ B B_i \in\mathcal{B} B i ∈ B :
If ∣ B i ∣ = 2 |B_i| = 2 ∣ B i ∣ = 2 , treat B i B_i B i as a clique K 2 K_2 K 2 .
Otherwise, test whether the induced subgraph G [ B i ] G[B_i] G [ B i ] is a clique.
Otherwise, test whether G [ B i ] G[B_i] G [ B i ] is a simple cycle C k C_k C k and reconstruct a cyclic order.
If none applies, raise an error (unsupported block type).
Block node construction. Create a block node b i b_i b i in T T T with attributes kind = block, block_type ∈ { clique , cycle } \in\{\text{clique}, \text{cycle}\} ∈ { clique , cycle } , size = ∣ B i ∣ = |B_i| = ∣ B i ∣ . If b i b_i b i is a cycle, store its cyclic ordering cycle_order.
Block–vertex connections. For each vertex v ∈ B i v \in B_i v ∈ B i , add an edge ( b i , v ) (b_i,v) ( b i , v ) to T T T .
Structural check. If G G G is connected, verify that T T T is a tree; otherwise raise an error.
Algorithm C.2: Construction of the base graph G G G from the factor graph T T T
Input. A bipartite factor graph T T T (assumed to be a tree), with nodes of type vertex and block.
Output. A graph G G G .
Initialization. Create an empty graph G G G . Add to G G G all nodes of T T T whose attribute is kind = vertex.
Block traversal. For each block node b b b in T T T :
Edge insertion.
If b b b is a clique, add all possible edges between vertices in V b V_b V b .
If b b b is a cycle and a cyclic order is available, add consecutive cycle edges.
Otherwise, add cycle edges in an arbitrary order.
Output. Return the reconstructed graph G G G .
Algorithm C.3: General Factor Graph construction and related utilities
Input. An undirected graph G = ( V , E ) G = (V, E) G = ( V , E ) and a block prefix.
Output. (1) A factor graph T T T , (2) block-induced subgraphs, (3) articulation points inferred from T T T .
Initialization of T T T . Create an empty graph T T T . For each vertex v ∈ V v \in V v ∈ V , add v v v to T T T with attribute kind = vertex.
Biconnected decomposition. Compute the set of biconnected components B = { B 1 , … , B m } \mathcal{B} = \{B_1,\ldots,B_m\} B = { B 1 , … , B m } of G G G .
Block node construction. For each block B i ∈ B B_i \in\mathcal{B} B i ∈ B :
kind = block , size = ∣ B i ∣ , nodes = B i . \text{kind} = \text{block}, \quad\text{size} = |B_i|,\quad\text{nodes} = B_i. kind = block , size = ∣ B i ∣ , nodes = B i . Block subgraph extraction. Given a block node b b b , return the induced subgraph G [ nodes ( b ) ] G[\text{nodes}(b)] G [ nodes ( b )] .
Attachment point identification. Define the set of articulation points as A \mathcal{A} A , the set of all v ∈ V v \in V v ∈ V adjacent to at least two block nodes in T T T . Return A \mathcal{A} A .
Error Bounds and Convergence of the MFPT Estimator
In this appendix, we establish a deterministic error bound for the estimator introduced in Algorithm 1 and prove its almost-sure convergence to the exact mean loop-erased path length.
Let G = ( V , E ) G=(V,E) G = ( V , E ) be a finite, connected, simple, undirected graph, and let u , v ∈ V u,v\in V u , v ∈ V be two distinct vertices. We denote by Γ ( u , v ) \Gamma(u,v) Γ ( u , v ) the set of all simple paths connecting u u u to v v v .
For each γ ∈ Γ ( u , v ) \gamma\in\Gamma(u,v) γ ∈ Γ ( u , v ) , let
p γ = det ( Y E ( γ ) , E ( γ ) ) (52) p_\gamma=\det\left(Y_{E(\gamma),E(\gamma)}\right) \tag*{(52)} p γ = det ( Y E ( γ ) , E ( γ ) ) (52)
be its probability under the loop-erased random-walk measure, as established in Eq. (6) .
The exact mean loop-erased path length is
μ u , v = MFPT L E R W ( u , v ) = ∑ γ ∈ Γ ( u , v ) p γ ∣ γ ∣ E . (53) \mu_{u,v}=\operatorname{MFPT}^{\mathrm{LERW}}(u,v)=\sum_{\gamma\in\Gamma(u,v)}p_\gamma|\gamma|_E. \tag*{(53)} μ u , v = MFPT LERW ( u , v ) = γ ∈ Γ ( u , v ) ∑ p γ ∣ γ ∣ E . (53)
Since the set of simple paths forms a partition of the possible loop-erased trajectories, their probabilities satisfy
∑ γ ∈ Γ ( u , v ) p γ = 1. (54) \sum_{\gamma\in\Gamma(u,v)}p_\gamma=1. \tag*{(54)} γ ∈ Γ ( u , v ) ∑ p γ = 1. (54)
Suppose that N N N independent random-walk realizations are generated and chronologically loop-erased. Let G N ⊂ Γ ( u , v ) \mathcal{G}_N\subset\Gamma(u,v) G N ⊂ Γ ( u , v ) denote the set of distinct paths discovered after these N N N realizations.
We define the captured probability mass as
M N = ∑ γ ∈ G N p γ , 0 < M N ≤ 1. (55) M_N=\sum_{\gamma\in\mathcal{G}_N}p_\gamma,\qquad0<M_N\le1. \tag*{(55)} M N = γ ∈ G N ∑ p γ , 0 < M N ≤ 1. (55)
The estimator returned by Algorithm 1 can then be written as
μ ^ N = 1 M N ∑ γ ∈ G N p γ ∣ γ ∣ E . (56) \widehat{\mu}_N=\frac{1}{M_N}\sum_{\gamma\in\mathcal{G}_N}p_\gamma|\gamma|_E. \tag*{(56)} μ N = M N 1 γ ∈ G N ∑ p γ ∣ γ ∣ E . (56)
Unlike a standard Monte Carlo estimator, μ ^ N \widehat{\mu}_N μ N is not obtained by averaging the lengths of the simulated trajectories. Instead, the simulations identify candidate paths, whose probability weights are subsequently computed exactly using the transfer-current kernel.
Proposition 22 (Deterministic error bound). Let d G ( u , v ) d_G(u,v) d G ( u , v ) denote the shortest-path distance between u u u and v v v in G G G . For every nonempty set of discovered paths G N \mathcal{G}_N G N , the estimator μ ^ N \widehat{\mu}_N μ N satisfies
∣ μ u , v − μ ^ N ∣ ≤ ( 1 − M N ) ( ∣ V ∣ − 1 − d G ( u , v ) ) . (57) |\mu_{u,v}-\widehat{\mu}_N|\le(1-M_N)(|V|-1-d_G(u,v)). \tag*{(57)} ∣ μ u , v − μ N ∣ ≤ ( 1 − M N ) ( ∣ V ∣ − 1 − d G ( u , v )) . (57)
Proof. We decompose the exact expectation into the contributions of discovered and undiscovered paths:
μ u , v = ∑ γ ∈ G N p γ ∣ γ ∣ E + ∑ γ ∈ Γ ( u , v ) ∖ G N p γ ∣ γ ∣ E . (58) \mu_{u,v}=\sum_{\gamma\in\mathcal{G}_N}p_\gamma|\gamma|_E+
\sum_{\gamma\in\Gamma(u,v)\setminus\mathcal{G}_N}p_\gamma|\gamma|_E. \tag*{(58)} μ u , v = γ ∈ G N ∑ p γ ∣ γ ∣ E + γ ∈ Γ ( u , v ) ∖ G N ∑ p γ ∣ γ ∣ E . (58)
By definition of μ ^ N \widehat{\mu}_N μ N , the first contribution equals
∑ γ ∈ G N p γ ∣ γ ∣ E = M N μ ^ N . \sum_{\gamma\in\mathcal{G}_N}p_\gamma|\gamma|_E=M_N\widehat{\mu}_N. γ ∈ G N ∑ p γ ∣ γ ∣ E = M N μ N .
If M N < 1 M_N<1 M N < 1 , define the conditional mean length of the undiscovered paths by
μ N m i s s = 1 1 − M N ∑ γ ∈ Γ ( u , v ) ∖ G N p γ ∣ γ ∣ E . (59) \mu_N^{\mathrm{miss}}=\frac{1}{1-M_N}\sum_{\gamma\in\Gamma(u,v)\setminus\mathcal{G}_N}p_\gamma|\gamma|_E. \tag*{(59)} μ N miss = 1 − M N 1 γ ∈ Γ ( u , v ) ∖ G N ∑ p γ ∣ γ ∣ E . (59)
Consequently, Eq. (58) becomes
μ u , v = M N μ ^ N + ( 1 − M N ) μ N m i s s . (60) \mu_{u,v}=M_N\widehat{\mu}_N+(1-M_N)\mu_N^{\mathrm{miss}}. \tag*{(60)} μ u , v = M N μ N + ( 1 − M N ) μ N miss . (60)
Subtracting μ ^ N \widehat{\mu}_N μ N from both sides gives
μ u , v − μ ^ N = ( 1 − M N ) ( μ N m i s s − μ ^ N ) . (61) \mu_{u,v}-\widehat{\mu}_N=(1-M_N)\left(\mu_N^{\mathrm{miss}}-\widehat{\mu}_N\right). \tag*{(61)} μ u , v − μ N = ( 1 − M N ) ( μ N miss − μ N ) . (61)
Since every loop-erased trajectory is a simple path connecting u u u to v v v , its length satisfies
d G ( u , v ) ≤ ∣ γ ∣ E ≤ ∣ V ∣ − 1. (62) d_G(u,v)\le|\gamma|_E\le|V|-1. \tag*{(62)} d G ( u , v ) ≤ ∣ γ ∣ E ≤ ∣ V ∣ − 1. (62)
The lower bound follows from the definition of the shortest-path distance, whereas the upper bound follows from the fact that a simple path visits each vertex at most once.
Both μ ^ N \widehat{\mu}_N μ N and μ N m i s s \mu_N^{\mathrm{miss}} μ N miss are convex combinations of simple-path lengths. Therefore,
d G ( u , v ) ≤ μ ^ N ≤ ∣ V ∣ − 1 , (63) d_G(u,v)\le\widehat{\mu}_N\le|V|-1, \tag*{(63)} d G ( u , v ) ≤ μ N ≤ ∣ V ∣ − 1 , (63)
d G ( u , v ) ≤ μ N m i s s ≤ ∣ V ∣ − 1. (64) d_G(u,v)\le\mu_N^{\mathrm{miss}}\le|V|-1. \tag*{(64)} d G ( u , v ) ≤ μ N miss ≤ ∣ V ∣ − 1. (64)
It follows that
∣ μ N m i s s − μ ^ N ∣ ≤ ∣ V ∣ − 1 − d G ( u , v ) . (65) \left|\mu_N^{\mathrm{miss}}-\widehat{\mu}_N\right|\le|V|-1-d_G(u,v). \tag*{(65)} μ N miss − μ N ≤ ∣ V ∣ − 1 − d G ( u , v ) . (65)
Combining this inequality with Eq. (61) yields
∣ μ u , v − μ ^ N ∣ ≤ ( 1 − M N ) ( ∣ V ∣ − 1 − d G ( u , v ) ) , |\mu_{u,v}-\widehat{\mu}_N|\le(1-M_N)(|V|-1-d_G(u,v)), ∣ μ u , v − μ N ∣ ≤ ( 1 − M N ) ( ∣ V ∣ − 1 − d G ( u , v )) ,
which proves the result. If M N = 1 M_N=1 M N = 1 , all the probability mass has been captured and μ ^ N = μ u , v \widehat{\mu}_N=\mu_{u,v} μ N = μ u , v , so the inequality also holds.
Corollary 23 (Bounds on the exact MFPT). Under the assumptions of Proposition 22, the exact mean loop-erased path length satisfies
M N μ ^ N + ( 1 − M N ) d G ( u , v ) ≤ μ u , v ≤ M N μ ^ N + ( 1 − M N ) ( ∣ V ∣ − 1 ) . (66) M_N\widehat{\mu}_N+(1-M_N)d_G(u,v)\le\mu_{u,v}
\le M_N\widehat{\mu}_N+(1-M_N)(|V|-1). \tag*{(66)} M N μ N + ( 1 − M N ) d G ( u , v ) ≤ μ u , v ≤ M N μ N + ( 1 − M N ) ( ∣ V ∣ − 1 ) . (66) Proof. Equation (60) expresses the exact expectation as
μ u , v = M N μ ^ N + ( 1 − M N ) μ N m i s s . \mu_{u,v}=M_N\widehat{\mu}_N+(1-M_N)\mu_N^{\mathrm{miss}}. μ u , v = M N μ N + ( 1 − M N ) μ N miss . Using
d G ( u , v ) ≤ μ N m i s s ≤ ∣ V ∣ − 1 d_G(u,v)\le\mu_N^{\mathrm{miss}}\le|V|-1 d G ( u , v ) ≤ μ N miss ≤ ∣ V ∣ − 1 immediately gives the claimed inequalities. The case M N = 1 M_N=1 M N = 1 follows by equality.
These bounds are deterministic and do not rely on a confidence level or an asymptotic normal approximation. They provide an interval containing the exact MFPT once the captured probability mass M N M_N M N is known.
Moreover, the interval width is
( 1 − M N ) ( ∣ V ∣ − 1 − d G ( u , v ) ) , (67) (1-M_N)(|V|-1-d_G(u,v)), \tag*{(67)} ( 1 − M N ) ( ∣ V ∣ − 1 − d G ( u , v )) , (67)
which decreases as the captured probability mass approaches one.
Proposition 24 (Almost-sure convergence). Assume that the N N N loop-erased trajectories used to construct G N \mathcal{G}_N G N are generated independently according to the loop-erased random-walk distribution.
Then
M N → N → ∞ a . s . 1 , (68) M_N \xrightarrow[N\to\infty]{\mathrm{a.s.}} 1, \tag*{(68)} M N a.s. N → ∞ 1 , (68) and
μ ^ N → N → ∞ a . s . μ u , v . (69) \widehat{\mu}_N \xrightarrow[N\to\infty]{\mathrm{a.s.}} \mu_{u,v}. \tag*{(69)} μ N a.s. N → ∞ μ u , v . (69) Proof. Since G G G is finite, the set Γ ( u , v ) \Gamma(u,v) Γ ( u , v ) of simple paths between u u u and v v v is finite.
Furthermore, every simple path γ ∈ Γ ( u , v ) \gamma\in\Gamma(u,v) γ ∈ Γ ( u , v ) has strictly positive probability p γ > 0 p_\gamma>0 p γ > 0 under the loop-erased random-walk measure.
Indeed, the original random walk can follow the prescribed simple path without revisiting any vertex, an event having positive probability on a finite connected graph.
For a given path γ \gamma γ , the probability that it is not observed in any of the first N N N independent realizations is
P ( γ ∉ G N ) = ( 1 − p γ ) N . (70) \mathbb{P}\left(\gamma\notin\mathcal{G}_N\right)=(1-p_\gamma)^N. \tag*{(70)} P ( γ ∈ / G N ) = ( 1 − p γ ) N . (70) Since p γ > 0 p_\gamma>0 p γ > 0 ,
( 1 − p γ ) N ⟶ 0. (1-p_\gamma)^N\longrightarrow0. ( 1 − p γ ) N ⟶ 0. Because Γ ( u , v ) \Gamma(u,v) Γ ( u , v ) is finite, the probability that at least one simple path remains undiscovered satisfies the union bound
P ( G N ≠ Γ ( u , v ) ) ≤ ∑ γ ∈ Γ ( u , v ) ( 1 − p γ ) N ⟶ 0. (71) \mathbb{P}\left(\mathcal{G}_N\ne\Gamma(u,v)\right)\le\sum_{\gamma\in\Gamma(u,v)}(1-p_\gamma)^N\longrightarrow0. \tag*{(71)} P ( G N = Γ ( u , v ) ) ≤ γ ∈ Γ ( u , v ) ∑ ( 1 − p γ ) N ⟶ 0. (71) In addition, the sets G N \mathcal{G}_N G N are increasing with N N N . Each path is eventually discovered almost surely, and therefore all paths are eventually discovered almost surely.
Consequently,
M N = ∑ γ ∈ G N p γ → a . s . 1. M_N=\sum_{\gamma\in\mathcal{G}_N}p_\gamma\xrightarrow{\mathrm{a.s.}}1. M N = γ ∈ G N ∑ p γ a.s. 1. Applying the deterministic bound (57), we obtain
0 ≤ ∣ μ u , v − μ ^ N ∣ ≤ ( 1 − M N ) ( ∣ V ∣ − 1 − d G ( u , v ) ) . 0\le\left|\mu_{u,v}-\widehat{\mu}_N\right|\le(1-M_N)(|V|-1-d_G(u,v)). 0 ≤ ∣ μ u , v − μ N ∣ ≤ ( 1 − M N ) ( ∣ V ∣ − 1 − d G ( u , v )) . Since the right-hand side converges to zero almost surely, the estimator converges almost surely to the exact mean loop-erased path length.
Proof of Theorem 5
Following Dhar and Dhar [20 ] , we relate the formation of erased loops to cycles created by adding an edge to a random spanning tree. Let T T T be a uniformly chosen spanning tree of G G G , and let e e e be an edge selected uniformly from E E E , independently of T T T . For e = { u , v } e=\{u,v\} e = { u , v } , define
L T ( e ) = d T ( u , v ) + 1 , (72) L_T(e)=d_T(u,v)+1, \tag*{(72)} L T ( e ) = d T ( u , v ) + 1 , (72)
where d T ( u , v ) d_T(u,v) d T ( u , v ) is the length of the unique path connecting u u u and v v v in T T T . If e ∉ T e\notin T e ∈ / T , adding e e e to T T T creates a unique cycle of size L T ( e ) L_T(e) L T ( e ) . If e ∈ T e\in T e ∈ T , we adopt the convention that L T ( e ) = 2 L_T(e)=2 L T ( e ) = 2 , corresponding to immediate backtracking along the same edge. We denote by P s t ( ℓ ) P_{\mathrm{st}}(\ell) P st ( ℓ ) the probability that the preceding spanning-tree experiment produces a cycle of size ℓ \ell ℓ . We now explain the relation between this probability and the probability P ( ℓ ) P(\ell) P ( ℓ ) that a step of the random walk creates and erases a loop of size ℓ \ell ℓ . Consider first a fixed simple cycle C C C of size ℓ > 2 \ell>2 ℓ > 2 , whose edges are
E ( C ) = { e 1 , e 2 , … , e ℓ } . (73) E(C)=\{e_1,e_2,\ldots,e_\ell\}. \tag*{(73)} E ( C ) = { e 1 , e 2 , … , e ℓ } . (73)
For j = 1 , … , ℓ j=1,\ldots,\ell j = 1 , … , ℓ , let P s t ( C , e j ) P_{\mathrm{st}}(C,e_j) P st ( C , e j ) be the probability that adding the marked edge e j e_j e j to a spanning tree creates precisely the cycle C C C . Since T T T is a spanning tree, this event is equivalent to
E ( C ) ∖ { e j } ⊆ E ( T ) , e j ∉ E ( T ) . (74) E(C)\setminus\{e_j\}\subseteq E(T),\qquad e_j\notin E(T). \tag*{(74)} E ( C ) ∖ { e j } ⊆ E ( T ) , e j ∈ / E ( T ) . (74)
The probability P s t ( C , e j ) P_{\mathrm{st}}(C,e_j) P st ( C , e j ) does not depend on j j j . Indeed, every spanning unicycle whose unique cycle is C C C can be transformed into a spanning tree by removing any one of the ℓ \ell ℓ edges of C C C . This gives a bijection between the possible marked-edge choices. Therefore,
P s t ( C , e j ) = P s t ( C ) ℓ , (75) P_{\mathrm{st}}(C,e_j)=\frac{P_{\mathrm{st}}(C)}{\ell}, \tag*{(75)} P st ( C , e j ) = ℓ P st ( C ) , (75)
where
P s t ( C ) = ∑ j = 1 ℓ P s t ( C , e j ) . (76) P_{\mathrm{st}}(C)=\sum_{j=1}^{\ell}P_{\mathrm{st}}(C,e_j). \tag*{(76)} P st ( C ) = j = 1 ∑ ℓ P st ( C , e j ) . (76)
At time N N N , the loop-erased random walk can be represented by the directed path from its starting vertex o o o to the current position in the associated last-exit tree. Adding an edge to this tree may create a cycle. However, not every such cycle is necessarily erased from the loop-erased path. For a cycle C C C closed by the marked edge e j e_j e j , an additional condition is required: the directed path from o o o must enter the cycle at the appropriate vertex, so that the new step closes a loop on the current loop-erased path. Let q j ( C ) q_j(C) q j ( C ) denote the corresponding conditional probability in the Dhar–Dhar [20 ] last-exit-tree construction. The key observation is that, for a fixed cycle C C C , the relevant entry events associated with the possible marked closing edges partition the possibilities. Thus,
∑ j = 1 ℓ q j ( C ) = 1. (77) \sum_{j=1}^{\ell}q_j(C)=1. \tag*{(77)} j = 1 ∑ ℓ q j ( C ) = 1. (77)
Under the assumed stationary correspondence, the probability that the marked edge e j e_j e j creates and erases the cycle C C C is
P ( C , e j ) = P s t ( C , e j ) q j ( C ) . (78) P(C,e_j)=P_{\mathrm{st}}(C,e_j)\,q_j(C). \tag*{(78)} P ( C , e j ) = P st ( C , e j ) q j ( C ) . (78)
Summing over the possible closing edges and using Eq. (75) , we obtain
P ( C ) = ∑ j = 1 ℓ P ( C , e j ) (79) P(C)=\sum_{j=1}^{\ell}P(C,e_j) \tag*{(79)} P ( C ) = j = 1 ∑ ℓ P ( C , e j ) (79)
= ∑ j = 1 ℓ P s t ( C , e j ) q j ( C ) (80) =\sum_{j=1}^{\ell}P_{\mathrm{st}}(C,e_j)q_j(C) \tag*{(80)} = j = 1 ∑ ℓ P st ( C , e j ) q j ( C ) (80)
= P s t ( C ) ℓ ∑ j = 1 ℓ q j ( C ) (81) =\frac{P_{\mathrm{st}}(C)}{\ell}\sum_{j=1}^{\ell}q_j(C) \tag*{(81)} = ℓ P st ( C ) j = 1 ∑ ℓ q j ( C ) (81)
= P s t ( C ) ℓ . (82) =\frac{P_{\mathrm{st}}(C)}{\ell}. \tag*{(82)} = ℓ P st ( C ) . (82)
Finally, summing over all simple cycles of size ℓ > 2 \ell>2 ℓ > 2 , we obtain
P ( ℓ ) = P s t ( ℓ ) ℓ . (83) P(\ell)=\frac{P_{\mathrm{st}}(\ell)}{\ell}. \tag*{(83)} P ( ℓ ) = ℓ P st ( ℓ ) . (83)
For ℓ = 2 \ell=2 ℓ = 2 , a loop corresponds to immediate backtracking along an edge. This case is treated using the two orientations of the same edge, giving the same relation, subject to the assumed stationary correspondence
P ( 2 ) = P s t ( 2 ) 2 . (84) P(2)=\frac{P_{\mathrm{st}}(2)}{2}. \tag*{(84)} P ( 2 ) = 2 P st ( 2 ) . (84)
Proof of Theorem 8
To prove theorem 8 we need the following Theorem [23 ] .
Theorem 25. Let F n F_n F n be a fixed forest on the labeled vertex set [ n ] [n] [ n ] with ℓ = ℓ ( F n ) ≥ 1 \ell=\ell(F_n)\ge1 ℓ = ℓ ( F n ) ≥ 1 connected components. Let the component sizes be j 1 , … , j ℓ j_1,\ldots,j_\ell j 1 , … , j ℓ (so ∑ i = 1 ℓ j i = n \sum_{i=1}^{\ell}j_i=n ∑ i = 1 ℓ j i = n ), and define
p = p ( F n ) : = ∏ i = 1 ℓ j i . p=p(F_n):=\prod_{i=1}^{\ell}j_i. p = p ( F n ) := i = 1 ∏ ℓ j i . Let T ( F n ) T(F_n) T ( F n ) denote the number of labelled trees on [ n ] [n] [ n ] that contain F n F_n F n as a spanning subgraph (i.e. that contain every edge of F n F_n F n ). Then
T ( F n ) = p n ℓ − 2 . (85) T(F_n)=p\,n^{\ell-2}. \tag*{(85)} T ( F n ) = p n ℓ − 2 . (85)
Proof. Part A: exact distribution (17). Fix u u u and v v v . We count how many labelled trees have S n = k S_n=k S n = k . Count the possible u u u –v v v paths with k k k vertices. Such a path consists of u u u and v v v plus k − 2 k-2 k − 2 distinct intermediate vertices chosen from the remaining n − 2 n-2 n − 2 labels. Choose the intermediate vertex set in ( n − 2 k − 2 ) \binom{n-2}{k-2} ( k − 2 n − 2 ) ways, and order them along the path in ( k − 2 ) ! (k-2)! ( k − 2 )! ways. Hence the number of distinct labelled paths
u = w 0 − w 1 − ⋯ − w k − 2 − w k − 1 = v u=w_0-w_1-\cdots-w_{k-2}-w_{k-1}=v u = w 0 − w 1 − ⋯ − w k − 2 − w k − 1 = v
with k k k vertices equals
( n − 2 k − 2 ) ( k − 2 ) ! = ( n − 2 ) ! ( n − k ) ! . \binom{n-2}{k-2}(k-2)!=\frac{(n-2)!}{(n-k)!}. ( k − 2 n − 2 ) ( k − 2 )! = ( n − k )! ( n − 2 )! .
For a fixed such path, count trees containing it. Fix one concrete labelled k k k -vertex path P P P from u u u to v v v . Consider the forest F n F_n F n consisting of this path component (size k k k ) together with the remaining n − k n-k n − k isolated vertices (each of size 1). This forest has
ℓ = 1 + ( n − k ) = n − k + 1 \ell=1+(n-k)=n-k+1 ℓ = 1 + ( n − k ) = n − k + 1
components, and
p = k ⋅ 1 n − k = k . p=k\cdot1^{n-k}=k. p = k ⋅ 1 n − k = k .
By The theorem 25, the number of trees containing this forest (hence containing the path) is
T ( F n ) = p n ℓ − 2 = k n ( n − k + 1 ) − 2 = k n n − k − 1 . T(F_n)=p\,n^{\ell-2}=k\,n^{(n-k+1)-2}=k\,n^{n-k-1}. T ( F n ) = p n ℓ − 2 = k n ( n − k + 1 ) − 2 = k n n − k − 1 .
Multiply and normalize. Therefore the total number of labelled trees with S n = k S_n=k S n = k is
( n − 2 ) ! ( n − k ) ! ⋅ k n n − k − 1 . \frac{(n-2)!}{(n-k)!}\cdot k\,n^{n-k-1}. ( n − k )! ( n − 2 )! ⋅ k n n − k − 1 .
Since there are n n − 2 n^{n-2} n n − 2 labelled trees in total, we obtain
P { S n = k } = ( n − 2 ) ! ( n − k ) ! k n n − k − 1 n n − 2 = k ( n − 2 ) ! ( n − k ) ! n k − 1 , \mathbb{P}\{S_n=k\}
=\frac{\frac{(n-2)!}{(n-k)!}k\,n^{n-k-1}}{n^{n-2}}
=\frac{k(n-2)!}{(n-k)!\,n^{k-1}}, P { S n = k } = n n − 2 ( n − k )! ( n − 2 )! k n n − k − 1 = ( n − k )! n k − 1 k ( n − 2 )! ,
which is the first form of (17). The second form follows from
( n ) k = n ! ( n − k ) ! = n ( n − 1 ) ( n − 2 ) ! ( n − k ) ! . (n)_k=\frac{n!}{(n-k)!}=n(n-1)\frac{(n-2)!}{(n-k)!}. ( n ) k = ( n − k )! n ! = n ( n − 1 ) ( n − k )! ( n − 2 )! .
Part B: Mean scaling We will use the product form,
( n ) k n k = ∏ j = 0 k − 1 ( 1 − j n ) . \frac{(n)_k}{n^k}=\prod_{j=0}^{k-1}\left(1-\frac{j}{n}\right). n k ( n ) k = j = 0 ∏ k − 1 ( 1 − n j ) .
For 0 < t < 1 0<t<1 0 < t < 1 , we have the inequality
e − t 1 − t < 1 − t < e − t . e^{-\frac{t}{1-t}}<1-t<e^{-t}. e − 1 − t t < 1 − t < e − t .
This means
e − j / n 1 − j / n < 1 − j / n < e − j / n ⇒ e − j n − j < 1 − j / n < e − j / n ⇒ ∏ j = 0 k − 1 e − j n − j < ∏ j = 0 k − 1 1 − j / n < ∏ j = 0 k − 1 e − j / n ⇒ e − ∑ j = 0 k − 1 j n − j < ∏ j = 0 k − 1 1 − j / n < e − ∑ j = 0 k − 1 j / n ⇒ e − ∑ j = 0 k − 1 j n − k < ∏ j = 0 k − 1 1 − j / n < e − ∑ j = 0 k − 1 j / n ⇒ e − k ⋅ ( k − 1 ) 2 ( n − k ) < ∏ j = 0 k − 1 1 − j / n < e − k ⋅ ( k − 1 ) 2 n ⇒ k n − 1 e − k ⋅ ( k − 1 ) 2 ( n − k ) < P { S n = k } < k n − 1 e − k ⋅ ( k − 1 ) 2 n ⇒ k n − 1 e − k 2 2 ( n − k ) < P { S n = k } < k n − 1 e − k ⋅ ( k − 1 ) 2 n . \begin{aligned}
e^{-\frac{j/n}{1-j/n}} < 1-j/n < e^{-j/n} \\
&\Rightarrow e^{-\frac{j}{n-j}} < 1-j/n < e^{-j/n} \\
&\Rightarrow\prod_{j=0}^{k-1}e^{-\frac{j}{n-j}} < \prod_{j=0}^{k-1}1-j/n < \prod_{j=0}^{k-1}e^{-j/n} \\
&\Rightarrow e^{-\sum_{j=0}^{k-1}\frac{j}{n-j}} < \prod_{j=0}^{k-1}1-j/n < e^{-\sum_{j=0}^{k-1}j/n} \\
&\Rightarrow e^{-\sum_{j=0}^{k-1}\frac{j}{n-k}} < \prod_{j=0}^{k-1}1-j/n < e^{-\sum_{j=0}^{k-1}j/n} \\
&\Rightarrow e^{-\frac{k\cdot(k-1)}{2(n-k)}} < \prod_{j=0}^{k-1}1-j/n < e^{-\frac{k\cdot(k-1)}{2n}} \\
&\Rightarrow\frac{k}{n-1}e^{-\frac{k\cdot(k-1)}{2(n-k)}} < \mathbb{P}\{S_n=k\} < \frac{k}{n-1}e^{-\frac{k\cdot(k-1)}{2n}} \\
&\Rightarrow\frac{k}{n-1}e^{-\frac{k^2}{2(n-k)}} < \mathbb{P}\{S_n=k\} < \frac{k}{n-1}e^{-\frac{k\cdot(k-1)}{2n}}.
\end{aligned} e − 1 − j / n j / n < 1 − j / n < e − j / n ⇒ e − n − j j < 1 − j / n < e − j / n ⇒ j = 0 ∏ k − 1 e − n − j j < j = 0 ∏ k − 1 1 − j / n < j = 0 ∏ k − 1 e − j / n ⇒ e − ∑ j = 0 k − 1 n − j j < j = 0 ∏ k − 1 1 − j / n < e − ∑ j = 0 k − 1 j / n ⇒ e − ∑ j = 0 k − 1 n − k j < j = 0 ∏ k − 1 1 − j / n < e − ∑ j = 0 k − 1 j / n ⇒ e − 2 ( n − k ) k ⋅ ( k − 1 ) < j = 0 ∏ k − 1 1 − j / n < e − 2 n k ⋅ ( k − 1 ) ⇒ n − 1 k e − 2 ( n − k ) k ⋅ ( k − 1 ) < P { S n = k } < n − 1 k e − 2 n k ⋅ ( k − 1 ) ⇒ n − 1 k e − 2 ( n − k ) k 2 < P { S n = k } < n − 1 k e − 2 n k ⋅ ( k − 1 ) .
We have ( k n − 1 ∼ ∞ k n ) \left(\frac{k}{n-1}\sim_{\infty}\frac{k}{n}\right) ( n − 1 k ∼ ∞ n k ) . Thus, we obtain the local approximation
P { S n = k } ∼ ∞ k n exp ( − k 2 2 n ) . \mathbb{P}\{S_n=k\}\sim_{\infty}\frac{k}{n}\exp\left(-\frac{k^2}{2n}\right). P { S n = k } ∼ ∞ n k exp ( − 2 n k 2 ) .
Now let x > 0 x>0 x > 0 and set k = x n k=x\sqrt{n} k = x n . The tail probability becomes a Riemann sum
P { S n n ≥ x } = ∑ k ≥ x n P { S n = k } \mathbb{P}\left\{\frac{S_n}{\sqrt{n}}\geq x\right\}=\sum_{k\geq x\sqrt{n}}\mathbb{P}\{S_n=k\} P { n S n ≥ x } = k ≥ x n ∑ P { S n = k }
⟶ ∫ x ∞ t e − t 2 / 2 d t = e − x 2 / 2 . \longrightarrow\int_x^\infty te^{-t^2/2}\,dt=e^{-x^2/2}. ⟶ ∫ x ∞ t e − t 2 /2 d t = e − x 2 /2 .
The limiting distribution is the Rayleigh law with density f ( t ) = t e − t 2 / 2 f(t)=te^{-t^2/2} f ( t ) = t e − t 2 /2 on t > 0 t>0 t > 0 . Its first moment is
E [ R ] = ∫ 0 ∞ t ⋅ t e − t 2 / 2 d t = π 2 . \mathbb{E}[R]=\int_0^\infty t\cdot te^{-t^2/2}\,dt=\sqrt{\frac{\pi}{2}}. E [ R ] = ∫ 0 ∞ t ⋅ t e − t 2 /2 d t = 2 π .
Because the tails are exponentially small, the family S n / n S_n/\sqrt{n} S n / n is uniformly integrable, and convergence in distribution implies convergence of the first two moments
E [ S n ] n → E [ R ] = π 2 . \frac{\mathbb{E}[S_n]}{\sqrt{n}}\to\mathbb{E}[R]=\sqrt{\frac{\pi}{2}}. n E [ S n ] → E [ R ] = 2 π .