Bounded affine permutations I. Pattern avoidance and enumeration

We introduce a new boundedness condition for affine permutations, motivated by the fruitful concept of periodic boundary conditions in statistical physics. We study pattern avoidance in bounded affine permutations. In particular, we show that if $\tau$ is one of the finite increasing oscillations, then every $\tau$-avoiding affine permutation satisfies the boundedness condition. We also explore the enumeration of pattern-avoiding affine permutations that can be decomposed into blocks, using analytic methods to relate their exact and asymptotic enumeration to that of the underlying ordinary permutations. Finally, we perform exact and asymptotic enumeration of the set of all bounded affine permutations of size $n$. A companion paper will focus on avoidance of monotone decreasing patterns in bounded affine permutations.


Introduction
Pattern-avoiding permutations have been studied actively in the combinatorics literature for the past four decades. (See Section 1.2 for definitions of terms we use.) Some sources on permutation patterns include: [5] for essential terminology, [9,Ch. 4] for a textbook introduction, and [30] for an in-depth survey of the literature. Pattern-avoiding permutations arise in a variety of mathematical contexts, particularly algebra and the analysis of algorithms. Research such as [14,6] have extended these investigations by considering affine permutations that avoid one or more (ordinary) permutations as patterns.  Condition (ii) can be viewed as a "centering" condition, since any bijection satisfying (i) can be made to satisfy (ii) by adding a constant to the function. The affine permutations of size n form an infinite Coxeter group under composition, with n generators; see Section 8.3 of Björner and Brenti [8] for a detailed look at affine permutations from this perspective.
For any given size n > 1, there are infinitely many affine permutations of size n; indeed, for some patterns such as τ = 321, there are infinitely many affine permutations of size n that avoid τ . One can view the following definition as a reasonable attempt to make these sets finite, but as we describe below and in Section 1.1, there are more compelling reasons for considering this definition.

