Papers
Topics
Authors
Recent
Search
2000 character limit reached

Alternating Numbers in Permutations

Updated 7 July 2026
  • Alternating numbers are a permutation statistic that counts the number of maximal consecutive monotone segments in a permutation.
  • The study includes recurrence relations and explicit generating polynomials that relate alternating runs to classical descent and peak statistics.
  • The framework connects alternating runs with derivative polynomials and central factorial numbers, deepening insights into combinatorial enumeration.

Searching arXiv for the primary permutation-statistic usage of “alternating number” and closely related work. Searching arXiv for the zigzag-number usage of “alternating numbers” to distinguish terminology. In permutation combinatorics, an alternating number is a run statistic: for a permutation written in one-line notation, it is the number of alternating runs, equivalently the number of maximal consecutive monotone segments, or one plus the number of interior changes of direction. If R(n,k)R(n,k) denotes the number of permutations of {1,2,,n}\{1,2,\dots,n\} with alternating number kk, then the generating polynomial Rn(x)=kR(n,k)xkR_n(x)=\sum_k R(n,k)x^k records the full distribution of this statistic on SnS_n. In this sense, the alternating number is a distributional companion to descents, peaks, and related permutation statistics (Ma, 2011).

1. Definition and combinatorial interpretation

Let π=π(1)π(2)π(n)\pi=\pi(1)\pi(2)\cdots\pi(n) be a permutation of [n]={1,2,,n}[n]=\{1,2,\dots,n\}. A change of direction at a position ii, where 2in12\le i\le n-1, occurs if

π(i1)<π(i)>π(i+1)\pi(i-1)<\pi(i)>\pi(i+1)

or

{1,2,,n}\{1,2,\dots,n\}0

These two cases are respectively a peak and a valley. If there are exactly {1,2,,n}\{1,2,\dots,n\}1 such positions, then {1,2,,n}\{1,2,\dots,n\}2 has {1,2,,n}\{1,2,\dots,n\}3 alternating runs. Equivalently, the plot of {1,2,,n}\{1,2,\dots,n\}4 decomposes into {1,2,,n}\{1,2,\dots,n\}5 maximal consecutive monotone pieces, and each change of direction starts a new run.

This definition makes the alternating number a natural measure of oscillation in a permutation. A monotone permutation has one alternating run, whereas a highly oscillatory permutation has many. The counting function

{1,2,,n}\{1,2,\dots,n\}6

packages this statistic over the whole symmetric group, and the polynomial

{1,2,,n}\{1,2,\dots,n\}7

encodes its distribution (Ma, 2011).

2. Recurrences and relation to descents

The classical recurrence, attributed to André, is

{1,2,,n}\{1,2,\dots,n\}8

for {1,2,,n}\{1,2,\dots,n\}9, with initial conditions

kk0

At the polynomial level this becomes

kk1

with

kk2

The alternating-number distribution is also tied to the descent distribution. If kk3 is the number of descents of kk4, then the Eulerian polynomial is

kk5

Ma recalls the David–Barton identity, reformulated by Knuth,

kk6

This identifies alternating runs as a statistic transform of descents, rather than an isolated enumeration problem. It places kk7 within the classical Eulerian framework of permutation statistics (Ma, 2011).

3. Explicit formula via derivative polynomials

A central result of Ma is an explicit representation of kk8 in terms of derivative polynomials. Define

kk9

These derivative polynomials satisfy

Rn(x)=kR(n,k)xkR_n(x)=\sum_k R(n,k)x^k0

and have degree Rn(x)=kR(n,k)xkR_n(x)=\sum_k R(n,k)x^k1. Writing

Rn(x)=kR(n,k)xkR_n(x)=\sum_k R(n,k)x^k2

one has the parity relation

Rn(x)=kR(n,k)xkR_n(x)=\sum_k R(n,k)x^k3

hence

Rn(x)=kR(n,k)xkR_n(x)=\sum_k R(n,k)x^k4

For Rn(x)=kR(n,k)xkR_n(x)=\sum_k R(n,k)x^k5, Ma proves

Rn(x)=kR(n,k)xkR_n(x)=\sum_k R(n,k)x^k6

Using the parity expansion of Rn(x)=kR(n,k)xkR_n(x)=\sum_k R(n,k)x^k7, this becomes

Rn(x)=kR(n,k)xkR_n(x)=\sum_k R(n,k)x^k8

If Rn(x)=kR(n,k)xkR_n(x)=\sum_k R(n,k)x^k9 denotes the coefficient of SnS_n0 in SnS_n1, then

SnS_n2

and therefore

SnS_n3

The derivation proceeds through Carlitz’s trigonometric generating function, Taylor expansion of SnS_n4, coefficient comparison, and an algebraic change of variables from trigonometric to rational form. The resulting formulas replace recurrence-based computation with an explicit coefficient formula in terms of derivative-polynomial coefficients and binomial sums (Ma, 2011).

4. Central factorial numbers, peaks, and signed permutations

Subsequent work places alternating runs inside a broader algebraic framework built from central factorial numbers. Let SnS_n5 denote the central factorial numbers of even index. Then for SnS_n6,

SnS_n7

and

SnS_n8

These formulas correct Carlitz’s earlier central-factorial expressions and make the divisibility of SnS_n9 by powers of π=π(1)π(2)π(n)\pi=\pi(1)\pi(2)\cdots\pi(n)0 transparent.

