Cutting and grafting at a DFS position #
Source lines 2487–2509 (Section 6.1 of the paper; inventory U08) and the weight computations in
the proof of Lemma lem:cut_graft, lines 2557–2580 (inventory P18).
For a finite plane tree T with |T| ≥ ℓ + 1, the paper's Cut_ℓ(T) replaces the fringe
subtree T_{u_{ℓ+1}(T)} at the (ℓ+1)-st vertex in depth-first order by a single marked leaf
⋆; conversely A[S] grafts a tree S at the marked leaf of a marked tree A.
PlaneTree.fringeAt T iis the fringe subtree at the vertex of DFS indexi(0-indexed), soT_{u_{ℓ+1}(T)} = fringeAt T ℓ = T.fringeTrees[ℓ].PlaneTree.replaceAt T i Sreplaces that fringe subtree byS. It is defined through the Łukasiewicz coding: its DFS sequence is the DFS sequence ofTwith the block ofT_{u_{i+1}}replaced by the DFS sequence ofS(dfsSeq_replaceAt).- A
PlaneTree.MarkedTreeis a plane tree together with the DFS positionposof a marked leaf⋆.MarkedTree.graft A S = A[S],PlaneTree.cut ℓ T = Cut_ℓ(T), andPlaneTree.cutFamily ℓ = 𝒜_ℓ = {Cut_ℓ(T) : |T| ≥ ℓ + 1}.
Main facts (U08): cut_graft (Cut_ℓ(A[S]) = A), fringeAt_graft (the (ℓ+1)-st fringe subtree
of A[S] is S), graft_cut (T = Cut_ℓ(T)[T_{u_{ℓ+1}}]), graft_inj (uniqueness of the
decomposition once the position of the marked leaf is fixed), cutFamily_eq
(𝒜_ℓ = the marked trees whose marked leaf is the (ℓ+1)-st vertex: the DFS position of ⋆ is
preserved), and the bijection cutEquiv.
Weights (P18): MarkedTree.weight μ A = ∏_{v ∈ A, v ≠ ⋆} μ_{k_v(A)} and the exact factorization
weight_graft: 𝐏_μ(A[S]) = w(A) 𝐏_μ(S); the sum over cut trees bienayme_cut_mem:
𝐏(|𝒯| ≥ ℓ+1, Cut_ℓ(𝒯) ∈ 𝓡, 𝒯_{u_{ℓ+1}} ∈ F(Cut_ℓ(𝒯))) = ∑_{A ∈ 𝓡} w(A) 𝐏(𝒯 ∈ F(A)).
These hold for every offspring law μ (no criticality is used).
Fringe subtree at a DFS position #
The fringe subtree T_{u_{i+1}(T)} at the vertex of DFS index i (0-indexed). It is
T.fringeTrees[i] when i < |T|; for i ≥ |T| it is a (never used) leaf.
Equations
- T.fringeAt i = T.fringeTrees.getD i (PoissonDeclumping.PlaneTree.node [])
Instances For
The DFS sequence of T splits around the block of the fringe subtree at DFS index i.
Splicing DFS sequences #
Replacing a sub-excursion u of a DFS sequence a ++ u ++ z by another DFS sequence s
yields a DFS sequence.
Replacing a fringe subtree #
replaceAt T i S: the tree obtained from T by replacing the fringe subtree
T_{u_{i+1}(T)} at the vertex of DFS index i by S. It is the tree whose DFS sequence is
𝐱(T) with the block of T_{u_{i+1}} replaced by 𝐱(S) (dfsSeq_replaceAt, for i < |T|).
Equations
Instances For
The DFS sequence before position i is unchanged: in particular the vertex where S is
grafted keeps its DFS position i.
Replacing at the root (DFS index 0) replaces the whole tree.
Bienaymé weights under replacement: 𝐏_μ(T[S/T_{u_{i+1}}]) 𝐏_μ(T_{u_{i+1}}) = 𝐏_μ(T) 𝐏_μ(S).
Marked trees, cut and graft #
w(A) = ∏_{v ∈ A, v ≠ ⋆} μ_{k_v(A)} (source line 2560): the Bienaymé weight of A without
the factor of the marked leaf.
Equations
Instances For
The fringe subtree of A[S] at the DFS position of ⋆ is S.
Weight factorization (source line 2562, inventory P18):
𝐏_μ(𝒯 = A[S]) = w(A) 𝐏_μ(𝒯 = S).
Consistency check: as an ordinary plane tree, A has weight w(A) μ_0.
Cut_ℓ(T): replace the fringe subtree T_{u_{ℓ+1}(T)} by a marked leaf ⋆, which is then
the vertex of DFS index ℓ. Only used for |T| ≥ ℓ + 1 (otherwise a fixed junk value).
Equations
- One or more equations did not get rendered due to their size.
Instances For
The marked leaf of Cut_ℓ(T) is its (ℓ+1)-st vertex: the DFS position is preserved.
Cut_ℓ(A[S]) = A when the marked leaf of A is its (ℓ+1)-st vertex.
𝒜_ℓ = {Cut_ℓ(T) : |T| ≥ ℓ + 1} (source line 2504).
Equations
Instances For
The cut-and-graft bijection {T : |T| ≥ ℓ + 1} ≃ 𝒜_ℓ × {plane trees},
T ↦ (Cut_ℓ(T), T_{u_{ℓ+1}(T)}), with inverse (A, S) ↦ A[S].
Equations
- One or more equations did not get rendered due to their size.
Instances For
Sum over cut trees (inventory P18). For 𝓡 ⊆ 𝒜_ℓ and target sets F(A),
𝐏_μ(|𝒯| ≥ ℓ+1, Cut_ℓ(𝒯) ∈ 𝓡, 𝒯_{u_{ℓ+1}(𝒯)} ∈ F(Cut_ℓ(𝒯))) = ∑_{A ∈ 𝓡} w(A) 𝐏_μ(𝒯 ∈ F(A)),
for every offspring law μ.