Skip to content

NonInitialLeftToRightMinima ​

Positions i >= 2 with p(i) smaller than everything before it.

✓ checked against that system · ! checked, with disagreements (hover a chip)FindStatSt000541via Permutation✓
NonInitialLeftToRightMinima(p)Positions i >= 2 with p(i) smaller than everything before it.
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.
  • FindStat's title speaks of indices with all smaller indices to the right; its code counts these, one less than LeftToRightMinima.

Definition

Epsil, as the implementation runs it.

on Permutation, over _x

0 if Length(_x) < 1 else Count(Filter(
                                       Range(2, Length(_x), 1),
                                       Function(
                                                 _x[i] < Min(Map(
                                                                  Function(
                                                                            _x[j],
                                                                            j,
                                                                          ),
                                                                  Range(
                                                                         1,
                                                                         i - 1,
                                                                       ),
                                                                )),
                                                 i,
                                               ),
                                     ))

Examples

Basic #

the one-line word 312312

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

the one-line word 312312, as a plain list

live ↗
InNonInitialLeftToRightMinima([3,1,2])\mathrm{NonInitialLeftToRightMinima}(\bigl\lbrack3, 1, 2\bigr\rbrack)Out11

the one-line word 24132413

live ↗
InNonInitialLeftToRightMinima(Permutation⁡([2,4,1,3]))\mathrm{NonInitialLeftToRightMinima}({\operatorname{Permutation}}([2, 4, 1, 3]))Out11
Properties #

FindStat's value for [1,2]

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

Known value · FindStat St000541

FindStat's value for [2,1]

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

Known value · FindStat St000541

FindStat's value for [1,2,3]

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

Known value · FindStat St000541

About
Examples6
CrosswalkFindStat