ExternalPathLength
The sum of the lengths of the paths from the root to the empty subtrees.
✓ checked against that system · ! checked, with disagreements (hover a chip)FindStat
St000399via BinaryTree✓ExternalPathLength(tree)The sum of the lengths of the paths from the root to the empty subtrees.Typed signatures
| Type | Package | Applies |
|---|---|---|
(binary_tree) -> number | combinatorics | always |
Details
- Defined over
BinaryTreeas an expression in_x, evaluated by compute-engine — the definition IS the implementation. - Takes a
BinaryTreeand 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 BinaryTree, over _x
Apply(
Function(0 if t in Integers else level + self(self, t[1], level + 1) +
self(self, t[2], level + 1), self, t, level),
Function(0 if t in Integers else level + self(self, t[1], level + 1) +
self(self, t[2], level + 1), self, t, level),
_x,
0,
) + 2 * (Length(Flatten([_x])) - 1)Examples
Properties #
About
| Examples | 4 |
|---|---|
| Crosswalk | FindStat |