CollessIndex
The sum, over the nodes, of how much the node counts of the two subtrees differ.
✓ checked against that system · ! checked, with disagreements (hover a chip)FindStat
St001376via BinaryTree✓CollessIndex(tree)The sum, over the nodes, of how much the node counts of the two subtrees differ.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 Abs(Length(Flatten([t[1]])) - 1 - (Length(Flatten([t[2]])) -
1)) +
self(self, t[1]) + self(self, t[2]), self, t),
Function(0 if t in Integers else Abs(Length(Flatten([t[1]])) - 1 - (Length(Flatten([t[2]])) -
1)) +
self(self, t[1]) + self(self, t[2]), self, t),
_x,
)Examples
Properties #
About
| Examples | 4 |
|---|---|
| Crosswalk | FindStat |