Definition 2.
A bounded affine permutation of size n is an affine permutation σ of size n such that |σ(i) − i| < n for all i. Remark 3. Affine permutations with a different boundedness condition were introduced by Knutson, Lam, and Speyer [22], who used them to study the totally non-negative Grassmannian and positroids. The bounded affine permutations in our paper are not the same as those.  Fig. 2: Schematic plot of a permutation π ∈ Sn and its periodic extension ⊕π ∈ S // n . For an affine permutation of size n to be bounded, all points of the plot must lie on or between the two diagonal lines.
Remark 5. If d | n, then every element of S d is also an element of S n . If ω is an affine permutation of size n, then n need not be the smallest possible size of ω. The notation in Definition 4 uses a disjoint union so that each element of S comes equipped with a "size". As a result, an affine permutation in S n and the same permutation considered as an element of S kn (for k ≥ 2) are different objects in S, distinguished by their size. Our definition using disjoint union is natural for enumeration purposes: our count of affine permutations of size n with a given property does not require that n is the smallest possible size. Remark 6. Of course S // n is a proper subset of S n for each n, and so S // is a proper subset of S. In contrast, every element of S n is an element of S // kn for some k, so n≥1 S // n = n≥1 S n . Using disjoint union in Definition 4 means that not every affine permutation (equipped with a size) is a bounded affine permutation.
If we view a permutation π ∈ S n as a bijection on [n], then we can extend it periodically by Equation (i) of Definition 1 to a bijection ⊕π on Z; that is, ⊕π(i + kn) = π(i) + kn for i ∈ [n] and k ∈ Z.
Observe that ⊕π ∈ S // n (see Figure 2). We call ⊕π the infinite sum of π. The map π → ⊕π is an injection from S n into S // n . Most of this paper concerns the set of affine permutations or bounded affine permutations that avoid some fixed set of permutations R; these sets are denoted S(R) and S // (R) respectively, and we define pattern avoidance and related notions in Section 1.2.
We remark that the indecomposability condition in the conjecture is important; e.g. the only affine permutation that avoids 2143 is the identity permutation. We can prove that the conjecture holds for some specific choices of τ , and that it holds when τ is an increasing oscillation (see Section 5), but in general we cannot even prove that the proper growth rate gr( S // (τ )) exists. At least we can show that the upper growth rate gr( S // (τ )) is always finite by the following easy argument. Proof: Observe that for any σ ∈ S // n , the set of integers M (σ) := {σ(i) : i ∈ [n]} must all be distinct modulo n. The boundedness condition tells us that M (σ) ⊆ (−n, 2n), so there are at most 3 n possible sets that M (σ) could be as σ varies over S // n . Given σ ∈ S // n (τ ), let σ † be the ordinary permutation in S n (τ ) that is order-isomorphic to the string (σ(1), σ(2), . . . , σ(n)). Then M (σ) and σ † determine σ: indeed, the value of σ(i) must be the [σ † (i)] th smallest element of M (σ). It follows that | S // n (τ )| ≤ 3 n |S n (τ )|. Certain pattern-avoiding affine permutation classes exhibit a curious phenomenon: every affine permutation in the class is "really" just an ordinary finite permutation, in the sense that it is a diagonal shift of an infinite sum of an ordinary permutation (see Figure 3 for an example). An affine permutation of this form is called decomposable, and an affine permutation class in which every element has this form is called decomposable as well. In Section 5, we characterize the pattern-avoiding affine permutation classes that are decomposable: they are exactly the ones that do not have the infinite increasing oscillation O as an element (see Theorem 29).
Decomposable classes are particularly easy to enumerate in terms of the corresponding class of ordinary permutations. In fact, regardless of whether S(R) is decomposable, we can enumerate the affine permutations in S(R) that are decomposable (assuming R is a set of indecomposable permutations). These are just the diagonal shifts of infinite sums of (ordinary) permutations that avoid R; the set of affine permutations that arise in this way is denoted ⊕S(R). Sections 2, 3, and 4 explore the enumerative relationship between ⊕C and C for a sum closed class C of (ordinary) permutations. We find a simple formula relating the generating function F (x) for ⊕C and the generating function F (x) for C (Theorem 12): In the process of proving this, we also prove an inequality (Proposition 10) showing that |C n | ≤ |⊕C n | ≤ n |C n |. In particular, this means that the growth rates are the same.
. . . The form of Equation 1 is significant, appearing in many different guises throughout combinatorics and probability. There is a cluster of related ideas concerning the arrangement of combinatorial objects into a cycle structure. The enumeration of these cycles is linked to that of the constituent objects via Equation 1. Many instances of this relation involve the enumeration of various kinds of trees, or various kinds of paths that do not go below the axis (such as Dyck paths), as in the work of Banderier and Flajolet [3,Sec. 4.1]. The same ideas are at play in many combinatorial proofs of the Lagrange Inversion Formula, first by Raney [26] and later by Gessel [20]. The elementary fact underlying these phenomena is the Cycle Lemma of Dvoretsky and Motzkin [17], along with its generalization by Spitzer [27]; for details, see Cori [13] and Dershowitz and Zaks [16].
In Sections 3 and 4, we extract from Equation 1 an asymptotic enumeration of ⊕C n in terms of the C n , dependent on the status of C as either a subcritical or supercritical sequence schema (defined in Section 3). If the class is subcritical and satisfies certain analytic properties, then |⊕C n | is asymptotically a constant times n|C n | (Theorem 25). If the class is supercritical, then |⊕C n | is asymptotically a constant times |C n |; intriguingly, if L is the growth rate of C, then |⊕C n | is asymptotically L n , with no constant multiplier required (Theorem 26).
In a companion paper [24], we focus on the case of avoiding monotone decreasing patterns m(m − 1) · · · 321 in bounded affine permutations. More specifically, for every m ≥ 3 we show that there is an explicit constant K m such that We also obtain scaling limits as n → ∞ of random elements of S // n (m(m − 1) · · · 321), in the framework of convergence of random measures that has been used in the context of permutons [21]. We conclude the present paper by returning to the set of all bounded affine permutations of size n. We count them exactly in Section 6 and asymptotically in Section 7, resulting in Theorems 38 and 45 which respectively say where a(m, k) are the Eulerian numbers, and .

Motivation
The plots of large randomly generated pattern-avoiding permutations offer visual representations of the structure of these permutations. A particularly tantalizing case is that of 4231-avoidance, where a canoelike shape appears (see Figure 4). Visually, the middle part of the canoe looks roughly like two parallel lines that are joined by more tenuous perpendicular segments (as a canoe's gunwales are joined by thwarts). The parallelism of the "gunwales" is distorted near the canoe's ends, since the plot must fit into a square. Following a suggestion of Nathan Clisby that uses intuition borrowed from statistical physics, perhaps the ends of our 4231-avoiding permutation are a "boundary effect" that we can try to separate from the main part of the permutation, far from the ends. Is there a way to make rigorous sense of this idea, particularly at the level of asymptotics when the size tends to infinity? Specifically, Clisby asked if we could find a way to use periodic boundary conditions for large pattern-avoiding permutations.
A classical statistical physics model is the Ising model for magnetism. (See [29] for a nice introduction for mathematicians.) Think of an atom at each point of a regular lattice, which has a "spin" that is either "up" or "down." For each n ∈ N, let Λ n be the set of points of the lattice Z 2 in the square [1, n] 2 . For a given temperature, there is a particular probability distribution on the spins of all the atoms Λ n , in which spins at neighbouring sites interact; if the number of up spins differs significantly from the number down spins, then magnetization occurs. This kind of model typically needs to be studied numerically in order to understand the physically relevant case of large n. But in a large finite square, the behaviour near the center can be rather different from the behaviour near the boundary, where atoms have fewer neighbours with which to interact. One way to study the behaviour near the center is to impose periodic boundary conditions on the model, i.e. the sites on the right edge of the square are treated as neighbours of sites on the left edge, and similarly for the top and bottom edges. We can think of this as repeating a single configuration of ups and downs periodically over Z 2 : the spin at sites (i, j) equals the spin at (i + an, j + bn) for all integers a and b. With periodic boundary conditions, the behaviour at any site is probabilistically the same as at every other site, and presumably is similar to behaviour in the middle of a large square without periodic boundary conditions.
A different statistical physics model is the self-avoiding walk (SAW) [15,23], which models the configurations of long polymer molecules. A SAW on a lattice such as Z d is a finite path that visits no site more than once. A randomly chosen long SAW is believed to look like a fractal; however the behaviour near the ends is likely rather different from the behaviour near the middle. Clisby [12] defined an "endless self-avoiding walk" as a SAW that could be extended infinitely by repeated end-to-end concatenation to itself without self-intersections. Not all SAWs can be extended in this way, but for those that can, we get a model in which all parts of the periodically extended walk behave like all other parts -free from any endpoint effects, and more representative of the middle of a long (ordinary) SAW.
We take an analogous approach to pattern-avoiding permutations, creating "endless pattern-avoiding permutations." Any given permutation π of size n can be concatenated to itself repeatedly as in Figure  2, corresponding to the periodicity equation π(i + an) = π(i) + an for all integers i and a. To get something really new, we should allow other permutations of Z that share this periodicity property-that is, the affine permutations. However, even with the periodicity fixed, the spatial variation in the plots of all affine permutations of size n is too great. To restrict the class as much as possible, we impose the boundedness condition |σ(i) − i| < n, which can be viewed as the tightest translation-invariant bound that includes ⊕π for every π ∈ S n .

Definitions and notation
For sequences {a n } and {b n }, we write a n ∼ b n to mean lim n→∞ a n /b n = 1.
Affine permutations and bounded affine permutations were defined above. We let S n denote the set of permutations of size n, we let S n denote the set of affine permutations of size n, and we let S // n denote the set of bounded affine permutations of size n. Furthermore, we set S =  We begin by introducing concepts that are standard in permutation patterns research. The diagram or plot of a permutation π ∈ S n is the set of points {(i, π(i)) : i ∈ [n]}. Given permutations π and τ , we say that π contains τ as a pattern, or simply that π contains τ , if the diagram of τ can be obtained by deleting zero or more points from the diagram of π (and shrinking corresponding segments of the axes), i.e. if π has a subsequence whose entries have the same relative order as the entries of σ. We may also say that two sequences with the same relative order are order-isomorphic. We say π avoids τ if π does not contain τ . For instance, for π = 493125876, the subsequence 9356 is an occurrence of τ = 4123, but on the other hand π avoids 3142. See Figure 5.
A permutation class is a set C of permutations such that, if π ∈ C and τ is contained in π, then τ ∈ C. For a permutation class C, we write C n = C ∩ S n . If R is a set of permutations, then S(R) denotes the set of all permutations that avoid every element of R. Then S(R) is a permutation class, and in fact every permutation class is equal to S(R) for some set R.
Given σ ∈ S a and τ ∈ S b , the sum σ ⊕ τ is the permutation in S a+b obtained by juxtaposing the diagrams of σ and τ diagonally: that is, . (This explains the notation ⊕σ defined above, which is the doubly infinite sum of σ with itself.) A class C is sum closed if σ, τ ∈ C implies σ ⊕ τ ∈ C. A permutation is sum-indecomposable, or indecomposable, if it is not the sum of two permutations of non-zero size. The set of indecomposable permutations in a class C is denoted C ⊕ .
The upper growth rate of a permutation class C is defined as gr(C) := lim sup n→∞ |C n | 1/n , and the lower growth rate is defined as gr(C) := lim inf n→∞ |C n | 1/n . If the upper and lower growth rates of C are equal, i.e.
if lim n→∞ |C n | 1/n exists (or is ∞), then this number is called the proper growth rate of C, written gr(C). By the Marcus-Tardos Theorem (formerly the Stanley-Wilf Conjecture), every permutation class has a finite upper growth rate except the class of all permutations [25]. It is also known that every sum closed class has a proper growth rate (essentially due to Arratia [2]). In particular, for each τ ∈ S, since either τ is sum-indecomposable or its reverse is, the class S(τ ) has a proper growth rate, often called the Stanley-Wilf limit and denoted L(τ ). It is widely believed that every permutation class has a proper growth rate, but we will refer to the upper or lower growth rate unless we know for sure.
We now introduce the analogous concepts for affine permutations. The diagram or plot of an affine permutation ω ∈ S n is the set of points {(i, ω(i)) : i ∈ Z}. Given an affine permutation ω and an ordinary permutation τ , we say that ω contains τ as a pattern, or simply that ω contains τ , if the diagram of τ can be obtained by deleting some points from the diagram of ω, i.e. if ω has a subsequence whose entries have the same relative order as the entries of τ . We say π avoids τ if π does not contain τ .
The idea of an affine permutation containing or avoiding a given ordinary permutation was first used by Crites [14], but we can also define one affine permutation containing or avoiding another affine permutation -this will be important in Section 5, along with the notion of an affine permutation class (see below). Given ω, ω ∈ S, we say ω contains ω if the diagram of ω can be obtained by deleting entries from the diagram of ω (and stretching the axes appropriately). In case the infinite nature of the diagrams makes this intuitive definition inadequate, we provide a more careful definition: ω contains ω if there are two injective order-preserving functions φ, φ : Z → Z such that ω(φ(i)) = φ (ω (i)) for all i ∈ Z. We say ω avoids ω if ω does not contain ω .
If ω contains ω , then it is always possible to find a periodic occurrence of ω in ω, i.e. the functions φ, φ above can be chosen such that, for some m, φ(i + m) = φ(i) + m and φ (i + m) = φ (i) + m for all i. This fact is tedious to prove and unimportant to this paper, so we omit the proof. Given ω ∈ S and τ ∈ S, ω contains the ordinary permutation τ if and only if ω contains the affine permutation ⊕τ .
An affine permutation class is a set C of affine permutations such that, if ω ∈ C and ω is an affine permutation contained in ω, then ω ∈ C. For an affine permutation class C, we write C n = C ∩ S n . If R ⊆ S ∪ S, then S(R) denotes the set of all affine permutations that avoid every element of R. Then S(R) is an affine permutation class, and every affine permutation class C is equal to S(R) for some R (for instance we can take R = S C).
Similarly, a bounded affine permutation class is a set C of bounded affine permutations such that, if ω ∈ C and ω is a bounded affine permutation contained in ω, then ω ∈ C. The definitions and observations from the previous paragraph apply to bounded affine permutation classes as well. We can define gr(C), gr(C), and gr(C) for affine permutation classes and bounded affine permutation classes in the same way as for ordinary permutation classes, though we do not know whether gr( S // (τ )) exists for every ordinary permutation τ , as it does in the setting of ordinary permutation classes.
We encounter a problem with enumeration: many affine permutation classes have infinitely many elements of each size. On this, there is a result by Crites [14] that S(τ ) satisfies S n (τ ) < ∞ for all n if and only if τ avoids 321 -or, more generally, an affine permutation class C satisfies |C n | < ∞ for all n if and only if S(321) is not a subset of C. (Our Theorem 29 is a result with a similar flavor.) Of course, a bounded affine permutation class has only finitely many elements of each size.
We will occasionally write an affine permutation ω in two-line notation:

Decomposable affine permutation classes
For σ ∈ S n and r ∈ Z, define Σ r σ : Z → Z by: Observe that Σ r σ ∈ S n . We call Σ r σ a shift of σ (by r).
Given a permutation class C, let ⊕C denote the following set of affine permutations: That is, ⊕C is the set of all shifts of infinite sums of permutations in C. An affine permutation that is a shift of an infinite sum of a permutation shall be called a decomposable affine permutation. Let C be a sum closed permutation class. If a permutation π is contained as a pattern in some σ ∈ ⊕C, then π ∈ C. As a result, if the permutations in C all avoid a given π ∈ S n , then the affine permutations in ⊕C all avoid π as well. Furthermore, if an affine permutation τ is contained as a pattern in some σ ∈ ⊕C, then τ ∈ ⊕C. These facts make it natural to study ⊕C for sum closed C. In this section and in Sections 3 and 4, we explore the relationship between |C n | and |⊕C n | for sum closed C. We prove both exact and asymptotic results.
Let f n = |C n | and f n = |⊕C n | and g n = |C ⊕ n |. We use the convention that f 0 = 1 and f 0 = 0 and g 0 = 0. Define Thus F (x), F (x), and G(x) are the ordinary generating functions for, respectively, C, ⊕C, and C ⊕ .
Since C is sum closed, we have the relation because each permutation in C has a unique decomposition as a sequence of indecomposable permutations in C.
For each π ∈ S n , let a(π) denote the size of the first indecomposable block of π, and let χ(π) denote the number of indecomposable blocks of π. For example, a(4312576) = 4 because the first block of 4312576 is 4312, and χ(4312576) = 3 because 4312576 decomposes into blocks as 4312 ⊕ 1 ⊕ 21. Proof: The sum on the right side is equal to the number of pairs (π, r) with π ∈ C n and r ∈ {1, . . . , a(π)}. The set of such pairs is mapped into ⊕C n by (π, r) → Σ −r (⊕π), and this mapping is a bijection.
Proof: Using Lemma 9, k · #{π ∈ C n : a(π) = k}, and the number of π ∈ C n whose first block has size k is given by g k f n−k , because there are g k options for the first block and f n−k options for the rest of π. This proves (a). We can now use (a) to prove (b): Remark 11. Proposition 10(b) implies that gr(⊕C) = gr(C) and gr(⊕C) = gr(C). Furthermore, the fact that f n ≤ nf n stands in contrast to the situation of bounded affine permutations: the number of bounded affine permutations of size n avoiding 321 is asymptotically 1 2 n 2 |S n (321)|.
, follows immediately from Proposition 10(a). Next, by , is merely an identity of formal power series.
(this class is famously counted by the Catalan numbers). Applying Theorem 12 gives us n .
• Let C = S(312, 231), the class of layered permutations, so called because each indecomposable block is a decreasing sequence. We have , so f n = 2 n − 1. .
(this class is counted by the Schröder numbers). Applying Theorem 12, we obtain We conclude this section with a result on the number of all decomposable affine permutations of size n.
Proposition 14. Let C be the class of all permutations, so f n = |⊕S n | (the number of decomposable affine permutations of size n) and g n = |S ⊕ n | (the number of indecomposable (ordinary) permutations of size n). For all n ≥ 1, we have f n = g n+1 .
Proof: Recall that every permutation in S n+1 is obtained in a unique way by taking a permutation π ∈ S n and inserting the value n+1 in some position from 1 to n+1. The permutation in S n+1 is indecomposable if and only if the value n + 1 is inserted in the first block of π, i.e. it is inserted in a position from 1 to a(π). Thus each π ∈ S n gives rise to a(π) permutations in S ⊕ n+1 . Therefore, g n+1 = π∈Sn a(π), which equals f n by Lemma 9.

Supercritical and subcritical sequence schemas
A sequence schema is a pair of ordinary generating functions F (x) and G(x) where G(x) represents "connected" or "indecomposable" structures and F (x) represents sequences of the connected structures. This is expressed by the relation The constant term of G(x) is 0, and the constant term of F (x) is 1.
Let r denote the radius of convergence of G(x), and let τ = lim x→r − G(x).
• The sequence schema is critical if τ = 1.
The schema exhibits qualitatively different behavior depending on whether it is subcritical, critical, or supercritical. The reason it matters whether τ is greater than 1 is that it affects the nature and location of the singularities of F (x) (considered as a complex function). If τ > 1 (the supercritical case), then by the Intermediate Value Theorem there is ξ ∈ (0, r) such that G(ξ) = 1, which makes ξ a singularity of . Conversely, if τ > 1 (the subcritical case), then this phenomenon does not occur, so there is no singularity on the interior of the disk of convergence -the pertinent singularities of F (x) are just the ones inherited from G(x). The case of τ = 1 (the critical case) is less common, and its analysis is more complicated, so we will mostly ignore it -but see Example 17 below. If C is a sum closed permutation class, with F (x) and G(x) the respective generating functions of C and C ⊕ , then F (x) and G(x) are a sequence schema. Throughout this section and the next, we consider several examples of specific classes C.

Example 15.
• Let C be one of S(321), S(312), or S(231). We have and so C is subcritical.
• Let C = S(312, 231), the class of layered permutations. We have and so this class is supercritical.
• More subcritical classes: S(3142), S(3142, 2413) (i.e. the separable permutations), and any sum closed classes that are equinumerous to either of these. Another supercritical class: S(321, 312, 231) (this is the class of permutations whose blocks are 1 or 21, and it is counted by the Fibonacci numbers).
Example 16. If F (x) is rational (which is of course equivalent to G(x) being rational), then the schema is supercritical. This is because the singularities of a rational function must be poles, and the limit at a pole is ∞. This covers both of the supercritical permutation classes given in the previous example.
Example 17. We now construct a sum closed permutation class C that has a critical sequence schema. Our method is to start with the indecomposable permutations in S(321) (which is subcritical) and add more indecomposable permutations until the resulting schema is critical. For each n, define a set A n ⊆ S ⊕ n as follows: • If 1 ≤ n ≤ 7, then let A n = S ⊕ n .
Finally, define C to be the set of permutations of the form π 1 ⊕ · · · ⊕ π k for π 1 , . . . , π k ∈ n≥1 A n . This set C is a permutation class because the sets A n satisfy the following property: if ρ ∈ S ⊕ i and π ∈ A j and ρ is contained as a pattern in π, then ρ ∈ A i . Clearly this class satisfies C ⊕ n = A n . Therefore, We have τ = G(1/4) = 1 (this is the reason for our precise choice of |A 8 | = 6513), so C is critical. We are not aware of any critical classes that are less artificial.
Remark 18. Bóna [10] showed that the class S(σ) is critical or subcritical for almost all σ ∈ S ⊕ k (in the sense that the fraction of σ ∈ S ⊕ k for which the property holds goes to 1 as k → ∞). It is not hard to strengthen this result to show that the class S(σ) is in fact subcritical for almost all σ ∈ S ⊕ k . Let χ n be the number of blocks (or components) of a uniformly random size-n structure counted by F (x). We are interested in the asymptotic distribution of χ n as n → ∞. We now state the relevant results, from Flajolet and Sedgewick [19].
. Consider the subcritical case τ < 1. Assume that when extended to a function of a complex variable z, G satisfies the following technical conditions: G(z) has no singularity except z = r on its disc of convergence, and we can express G(z) = τ − (c + o(1))(1 − z/r) λ with c > 0 and 0 < λ < 1 for z in some set of the form D \ T where D = {z ∈ C : |z| < r + } ( > 0) and T is a closed triangle, symmetric about the real axis, with its left vertex at z = r. Then, as n → ∞, the mean of χ n is asymptotically 1 + τ 1 − τ , and the variance is asymptotically 2τ (1 − τ ) 2 . Moreover, the distribution of χ n converges to a negative binomial distribution (offset by 1): for positive integer k. In particular, setting k = 1 yields lim . In the supercritical case, let ρ be the (unique) positive root of G(x) = 1, which is also the radius of convergence of F (x). Assume that the coefficients of G(x) are aperiodic (in the sense that there do not exist integers r ≥ 0 and d ≥ 2 and a power series H(x) such that G(x) = x r H(x d )). Define Then: (a) The mean of χ n is asymptotically αn, and the variance is asymptotically βn. (Note that the variance is given incorrectly in [19,Prop. IX.7], but correctly in [19, Thm. V.1].) (b) The distribution of χ n is concentrated, in the sense that, for every ε > 0, the probability that |χ n − αn| < εn converges to 1. (This follows directly from (a).) (c) The distribution of the standardized variable χ n − αn √ βn converges to the standard normal distribution: The treatment of asymptotics for the critical case [19, Subsec. IX.11.2] is more subtle, and we do not cover it.

Example 21.
• Let C be one of S(321), S(312), or S(231). The function G is given in Example 15 above. Since C has τ = 1/2, Proposition 19 says that the expected number of blocks of a uniformly random permutation in C n is asymptotically 3, and the number of indecomposable permutations, g n , satisfies g n ∼ 1 4 f n . The probability that a uniformly random permutation in C n has k blocks is asymptotically 1 4 k 1 2 k−1 .
• Let C = S(3142, 2413) (separable permutations). We have τ = 1 − 1 √ 2 ≈ 0.293; the expected number of blocks is asymptotically 2 √ 2 − 1 ≈ 1.83; we have g n ∼ 1 2 f n (in this case it happens that g n = 1 2 f n ); and the probability of k blocks is asymptotically 1 , from which we compute ρ = 1/2 and α = 1/2 and β = 1/4, Thus, by Proposition 20, the expected value of the number of blocks is asymptotically 1 2 n, and the variance is asymptotically 1 4 n. After standardization (using this mean and variance), the number of blocks has a normal limiting distribution. We also conclude that f n ∼ 1 2 · 2 n . Of course, since these permutations are in bijection with compositions, the distribution of the number of blocks is a binomial distribution, and in fact f n = 1 2 · 2 n .
• Let C = S(321, 312, 231) (permutations whose blocks are all 1 or 21, counted by the Fibonacci numbers). In this case we simply have G(x) = x+x 2 , from which we compute ρ = (which we also know because f n is the (n + 1)st Fibonacci number).
We conclude this section with a refined probabilistic description of random elements in the subcritical case described by Proposition 19. Under the assumptions of Proposition 19, a random element of size n is very likely to have one very large block along with a few small blocks on each side of the large block.
Recall that a(π) is the size of the first block of the permutation π. We shall write a[n] to denote the random variable a(π) when π is chosen uniformly at random from the elements of size n. In the following result, the main interest is in the case that b n tends to infinity very slowly.

Proposition 22.
Assume that the hypotheses of Proposition 19 hold. Let {b n } be a sequence of natural numbers that tend to infinity such that b n = o(n). Let A n be the event that for a randomly chosen element of size n, one block has size at least n − b n and no other block has size greater than b n . Then (a) lim n→∞ P(a[n] = j) = g j r j for all j ∈ N. (c) Fix integers k ≥ j ≥ 1. Then, conditional on the event that χ n = k, the probability that the size of the j th block lies in the interval (b n , n − b n ) converges to 0 as n → ∞. Proof: Note that the assumptions imply that lim n→∞ f n /f n+1 = r (see equation (15) in the proof of Proposition IX.1 of [19], whose hypotheses are the same as those of Proposition 19). Part (a) follows from this and the identity P(a[n] = j) = g j f n−j /f n .
For part (b), define the sequences u n , v n and w n by Observe that u n +v n +w n = f n . By part (a) we have lim inf n→∞ u n /f n ≥ G(r) = τ . Recall from Proposition n→∞ v n f n = 0 , and lim n→∞ w n f n = 1 − τ .
The first and third limits prove part (b). The second limit proves that lim n→∞ P(b n < a[n] < n − b n ) = 0. Now fix k ∈ N. Since lim n→∞ P(χ n = k) is nonzero, it follows that For fixed χ n = k, the distribution of the size of the j th block is the same for every j. This observation and equation (5) imply part (c). Part (d) is a consequence of part (c), since some block has size at least n/k, and at most one block can have size greater than or equal to n − b n (recall b n = o(n), so b n < n k and n 2 < n − b n for large n). Finally, part (e) follows from part (d) and the fact that χ n converges in distribution (Proposition 19).

Asymptotic enumeration of decomposable affine permutation classes
We continue to assume that C is a sum closed permutation class, letting F (x), F (x), and G(x) denote the respective generating functions of C, ⊕C, and C ⊕ . Also recall that a(π) is the size of the first indecomposable block of π, and that χ(π) is the number of indecomposable blocks of π.
We begin by proving a lemma that we will need for both asymptotic results in this section: .
Proof: For permutations π, π ∈ S n , say that π ≈ π if there are permutations σ and τ such that π = σ ⊕τ and π = τ ⊕ σ. Let [π] denote the equivalence class of π under ≈; that is, [π] is the set of permutations obtained by cyclically permuting the summands in the sum decomposition of π. Since C is sum closed, it is closed under the equivalence relation ≈, in the sense that if π ∈ C then [π] ⊆ C. Let C n /≈ denote the set of equivalence classes of C n under ≈.
For π ∈ S n , define the period of π, denoted λ(π), to be the smallest j such that π is a sum of n/j copies of a permutation of size j: π = n/j i=1 ρ for some ρ ∈ S j . Observe that the quantities we have defined are related by and π ∈[π] a(π ) = λ(π).
(by (6)) The following elementary lemma will be used to prove Theorem 25. It can be viewed as a property of convergence in distribution for discrete distributions.
Theorem 26. If F (x) and G(x) are a supercritical sequence schema and G(x) satisfies the aperiodicity condition from Proposition 20, then with ρ and α defined as in Proposition 20: ρ is the (unique) positive root of G(x) = 1, which is also the radius of convergence of F (x), and α −1 = ρG (ρ). Proof: Remark 27. We can interpret these results in the context of Proposition 10(b), which says that • In the subcritical case, g n ∼ (1 − τ ) 2 f n , so (8) becomes We now see that f n falls at the geometric mean of these bounds, since by Theorem 25 we have • In the supercritical case, g n is exponentially smaller than f n , so (8) becomes We now see by Theorem 26 that f n falls near the lower bound, since asymptotically it is a constant multiple of f n and not of nf n .

Recognizing when an affine permutation class is decomposable
A class of affine permutations may have the property that every element of the class is decomposable. We will say that a class with this property is decomposable. Note that, for a set of (ordinary) permutations R, There is an easy way to tell whether a class is decomposable, involving an affine permutation called the infinite (increasing) oscillation. This is the permutation O = · · · −1 0 1 2 3 4 · · · · · · 1 −2 3 0 5 2 · · · ∈ S 2 , as shown in Figure 6. We take O to be of size 2. (c) Let R be a set of (ordinary) permutations; then ⊕S(R) = S(R ∪ {O}). In particular, S(R) is decomposable if and only if there is τ ∈ R that is contained in O.
(d) Let R be a set of indecomposable (ordinary) permutations; S(R) is decomposable if and only if R has an element that is a finite oscillation.
Note that with parts (c) and (d) we can easily find, for every set R of permutations, whether S(R) is decomposable.
Remark 30. This theorem is similar to the result by Crites [14] that S(τ ) satisfies | S n (τ )| < ∞ for all n if and only if τ avoids 321 -or, more generally, an affine permutation class C satisfies |C n | < ∞ for all n if and only if S(321) is not a subset of C. This makes possible the intriguing phenomenon of an affine permutation class C, such as S(3412), that is not decomposable but has |C n | < ∞ for each n. Theorem 29 also implies that an affine permutation class is a subset of S // if and only if it is decomposable: one direction was already clear without our theorem, and the other direction holds because an affine permutation class that is not decomposable must contain O, which is not bounded (considering O to have size 2, see Remarks 5 and 6).
Before proving Theorem 29, we will introduce the inversion graph of a permutation, and we will give a few required lemmas.
Let A and B be ordered sets, and let ω : A → B be a bijection. An inversion of ω is a pair {i, j} ⊆ A such that i < j and ω(i) > ω(j). The inversion graph of ω is the graph G(ω) with vertex set A whose edges are the inversions of ω. Abusing notation, we will sometimes say "ω has property P " to mean "G(ω) has property P ".
The following lemma is evident: An affine permutation is decomposable if and only if its inversion graph is not connected. More specifically, the blocks of an affine permutation's sum decomposition are the components of its inversion graph.
(This lemma's analog for ordinary permutations is well known, and the proof is the same.) For example, we see in Figure 6 that G(O) is connected -it is a doubly infinite path -so the lemma tells us that O is not decomposable.
Lemma 32. Let ω be a bijection from Z to Z. If G(ω) is a doubly infinite path, then ω is order-isomorphic to either O or ΣO. That is, the only permutations of Z that are doubly infinite paths are order-isomorphic to one of the two shifts of O.
Proof: Assume G(ω) is a doubly infinite path. Every vertex of G(ω) has exactly two neighbors. Let j ∈ Z, and let i, k be the neighbors of j in G(ω). Suppose i < j < k. Since {i, j} and {j, k} are inversions of ω, we have ω(i) > ω(j) > ω(k). But this means {i, k} is an inversion of ω, so i, j, k induce a triangle in G(ω), a contradiction. Therefore, the two neighbors of j must be "on the same side" of j: either i, k < j and ω(i), ω(k) > ω(j), or i, k > j and ω(i), ω(k) < ω(j). Let denote the vertices in the order in which they occur along the path. Without loss of generality, x 1 = 1. By the previous paragraph, either x 0 , x 2 > x 1 or x 0 , x 2 < x 1 . First, assume that x 0 , x 2 > x 1 . Further assume that x 0 < x 2 . We will prove that, under these assumptions (x 1 < x 0 < x 2 ), the relative order of the values of ω is uniquely determined. Since That is, the three vertices x 0 , x 1 , x 2 form a permutation that is order-isomorphic to 312. The two neighbors of x 2 are x 1 and x 3 . Since x 1 < x 2 , we must also have x 3 < x 2 (by the "same side" principle). Since {x 2 , x 3 } is an inversion, we have ω(x 3 ) > ω(x 2 ). Since {x 0 , x 3 } is not an inversion and ω(x 0 ) < ω(x 2 ) < ω(x 3 ), we have x 0 < x 3 . Since {x 1 , x 3 } is not an inversion and x 1 < x 0 < x 3 , we have ω(x 1 ) < ω(x 3 ). Therefore, That is, the four vertices x 0 , x 1 , x 2 , x 3 form a permutation that is order-isomorphic to 3142.
Continuing in this fashion, it follows that, for each n ≥ 4, the position x n is uniquely determined relative to x 0 , . . . , x n−1 , and the value ω(x n ) is uniquely determined relative to ω(x 0 ), . . . , ω(x n−1 ). The same process for x < 0 completes the proof that the entire permutation ω is uniquely determined up to order isomorphism, assuming the condition x 1 < x 0 < x 2 . But O also satisfies this condition (setting x 1 = 1) along with the condition that G(O) is a doubly infinite path, so it must be that ω is order-isomorphic to O.
The case where x 1 < x 2 < x 0 also results in ω being order-isomorphic to O, as exchanging the positions of x 0 and x 2 is tantamount to traversing the path in the opposite direction from x 1 = 1. In the case where x 0 , x 2 < x 1 , a similar argument shows that ω is order-isomorphic to ΣO.
Recall that, if X is a subset of the vertices of G, then the subgraph of G induced by X is the subgraph of G whose vertex set is X and whose edge set is the set of all edges of G that join vertices in X. Furthermore, a subgraph H of G is an induced subgraph of G if H is the subgraph of G induced by the vertices of H; that is, every edge of G that joins vertices of H is also an edge of H.
Lemma 33. If an affine permutation is connected (i.e. not decomposable), then it has an induced subgraph that is a doubly infinite path.
Proof: Let ω be an affine permutation of size n, and assume that G(ω) is connected. Thus there is a path from 0 to n in G(ω). Denote the vertices in the path by We can continue this path infinitely in both directions by setting x r+qm = x r + qn for q ∈ Z and r ∈ [0, m − 1], which results in the following doubly infinite walk: For the rest of the proof, our goal is to find a doubly infinite subsequence x α(i) i∈Z of this walk whose vertices induce a subgraph of G(ω) that is a path.
Set α(1) = 0, and for each i ≥ 2 define α(i) recursively as the greatest integer a such that x a is adjacent to x α(i−1) in G(ω) (there is a greatest such a because x α(i−1) is in finitely many inversions). Thus we have defined α(i) for each i ≥ 1. Our construction ensures that the sequence x α(1) → x α(2) → · · · is a (singly) infinite path in which no two non-consecutive vertices are adjacent in G(ω) -that is, if x α(i) and x α(i ) are adjacent in G(ω) then i = i ± 1. From this path, we will construct a doubly infinite path with the same property.
Let α(0) be the least a ∈ Z such that x a is adjacent to x α(j) for some j ≥ 1. Now, for each i ≤ −1, define α(i) recursively as the least integer a such that x a is adjacent to x α(i+1) in G(ω). Thus we have defined α(i) for each i ∈ Z. Finally, let I be the greatest i such that x α(i) is adjacent to x α(0) . This ensures that the sequence (skipping x α(1) through x α(I−1) ) is a doubly infinite path in which no two non-consecutive vertices are adjacent in G(ω). Indeed, consider vertices x α(i) and x α(i ) with i ≥ i + 2. We already saw that x α(i) and x α(i ) are not adjacent when i, i ≥ I, and the same reasoning shows it when i, i ≤ 0. If i ≤ −1 and i ≥ I, then our choice of α(0) implies that x α(i) and x α(i ) are not adjacent. If i = 0 and i ≥ I + 1, then our choice of I implies that x α(i) and x α(i ) are not adjacent.
Proof of Theorem 29: (a) If an affine permutation ω is decomposable, then every block of ω has finite size, which by Lemma 31 means that every component of G(ω) has finite size. But if O is contained in ω, then the entries of ω in an occurrence of O form an infinite connected subgraph of G(ω), a contradiction. Therefore, if ω is decomposable, then ω avoids O. Now assume ω is not decomposable. By Lemma 33, G(ω) has an induced subgraph H that is a doubly infinite path. We can delete all entries of ω: letting X ⊆ Z be the vertex set of H, the bijection ω : Z → Z restricts to a bijection ω : X → ω(X) whose inversion graph is H, a doubly infinite path. Thus, by Lemma 32 (which applies to ω because X and ω(X) are order-isomorphic to Z), ω is order-isomorphic to either O or ΣO. Either way, the entries of ω that form ω are an occurrence of O in ω.
(b) Let C be an affine permutation class. If C is decomposable, then O ∈ C because O is not decomposable. Conversely, if C is not decomposable, then there is ω ∈ C that is not decomposable; by (a), ω contains O, so since C is a class we have O ∈ C. This shows that C is decomposable if and only if O ∈ C. Let R be a set of indecomposable (ordinary) permutations. It follows from Theorem 29 that, if R has an element that is a finite oscillation, then ⊕S(R) = S // (R) = S(R). In this case, the problem of enumerating S // (R) or S(R) reduces to the easier problem of enumerating ⊕S(R), which is readily accomplished using Theorem 12 (exact) and Theorems 25 and 26 (asymptotic). This reasoning, along with the enumerations found in Example 13, recovers a result of Crites [14] and proves one of his conjectures: Corollary 34. | S n (231)| = | S n (312)| = 2n − 1 n (proved by [14]), and | S n (3142)| = | S n (2413)| = n−1 k=0 n − k n n − 1 + k k 2 k (conjectured by [14]).

Exact enumeration of all bounded affine permutations
We start with the following lemma, whose proof is straightforward.
Lemma 35. For every affine permutation σ of size n, there is a unique pair ( σ, a) such that: • σ ∈ S n ; • a = a 1 . . . a n is a word with a i ∈ Z for each i, such that n i=1 a i = 0; and Furthermore, σ is a bounded affine permutation of size n if and only if if σ(i) < i.
We will call ( σ, a) the standard decomposition of σ. The standard decomposition of bounded affine permutations will be useful in obtaining their exact enumeration. (Note that σ is different from σ † that we defined in the proof of Proposition 8.) An excedance of a permutation π ∈ S n is a position i ∈ [n] such that π(i) > i. Let a(n, k) denote the number of permutations in S n that have k excedances (with a(0, 0) = 1). These are the Eulerian numbers; see Section 1.4 of Stanley [28] for an introduction -though note that our convention is off by one from his, i.e. our a(n, k) is his A(n, k − 1).
Let d(n, k) denote the number of derangements (i.e. permutations with no fixed points) in S n that have k excedances (with d(0, 0) = 1); these can be called the derangement Eulerian numbers. Let d(n) denote the number of derangements in S n (with any number of excedances).
Let  Proof: (a) Let π be a permutation counted by d(n − m, k); that is, π is a derangement in S n−m with k excedances. Let I ⊆ [n] be a set of size m. Then π and I give rise to a permutation π in S n as follows: the elements of I are the fixed points of π , and π permutes the remaining elements of [n] according to π. This map (π, I) → π is bijective onto the set of permutations in S n with m fixed points and k excedances. (c) Under the assumptions of (a), we say that p n (k) (or f n (k)) obeys a Gaussian local limit law if for each x ∈ R and for k(n, x) as in part (b), we have and the convergence is uniform in x. Equivalently, with k = k(n, x) as above, where the error term o(1) goes to 0 uniformly in x.
Parts (b) and (c) of the above definition say that the numbers f n (k) (k ∈ Z) approximate a normal curve, in two particular senses.
The formula in Theorem 38(a) includes a sum of terms of the form n k d(n, k); we will see later that both n k and d(n, k) have Gaussian limits. The following result will allow us to deal with the sum.
Proof: Define the functions φ and b n (n ∈ N) from R to [0, ∞) by Then assumption (ii) says that lim n→∞ n = 0, where For each positive integer n, let Z n be a random variable whose probability distribution is Assumption (i) says the standardized random variable converges in distribution to the standard normal distribution as n → ∞. Define Then we can express θ n as an expected value of a function of Z n : where Let W ∞ be a standard normal random variable, so that W n converges in distribution to W ∞ . By our assumptions, we know that σ α (n)/σ β (n) → B 1 /B 2 and |µ α (n)−µ β (n)|/σ β (n) → 0 as n → ∞. Therefore, by the corollary to Theorem 4.4.6 in [11], we see that W n converges in distribution to W ∞ B 1 /B 2 . Now define ψ n := E φ W n .
Then, by Equations (9) and (10), we see that A fundamental property of convergence in distribution is that if a sequence of random variables {X m } converges in distribution to X, then E[g(X m )] converges to E[g(X)] for every bounded continuous function g (see for example Theorem 2.1 of Billingsley [7]; indeed, like many authors, Billingsley uses this property as the definition of convergence in distribution). Thus, writing c = B 1 /B 2 , we obtain .
Applying this to Equation (11), and using the convergence of n to 0, we obtain .

Derangement Eulerian numbers
Define a(n, k)u k z n n! and D(z, u) = n,k≥0 d(n, k)u k z n n! .
So A(z, u) (resp. D(z, u)) is the bivariate generating function counting permutations (resp. derangements) according to excedance number. It is a classical result that A permutation is a derangement with an added set of fixed points, and inserting additional fixed points into a permutation preserves the permutation's excedance number. Thus, since e z is the generating function counting sets of fixed points, A(z, u) = e z D(z, u), and so (This also serves as a much more compact proof of Lemma 37.) The following theorem was proved by Bender [4] and appears as Example IX.35 in in Flajolet and Sedgewick [19] (though note that these use the alternative convention for the Eulerian numbers, used also by Stanley [28]).
The proof in Flajolet and Sedgewick uses the analytic properties of A(z, u) treated as a function of complex variables. We will use that idea to obtain: Theorem 42. The derangement Eulerian numbers d(n, k) obey a Gaussian local limit law with mean µ d (n) = n/2 and variance σ d (n) 2 ∼ n/12.
We need the following theorem, which comes from Theorems IX.9 and IX.14 in Flajolet and Sedgewick [19].
Theorem 43. Let F (z, u) be a function that is bivariate analytic at (z, u) = (0, 0) and has non-negative coefficients of its power series. Let r > 0 such that F (z, 1) is meromorphic on the disk |z| ≤ r. Assume the following: (1) The only singularity of F (z, 1) on the disk |z| ≤ r is a simple pole at z = ρ for some ρ ∈ (0, r).
Proof: Conditions (1) through (4) correspond in a straightforward manner to the conditions in Theorem IX.9 from Flajolet and Sedgewick (with v defined in Equation (27)  To show that the numbers f (n, k) satisfy a local limit law of Gaussian type, we use Theorem IX.14 from Flajolet and Sedgewick. This theorem requires that p n (u) := [z n ]F (z, u) [z n ]F (z, 1) satisfies the conditions of the "Quasi-Powers Theorem" (Theorem IX.8 from Flajolet and Sedgewick) and an additional condition. The proof of Theorem IX.9 shows that p n (u) satisfies the conditions of the Quasi-Powers Theorem, and the additional condition is implied by our (5), as explained on page 697 of Flajolet and Sedgewick (the paragraph after the proof of Theorem IX.14).
For our purposes, we can safely ignore Theorem 43 after we use it to obtain the following: Lemma 44. Assume F (z, u) satisfies the conditions of Theorem 43, and let α(z, u) be a function that is analytic and non-zero on all of C × C. Assume also that α(z, u) F (z, u) has non-negative coefficients of its power series. Then α(z, u) F (z, u) satisfies the conditions of Theorem 43, and the mean and standard deviation of the coefficients of α(z, u) F (z, u) are asymptotically the same as for F (z, u).
Proof: Because α(z, u) is analytic and non-zero everywhere, α(z, u) F (z, u) has singularities at the same points and with the same orders as F (z, u). Thus, we can take ρ and r to be the same, we can replace B(z, u) with α(z, u) B(z, u), and we can take C(z, u) and ρ(u) to be the same. This shows that α(z, u) F (z, u) meets conditions (1) through (4) of Theorem 43. It also meets condition (5), since for each u the singularities of z → F (z, u) are identical to the singularities of z → α(z, u) F (z, u). Finally, m and v depend only on ρ, so m and v are the same for α(z, u) F (z, u), and so the resulting mean and standard deviation are asymptotically the same.
Proof of Theorem 42: The proof that µ d (n) = n/2 is elementary: Let π be a derangement of size n. For each i ∈ [n], i is an excedance of π if and only if π(i) is not an excedance of π −1 , precisely because π has no fixed points. Thus the map π → π −1 is an involution on the set of size-n derangements that maps each derangement with k excedances to a derangement with n − k excedances. Therefore, d(n, k) = d(n, n − k), and so the mean is n/2.
By Flajolet and Sedgewick [19], Examples IX.12 and IX.35, A(z, u) satisfies the conditions of Theorem 43. Since D(z, u) = e −z A(z, u) and e −z is analytic and non-zero everywhere, it follows from Lemma 44 that D(z, u) also satisfies the conditions of Theorem 43, and that the coefficients have the same asymptotic mean and standard deviation as those of A(z, u). We now apply Lemma 40 with α n (k) = n k and β n (k) = d(n, k). Then we have α * n = 2 n , µ α (n) = n/2, and σ α (n) = n/4, as well as β * n = d(n) ∼ n!/e, µ β (n) = n/2, and σ β (n) ∼ n/12. Assumption (i) of the lemma, the convergence in distribution of α n (k), is the classical De Moivre-Laplace Central Limit Theorem (e.g. p. 186 of [18]). Assumption (ii), the local limit law of β n (k), is Theorem 42 above. The conclusion of Lemma 40 is In particular, the sequence { √ m Q m } is bounded. Let we can apply the Dominated Convergence Theorem: Combining Equations (14), (15), and (17) completes the proof of Theorem 45.