Depth-first degree sequences #
The degree sequence visits the root first, then each child subtree in its child
order. Subtracting one in ℤ gives the Łukasiewicz increments: their sum is
-1, and each strict prefix has nonnegative sum.
This is the forward coding direction used in Section 2 of Kortchemski–Vetter, Rare subtree patterns in size-conditioned Bienaymé trees. Reconstruction and the identification of fringe segments are separate results.
Outdegrees in root-first depth-first order, counting every vertex occurrence.
Equations
- BGW.PlaneTree.degrees = BGW.PlaneTree.fold fun (ds : List (List ℕ)) => ds.length :: ds.flatten
Instances For
The Łukasiewicz path ends at -1.
Before its final increment, the Łukasiewicz path stays nonnegative.
The recursive degree sequence agrees with fringe lookup at the actual DFS addresses.
The Option codomain avoids assigning an artificial degree to an invalid address.
Total number of vertices in a finite ordered forest.
Equations
- ts.size = (List.map BGW.PlaneTree.size ts).sum
Instances For
Concatenate the depth-first increment sequences in component order.
Equations
Instances For
Each component contributes one net downward step, including the empty forest.