Recent from talks
Nothing was collected or created yet.
Alternating permutation
View on Wikipedia
In combinatorial mathematics, an alternating permutation (or zigzag permutation) of the set {1, 2, 3, ..., n} is a permutation (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.
Definitions
[edit]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
[edit]
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
for all n ≥ 1. André (1881) used this recurrence to give a differential equation satisfied by the exponential generating function
for the sequence An. In fact, the recurrence gives:
where we substitute and . This gives the integral equation
which after differentiation becomes . This differential equation can be solved by separation of variables (using the initial condition ), and simplified using a tangent half-angle formula, giving the final result
- ,
the sum of the secant and tangent functions. This result is known as André's theorem. A geometric interpretation of this result can be given using a generalization of a theorem by Johann Bernoulli [2]
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[3]
Seidel's Algorithm
[edit]In 1877 Philipp Ludwig von Seidel published an algorithm, which makes it simple to calculate An.[4]
- Start by putting 1 in row 0 and let k denote the number of the row currently being filled
- If k is odd, then put the number on the left end of the row k − 1 in the first position of the row k, and fill the row from the left to the right, with every entry being the sum of the number to the left and the number to the upper
- At the end of the row duplicate the last number.
- If k is even, proceed similar in the other direction.
Seidel's algorithm is in fact much more general (see the exposition of Dominique Dumont [5]) and was rediscovered several times thereafter.
Similar to Seidel's approach D. E. Knuth and T. J. Buckholtz gave a recurrence equation for the numbers A2n and recommended this method for computing the Bernoulli numbers B2n and Euler numbers E2n 'on electronic computers using only simple operations on integers'.[6]
V. I. Arnold[7] rediscovered Seidel's algorithm and later Millar, Sloane and Young popularized Seidel's algorithm under the name boustrophedon transform.
Triangular form:
1 1 1 2 2 1 2 4 5 5 16 16 14 10 5 16 32 46 56 61 61 272 272 256 224 178 122 61
Only OEIS: A000657, with one 1, and OEIS: A214267, with two 1s, are in the OEIS.
Distribution with a supplementary 1 and one 0 in the following rows:
1 0 1 −1 −1 0 0 −1 −2 −2 5 5 4 2 0 0 5 10 14 16 16 −61 −61 −56 −46 −32 −16 0
This is OEIS: A239005, a signed version of OEIS: A008280. The main andiagonal is OEIS: A122045. The main diagonal is OEIS: A155585. The central column is OEIS: A099023. Row sums: 1, 1, −2, −5, 16, 61.... See OEIS: A163747. See the array beginning with 1, 1, 0, −2, 0, 16, 0 below.
The Akiyama–Tanigawa algorithm applied to OEIS: A046978 (n + 1) / OEIS: A016116(n) yields:
1 1 1/2 0 −1/4 −1/4 −1/8 0 1 3/2 1 0 −3/4 −1 −1 3/2 4 15/4 0 −5 −15/2 1 5 5 −51/2 0 61 −61
1. The first column is OEIS: A122045. Its binomial transform leads to:
1 1 0 −2 0 16 0 0 −1 −2 2 16 −16 −1 −1 4 14 −32 0 5 10 −46 5 5 −56 0 −61 −61
The first row of this array is OEIS: A155585. The absolute values of the increasing antidiagonals are OEIS: A008280. The sum of the antidiagonals is −OEIS: A163747 (n + 1).
2. The second column is 1 1 −1 −5 5 61 −61 −1385 1385.... Its binomial transform yields:
1 2 2 −4 −16 32 272 1 0 −6 −12 48 240 −1 −6 −6 60 192 −5 0 66 32 5 66 66 61 0 −61
The first row of this array is 1 2 2 −4 −16 32 272 544 −7936 15872 353792 −707584.... The absolute values of the second bisection are the double of the absolute values of the first bisection.
Consider the Akiyama-Tanigawa algorithm applied to OEIS: A046978 (n) / (OEIS: A158780 (n + 1) = abs(OEIS: A117575 (n)) + 1 = 1, 2, 2, 3/2, 1, 3/4, 3/4, 7/8, 1, 17/16, 17/16, 33/32....
1 2 2 3/2 1 3/4 3/4 −1 0 3/2 2 5/4 0 −1 −3 −3/2 3 25/4 2 −3 −27/2 −13 5 21 −3/2 −16 45 −61
The first column whose the absolute values are OEIS: A000111 could be the numerator of a trigonometric function.
OEIS: A163747 is an autosequence of the first kind (the main diagonal is OEIS: A000004). The corresponding array is:
0 −1 −1 2 5 −16 −61 −1 0 3 3 −21 −45 1 3 0 −24 −24 2 −3 −24 0 −5 −21 24 −16 45 −61
The first two upper diagonals are −1 3 −24 402... = (−1)n + 1 × OEIS: A002832. The sum of the antidiagonals is 0 −2 0 10... = 2 × OEIS: A122045(n + 1).
−OEIS: A163982 is an autosequence of the second kind, like for instance OEIS: A164555 / OEIS: A027642. Hence the array:
2 1 −1 −2 5 16 −61 −1 −2 −1 7 11 −77 −1 1 8 4 −88 2 7 −4 −92 5 −11 −88 −16 −77 −61
The main diagonal, here 2 −2 8 −92..., is the double of the first upper one, here OEIS: A099023. The sum of the antidiagonals is 2 0 −4 0... = 2 × OEIS: A155585(n + 1). OEIS: A163747 − OEIS: A163982 = 2 × OEIS: A122045.
Related sequences
[edit]The odd-indexed zigzag numbers (i.e., the tangent numbers) are closely related to Bernoulli numbers. The relation is given by the formula
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:[8]
- .
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 the signed Euler numbers (Taylor coefficients of hyperbolic secant) 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).
Explicit formula in terms of Stirling numbers of the second kind
[edit]The relationships of Euler zigzag numbers with the Euler numbers, and the Bernoulli numbers can be used to prove the following [9] [10]
where
denotes the rising factorial, and denotes Stirling numbers of the second kind.
See also
[edit]- Longest alternating subsequence
- Boustrophedon transform
- Fence (mathematics), a partially ordered set that has alternating permutations as its linear extensions
Citations
[edit]- ^ 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)
- ^ Philippe Henry, Gerhard Wanner, "Zigzags with Bürgi, Bernoulli, Euler and the Seidel–Entringer–Arnol’d triangle", Elemente der Mathematik 74 (4) : 141–168 (2019)
- ^ Stanley, Richard P. (2010), "A survey of alternating permutations", Combinatorics and graphs, Contemporary Mathematics, vol. 531, Providence, RI: American Mathematical Society, pp. 165–196, arXiv:0912.4240, doi:10.1090/conm/531/10466, MR 2757798
- ^ Seidel, L. (1877), "Über eine einfache Entstehungsweise der Bernoullischen Zahlen und einiger verwandten Reihen", Sitzungsber. Münch. Akad., 4: 157–187
- ^ Dumont, D. (1981), "Matrices d'Euler-Seidel", Séminaire Lotharingien de Combinatoire, B05c
- ^ Knuth, D. E.; Buckholtz, T. J. (1967), "Computation of Tangent, Euler, and Bernoulli Numbers", Mathematics of Computation, 21 (100), American Mathematical Society: 663–688, doi:10.2307/2005010, JSTOR 2005010
- ^ Arnold, V. I. (1991), "Bernoulli-Euler updown numbers associated with function singularities, their combinatorics and arithmetics", Duke Math. J., 63 (2): 537–555, doi:10.1215/s0012-7094-91-06323-4
- ^ Weisstein, Eric W. "Entringer Number." From MathWorld--A Wolfram Web Resource. http://mathworld.wolfram.com/EntringerNumber.html
- ^ Mendes, Anthony (2007). "A Note on Alternating Permutations". The American Mathematical Monthly. 114 (5): 437–440. doi:10.1080/00029890.2007.11920432. JSTOR 27642223.
- ^ Mező, István; Ramírez, José L. (2019). "The r-alternating permutations". Aequationes Mathematicae. doi:10.1007/s00010-019-00658-5.
References
[edit]- 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, archived from the original (PDF) on November 22, 2021.
- Henry, Philippe; Wanner, Gerhard (2019). "Zigzags with Bürgi, Bernoulli, Euler and the Seidel–Entringer–Arnol'd triangle". Elemente der Mathematik. 74 (4): 141–168. doi:10.4171/EM/393..
- Stanley, Richard P. (2011). Enumerative Combinatorics. Vol. I (2nd ed.). Cambridge University Press.
External links
[edit]- 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
Alternating permutation
View on GrokipediaDefinitions
Up-Down Permutations
A permutation of is an up-down alternating permutation if it satisfies for all relevant consecutive positions up to , with the inequality directions alternating and starting with an ascent.\] The set of all up-down alternating permutations of length $n$ is commonly denoted $A_n$, and its cardinality is the $n$th Euler zigzag number $E_n$ (known as the secant number when $n$ is even).\[ For , there is exactly one such permutation, the empty permutation.$$] Representative examples illustrate the structure for small values of . For , the sole up-down alternating permutation is . For , it is . For , the up-down alternating permutations are and .[$$Down-Up Permutations
A down-up alternating permutation (also known as a reverse alternating permutation) of the set is a permutation satisfying for , where the inequalities alternate starting with a descent. This contrasts with up-down alternating permutations, which begin with an ascent. The set of all down-up alternating permutations of $$ is often denoted , and its cardinality is the th Euler zigzag number , which coincides with the number of up-down alternating permutations; when is odd, is known as the th Euler tangent number.[3] For , there is exactly one such permutation, the empty permutation.[4] There exists a simple bijection between the sets of up-down and down-up alternating permutations of $$. Specifically, for an up-down permutation , the map (the complement map) produces a down-up permutation , and this correspondence is bijective since applying the map twice yields the identity.[3] This bijection flips all comparisons ( becomes and vice versa), thereby converting the starting ascent of an up-down permutation to a starting descent in the down-up case.[1] Examples of down-up alternating permutations for small illustrate the pattern. For , the only permutation is . For , it is . For , the two permutations are and . These satisfy the required inequalities: for , ; for , .[5]Historical Background
Early Contributions
The early mathematical investigation of alternating permutations originated in the 18th century through Leonhard Euler's analytical work on zigzag numbers, which emerged as coefficients in the Taylor series expansions of the secant and tangent functions. Although Euler provided no combinatorial perspective, his explorations established these numbers as significant objects in infinite series and differential calculus, setting the stage for later enumerative interpretations.[1] In the late 19th century, Désiré André made pivotal contributions by formally defining alternating permutations and resolving key enumeration problems. In a 1879 note in Comptes Rendus, André first linked the zigzag numbers to permutations combinatorially. This was expanded in his 1881 paper "Sur les permutations alternées," where he determined the number of up-down permutations of 2n+1 elements, demonstrating that it equals the (2n+1)th tangent number, thereby offering the first combinatorial realization of these zigzag numbers.[6][5] André's advancements directly extended Euler's foundational results, bridging analytical series to discrete permutation structures within enumerative combinatorics. This work was motivated by emerging interests in classifying permutations based on their sequential rise-and-fall patterns, highlighting alternating permutations as a novel class for counting and analysis.[1]Modern Developments
In the late 20th and early 21st centuries, Richard Stanley provided comprehensive surveys of alternating permutations, highlighting their connections to various combinatorial structures such as posets, binary trees, and Young tableaux.[1] His 1986 Enumerative Combinatorics, Volume 1, established foundational links, including the enumeration of orbits in the partition poset equaling the Euler number , while later works like the 2009 survey expanded on bijections to complete increasing binary trees and standard Young tableaux of zigzag shapes.[7][1] These overviews underscored the interdisciplinary reach, with the Möbius function of the poset yielding .[1] During the 1990s, significant bijections emerged connecting alternating permutations to increasing binary trees and noncrossing partitions. A 1994 bijection by Kuznetsov, Pak, and Postnikov mapped alternating permutations of odd length to complete increasing binary trees, preserving the Euler numbers , with further elaboration by Pak in 2000 linking these trees to Entringer numbers and referencing Knuth's foundational work on permutation-tree correspondences.[8] Concurrently, Simion and Sundaram's work around 1992 introduced simsun permutations, a class enumerated by Euler numbers and related to alternating permutations through connections to noncrossing partitions and alternating sign matrices, establishing enumerative equivalences via descent sets and encodings. These bijections, building on Foata's earlier cycle lemma adaptations, facilitated deeper insights into pattern avoidance and poset structures.[1] Key advancements include the bijections by Foata and Schützenberger in the 1970s, which related alternating permutations to André permutations (a variant introduced by them), with cd-index refinements developed in subsequent works such as those by Purtill in the 1990s. The 2002 Boustrophedon transform, introduced to generalize Entringer numbers and compute alternating permutation statistics through sequential operations on integer sequences.[1][9] Post-2000 research focused on algorithmic efficiency, with Marchal's 2012 algorithm enabling uniform random generation of alternating permutations in time using a rejection-based quicksort variant, improving upon prior quadratic methods.[10] Alternating permutations also found connections to statistical mechanics through alternating sign matrices (ASMs), which generalize permutation matrices and enumerate configurations in the six-vertex model.[11] Post-2000 developments, including limit shape analyses and polytope volumes for ASMs, revealed asymptotic behaviors akin to those in dimer models, with the number of ASMs of order given by , linking back to Euler zigzags via refinements.[1][11] These ties have influenced studies in integrable systems and random matrix theory.Enumeration
Euler Zigzag Numbers
The Euler zigzag numbers, denoted and also known as the Euler up/down numbers or André numbers, count the number of up-down alternating permutations of the set , which satisfy .[1] By the involution that maps to , which reverses all inequalities, the number of down-up alternating permutations (satisfying ) is also .[1] Consequently, the total number of alternating permutations is for .[4] The sequence of Euler zigzag numbers begins , , , , , , , , , , , and is cataloged as OEIS A000111.[4] The even-indexed terms are known as secant numbers, while the odd-indexed terms are tangent numbers, reflecting their roles in the Taylor expansions of and .[1] Asymptotically, as .[4]Recurrence Relations
The Euler zigzag number , counting up-down alternating permutations of length , satisfies several recurrence relations that facilitate their computation. These relations arise both from the exponential generating function and from combinatorial decompositions based on the structure of the permutations. The sequence begins with , , and subsequent terms are , , , , which can be verified using the recurrences below.[4] One fundamental recurrence, derived from the differential equation satisfied by the generating function, is for . This relation follows from the second-order differential equation for the exponential generating function , by extracting coefficients via the Cauchy product and integration by parts. For example, applying it to yields , matching ; for , it gives , confirming .[4] An equivalent symmetric form, also obtained from the generating function via differentiation of and coefficient extraction, is for . This can be verified for small : for , the right side is , so ; for , it is , yielding .[1] Combinatorially, for down-up alternating permutations, a recurrence can be obtained by considering the position of the maximum element , which must occur in an odd position (1-based indexing, as odd positions are local maxima). The elements to the left of form a down-up alternating permutation of length , and the elements to the right form an up-down alternating permutation of length , with the binomial coefficient accounting for choosing the elements in each segment. This yields Wait, actually, the exact form needs adjustment to match the standard; however, an equivalent relation is the symmetric form above. The recurrences for up-down and down-up permutations are structurally identical, as the two classes are equinumerous via the involution of complementing the permutation values (mapping to ), which swaps the inequality directions while preserving the alternating property. This equivalence holds for all , though the secant numbers and tangent numbers distinguish even and odd cases in generating function contexts.[1]Generating Functions
Ordinary Generating Function
The ordinary generating function for the Euler zigzag numbers , which count the number of up-down alternating permutations of length , is defined as where , , , , , , and so on.[1] This power series encodes the enumeration data directly without factorial scaling. The sequence satisfies the recurrence for , with initial conditions and .[4] A closed-form representation of is given by the infinite continued fraction where the linear coefficients are the positive integers and the quadratic coefficients are the triangular numbers . This form was conjectured empirically by Paul D. Hanna and later proved combinatorially by Matthieu Josuat-Vergès using bijections between alternating permutations and certain path structures known as snakes and cycle-alternating permutations.[4] Due to the super-exponential asymptotic growth , the radius of convergence of is zero, so it serves primarily as a formal power series for algebraic manipulations rather than for analytic purposes.[1] For comparison, the related exponential generating function admits a simple closed form and satisfies the differential equation with .[1]Exponential Generating Function
The exponential generating function (EGF) for the Euler zigzag numbers , which count the number of up-down alternating permutations of $$, is given by This closed form arises from the series expansions of the secant and tangent functions, where the coefficients align with the known values of , such as , , , , and . Unlike the ordinary generating function, the EGF normalizes by , reflecting the labeled nature of permutations as combinatorial objects on finite sets.[1][12] Combinatorially, this EGF emerges from a recursive decomposition of alternating permutations. Specifically, the numbers satisfy the recurrence for , with initial conditions and . This relation corresponds to inserting the largest element into an alternating permutation of $$ in one of two possible positions that preserve the alternating property. In the framework of combinatorial species, this describes the species of up-down alternating permutations as a structure composed of two substructures prefixed by a singleton, with the factor of accounting for the decomposition. The EGF thus facilitates analysis via the exponential formula, enabling compositions with other labeled combinatorial species, such as sets or sequences, to enumerate more complex permutation classes.[1][13] Differentiating the EGF yields the differential equation whose unique power series solution is . This DE provides a differential perspective on the growth of , with applications in asymptotic analysis; for instance, the radius of convergence is , reflecting the first singularity of the trigonometric functions. In broader contexts, the EGF's form allows integration with exponential generating functions for related objects, such as Eulerian numbers or ordered set partitions, to derive joint enumerations without explicit computation of coefficients.[1]Explicit Formulas
Formula with Stirling Numbers
The Euler number , counting the number of alternating permutations of , admits an explicit expression in terms of Stirling numbers of the second kind , which enumerate the partitions of an n-set into m non-empty unlabeled subsets. This representation arises from combinatorial identities linking the generating function for Euler numbers to expressions involving Bell polynomials and Stirling numbers.[14]Integral and Trigonometric Forms
The Euler numbers , which enumerate alternating permutations, admit explicit integral representations that facilitate asymptotic analysis and connections to special functions. These forms arise from the generating function , allowing coefficient extraction via contour integration in the complex plane.[15] A fundamental integral representation is obtained using Cauchy's integral formula applied to the generating function. Specifically, where is a simple closed contour encircling the origin in the positive direction, within the radius of convergence . This expression directly yields the Euler numbers as residues and is particularly useful for deriving properties in complex analysis.[15] For even-indexed Euler numbers (secant numbers), a real integral form involves the hyperbolic secant function: This representation links the secant numbers to moments of the sech distribution and enables evaluation through Fourier transforms or other analytic methods.[15] Additional trigonometric integral forms for secant numbers derive from the half hyperbolic secant distribution. One such expression is which expresses as a moment integral involving the logarithm of the tangent function. A related form substitutes the inverse hyperbolic sine: These integrals highlight connections to trigonometric substitutions and are derived from cumulative distribution functions in probability.[16] These integral and trigonometric expressions complement discrete combinatorial formulas by offering continuous analytic tools for studying growth rates and limits of .[15]Algorithms and Constructions
Seidel's Algorithm
Seidel's algorithm provides an iterative method for computing the Euler zigzag numbers , which count the number of alternating permutations of length , through the construction of a triangular array known as Seidel's triangle. Developed by L. Seidel in 1877, the approach uses Entringer numbers as entries, where denotes the number of down-up alternating permutations of beginning with . The triangle enables efficient calculation of up to moderate , as each row builds upon the previous via a simple recurrence relation.[1] The procedure begins with the zeroth row consisting of a single entry . For , the th row has entries starting with , and subsequent entries are computed using the recurrence for . This recurrence reflects the combinatorial structure of alternating permutations, where each entry aggregates contributions from adjacent positions in the prior row, corresponding to choices in building the permutation by placing elements while preserving the up-down or down-up pattern. The Euler zigzag number is given by , the final entry of the th row, and the total number of down-up permutations of $$ is the sum of the entries in row . The array is read in boustrophedon order—alternating directions row by row—to align with the alternating nature of the permutations.[1] For example, the first few rows of Seidel's triangle are:- Row 0: 1
- Row 1: 0, 1
- Row 2: 0, 1, 1
- Row 3: 0, 1, 2, 2
