Alternating permutation

from Wikipedia, the free encyclopedia
Graphic representation of all up-down permutations of length five, starting with the permutation (1,3,2,5,4) (top left) and ending with the permutation (4,5,2,3,1) (bottom right ).

An alternating permutation (also called zigzag permutation ) is in combinatorics a permutation of the first natural numbers , in which there is no number between the preceding and the following number in terms of size. If the sequence begins with an increase, one speaks of an up-down permutation , and it begins with a decrease from a down-up permutation . Alternating permutations have a number of mirror symmetries . Each alternating permutation of odd length corresponds to a full partially ordered binary tree and each alternating permutation of even length corresponds to an almost full such tree. The numbers of alternating permutations of fixed length appear as coefficients in the Maclaurin series of the secant and the tangent function and are closely related to the Euler and Bernoulli numbers .

definition

Illustration of an up-down permutation of the numbers from 1 to 7

If the symmetric group of all permutations of the set , then a permutation is called alternating if in its tuple representation

the numbers are always alternately larger and smaller than the previous number. So it has to be for either

or

be valid. If the sequence of numbers begins with an increase, i.e. , what is called an up-down permutation , it begins with a decrease, i.e. a down-up permutation . More generally, alternating permutations of ordered finite sets , for example alphabets , can also be considered, but the analysis of the mathematical properties can be limited to the first natural numbers.

Examples

Up-Down Permutations Down-up permutations number
2 (1.2) (2.1) 2
3 (1,3,2), (2,3,1) (2,1,3), (3,1,2) 4th
4th (1,3,2,4), (1,4,2,3),
(2,3,1,4),
(2,4,1,3),
(3,4,1,2)
(2,1,4,3),
(3,1,4,2),
(3,2,4,1),
(4,1,3,2),
(4,2,3,1)
10

The permutation

is an up-down permutation because it holds . The permutation

however, is a down-up permutation, since . The permutation

is not an alternating permutation, because it contains two consecutive increases.

The table opposite lists all alternating permutations of the symmetrical groups from degrees two to four.

Symmetries

Ascents and descents

With an alternating permutation, ascents and descents alternate. In the case of an up-down permutation, the following applies to odd and even , and vice versa in the case of down-up permutations. An alternating permutation of even length accordingly has as many ascents as descents. An up-down permutation of odd length has one more rise than descents, and a down-up permutation of odd length has one more descent than climbs. Furthermore, alternating permutations have the following two types of mirror symmetries .

Horizontal symmetry

Horizontal (above) and vertical (below) mirror symmetries between up-down permutations (blue) and down-up permutations (red), each of odd and even lengths

If you read a permutation from right to left, you get the corresponding reverse permutation . The reverse of an up-down permutation is again an up-down permutation if is odd and a down-up permutation if is even. Analogously, the reverse of a down-up permutation is again a down-up permutation if it is odd and an up-down permutation if it is even. The image

thus represents an involution of the set of up-down or down-up permutations, if is odd, and a bijection between the two sets, if is even.

Vertical symmetry

Replacing the number in a permutation for each number results in the corresponding complementary permutation . The complement of an up-down permutation is always a down-up permutation and vice versa. The image

thus represents a bijection for each between the set of up-down permutations and the set of down-up permutations.

number

Recursive representation

Number of down-up permutations of n numbers starting with the number k
1 2 3 4th 5 6th 7th total
2 0 1 1
3 0 1 1 2
4th 0 1 2 2 5
5 0 2 4th 5 5 16
6th 0 5 10 14th 16 16 61
7th 0 16 32 46 56 61 61 272
Number of up-down permutations of n numbers starting with the number k
1 2 3 4th 5 6th 7th total
2 1 0 1
3 1 1 0 2
4th 2 2 1 0 5
5 5 5 4th 2 0 16
6th 16 16 14th 10 5 0 61
7th 61 61 56 46 32 16 0 272

Because of the above symmetry, there are as many up-down as down-up permutations. Since these two sets are disjoint, one can restrict oneself to one of the two types when counting. Now designates the number of down-up permutations of the length , as well as the number of down-up permutations of the length that begin with the number , then applies

