LinearExtensionCount
BinaryTree: The number of linear extensions of the tree as a poset: n! over the tree factorial. OrderedTree: The number of linear extensions of the tree as a poset: n! over the tree factorial.
✓ checked against that system · ! checked, with disagreements (hover a chip)FindStat
St000045via BinaryTree✓St000085via OrderedTree✓LinearExtensionCount(tree)BinaryTree: The number of linear extensions of the tree as a poset: n! over the tree factorial. OrderedTree: The number of linear extensions of the tree as a poset: n! over the tree factorial.Typed signatures
| Type | Package | Applies |
|---|---|---|
(binary_tree | ordered_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. - 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 BinaryTree, over _x
(1 if Length(Flatten([_x])) - 1 < 2 else Product(Range(
1,
Length(Flatten([_x])) -
1,
))) / Apply(
Function(
1 if f in Integers else (Length(Flatten([f])) - 1) *
self(self, f[1]) *
self(self, f[2]),
self,
f,
),
Function(
1 if f in Integers else (Length(Flatten([f])) - 1) *
self(self, f[1]) *
self(self, f[2]),
self,
f,
),
_x,
)on OrderedTree, over _x
Apply(
(r: collection) => (1 if r[1] < 2 else Product(Range(1, r[1]))) / r[2],
Apply(
Function([1, 1] if Length(t) == 0 else Apply(
(r: collection) => [
1 + r[1],
(1 + r[1]) *
r[2],
],
Fold(
Function(
[a[1] +
b[1], a[2] *
b[2]],
a,
b,
),
[0, 1],
Map(Function(
self(self, c),
c,
), t),
),
), self, t),
Function([1, 1] if Length(t) == 0 else Apply(
(r: collection) => [
1 + r[1],
(1 + r[1]) *
r[2],
],
Fold(
Function(
[a[1] +
b[1], a[2] *
b[2]],
a,
b,
),
[0, 1],
Map(Function(
self(self, c),
c,
), t),
),
), self, t),
_x,
),
)Examples
Properties #
About
| Examples | 8 |
|---|---|
| Crosswalk | FindStat ×2 |