Skip to content

HookFactorInversions ​

The inversions summed over the hook factors t1, ..., tk of p.

✓ checked against that system · ! checked, with disagreements (hover a chip)FindStatSt000337via Permutation✓
HookFactorInversions(p)The inversions summed over the hook factors t1, ..., tk of p.
Typed signatures
TypePackageApplies
(list<integer> | permutation) -> numbercombinatoricsalways

Domain: Permutation statistics

Details
  • Defined over Permutation as 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 #

the one-line word 312312

live ↗
InHookFactorInversions(Permutation⁡([3,1,2]))\mathrm{HookFactorInversions}({\operatorname{Permutation}}([3, 1, 2]))Out22

the one-line word 312312, as a plain list

live ↗
InHookFactorInversions([3,1,2])\mathrm{HookFactorInversions}(\bigl\lbrack3, 1, 2\bigr\rbrack)Out22

the one-line word 24132413

live ↗
InHookFactorInversions(Permutation⁡([2,4,1,3]))\mathrm{HookFactorInversions}({\operatorname{Permutation}}([2, 4, 1, 3]))Out22
Properties #

FindStat's value for [1]

live ↗
InCombinatorialStat(Permutation⁡([1]),HookFactorInversions)\mathrm{CombinatorialStat}({\operatorname{Permutation}}([1]), \text{HookFactorInversions})Out00

Known value · FindStat St000337

FindStat's value for [1,2]

live ↗
InCombinatorialStat(Permutation⁡([1,2]),HookFactorInversions)\mathrm{CombinatorialStat}({\operatorname{Permutation}}([1, 2]), \text{HookFactorInversions})Out00

Known value · FindStat St000337

FindStat's value for [2,1]

live ↗
InCombinatorialStat(Permutation⁡([2,1]),HookFactorInversions)\mathrm{CombinatorialStat}({\operatorname{Permutation}}([2, 1]), \text{HookFactorInversions})Out11

Known value · FindStat St000337

About
Examples6
CrosswalkFindStat