1 Introduction

Cycle up-down permutations

Abstract.

A permutation is defined to be cycle-up-down if it is a product of cycles that, when written starting with their smallest element, have an up-down pattern. We prove bijectively and analytically that these permutations are enumerated by the Euler numbers, and we study the distribution of some statistics on them, as well as on up-down permutations, on all permutations, and on a generalization of cycle-up-down permutations. The statistics include the number of cycles of even and odd length, the number of left-to-right minima, and the number of extreme elements.

1. Introduction

Let , and let be the set of permutations of . A permutation of can be written in one-line notation as or as a product of cycles as

We will write commas in the cycle notation but not in the one-line notation, in order to distinguish them. A cycle is said to be in standard form if its smallest element is in first position. Every permutation has a unique expression as a product of cycles in standard form where the first entries of the cycles are in increasing order. For example, . A cyclic permutation is a permutation that consists of only one cycle.

An up-down permutation of is a permutation satisfying

Let denote the set of up-down permutations of length . It is well known that the size of is the Euler number . The exponential generating function (EGF for short) for the Euler numbers is

and the first values of are . A permutation satisfying is called a down-up permutation.

In this paper we are concerned with a variation of the above definition. Instead of requiring the one-line notation to be up-down, we will study permutations whose cycles, when written in standard form, have an up-down pattern. A precise definition of these permutations, which we call cycle-up-down permutations, is given in Section 2. It is also shown, both analytically and bijectively, that they are enumerated by the Euler numbers. In Section 3 we define a less restrictive family of permutations, which we call generalized cycle-up-down permutations, and enumerate them as well. In Section 4 we obtain refined generating functions for these families of permutations with respect to several statistics. We also find statistics that are preserved by our bijections between up-down and cycle-up-down permutations. In Section 5 we study the distribution of some of these permutation statistics on , obtaining some formulas that involve the Stirling numbers of the first kind. Finally, Section 6 gives another interpretation of cycle-up-down permutations in terms of perfect matchings.

Let us now introduce some notation and definitions that will be needed later on. Let be a finite subset of the natural numbers, and assume that . Given a permutation of , let be the permutation obtained by replacing each entry of the one-line notation of with . For example, . Following [5], we will call this operation a switch.

We say that is a left-to-right (LR) minimum (resp. maximum) of a permutation if (resp. ) for all . If , we say that is an extreme element if it is either an LR minimum or an LR maximum (see [6, p. 98]). The min-max subsequence of is defined to be the subsequence where is the smallest entry of , is the largest entry to the right of , is the smallest entry to the right of , and so on. Note that we always have . For example, the min-max sequence of is . An excedance (resp. deficiency) of is a value such that (resp. ). We use the term odd cycle (resp. even cycle) to mean a cycle of odd (resp. even) length.

For , we define the following statistics, which will be studied in Sections 4 and 5:

  • number of cycles of ,

  • number of odd cycles of ,

  • number of even cycles of ,

  • number of fixed points of ,

  • number of left-to-right minima of ,

  • length of the min-max sequence of ,

  • number of extreme elements of ,

  • number of excedances of .

2. Cycle-up-down permutations

A cycle is said to be up-down if, when written in standard form, say , one has . We define a permutation to be cycle-up-down (CUD for short) if it is a product of up-down cycles. For example, is CUD, but is not. Let be the set of CUD permutations of . The main result of this section is the enumeration of CUD permutations.

Proposition 2.1.

The number of CUD permutations of is .

In subsection 2.2 we give a bijective proof of this fact. In order to construct a bijection, it will be convenient to separate odd cycles from even cycles. Up-down even cycles can alternatively be described as fully alternating cycles, meaning that in any representation of the cycle, the entries alternate going up and down. Then, CUD permutations having only cycles of even length are precisely those permutations with no fixed points where the image of each excedance is a deficiency, and viceversa. The following lemma enumerates these permutations.

Lemma 2.2.

The number of CUD permutations of all of whose cycles are even is .

If we only allow odd cycles, we obtain a similar result.

Lemma 2.3.

The number of CUD permutations of all of whose cycles are odd is .

2.1. Proofs via generating functions

Let us first give relatively straightforward proofs of the above results using generating functions.

Analytic proof of Proposition 2.1.

The number of CUD cyclic permutations of length is , because each such permutation can be written as , with being an up-down permutation of . Thus, the corresponding EGF is

