The mean number of k-local maxima of a random permutation #
The k-local maxima of a permutation are the distinct values among the maxima of its windows of
length k. Summed over the n! permutations, (k + 1) · Σ_σ #maxima = n! (2n − k + 1): the mean
is (2n − k + 1)/(k + 1) (Theorem of the Day, after Austin–Fagen–Lehrer–Penney 1957). Proof: the
window maximum changes between windows i − 1 and i exactly when the maximum of the block of
k + 1 positions [i − 1, i + k − 1] sits at one of its ends, which by symmetry happens for
2 n!/(k + 1) permutations.
Main results #
LocalMaxima.card_image_windowMax: number of distinct window maxima = 1 + number of blocks whose maximum is at an endLocalMaxima.card_argmax_end: the maximum of a block of k + 1 positions is at an end for 2 n!/(k+1) permutationsLocalMaxima.sum_card_windowMax: (k + 1) Σ_σ #k-local maxima = n! (2n − k + 1)
References #
- R. Whitty, Theorem of the Day, «Distribution of local maxima in random samples» (Statistics/PermLocalMax).
- T. L. Austin, R. E. Fagen, T. A. Lehrer, W. F. Penney, The distribution of the number of locally maximal elements in a random sample, Ann. Math. Statist. 28 (1957).
The maximum of the window [i, i + k) of σ (values as natural numbers).
Equations
Instances For
p is a position of the block [a, a + k] carrying the largest value of σ on the block.
Equations
Instances For
The maximum of the block [a, a + k] of σ sits at one of its two ends.
Equations
- LocalMaxima.EndMax σ a k = ∃ (p : Fin n), (↑p = a ∨ ↑p = a + k) ∧ LocalMaxima.IsBlockMax σ a k p
Instances For
The number of distinct window maxima of σ is 1 + the number of blocks [a, a + k]
(0 ≤ a < n - k) whose maximum sits at an end.