Peaks
The number of peaks of : interior positions with .
✓ checked against that system · ! checked, with disagreements (hover a chip)FindStat
St000015via DyckPath✓St001068via DyckPath✓St000768via IntegerComposition✓St000023via Permutation✓Peaks(p)the peak count of a one-line permutation SageMath
enumeratio_stat("Permutation", p, "Peaks")Typed signatures
| Type | Package | Applies |
|---|---|---|
(composition | dyck_path | list | motzkin_path | permutation | schroeder_path) -> integer | number | combinatorics | always |
Details
- Only interior positions count (), so whenever
- Peaks and Valleys alternate along the sequence, so they differ by at most
- Defined over
Permutationas 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. - A separate definition exists for
DyckPath(Occurrences of an up step immediately followed by a down step.) but is not the one declared: one head, one owner. - A separate definition exists for
MotzkinPath(Occurrences of an up step immediately followed by a down step.) but is not the one declared: one head, one owner. - A separate definition exists for
SchroederPath(Occurrences of an up step immediately followed by a down step.) but is not the one declared: one head, one owner.
Definition
Epsil, as the implementation runs it.
on Permutation, over _x
0 if Length(_x) < 3 else Count(Filter(
Range(2, Length(_x) - 1),
Function(_x[i - 1] < _x[i] && _x[i] >
_x[i + 1], i),
))on DyckPath, over _x
0 if Length(_x) < 2 else Count(Filter(
Range(1, Length(_x) - 1),
Function(_x[i] == 1 && _x[i + 1] == 0, i),
))on IntegerComposition, over _x
0 if Length(_x) < 3 else Count(Filter(
Range(2, Length(_x) - 1),
Function(_x[i - 1] < _x[i] && _x[i] >
_x[i + 1], i),
))Examples
Basic #
Properties #
About
| Examples | 11 |
|---|---|
| Checked against | SageMath 9 agree |
| Crosswalk | FindStat ×4SageMath |
Implementation
mapped
sagepackages/oracle/src/mappings.ts See also: Valleys, Descents, SymmetricGroup