Documentation

BGW.Tree.DFS

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
Instances For

    The sum of all outdegrees is one less than the number of vertices.

    Integer Łukasiewicz increments; subtraction is not truncated at zero.

    Equations
    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
      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.