HookNumber
The number of hooks in the decomposition of the tree into hooks: a node with the chains of left children and of right children below it, the subtrees hanging off those chains decomposed in turn.
✓ checked against that system · ! checked, with disagreements (hover a chip)FindStat
St000568via BinaryTree✓HookNumber(tree)The number of hooks in the decomposition of the tree into hooks: a node with the chains of left children and of right children below it, the subtrees hanging off those chains decomposed in turn.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 1 + self(self, t[1], 1) + self(
self,
t[2],
2,
) if mode ==
0 else self(self, t[2], 0) +
self(self, t[1], 1) if mode == 1 else self(self, t[1], 0) +
self(self, t[2], 2),
self,
t,
mode,
), Function(0 if t in Integers else 1 + self(self, t[1], 1) +
self(self, t[2], 2) if mode == 0 else self(
self,
t[2],
0,
) +
self(
self,
t[1],
1,
) if mode ==
1 else self(self, t[1], 0) +
self(self, t[2], 2), self, t, mode), _x, 0)Examples
Properties #
About
| Examples | 4 |
|---|---|
| Crosswalk | FindStat |