Skip to content

FixedPointMajorIndex ​

The sum of the fixed points less the triangular number of their count, plus the major index of the word without its fixed points.

✓ checked against that system · ! checked, with disagreements (hover a chip)FindStatSt000339via Permutation✓
FixedPointMajorIndex(p)The sum of the fixed points less the triangular number of their count, plus the major index of the word without its fixed points.
Typed signatures
TypePackageApplies
(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 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.
  • Called maf.

Definition

Epsil, as the implementation runs it.

on Permutation, over _x

0 if Length(_x) < 1 else Sum(Filter(
                                     Range(1, Length(_x)),
                                     Function(_x[i] == i, i),
                                   )) - Count(Filter(
                                                     Range(1, Length(_x)),
                                                     Function(_x[i] == i, i),
                                                   )) * (Count(Filter(
                                                                      Range(
                                                                             1,
                                                                             Length(_x),
                                                                           ),
                                                                      Function(_x[i] ==
                                                                               i, i),
                                                                    )) + 1) / 2 +
                         Apply(
                                (d: list<integer>) => Sum(Map(
                                                               Function(i, i),
                                                               Filter(
                                                                       Range(
                                                                              1,
                                                                              Length(d) -
                                                                              1,
                                                                              1,
                                                                            ),
                                                                       Function(d[i] >
                                                                                d[i + 1], i),
                                                                     ),
                                                             )),
                                Filter(
                                        Map(Function(
                                                      0 if _x[i] == i else _x[i],
                                                      i,
                                                    ), Range(1, Length(_x))),
                                        Function(v != 0, v),
                                      ),
                              )

Examples

Basic #

the one-line word 312312

live ↗
InFixedPointMajorIndex(Permutation⁡([3,1,2]))\mathrm{FixedPointMajorIndex}({\operatorname{Permutation}}([3, 1, 2]))Out11

the one-line word 24132413

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

FindStat's value for [1]

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

Known value · FindStat St000339

FindStat's value for [1,2]

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

Known value · FindStat St000339

FindStat's value for [2,1]

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

Known value · FindStat St000339

About
Examples5
CrosswalkFindStat