(1)

Since any CUD permutation is an unordered product of up-down cycles, the EGF for CUD permutations is

via the set construction (see [4]). Thus, using that , the statement of the proposition, in terms of generating functions, is equivalent to

Taking logarithms and differentiating, this equation is equivalent to , which can be proved by simple calculus, since and . ∎

Analytic proof of Lemma 2.2.

The EGF for CUD cyclic permutations of even length is

Thus, the statement of the proposition is equivalent to

which can be easily checked. ∎

Remark. It is now clear that if we want to count permutations where the image of excedances are deficiencies and viceversa, we only need to modify the proof of Lemma 2.2 by allowing fixed points. The EGF for these permutations is then

which appears in [7, A003701].

Analytic proof of Lemma 2.3.

The EGF for CUD cyclic permutations of odd length is

Thus, the statement of the proposition is equivalent to

which can be easily checked. ∎

2.2. Bijective proofs

Here we prove the three above results bijectively.

Bijective proof of Lemma 2.2.

Given , let be its left to right minima. Note that all the must be odd. Then

(2)

is a CUD permutation with only even cycles, and is a bijection.

To find the preimage of a CUD permutation with only even cycles, write it as a product of cycles in standard form ordered by decreasing first entry. Removing the parentheses gives the one-line notation of an up-down permutation which is its preimage by .

For example, if , we have . ∎

Bijective proof of Lemma 2.3.

It will be convenient to consider permutations of a finite set of natural numbers with . We describe a bijection between up-down permutations of and CUD permutations of with only odd cycles. Given an up-down permutation , let be such that . Define recursively

where is the switch operation defined in Section 1.

For example, if , then

which is a CUD permutation. Conversely, given a CUD permutation of with odd cycles, write it as a product of cycles in standard form ordered by increasing first entry, and reverse the previous steps. For example, if , then

The bijection is similar to Chebikin’s decomposition of up-down permutations into a set of up-down permutations of odd length [1, p. 26].

Bijective proof of Proposition 2.1.

We can combine the bijections in the above two proofs to give a bijection . In the above proof of Lemma 2.2 we described a bijection from up-down permutations of even length to CUD permutations with only even cycles. Consider the straightforward generalization of this bijection to permutations of a finite set of natural numbers.

Given , let be such that , and for , let . Define to be the CUD permutation which has cycle decomposition given by

For example, if , then

Now, noticing that the left-to-right minima of are and , we have

An alternative bijective proof of Proposition 2.1 can be obtained by modifying a bijection of Johnson [5] involving the so-called zigzig sequences. We next describe the resulting map . Given , let be its rightmost extreme element. If it is an LR minimum (i.e. in this case), let ; if it is an LR maximum (i.e. in this case), let . We define to be the first cycle of , and we delete the entries from . Now we look at the rightmost extreme element of what remains of . Again, if it is an LR maximum, we switch to make an LR minimum. The second cycle of is , we delete the entries and repeat this process until has only one entry, which at this point is necessarily .

For example, if , then its rightmost extreme element is , so we take , add the cycle to , and remove and from . Now the rightmost extreme element is , so , we add the cycle to , and delete from . The rightmost extreme element of is , so , and the cycle gets added to . The rightmost extreme element of is , so , the cycle gets added to , and we end here, obtaining .

The inverse map can be described as follows. Given , write its cycles in standard form ordered by decreasing first element. Removing the parenthesis (this correspondence is due to Foata) gives the one-line notation of a permutation. Let be the permutation obtained by adding in front of it. Let be the largest index such that is alternating, that is, either up-down or down-up. Replace with . Consider again the largest alternating prefix of and switch it. Repeat until is alternating. If it is up-down, then ; if it is down-up, then .

Going back to the above example for , after applying Foata’s correspondence and inserting at the beginning we get . It is alternating up to , so we let . Now it is alternating up to , so we let . This is already an alternating permutation. Since it is down-up, we recover .

3. Generalized cycle-up-down permutations

We say that a cycle is generalized up-down if it admits a representation satisfying (we call this an up-down representation of the cycle). Note that up-down cycles are always generalized up-down cycles, but the converse is not true. For example, is a generalized up-down cycle, but not an up-down cycle. Define a permutation to be generalized-cycle-up-down (GCUD for short) if it is a product of generalized up-down cycles. Let be the set of GCUD permutations of . In this section we enumerate GCUD permutations.

