ArticleslgStudy

science

Alternating permutation

Alternating permutation is a science topic covered in the lgStudy science library. This page brings together a partial reference excerpt, illustrations, worked examples, real-world applications and a short study plan, so you can understand Alternating permutation rather than just read about it. In short: 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 beca…

Alternating permutation — main illustration
Alternating permutation — illustration

Key takeaways

  • Alternating permutation belongs to science; place it in that map before memorising details.
  • Learn the definition first, then one example that makes the definition concrete.
  • Connect Alternating permutation to a quantity you can measure, compute or draw — that is where exam questions come from.
  • Reproduce the core statement of Alternating permutation from memory before moving on to harder problems.

Reference excerpt

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. 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 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−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! for the sequence An. In fact, the recurrence gives:

2∑n≥1An+1xn+1(n+1)!=∑n≥1∑k=0nAkk!An−k(n−k)!xn+1n+1=∫(∑k≥0Akxkk!)(∑j≥0Ajxjj!)dx−x where we substitute j=n−k and xn+1n+1=∫xk+jdx. This gives the integral equation

2(A(x)−1−x)=∫A(x)2dx−x, which after differentiation becomes 2dAdx−2=A2−1. This differential equation can be solved by separation of variables (using the initial condition A(0)=A0/0!=1), and simplified using a tangent half-angle formula, giving the final result

A(x)=tan⁡(π4+x2)=sec⁡x+tan⁡x, 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. 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+1n!.

Seidel's Algorithm In 1877 Philipp Ludwig von Seidel published an algorithm, which makes it simple to calculate An.

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 ) 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'. V. I. Arnold rediscovered Seidel's algorithm and later Millar, Sloane and Young popularized Seidel's algorithm under the name boustrophedon transform. Triangular form:

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:

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. The first column is OEIS: A122045. Its binomial transform leads to:

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:

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⁠....

… excerpt ends here. Continue reading the full article.

Worked examples

Example 1 — a first encounter with Alternating permutation

Start with the simplest possible case. Write down what Alternating permutation claims or describes in one sentence, then invent the smallest concrete situation in which that sentence is true. In science, the smallest case is usually a single object, a single equation or a single measurement. Check that every symbol or term in your sentence has a meaning in that case.

Example 2 — changing one variable

Take the situation from Example 1 and change exactly one quantity: double it, halve it, or set it to zero. Predict what should happen to Alternating permutation before you calculate. Comparing your prediction with the result is the fastest way to find out whether you understand the idea or only the words.

Example 3 — an exam-style question

Typical questions about Alternating permutation ask you to (a) state it precisely, (b) apply it to given data, and (c) explain a limitation. Practise writing all three answers in under five minutes; the third part is what separates a full-mark answer from an average one.

Applications of Alternating permutation

In research
Alternating permutation appears in science research whenever the underlying quantities have to be modelled precisely. Papers usually cite it as a starting assumption and then explore where it breaks down.
In technology and industry
Engineering practice reuses Alternating permutation in design rules, simulations and safety margins. Knowing the idea lets you read a specification sheet and understand why the numbers look the way they do.
In the classroom
Alternating permutation is common in secondary-school and first-year university syllabi. It links to neighbouring topics Enumerative combinatorics, Permutations, so understanding it makes those chapters shorter.
In everyday life
Look for Alternating permutation outside the textbook — in sport, cooking, traffic, electronics or the sky above you. An example you found yourself is remembered far longer than one you were given.
Ask Teacher Smith questions about this articleOpens your AI tutor with a question about “Alternating permutation” →

How to study Alternating permutation in 20 minutes

  1. Read the reference excerpt below once, without taking notes.
  2. Close the page and write down what Alternating permutation means in your own words.
  3. Compare your version with the excerpt and mark what you missed.
  4. Work through the three examples above with pen and paper.
  5. Explain Alternating permutation out loud to somebody else — or to Teacher Smith in the lgStudy chat.

Frequently asked questions

What is Alternating permutation in simple terms?

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} ar…

Why does Alternating permutation matter?

Because it connects several science ideas at once: it gives you a definition you can apply, a quantity you can calculate, and a way to check whether a result is plausible.

How should I study Alternating permutation?

Read the excerpt, restate it from memory, then work through the examples and applications listed on this page. The five-step study plan above takes about twenty minutes.

What does this page cover?

It gives you a compact reference excerpt plus original lgStudy explanations, examples, applications and study material on Alternating permutation.

Tags

  • Enumerative combinatorics
  • Permutations

Keep exploring