Skip to content

DescentSet ​

The positions where the word falls.

DescentSet(Permutation)The positions where the word falls.
Typed signatures
TypePackageApplies
(permutation) -> finsetcombinatoricsalways

Domain: Combinatorial maps

Details
  • Takes a Permutation and returns a Finset — a typed map, so a wrong carrier is a type error rather than a wrong answer.
  • The statistics Descents and MajorIndex are the size and the sum of this set — which is the reduction worth having: a statistic of a map's output rather than a fresh walk.

Examples

Basic #

the one-line word 231231

live ↗
InDescentSet(Permutation⁡([2,3,1]))\mathrm{DescentSet}({\operatorname{Permutation}}([2, 3, 1]))OutFinset⁡(Tuple⁡(3,[2]))\operatorname{Finset}(\operatorname{Tuple}(3,\bigl\lbrack2\bigr\rbrack))
About
Examples1