We start by enumerating GCUD cyclic permutations. First observe that generalized up-down cycles of odd length admit a unique up-down representation. Indeed, given a cycle with , there is no other representation of the cycle because either or (unless ). Thus, the number of GCUD cyclic permutations of odd length is , with EGF . The EGF for GCUD permutations having only odd cycles is  [7, A006229].

To count GCUD cyclic permutations of even length we use the following result, which appears in [2, Lemma 4]. The sequence is [7, A024255].

Lemma 3.1.

The number of permutations with is .

Proof.

Given an up-down permutation with , let be the index such that (note that must be odd). Then the permutation is an up-down permutation beginning with . Conversely, for any up-down permutation with , its cyclic rotations

for are up-down permutations whose last entry is larger than the first. Since the number of up-down permutations in beginning with is , the result follows. ∎

An immediate consequence of Lemma 3.1 is that the number of permutations with is .

Lemma 3.2.

The number of GCUD cyclic permutations of is .

Proof.

Let be a GCUD cyclic permutation, and fix an up-down representation of . If , then this is the only possible up-down representation of , since any other representation would have the consecutive entries (note that it cannot start with because then the first and second entries would be ). By the above argument, there are GCUD cyclic permutations of this kind.

If , then has up-down representations. Picking the representation that starts with a , there are choices for the other entries. In fact, these GCUD cyclic permutations are precisely the CUD cyclic permutations. Altogether, the number of GCUD cyclic permutations of both kinds is . ∎

From Lemma 3.2 it is easy to compute the EGF for GCUD cyclic permutations of even length:

The beginning of the sequence, starting with the coefficient of , is . The term , for example, corresponds to , , . The EGF for GCUD permutations having only even cycles is

and the first few terms are . The term corresponds to , , , , , .

Finally, the EGF for all GCUD permutations is

The first few terms are . The term 21 corresponds to all permutations of except , , . None of the above three sequences appears currently in [7].

4. Statistics on up-down, CUD, and GCUD permutations

4.1. Refined generating functions

It is possible to refine the above enumerations of CUD and GCUD permutations by adding a variable that marks the number of cycles and a variable that marks the number of fixed points.

For CUD permutations we get the multivariate generating function

In particular, the EGF for CUD derangements is

and the first few terms are . The EGF for CUD permutations with respect to the number of cycles is

(3)

The coefficients of in the expansion of (3) are the polynomials in [5, Eq. (7.1)].

It is also easy to keep track of odd and even cycles separately:

(4)

The number of odd cycles and the number of excedances in a permutation are related by

since in each cycle of length and each cycle of length , of the entries are excedances. Consequently, the bivariate generating function for CUD permutations with respect to the number of excedances is

Finally, for GCUD permutations, the multivariate generating function keeping track of fixed points and cycles is


4.2. Statistics preserved by the bijections

In the following statements, , , and are the bijections defined in Section 2.2.

Lemma 4.1.

Let and let be the corresponding CUD permutation with only odd cycles. Then

Proof.

We proceed by induction on . The result is obviously true for . Recall the recursive definition of : if and , then

Thus, we have that

where the second equality holds by induction, and the last equality follows from the definition of the statistic . ∎

As a consequence of this lemma we obtain the EGF for up-down permutations with respect to the statistic :

(5)

where the second step follows from the analytic proof of Lemma 2.3. The coefficients of in the expansion of (5) are the polynomials in [5, Eq. (2.1)].

Lemma 4.2.

Let and let be the corresponding CUD permutation with only even cycles. Then

Proof.

It follows immediately from the definition of , since the opening parentheses for the cycles of are inserted at each left-to-right minimum of . ∎

Proposition 4.3.

Let and let . Then

Proof.

Recall the definition of : if and , then

where for all .

Since the range of (resp. ) are CUD permutations with only odd (resp. even) cycles, we have that

and

The third equation is obtained by adding the other two. ∎

We know from equation (4) that the bivariate EGF for CUD permutations where marks the number of even cycles is

It follows from the first part of Proposition 4.3 that the generating function for up-down permutations with respect to the number of LR minima is

The coefficients of in the expansion of the last expression are the polynomials in [5, Eq. (5.1)].

Under the bijection described at the end of Section 2.2 and adapted from [5], the number of cycles corresponds to a different statistic:

Proposition 4.4.

