Alternating permutation
In combinatorial mathematics, an alternating permutation (or zigzag permutation) of the set 1, 2, 3, ..., n is an arrangement of those numbers so that each entry is alternately greater or less than the preceding entry. For example, the five alternating permutations of 1, 2, 3, 4 are:
- 1, 3, 2, 4 because 1 < 3 > 2 < 4,
- 1, 4, 2, 3 because 1 < 4 > 2 < 3,
- 2, 3, 1, 4 because 2 < 3 > 1 < 4,
- 2, 4, 1, 3 because 2 < 4 > 1 < 3, and
- 3, 4, 1, 2 because 3 < 4 > 1 < 2.
This type of permutation was first studied by Désiré André in the 19th century.[1]
Different authors use the term alternating permutation slightly differently: some require that the second entry in an alternating permutation should be larger than the first (as in the examples above), others require that the alternation should be reversed (so that the second entry is smaller than the first, then the third larger than the second, and so on), while others call both types by the name alternating permutation.
The determination of the number An of alternating permutations of the set 1, ..., n is called André's problem. The numbers An are known as Euler numbers, zigzag numbers, or up/down numbers. When n is even the number An is known as a secant number, while if n is odd it is known as a tangent number. These latter names come from the study of the generating function for the sequence.
Contents
1 Definitions
2 André's theorem
3 Related integer sequences
4 See also
5 Citations
6 References
7 External links
Definitions
A permutation c1, ..., cn is said to be alternating if its entries alternately rise and descend. Thus, each entry other than the first and the last should be either larger or smaller than both of its neighbors. Some authors use the term alternating to refer only to the "up-down" permutations for which c1 < c2 > c3 < ..., calling the "down-up" permutations that satisfy c1 > c2 < c3 > ... by the name reverse alternating. Other authors reverse this convention, or use the word "alternating" to refer to both up-down and down-up permutations.
There is a simple one-to-one correspondence between the down-up and up-down permutations: replacing each entry ci with n + 1 - ci reverses the relative order of the entries.
By convention, in any naming scheme the unique permutations of length 0 (the permutation of the empty set) and 1 (the permutation consisting of a single entry 1) are taken to be alternating.
André's theorem
The determination of the number An of alternating permutations of the set 1, ..., n is called André's problem. The numbers An are variously known as Euler numbers, zigzag numbers, up/down numbers, or by some combinations of these names. The name Euler numbers in particular is sometimes used for a closely related sequence. The first few values of An are 1, 1, 1, 2, 5, 16, 61, 272, 1385, 7936, 50521, ... (sequence A000111 in the OEIS).
These numbers satisfy a simple recurrence, similar to that of the Catalan numbers: by splitting the set of alternating permutations (both down-up and up-down) of the set 1, 2, 3, ..., n, n + 1 according to the position k of the largest entry n + 1, one can show that
- 2An+1=∑k=0n(nk)AkAn−kdisplaystyle 2A_n+1=sum _k=0^nbinom nkA_kA_n-k
for all n ≥ 1. André (1881) used this recurrence to give a differential equation satisfied by the exponential generating function
- A(x)=∑n=0∞Anxnn!displaystyle A(x)=sum _n=0^infty A_nfrac x^nn!
for the sequence An. He then solved this equation, establishing that
A(x)=secx+tanxdisplaystyle A(x)=sec x+tan x,
where sec x and tan x are the trigonometric functions secant and tangent. This result is known as André's theorem.
It follows from André's theorem that the radius of convergence of the series A(x) is π/2. This allows one to compute the asymptotic expansion
- An∼2(2π)n+1⋅n!displaystyle A_nsim 2left(frac 2pi right)^n+1cdot n!
of the sequence An.[2]
Related integer sequences
The odd-indexed zigzag numbers (i.e., the tangent numbers) are closely related to Bernoulli numbers. The relation is given by the formula
- B2n=(−1)n−12n42n−22nA2n−1displaystyle B_2n=(-1)^n-1frac 2n4^2n-2^2nA_2n-1
for n > 0.
If Zn denotes the number of permutations of 1, ..., n that are either up-down or down-up (or both, for n < 2) then it follows from the pairing given above that Zn = 2An for n ≥ 2. The first few values of Zn are 1, 1, 2, 4, 10, 32, 122, 544, 2770, 15872, 101042, ... (sequence A001250 in the OEIS).
The Euler zigzag numbers are related to Entringer numbers, from which the zigzag numbers may be computed. The Entringer numbers can be defined recursively as follows:[3]
- E(0,0)=1displaystyle E(0,0)=1
- E(n,0)=0for n>0displaystyle E(n,0)=0qquad mboxfor n>0
E(n,k)=E(n,k−1)+E(n−1,n−k)displaystyle E(n,k)=E(n,k-1)+E(n-1,n-k).
The nth zigzag number is equal to the Entringer number E(n, n).
The numbers A2n with even indices are called secant numbers or zig numbers: since the secant function is even and tangent is odd, it follows from André's theorem above that they are the numerators in the Maclaurin series of sec x. The first few values are 1, 1, 5, 61, 1385, 50521, ... (sequence A000364 in the OEIS).
Secant numbers are related to Euler numbers by the formula E2n = (−1)nA2n. (En = 0 when n is odd.)
Correspondingly, the numbers A2n+1 with odd indices are called tangent numbers or zag numbers. The first few values are 1, 2, 16, 272, 7936, ... (sequence A000182 in the OEIS).
See also
- Longest alternating subsequence
- Boustrophedon transform
Fence (mathematics), a partially ordered set that has alternating permutations as its linear extensions
Citations
^ Jessica Millar, N. J. A. Sloane, Neal E. Young, "A New Operation on Sequences: the Boustrouphedon Transform" Journal of Combinatorial Theory, Series A 76(1):44–54 (1996)
^ Stanley, Richard P. (2010), "A survey of alternating permutations", Combinatorics and graphs, Contemporary Mathematics, 531, Providence, RI: American Mathematical Society, pp. 165–196, arXiv:0912.4240, doi:10.1090/conm/531/10466, MR 2757798.mw-parser-output cite.citationfont-style:inherit.mw-parser-output qquotes:"""""""'""'".mw-parser-output code.cs1-codecolor:inherit;background:inherit;border:inherit;padding:inherit.mw-parser-output .cs1-lock-free abackground:url("//upload.wikimedia.org/wikipedia/commons/thumb/6/65/Lock-green.svg/9px-Lock-green.svg.png")no-repeat;background-position:right .1em center.mw-parser-output .cs1-lock-limited a,.mw-parser-output .cs1-lock-registration abackground:url("//upload.wikimedia.org/wikipedia/commons/thumb/d/d6/Lock-gray-alt-2.svg/9px-Lock-gray-alt-2.svg.png")no-repeat;background-position:right .1em center.mw-parser-output .cs1-lock-subscription abackground:url("//upload.wikimedia.org/wikipedia/commons/thumb/a/aa/Lock-red-alt-2.svg/9px-Lock-red-alt-2.svg.png")no-repeat;background-position:right .1em center.mw-parser-output .cs1-subscription,.mw-parser-output .cs1-registrationcolor:#555.mw-parser-output .cs1-subscription span,.mw-parser-output .cs1-registration spanborder-bottom:1px dotted;cursor:help.mw-parser-output .cs1-hidden-errordisplay:none;font-size:100%.mw-parser-output .cs1-visible-errorfont-size:100%.mw-parser-output .cs1-subscription,.mw-parser-output .cs1-registration,.mw-parser-output .cs1-formatfont-size:95%.mw-parser-output .cs1-kern-left,.mw-parser-output .cs1-kern-wl-leftpadding-left:0.2em.mw-parser-output .cs1-kern-right,.mw-parser-output .cs1-kern-wl-rightpadding-right:0.2em
^ Weisstein, Eric W. "Entringer Number." From MathWorld--A Wolfram Web Resource. http://mathworld.wolfram.com/EntringerNumber.html
References
André, Désiré (1879), "Développements de séc x et de tang x", Comptes rendus de l'Académie des sciences, 88: 965–967.
André, Désiré (1881), "Sur les permutations alternées" (PDF), Journal de mathématiques pures et appliquées, 3e série, 7: 167–184.
Stanley, Richard P. (2011). Enumerative Combinatorics. Vol. I (2nd ed.). Cambridge University Press.
External links
- Weisstein, Eric W. "Alternating Permutation". MathWorld.
Ross Tang, "An Explicit Formula for the Euler zigzag numbers (Up/down numbers) from power series" A simple explicit formula for An.
"A Survey of Alternating Permutations", a preprint by Richard P. Stanley