BoundaryLengthBeyondTrunk
The edges on the leftmost path or the rightmost path from the root, less the trunk they share.
✓ checked against that system · ! checked, with disagreements (hover a chip)FindStat
St000975via OrderedTree✓BoundaryLengthBeyondTrunk(tree)The edges on the leftmost path or the rightmost path from the root, less the trunk they share.Typed signatures
| Type | Package | Applies |
|---|---|---|
(ordered_tree) -> number | combinatorics | always |
Details
- Defined over
OrderedTreeas an expression in_x, evaluated by compute-engine — the definition IS the implementation. - Takes a
OrderedTreeand nothing else — it reads values against their positions, or walks the orbits, so it needs the bijection. Applying it to a bare list is a type error, not a wrong answer.
Definition
Epsil, as the implementation runs it.
on OrderedTree, over _x
Apply(
Function(0 if Length(t) == 0 else 1 + self(self, t[1]), self, t),
Function(0 if Length(t) == 0 else 1 + self(self, t[1]), self, t),
_x,
) + Apply(
Function(0 if Length(t) == 0 else 1 + self(self, t[-1]), self, t),
Function(0 if Length(t) == 0 else 1 + self(self, t[-1]), self, t),
_x,
) - Apply(
Function(
1 + self(self, t[1]) if Length(t) == 1 else 0,
self,
t,
),
Function(
1 + self(self, t[1]) if Length(t) == 1 else 0,
self,
t,
),
_x,
)Examples
Properties #
About
| Examples | 4 |
|---|---|
| Crosswalk | FindStat |