Let and let . Then

Proof.

The positions of the extreme elements of are not affected by the switches that take place in the construction of . Since a new cycle of is created for each extreme element of , the result follows. ∎

From the above proposition and equation (3), it follows that the EGF for up-down permutations with respect to the number of extreme elements is

It also follows from Propositions 4.3 and 4.4 that the statistics and are equidistributed on up-down permutations.

5. Statistics on all permutations

Some of the above statistics have an interesting distribution not only in but also in . Let denote the signless Stirling numbers of the first kind. It is well known that

Lemma 5.1.

For ,

Proof.

We define a bijection that transforms the min-max sequence of a permutation into the sequence of left-to-right minima of . Given , let be the min-max sequence of . Starting with , for switch the entries of . Finally, if is the resulting permutation, let .

For example, if (the min-max sequence is in boldface), we first switch the entries , getting , then switch the entries , getting . The switch of the at the end does not change the permutation, so we obtain , where now the elements in boldface are the LR minima. ∎

In fact, the following generalization of Lemma 5.1 holds as well. For any infinite sequence , where each , define the statistic on permutations as the length of the subsequence where , , and in general for each until for some . For example, if , then , and if , then . Then, for any sequence as above, we have

The bijection from Lemma 5.1 can be easily generalized to prove this fact if we start with or depending on whether equals or , respectively, and then for each we switch the entries only if .

Proposition 5.2.

For with ,

Proof.

We give a bijection between the sets

and

Given a pair in the first set, the digit being or will indicate whether the th LR minimum of will become an LR minimum or an LR maximum of , respectively. Let be the LR minima of . Define for convenience. Let . For , switch the prefix of if . Let be the permutation obtained at the end. It is clear from the construction that the positions of the extreme elements of are the same as the LR minima of .

For example, if (the LR minima of are in boldface), we start with . Since , we first switch the prefix , getting . Now , so no switches are done for . Since , we now switch the prefix , getting . The last switch happens for because , ending with .

The inverse map has a similar description. Given with extreme elements, we have where, for , is or depending on whether the th extreme element of is an LR minimum or an LR maximum, respectively. To obtain , let be the extreme elements of from left to right. For , switch the first entries of if , where again we define for convenience. Finally, we recover by deleting the first entry, which is necessarily . ∎

Let us now study the distribution of two more statistics on permutations. For , let be the number of up-down cycles in , and let be the number of cycles of that are not up-down. Using equation (1) and the fact that the EGF for all cycles is

we can derive the EGF for all permutations with respect to the number of up-down and non-up-down cycles:

(6)

It is now straightforward to obtain an expression for the expected number of up-down cycles in a random permutation. Plugging into (6) we get

the EGF for permutations where marks the number of up-down cycles. Its derivative with respect to , evaluated at , is

(7)

The expected number of up-down cycles in a random permutation of is now the coefficient of in (7), which equals

(8)

This formula can also be obtained directly using the well-known fact that the expected number of cycles of length in a random permutation of is , for all . For each one of these cycles, the probability that it is up-down is , since there are up-down cycles of length . Thus, the expected number of up-down cycles of length in a random permutation of is . Adding up for we obtain (8). For large , this number approaches

Another consequence of equation (6) is a formula for the number of permutations of having no up-down cycles. The EGF for these permutations, obtained by setting and in (6), is

It follows that

The limiting value of this expression, which is the probability that a random permutation of length approaching infinity has no up-down cycles, is .

6. Another interpretation of CUD permutations

A permutation of can be represented as a directed graph on vertices labeled , with an edge from to if and only if . Consider the following way of drawing the graph. Put the vertices on a horizontal line, ordered from left to right by increasing label. If (resp. ), then draw a red (resp. blue) arc between to above (resp. below) the horizontal line. Note that the orientation of the arcs is implicit, so we can draw undirected arcs (see Figure 1).

Figure 1. The CUD permutation .

Using this drawing, CUD permutations having only even cycles correspond precisely to those graphs with the property that each vertex is of one of two types: it is incident to a red and a blue edge that connect it to vertices to its left, or it is incident to a red and a blue edge that connect it to vertices to its right. Equivalently, the edges of each color form a perfect matching of the vertices, and the two matchings agree on what vertices are opening vertices (matched with a vertex to their right) or closing vertices (matched with a vertex to their left).

Since the number of CUD permutations of