Skip to content

PeakSet ​

The interior positions that rise then fall.

PeakSet(Permutation)The interior positions that rise then fall.
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.
  • Its size is the Peaks statistic, exactly as DescentSet's is Descents.

Examples

Basic #

the one-line word 231231

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