The same paper connects alternating runs with peak polynomials through

π=π(1)π(2)π(n)\pi=\pi(1)\pi(2)\cdots\pi(n)1

where π=π(1)π(2)π(n)\pi=\pi(1)\pi(2)\cdots\pi(n)2 is the interior peak polynomial. It also gives parallel formulas for left peak polynomials in terms of odd-index central factorial numbers π=π(1)π(2)π(n)\pi=\pi(1)\pi(2)\cdots\pi(n)3, and extends the theory to up signed permutations in the hyperoctahedral group π=π(1)π(2)π(n)\pi=\pi(1)\pi(2)\cdots\pi(n)4, where alternating run polynomials π=π(1)π(2)π(n)\pi=\pi(1)\pi(2)\cdots\pi(n)5 are expressed באמצעות the same π=π(1)π(2)π(n)\pi=\pi(1)\pi(2)\cdots\pi(n)6-family.

A further consequence is an explicit representation of the derivative polynomials of π=π(1)π(2)π(n)\pi=\pi(1)\pi(2)\cdots\pi(n)7 and π=π(1)π(2)π(n)\pi=\pi(1)\pi(2)\cdots\pi(n)8 in terms of π=π(1)π(2)π(n)\pi=\pi(1)\pi(2)\cdots\pi(n)9 and [n]={1,2,,n}[n]=\{1,2,\dots,n\}0. This suggests that alternating runs, peaks, left peaks, and trigonometric derivative polynomials are different manifestations of a shared central-factorial structure (Fang et al., 2022).

5. Small values and structural properties

For small [n]={1,2,,n}[n]=\{1,2,\dots,n\}1, the first alternating-run polynomials are

[n]={1,2,,n}[n]=\{1,2,\dots,n\}2

[n]={1,2,,n}[n]=\{1,2,\dots,n\}3

[n]={1,2,,n}[n]=\{1,2,\dots,n\}4

[n]={1,2,,n}[n]=\{1,2,\dots,n\}5 [n]={1,2,,n}[n]=\{1,2,\dots,n\}6 Nonzero values
2 [n]={1,2,,n}[n]=\{1,2,\dots,n\}7 [n]={1,2,,n}[n]=\{1,2,\dots,n\}8
3 [n]={1,2,,n}[n]=\{1,2,\dots,n\}9 ii0
4 ii1 ii2
5 ii3 ii4

For ii5, the permutations ii6 and ii7 have one alternating run, while ii8 each have two alternating runs. Thus ii9 and 2in12\le i\le n-10.

The structure of 2in12\le i\le n-11 reflects deeper regularities. Ma records that Bóna–Ehrenborg showed 2in12\le i\le n-12 has a root at 2in12\le i\le n-13 of multiplicity 2in12\le i\le n-14, and formula

2in12\le i\le n-15

makes the divisibility by 2in12\le i\le n-16 visible. In probabilistic terms, this distribution describes how many monotone segments a random permutation decomposes into; the explicit formulas suggest asymptotic analysis of the mean and variance, although that direction is not developed in the short note (Ma, 2011).

The phrase alternating number is not unique across combinatorics. A different and well-established usage concerns the alternating (zigzag) numbers 2in12\le i\le n-17, which count ascending alternating permutations

2in12\le i\le n-18

and have exponential generating function

2in12\le i\le n-19

Their first values are

π(i1)<π(i)>π(i+1)\pi(i-1)<\pi(i)>\pi(i+1)0

These are the classical Euler zigzag numbers, also described as absolute Euler numbers on even indices and by a Bernoulli-number formula on odd indices (Pain, 17 Feb 2026).

This object is distinct from the alternating number π(i1)<π(i)>π(i+1)\pi(i-1)<\pi(i)>\pi(i+1)1 counted by π(i1)<π(i)>π(i+1)\pi(i-1)<\pi(i)>\pi(i+1)2. The zigzag number π(i1)<π(i)>π(i+1)\pi(i-1)<\pi(i)>\pi(i+1)3 counts a restricted class of permutations with a prescribed up–down pattern, whereas π(i1)<π(i)>π(i+1)\pi(i-1)<\pi(i)>\pi(i+1)4 distributes a run statistic over all permutations of size π(i1)<π(i)>π(i+1)\pi(i-1)<\pi(i)>\pi(i+1)5. Related literature on alternating permutations often uses “alternating” in the up–down or down–up sense. For example, Euler numbers π(i1)<π(i)>π(i+1)\pi(i-1)<\pi(i)>\pi(i+1)6 count up–down permutations and admit refinements by the relative positions of π(i1)<π(i)>π(i+1)\pi(i-1)<\pi(i)>\pi(i+1)7, π(i1)<π(i)>π(i+1)\pi(i-1)<\pi(i)>\pi(i+1)8, and π(i1)<π(i)>π(i+1)\pi(i-1)<\pi(i)>\pi(i+1)9 (Kobayashi, 2019). The distinction between alternating permutations and alternating runs is therefore terminologically essential: the former specifies a global inequality pattern, while the latter measures how often the monotonicity direction changes inside an arbitrary permutation.

Topic to Video (Beta)

No one has generated a video about this topic yet.

Whiteboard

No one has generated a whiteboard explanation for this topic yet.

Follow Topic

Get notified by email when new papers are published related to Alternating Number.