.

The figures are for odd and (positive) Euler numbers called, the numbers are called Entringer numbers (sequence A008282 in OEIS ). Each of the down-up permutations of length and starting number is obtained by increasing all numbers from to by one and adding the number in front of an up-down permutation of length that begins at most with the number . After each up-down permutation is created by vertical mirroring of a down-up permutation, the recurrence is obtained for the number with and

,

where and is set for all . This recurrence is allowed

simplify. Correspondingly mirrored recurrences can also be derived for the number of up-down permutations that begin with the number (sequence A010094 in OEIS ).

Explicit representation

By resolving the recurrences, the number of up-down or down-up permutations of uneven length can now be explicitly represented

and the corresponding representation for the number of up-down or down-up permutations of even length

.

Overall, this gives the sequence for the number of up-down or down-up permutations

  (Follow A000111 in OEIS )

and for the total number of alternating permutations of length, the sequence

  (Follow A001250 in OEIS ).

Correspondence on binary trees

Conversion of an up-down permutation into a full, partially ordered binary tree

In the following, binary trees are considered whose nodes are denoted by the first natural numbers . A binary tree is called full if each node has either two or no child nodes . In a partially ordered binary tree , all nodes are marked in such a way that the number of a parent node is always greater than the numbers of the child nodes. Each up-down permutation of odd length now corresponds to a full, partially ordered binary tree with nodes. In order to construct this correspondence, one selects the largest number as the root node of the tree and observes the partial permutations

  and  

left and right of this number. The two partial permutations are now again up-down permutations of a subset of the numbers . From these partial permutations the largest element can be selected again and in this way a full, partially ordered binary tree can be built up recursively (see figure). The recursive structure of the binary trees can now be used to derive further recurrences. The root node must have an even index so that the left subtree has nodes and the right subtree has nodes. There are now exactly possibilities to select the numbers of the left subtree, whereby the remaining numbers have to be in the right subtree. If one sets , the recurrence follows for the number of up-down permutations of uneven length

with start value . Each up-down permutation of even length corresponds to an almost full, partially ordered binary tree with nodes, in which only the rightmost leaf of the tree is missing. The corresponding recurrence is obtained for the number of up-down permutations of even length

with start value . Analogous to these two cases, each down-up permutation corresponds to a binary tree that is partially ordered with respect to the reversed order, which is full if the length is odd and almost full if the length is even. Because of the mirror symmetry, the recurrence is obtained for the total number of alternating permutations of the length

and after setting the discrete convolution

.

Generating functions

Differential equation

The exponentially generating function of the sequence

satisfies the ordinary differential equation

with the initial condition , as can be recalculated by inserting the above recurrence. By separating the variables , the solution of this initial value problem is obtained as

.

This classic result of analytical combinatorics from 1881 goes back to the French mathematician Désiré André .

Maclaurin series

The numbers are also called secant numbers for even and occur in the Maclaurin series of the secant function

while the numbers for odd are also called tangent numbers and in the series expansion of the tangent function

occurrence. The numbers are closely related to the Bernoulli numbers .

Asymptotics

For the proportion of the alternating permutations in the set of all permutations, the following applies to asymptotically

.

This proportion corresponds to the probability that a (uniformly distributed) random permutation of the length is alternating.

literature

Web links

Individual evidence

  1. ^ A b Stanley: Enumerative Combinatorics . 2011, p. 32 .
  2. Dobrushkin: Methods in Algorithmic Analysis . 2011, p. 430-431 .
  3. Louis Comtet: Advanced Combinatorics . Reidel, Dordrecht 1974, ISBN 90-277-0380-9 , pp. 259 .
  4. ^ Bornemann: Concrete Analysis: for students of computer science . 2008, p. 139 .
  5. ^ A b Bornemann: Concrete Analysis: for students of computer science . 2008, p. 140 .
  6. ^ A b Stanley: Enumerative Combinatorics . 2011, p. 47 .
  7. Flajolet, Sedgewick: Analytic Combinatorics . 2009, p. 2 .
  8. ^ A b Bornemann: Concrete Analysis: for students of computer science . 2008, p. 141-142 .