HookFactorInversions
The inversions summed over the hook factors t1, ..., tk of p.
✓ checked against that system · ! checked, with disagreements (hover a chip)FindStat
St000337via Permutation✓HookFactorInversions(p)The inversions summed over the hook factors t1, ..., tk of p.Typed signatures
| Type | Package | Applies |
|---|---|---|
(list<integer> | permutation) -> number | combinatorics | always |
Details
- Defined over
Permutationas an expression in_x, evaluated by compute-engine — the definition IS the implementation. - Takes a
Permutation, and also a bare list of integers: this reading compares entries with each other rather than with their positions, so it stands on any sequence. - Called lec.
Definition
Epsil, as the implementation runs it.
on Permutation, over _x
0 if Length(_x) < 2 else Fold(
Function(
Apply(
(e: integer) => [
b,
a[2] +
Sum(Map(
Function(Count(Filter(
Range(i + 1, e, 1),
Function(_x[i] > _x[j], j),
)), i),
Range(b, e, 1),
)),
] if b <= e - 1 &&
_x[b] > _x[b +
1] else a,
a[1] - 1,
),
a,
b,
),
[Length(_x) + 1, 0],
Range(Length(_x) - 1, 1, -1),
)[2]Examples
Basic #
Properties #
About
| Examples | 6 |
|---|---|
| Crosswalk | FindStat |