Alternating permutation 2026-11-05
With the upward-starting convention, an alternating permutation of has one-line entries satisfying
For , the possibilities are and . Reversing every inequality gives the downward-starting convention; complementing each label by is a bijection between the two conventions.
These permutations are counted by the Euler zigzag numbers for one fixed initial direction. For , counting both directions doubles that count. For lengths zero and one, the inequality condition is vacuous, so the direction classes coincide instead.
Alternating refers to the succession of inequalities, not to membership in the alternating group. For example, is upward alternating but is an odd permutation: it swaps two labels. This distinguishes an order pattern from permutation parity.
Euler zigzag number Created 2026-10-20 Updated 2026-11-05
The Euler zigzag number counts permutations satisfying . Reversing every inequality gives the same count by replacing each label with . The first values, starting at , are . For the two upward-starting examples are 132 and 231. Their exponential generating function is
This convention fixes the direction of the first inequality; adding both directions for doubles the count.[ref]