Permutations Avoiding Certain Partially-ordered Patterns

A permutation $\pi$ contains a pattern $\sigma$ if and only if there is a subsequence in $\pi$ with its letters are in the same relative order as those in $\sigma$. Partially ordered patterns (POPs) provide a convenient way to denote patterns in which the relative order of some of the letters does not matter. This paper elucidates connections between the avoidance sets of a few POPs with other combinatorial objects, directly answering five open questions posed by Gao and Kitaev \cite{gao-kitaev-2019}. This was done by thoroughly analysing the avoidance sets and developing recursive algorithms to derive these sets and their corresponding combinatorial objects in parallel, which yielded a natural bijection. We also analysed an avoidance set whose simple permutations are enumerated by the Fibonacci numbers and derived an algorithm to obtain them recursively.


INTRODUCTION
This paper elucidates connections between the avoidance sets of a few Partially Ordered Patterns (POPs) with other combinatorial objects, directly answering five open questions posed by Gao and Kitaev [5]. Results in this article appeared in the first author's MSC dissertation.
We write [n] to denote the set of integers {1, 2, . . ., n} for n ≥ 1. A permutation is a bijection from [n] to itself for some n ≥ 1. We call such a permutation an n-permutation and typically denote it by π = π 1 π 2 . . . π n , where π i = π(i ). We say that its length or size (denoted |π|) is n. We write S n to denote the set of all n-permutations. We denote the size of any set S by #S or |S|.

Background.
A permutation π contains a pattern σ if and only if there is a subsequence in π (of the same length as σ) with its letters are in the same relative order as those in σ. For instance, the pattern 312 occurs in 42531 (as the subsequence 423), but not in 132465. The permutations that avoid a pattern or a set of patterns make up an avoidance set. Avoidance sets have been studied extensively and research in this area has important applications to numerous fields. Examples include sorting devices in theoretical computer science, Schubert varieties and Kazhdan-Lusztig polynomials, statistical mechanics, the tandem duplication-random loss model in computational biology and bijective combinatorics (see [6] and references therein).
A partially ordered pattern (abbreviated POP) is a partially ordered set (poset) that generalizes the notion of a pattern when we are not concerned with the relative order of some of its letters, and therefore may represent multiple patterns. Specifically, a POP is a poset with n elements labelled 1, 2, . . . , n, for some n ≥ 1. For any pattern that the POP represents, the partial order of the elements stipulates the relative order of letters in the pattern, where the labels of The goal of this paper is to find as many bijections between the pairs of objects in ways that are meaningful. With the help of an interactive software PermLab [1], we successfully construct nontrivial bijections for five of these pairs and find generalizations whenever possible. We list the objects in Table 1 and discuss the bijections in Sections 2, 3, 4 and 5. One bijection (discussed in Section 3.2) emerges directly from the original proof of the enumeration of groundstate juggling sequences by Chung and Graham [4]. For each of the remaining four bijections, we first realize that both sets in the corresponding pair could be partitioned into subsets of corresponding sizes. This allows us to construct similar recursive algorithms that can build the sets in parallel, which in turn yield (one or many) bijections that could be constructed directly and explicitly. Thus, we end up with a thorough understanding of the permutations that avoid each POP and of the corresponding combinatorial objects.
During our analysis, we discovered a set of patterns that are avoided by infinitely many simple permutations (to be defined in Section 1.3), which are, in fact, enumerated by a translation of the well-known Fibonacci sequence. We construct an algorithm that allows one to obtain this set of permutations recursively and prove this in Section 6. Section 1.3 defines all the relevant terms and concepts in detail and Section 7 summarises our research and lists possible avenues of further research. For an n-permutation π, we say that π i 1 π i 2 · · · π i k is a subsequence of π if and only if 1 ≤ i 1 < i 2 < · · · i k ≤ n and k ∈ [n]. For an n-permutation π and any 1 ≤ i , j ≤ n, the contiguous substring π i π i +1 · · · π j is called a factor of π. We denote π i π i +1 · · · π j simply as π [i ,j ] . Note that if i = j , then π [i ,j ] = π i has length 1 and we call it a point, term or an element. If i > j then π [i ,j ] has length 0, and we say that it is empty. Let α = π [i 1 ,j 1 ] and β = π [i 2 ,j 2 ] be non-empty factors of π. We write α < β if and only if π ℓ 1 < π ℓ 2 for all ℓ 1 ∈ [i 1 , j 1 ] and ℓ 2 ∈ [i 2 , j 2 ].

POP
Note that we may extend the definition of factors of permutations to factors of factors. If π is a factor of size n of a larger m-permutation ζ, say π = ζ [i ,j ] for some 1 ≤ i ≤ j ≤ m, then we use π k to denote ζ i +k−1 for any k ∈ [n]. Then π [k,ℓ] = ζ [i +k−1,i ℓ −1] for any 1 ≤ k ≤ ℓ ≤ n.
We say that a factor σ = π [i ,j ] (for some 1 ≤ i ≤ j ≤ n) of an n-permutation π contains the number x, denoted as x ∈ σ, if and only if π ℓ = x for some ℓ ∈ [i , j ]. Otherwise, we say that σ does not contain the number x and write x ∈ σ.
For an n-permutation π, we say that a factor π [i ,j ] is an interval if and only if it contains exactly the numbers in a contiguous interval of [n]. That is, if and only if {π ℓ | ℓ ∈ [i , j ]} = [s, t ] for some s, t ∈ [n]. For example, the factor 2413 is an interval while the factor 241 is not an interval. An interval of an n-permutation is trivial if and only if its length is 0, 1 or n.
1.5. Separable permutations. Definition 1.3. Suppose π and σ are permutations of length n and m respectively. We define the direct sum (or simply, sum), using the operator ⊕, and the skew sum, using the operator ⊖, of π and σ as the permutations of length m + n as follows: π ⊕ σ = 12[π, σ] and π ⊖ σ = 21[π, σ]. Definition 1.4. If a permutation is an inflation of 12 or 21, we call it sum decomposable and skew sum decomposable respectively. If a permutation is not sum decomposable we say it is sum indecomposable, and if it is not skew sum decomposable we say it is skew-sum indecomposable.   [2]). If π is an inflation of 12, say π = 12[α, β], then α and β are unique if α is sum indecomposable. The same holds with 12 replaced by 21 and "sum" replaced by "skew sum". Proof. It is clear that simple permutations are not separable, so by Theorem 1.1, they must contain at least one of 2413 or 3412, both of which contain the four patterns of length three.
1.6. Pattern/POP containment and avoidance. Definition 1.6. A pattern is a permutation of length at least 2. We say that a permutation π contains a pattern p if and only if there exists some subsequence π i 1 π i 2 · · · π i k of π where red(π i 1 π i 2 · · · π i k ) = p. That is, p j < p ℓ if and only if π i j < π i ℓ for all j , ℓ ∈ [k]. Otherwise, we say that π avoids p. If P is a set of patterns, we say that π contains P if π contains any pattern in P . Otherwise we say that π avoids P .
A partially ordered pattern generalizes the notion of a pattern whereby the order between certain elements do not have to be considered. We are left with a partial order on the elements, which we can represent using a labelled partially ordered set. Recall that a partial order is a binary relation ≤ over a set P that is reflexive, antisymmetric and transitive. That is, for all a, b, c ∈ P , the following hold: 1. a ≤ a (reflexivity); 2. If a ≤ b and b ≤ a then a = b (antisymmetry); 3. If a ≤ b and b ≤ c then a < c (transitivity).
A set P with a partial order ≤ is called a partially ordered set (poset), denoted (P, ≤). We may write b ≥ a as an equivalent statement to a ≤ b for any a, b ∈ P . We write a < b to mean that a ≤ b and that a and b are distinct. Definition 1.7. A partially ordered pattern (POP) p of size k is a poset with k elements labelled 1, 2, . . . , k. A POP can be expressed in one-line notation by indicating its size and the minimal set of relations that defines the respective poset. Definition 1.8. An n-permutation π contains such a POP p if and only if π has a subsequence π i 1 π i 2 · · · π i k such that π i j < π i m if j < m in the poset P . Otherwise, we say that π avoids p. Example 1.5. The pattern 3241 represented as a POP is the 4-element chain with its elements labelled 1, 2, 3 and 4, where 4 < 2 < 1 < 3. Note that the permutation 4213 is the inverse of 3241.
Recall that a poset can be represented visually as a Hasse diagram. A Hasse diagram of a finite poset is a visual representation of the elements and relations in the poset, where only the covering relations are shown. Recall that a covering relation in a poset (P, ≤) is a binary relation i ≺ j for some i and j in P where i < j and there does not exist any k ∈ P such that both i < k and k < j hold. A Hasse diagram uniquely determines the partial order.
A Hasse diagram of a poset with n elements can also be understood as a simple directed graph (V, E ) with an implicit upward orientation where V is a set of n vertices and E is a set of ordered pairs of distinct elements in V , i.e. E ⊆ {(i , j ) | i , j ∈ V, i = j }, that satisfies the following three conditions: A POP is a labelled poset, and can therefore be represented visually as a labelled Hasse diagram. That is, as a graph (V, E ) defined as above where the vertices in V are labelled 1, 2, . . . , k. Example 1.6. The POP of size 4 where 1 > 3 is illustrated in Figure 1  Definition 1.9. Let P be a pattern, a set of patterns, or a POP. We denote Av (P ) as the set of permutations that avoid P (called the avoidance set of P ), and Av n (P ) as the set of n-permutations that avoid P . That is, Av n (P ) := Av (P ) ∩ S n . Definition 1.10. Let P 1 and P 2 each be a set of patterns of a POP. We say that P 1 and P 2 are Wilf-equivalent if and only if |Av n (P 1 )| = |Av n (P 2 )| for all n ≥ 1.
It is not hard to check that containment is a partial order on any set of permutations. In the literature, sets of permutations which are closed downward under this order are called permutation classes, or sometimes just classes. That is, C is a permutation class if and only if for any π ∈ C and any σ contained in π, we have σ ∈ C . If a permutation π avoids a pattern p, then every reduced subsequence of π avoids p. In other words, every pattern contained in π avoids p. Therefore Av (p) and Av n (p) are permutation classes. The same is true if p is a set of patterns or a POP.
Observe that if k P is the length of the shortest pattern in a set of patterns P , then all permutations of length less than k P avoid P . This means that |Av n (P )| = n! for all n < k P . Therefore it suffices to enumerate Av n (P ) for n ≥ k P for every POP or set of patterns P discussed in subsequent sections. 1.7. Matrix representations of permutations. Definition 1.11. For an n-permutation π, its permutation matrix is a binary n × n matrix, de- We may refer to the non-zero entries in a permutation matrix or pattern matrix as points. Sometimes, we may omit displaying the 0s and the traditional brackets if no confusion would arise. Example 1.8. The weight of the permutation matrix of π is equal to the length of π. The weight of any column or row of a permutation matrix is 1.
1.8. Lattice matrices. Definition 1.13. We call a matrix (or submatrix) void if it has no rows or no columns. A matrix (or submatrix) is trivial if its weight is 0, and nontrivial otherwise. That is, a trivial matrix is either void or is a zero matrix. All void matrices are trivial.
If we know that a permutation contains a certain pattern, it might be helpful to represent its permutation as a block matrix in order to better understand the permutation. We will show an example before stating formal definitions: Suppose we know that the n-permutation π contains the pattern p := 312. That is, there exist i , j and k where 1 ≤ i < j < k ≤ n and π i π j π k reduces to 312. The columns i , j and k partition the rest of the permutation matrix M(π) into 4 (possibly trivial) blocks of columns, and the rows π i , π j and π k partition the rest of the permutation matrix M(π) into 4 (possibly trivial) blocks of rows. This gives rise to another representation of M(π) as a 7 × 7 block matrix. In this representation we can find the 3 × 3 matrix M(p) interwoven with a 4 × 4 block matrix (α i j ) i ,j ∈ [4] as depicted in Figure 2, with the following alterations: The lattice matrix L 312 (π) • the ones in columns i , j and k are replaced by π i , π j and π k respectively, in other words, we replace the submatrix corresponding M(p) with the pattern matrix M ′ (p) • the zeroes in columns i , j and k that are also in row π i , π j or π k are replaced by plus signs, • the trivial blocks in columns i , j and k are replaced by vertical bars, • the trivial blocks in rows π i , π j and π k are replaced by horizontal bars, and finally, • the conventional matrix brackets are omitted.
Note that we may also alter the ones, zeroes and α i j blocks (where i , j ∈ [n+1]) differently based on which properties of the permutation we are trying to highlight. This figure is reminiscent of the lattice structure of gridded window panes, so we call it the p-lattice matrix of π, or simply a lattice matrix, and denote it by L p (π).
In general, we may use the following definition: Definition 1.14. Consider a permutation π on n letters and choose m indices 1 ≤ i 1 < i 2 < · · · < i m ≤ n. Write I = (i 1 , i 2 , . . . , i m ) and let p := red(π i 1 π i 2 · · · π i m ). We proceed to define the lattice matrix L p (π). Put i 0 = 0 and i m+1 = n +1. We use the values i 1 , i 2 , . . . , i m to partition the column indices into subintervals and the values π i 1 , π i 2 , . . . , π i m to partition the row indices into subintervals.
A block in L p (π) is a (possibly trivial) continguous block submatrix of the permutation matrix M(π) with its column and row indices each given by a relevant subinterval defined above. To make this more explicit, we note that π(i p −1 (1) ) < π(i p −1 (2) ) < · · · < π(i p −1 (m) ). Write j k := π(i p −1 (k) ). Put j 0 = 0 and j m+1 = n + 1. Then is a block for all s and t in [m +1]. We label the block M S×T as α s,t . Note that α s,t is void if either i s = i s−1 or j t = j t−1 + 1. We may write α s,t as α st if no confusion would arise. Note that M i k ,π(i k ) , M i k ×T and M S×j k may also be referred to as blocks for any k ∈ [m] and subintervals S and T defined as above.
When depicting L p (π), we replace the zero entries in column i k by a vertical line and the zero entries in row j k by a horizontal line for every k ∈ [m + 1]. We also omit the traditional parentheses around the entire matrix L p (π). Proposition 1.3. It is easy to deduce the following properties of the lattice matrix L p (π) defined above: Each horizontal (respectively, vertical) bar is either void, or is a single row (respectively, column) of zeroes. 3. All block matrices in the same row (respectively, column) of the lattice matrix have the same number of rows (respectively, columns). 4. Any square block submatrix of the lattice matrix has the same total number of rows as columns.
We would like to describe the relationships between points in different blocks in a lattice matrix precisely. The following definitions provide an intuitive way to do so. Definition 1.15. Let p and π be permutations of length m and n respectively where m ≤ n and π contains p. Let L p (π) be the p-lattice matrix of π with its blocks denoted by (a) For the points in L p (π) that correspond to the pattern p, we define a point being adjacent to a block in a natural way. For example, in Figure 2, the point labelled 1 is adjacent to the blocks α 32 , α 33 , α 42 and α 43 while the point labelled 2 is adjacent to the blocks α 23 , α 24 , α 33 and α 34 . We note that every point is adjacent to exactly four blocks. column of α i j is nontrivial. (f) We say that α i j is topmost (respectively, bottommost) if and only if the first (respectively, last) row of α i j is nontrivial.

PERMUTATIONS AVOIDING λ
Gao and Kitaev [5] observed that there the POP λ of size 4 where 1 > 2 and 1 > 4 (illustrated in Figure 3) and the set of patterns are Wilf-equivalent. This was done by proving the recursive equation which corresponds to the OEIS sequence A111281. In this section, we will give a new proof that λ and P are Wilf-equivalent as well as provide a new recursive formula for the OEIS sequence. We also analyse each avoidance set in detail and construct an explicit bijection between them.
First, we show that both avoidance sets have only finitely many simple permutations. Using this fact, we analyse the possible inflations of these simple permutations in each avoidance set and derive a method to construct each set recursively. A recursively-defined bijection on the In this section, we use the symbol I k to denote the identity permutation 1 2 3 · · · k for all k ≥ 1. Proof. It is clear that 2413 and all simple permutations of length 3 or less avoid λ. Consider the permutation matrix of a simple permutation π with length at least 4. It must contain the pattern 312 by Corollary 1.1.1, say 1 ≤ i < j < k ≤ n where red(π i π j π k ) = 312. We can then consider the lattice matrix L 312 (π) which is illustrated in Figure 2. It suffices to prove that α 31 has weight 1, while the other blocks are trivial.
Upon inspection, it is clear that if any of α 11 , α 13 or α i j , where i , j ∈ [2, 4], were not trivial, then the permutation would contain λ. For the reader's convenience, we reproduce the figure with those α i j 's omitted in Figure 4. We now proceed to show that the remaining blocks, except for α 31 , are trivial: The lattice matrix L 312 (π), with some blocks omitted. The omitted blocks must be trivial for π to avoid λ.
(a) Suppose α 41 is not trivial. It cannot be leftmost, since otherwise the permutation would be sum decomposable. However, if α 21 or α 31 contains a point east of a point in α 41 , then π would contain λ (consider the 1 in α 21 or α 31 , together with the 1 in α 41 and the points labelled 3 and 1). So α 41 is trivial. (b) Suppose α 21 is not trivial. Since it is adjacent to the block labelled 3, it cannot be rightmost in its column by simpleness. However, if α 31 contains a point east of a point of α 21 , then π would contain λ (consider the 1s in α 21 α 31 , together with the points labelled 3 and 1). So α 21 is trivial.
(c) Suppose α 14 is not trivial. If α 14 is superior to α 12 , then the permutation would be sum decomposable. So α 12 must contain a nontrivial row superior to a nontrivial row of α 12 . However, π would contain then λ (consider the 1s in α 12 α 14 , together with the points labelled 1 and 2). So α 14 is trivial. (d) Observe that α 12 is adjacent to the block labelled 3. Since the blocks in the same row or column as α 12 are trivial, α 12 must also be trivial.
Finally, since all the blocks in the same row or column as α 31 are trivial, α 31 can have weight at most 1 by simpleness. We have thus eliminated the possibility of there being a simple permutation of length at least 4 avoiding λ that is not 2413, so our list is exhaustive.
Proof. Let π = 21[α, β] be an n-permutation avoiding λ. It is not hard to see that if β ≥ 3, then π contains λ. So β = 1 or 2: 1) Suppose β = 2. If α contains a descent, then the elements that make up the descent, together with β make up λ. So α must be an increasing sequence, and indeed both 21[I n−1 , 12] and 21[I n−2 , 21] avoid λ. 2) Suppose β = 1. Then π avoids λ if and only if α avoids the POP of size 3 where 1 > 2. This is exactly when the first n − 2 elements of α are increasing. Since α is assumed to be skew sum indecomposable (for uniqueness), the last element of α cannot be 1. Therefore there are n − 2 choices for the last element of α, and only one way to order the initial elements. Indeed, for all 2 ≤ ℓ ≤ n − 1, the following permutation avoids λ: Therefore, there are (n − 2) + 2 = n skew sum decomposable n-permutations avoiding λ in total. Proof. Let π := 2413[α, β, γ, δ] be an n-permutation avoiding λ. We will show that γ = |δ| = 1, while α and β are increasing sequences but can be of variable length.
Suppose γ ≥ 2 or |δ| ≥ 2. Then π contains λ (consider one point from β) and three points total from γ and δ. Now suppose that α or β contains a descent. Then the two elements that make up the descent, together with one element from γ and one element from δ make λ. Therefore, γ = |δ| = 1 and α and β are increasing.
Finally, it is not hard to see that for all ℓ ∈ [n − 3], the permutation 2413[I ℓ , I n−ℓ−2 , 1, 1] avoids λ. So there are n − 3 inflations of 2413 avoiding λ. Proof. It is clear that 3142, 41352 and all simple permutations of length 3 or less avoid P . Consider a simple permutation π of length at least 4 avoiding P . Since P contains 2413, π avoids 2413 and must contain 3142, since otherwise it would be a separable permutation and not simple by Theorem 1.1.
We present its lattice matrix L 3142 (π) in Figure 5, with some alterations explained in the caption. It suffices to show that α 33 can have weight at most 1, while the remaining α i j are trivial: . The lattice matrix L 3142 (π) with some α i j replaced by a pattern in P that π would contain if that α i j were nontrivial, for i , j ∈ [5]. For example, if α 12 were nontrivial, then π would contain 3412.
We proceed to show that α i j must trivial for all i , j ∈ [5], except for i = j = 3. (a) Suppose α 52 were nontrivial. Since it is adjacent to the point 1, the block α 51 cannot be trivial and must be superior to α 52 by simpleness. However, this would mean the inclusion of the pattern 2413 (consider any submatrix containing α 51 3 α 52 1). (b) Since α 5j are trivial for all j ∈ [2,5], the block α 51 must be trivial as well, for otherwise π would be sum decomposable. (c) Suppose α 14 were nontrivial. Since it is adjacent to the point 4, the block α 15 cannot be trivial and must be inferior to α 14 by simpleness. However, this would mean the inclusion of the pattern 2413 (consider any submatrix containing 4 α 14 2 α 15 ). (d) Suppose α 23 were nontrivial. Since it is adjacent to the point 4, it cannot be rightmost by simpleness. However, this would mean the inclusion of the pattern 3412 (consider any submatrix containing 3 α 23 α 33 2 or 3 α 23 α 43 2).
(e) Suppose α 43 were nontrivial. Since it is adjacent to the point 1, it cannot be leftmost by simpleness. Then α 33 must be nontrivial and lie to the left of α 43 . However, this would mean the inclusion of the pattern 4312 (consider any submatrix containing 3 α 33 α 43 2).
Since all the blocks in the same row or column as α 33 are trivial, it can have weight at most 1 by simpleness. Moreover, it cannot be trivial since all the other α i j s are trivial and 312 is not simple. We have thus eliminated the possibility of there being a simple permutation of length at least 5 avoiding P that is not 41352, so our list is exhaustive.
Proof. From Lemma 2.5, 2.6, 2.7 and 2.8, we can easily see that there are 2n−3 sum indecomposable n-permutations in Av (P ). Moreover, a sum decomposable n-permutation 12[α, β] avoids P if and only if α and β both avoid P , so there are , and α is a sum indecomposable.

Then f is a bijection. In fact, f restricted to Av n (λ) is a bijection onto Av n (P ).
Proof. From the lemmas in the previous two sections, it is clear that g maps the sum indecomposable permutations in Av n (λ) to the sum indecomposable permutations in Av n (P ). Moreover f maps permutations in Av n (λ) into Av n (P ) by the proofs of Theorem 2.4 and Theorem 2.9, and it is clear that f is an injection. Since |Av n (λ)| = |Av n (λ)|, f restricted to Av n (λ) is a bijection onto Av n (P ) for all n ≥ 1. Thus f is a bijection from Av (λ) to Av (P ).

Q k AND TWO CONNECTIONS TO CLASSICAL COMBINATORIAL OBJECTS
The Hasse diagram of Q k is the following: . . . Gao and Kitaev [5] enumerated the avoidance set of Q k in Theorem 2 of their paper and observed that the sequences |Av n (Q 4 )| n≥1 and |Av n (Q 5 )| n≥1 are listed in the OEIS database as A025192 and A084509 respectively. These sequences enumerate the 2-ary shrub forests of n heaps avoiding the patterns 231, 312 and 321, and the ground state 3-ball juggling sequence of period n respectively. These objects will be defined in the following sections.
We show that there are intimate connections between the relevant sets by constructing explicit bijections. In fact, we construct an explicit bijection from Av n (Q k ) to ground state (k − 2)ball juggling sequence of period n which yields a bijection between the original two sets as a special case. The study that led us to this bijection also produced a new way of enumerating Q k using the concept of matrix permanents.
3.1. Enumeration of Av n (Q k ). We will enumerate Av n (Q k ) for k, n ≥ 1 using the concept of matrix permanents. Recall that the permanent is defined on square matrices and is similar to the definition of the determinant of a matrix, where the signs of the summands are all positive instead of alternating. We restate Gao and Kitaev's proof first as a reference for comparison. (2019)

Theorem 3.1 (Gao and Kitaev
For n ≥ k, π is an n-permutation avoiding Q k if and only if n ∈ π [n−k+2,n] and the (n −1)permutation obtained from removing n from the permutation π avoids Q k . So |Av n (Q k )| = (k − 1) × |Av n (Q k−1 )|. The desired formula can then be easily obtained from this recursion via induction on k. The following proposition states a well-known property of permanents. Its proof is similar to the proof for an analogous statement for determinants and is therefore omitted. Observe that the permanent of the n × n matrix of ones is equal to n! for all positive n, and recall that there are n! permutations in S n . One may ask whether there is a matrix associated with subsets of S n , such that the problem of enumerating those subsets can be converted into computing a certain value of a matrix. This is in fact possible for certain subsets of S n , as we shall see.

Definition 3.3.
Let n ≥ 1. Suppose K is a set of restrictions that indicate whether i → j in an n-permutation is allowed for all i , j ∈ [n]. Then define A K n = (a i j ) as the binary n × n matrix where, for all i , j ∈ [n], the i j th element of A K n is denoted a i j and is equal to 1 if and only if having i → j is allowed by K . We say that the matrix A K n represents K .

Lemma 3.2 (Percus (1971) [7]). Given a set of restrictions K n and matrix A K n defined as above, the number of n-permutations that satisfy K is the permanent of A K n .
Proof. Let f be the function from [n] to the set of subsets of [n] such that i → π i is allowed in a permutation if and only if π i ∈ f (i ). Let a i j denote the i j th entry of A K n . Then the number of n-permutations induced by f is We can now apply the theorem to the enumeration of the avoidance set of Q k for all k ≥ 1: Observe that for all n, an n-permutation π avoids Q k if and only if t ∈ π [t−k+2,n] for all t ∈ [k, n]. Therefore we have the following theorem: Since the permanent of A n is exactly (k−1)!(k−1) n−k+1 for all n ≥ k, the theorem above proves the enumeration of the avoidance set of R k for all n.
3.2. Juggling sequences. Suppose we have b balls and a binary vector σ = (σ 1 , σ 2 , . . . , σ n ) ∈ {0, 1} n for some integer n ≥ b. Given a reference time, we can throw one ball at the i th second such that it lands in our hand again after exactly t i seconds (that is, i + t i seconds after the reference time) where t i is a positive integer for all i ∈ [n], if σ i = 1. Otherwise, we put t i := 0. We say that the n-tuple of non-negative integers T = (t 1 , t 2 , . . . , t n ) is a juggling sequence of period n and state σ if and only if no two balls land in our hand at the same time, and our sequence of throws is infinitely repeatable. That is, the following two conditions hold: We say that σ is a ground state if and only if σ i = 1 if i ∈ [b] and σ i = 0 otherwise. We refer the reader to [3] and [4] for diagrams and further analysis on juggling sequences. Gao and Kitaev [5] observed that the avoidance set Av n (Q 5 ) and the number of ground-state 3-ball juggling sequences of period n are enumerated by the same OEIS sequence A084509. We will prove a natural bijection between a generalization of these two combinatorial objects, which is inspired by the proof of Theorem 1 of [4], restated below: Proof. Observe that T = (t 1 , t 2 , . . . , t n ) is a conforming juggling sequence if and only if every ball that is thrown lands exactly at some time t seconds after the reference time where t ∈ [n + 1, n + b], and no two balls land on the same second. That is, The desired bijection can then be easily obtained by realizing that the permutations mentioned in the proof of Theorem 3.4 are exactly the permutation inverses of those avoiding Q b+2 , as is carefully fleshed out in the following theorem: Theorem 3.5. Let θ be a function from the set of ground state juggling sequences of period n using b balls to Av n (Q b+2 ) given by θ ((t 1 , t 2 , . . . , t n )) = π where π t i +i −b = i for all i ∈ [n]. Then θ is a bijection.
Proof. Since t i is nonnegative for all i ∈ [n], we have Therefore, for a given n, b, the matrix M defined in Chung and Graham's paper is exactly the transpose of the matrix that represents the avoidance of Q b+2 as defined in Theorem 3.3. So the codomain of θ is indeed Av n (Q b+2 ). By Theorem 3.1, the number of ground state b-ball juggling State, period, # balls, # juggling sequences Juggling sequences T = (t 1 , . . . , t n ) (t 1 + 1, . . . , t n + n) = (σ 1 , . . . , σ n ) Note that we are using the permutation matrix notation system where rows are numbered from bottom to top in increasing order.
sequences of period n is equal to the size of Av n (Q b+2 ) since Therefore, since θ is injective, it must also be bijective.
We refer the reader to Table 3.2 for sample values for small n and b.
Remark 1. P 3n is also known as the set of 2-ary shrub forests of n heaps avoiding the patterns 231, 312 and 321.
Gao and Kitaev [5] observed that Av n (Q 4 ) and the P 3n are enumerated by the same OEIS sequence A025192. We will show a natural bijection between these two sets for all n ≥ 1.
if π n = n, Then θ is a bijection.
Theorem 3.8. There is a natural bijection between Av n (Q 4,j ) and P 3n−3 for all 1 ≤ j ≤ 4.
Proof. Due to the symmetry of Q k,j and the fact that Q k = Q k,1 , it is not hard to see that π ∈ Av n (Q k ) if and only if π j π [2,j −1] π 1 π [ j +1,n] ∈ Av n (Q k,j ). We can then obtain a bijection from between Av n (Q 4,j ) and P 3n−3 for all 1 ≤ j ≤ 4 by composing θ from Theorem 3.7 with the bijection π → π j π [2,j −1] π 1 π [ j +1,n] . A composition of n is a way of writing n as the sum of positive integers that sum to n, that is, an expression i 1 + i 2 + · · · + i k = n for some k ≥ 1. A composition of n of ones and twos has the added restriction that i j ∈ {1, 2} for all j ∈ [n]. In this paper, we will refer to a composition of n of ones and twos simply as a "composition of n", and call the set C n .

Definition 4.3.
A level in a composition of n (of ones and twos) is a pair of consecutive ones or twos separated by a + sign. We define a marked composition of n to be a composition of n with exactly one level marked with a line above the pair of ones or twos. We may denote a single summand that is part of a level by including a line above it, i.e. 1 + 1 = 1 + 1 and 2 + 2 = 2 + 2. We denote the set of marked compositions of n by L n .
We refer the reader to Table 4 for examples.
Gao and Kitaev [5] discovered that the sequence |Av n (P 4 )| n≥1 corresponds to the OEIS sequence A045925 that enumerates the number of levels in all compositions of n + 1 of ones and twos. In this section, we will demonstrate an explicit bijection between the two sets. To do so, we first construct an explicit bijection from Av n (P 3 ) to C n . Proof. The size of C n for n = 1 and 2 can be verified easily. For n ≥ 3, observe that c ∈ C n−1 ⇐⇒ c + 1 ∈ C n and c ∈ C n−2 ⇐⇒ c + 2 ∈ C n , so |C n | = |C n−1 | + |C n−2 |, and |C n | = F n .

Lemma 4.2.
The size of Av n (P 3 ) is F (n) for all n ≥ 1. Moreover, all n-permutations avoiding P 3 for n ≥ 2 are sum decomposable.
So by Theorem 1.2, for all n ≥ 3 as well, proving the statements.
The previous two lemmas suggest that there is a natural bijection from the set C n to Av n (P 3 ). Indeed there is, as we will see in the following theorem: n F (n) Compositions of n Permutations in Av n (P 3 ) Let f : C n → Av n (P 3 ) defined as f (r 1 + r 2 + · · · + r k ) = 123 · · · k[α 1 , α 2 , . . . , α k ] where r 1 + r 2 + · · · + r k is a composition of n of ones and twos, and Then f is a bijection.
Proof. We refer the reader to Table 5 for examples for small n. First we check that if r 1 +r 2 +· · ·+r k is a composition of n, then f (r 1 + r 2 + · · · + r k ) is a permutation in S n : f (r 1 + r 2 + · · · r k ) = |123 · · ·k[α 1 , α 2 , . . . , α k ]| = |α 1 | + |α 2 | + · · · |α k | = r 1 + r 2 + · · · r k = n.  Proof. For n ∈ [3], it is easy to check that |L n | = (n) − 1! = (n − 1)F (n − 1), as we show in Table 4. For n ≥ 4, we proceed by induction. Suppose that for some k ≥ 4, the statement is true for all n ∈ [k − 1]. It is clear that the union of A ′ k , B ′ k , C ′ k , and D ′ k together make up L k , and that the following statements are true for all n: So by the inductive hypothesis, , and by Lemma 4.1, and the statement is true by induction on n. Proof. For n ≤ 3, it is easy to check that |Av n (P 4 )| = n! = nF (n). We refer the reader to Table 6 for examples.
These imply that A n , B n ,C n and D n are subsets of Av n (P 4 ). Now suppose that for some k ≥ 4, the statement is true for all n ∈ [k − 1]. Then by our inductive hypothesis, we have that A k contains (k −1)F (k −1) elements and B k contains (k −2)F (k −2) elements.
By Lemma 4.2, Av n (P 3 ) is counted by the (n +1)th Fibonacci number for all n, so C k contains F (k) elements and D k contains F (k − 2) elements.
It is not hard to see that the four sets are disjoint, so the total number of items in the four sets is It remains to check that any k-permutation avoiding P 4 indeed lies in A k , B k ,C k or D k . By Theorem 1.2, it suffices to show that For (a), it is clear that 12 and 21 avoid P 4 . Since 2413 contains P 4 , any simple permutation of length at least 4 avoiding P 4 must contain 3142 by Theorem 1.1. Let π be such a simple permutation. We can view it as a lattice matrix. This is shown in Figure 10, with some alterations explained in the caption. The blocks α 13 , α 14 , α 23 and α 24 are adjacent to the bullet point representing the number 4, so they must be trivial since π is simple. Finally, α 51 must be trivial, otherwise π would be sum decomposable. For (c), suppose α is sum indecomposable and of length at least 3. Since β ≥ 1, α must avoid P 3 . By (a), α is an inflation of 21 or 3142. The only inflation of 21 avoiding P 3 is itself, while 3142 contains P 3 . So α = 1 or 21.
Once again, the previous two lemmas suggest that there is a natural bijection from the set L n+1 to Av n (P 4 ) -and indeed there is, as we will see in the main theorem of this section: Theorem 4.6. Let g : L n+1 → Av n (P 4 ), where n ≥ 0 and r i ∈ {1, 2, 1, 2} for i ∈ [k] and k ≥ 1 Then g is a bijection.   Tables 8, 9 and 7 for enumerations for small n.
By Lemmas 4.4 and 4.5, the sets L n+1 and Av n (P 4 ) both contain nF (n) elements, so g must be bijective.
In addition, it can easily be seen that the inverse of g is the following: n |L n+1 |

Number of compositions
in L n+1 where the last summand is not marked
It is easy to see that the avoidance set of R 2 contains only the identity permutations. Observe that R 3 is equivalent to the POP P 3 introduced in Section 4, where we showed that its avoidance set is enumerated by the well-known Fibonacci numbers. Gao and Kitaev [5] enumerated the avoidance sets of R 4 and R 5 in Theorems 14 and 33 of their paper respectively. Moreover, they showed that for all k ≥ 3, the avoidance set of R k is in one-to-one correspondence with n-permutations such that for each cycle c, the smallest integer interval containing all elements of c has at most k − 1 elements.
They also observed that Av n (R 4 ) and the set of n-permutations for which the partial sums of signed displacements do not exceed 2 (to be defined later) are the same size for all n ≥ 1, and asked if there is an interesting bijection on one set to the other. We construct such a bijection in this section by analyzing the two sets in detail.
Proof. We claim that the only simple permutations avoiding R 4 are 1, 12, 21 and 2413. Recall that any simple n-permutation contains the patterns 132, 213 and 312 if n ≥ 4. Thus, we can write such a simple permutation as the string of factors (4) where α i are possibly empty factors (of length 0) and p, q and r are factors of length 1 where red(p q r ) = 312. It is clear that if α (2) and α (3) were not empty, if α (1) > p or if α (4) < p then the permutation would contain R 4 . So α (2) and α (3) are empty and if α (1) and α (4) are not empty then we must have α (1) < p < α (4) . However, this implies that if α 4 is not empty then the permutation must be sum decomposable, so α (4) is empty. If α (1) = t ≥ 2, then we must have α (2) [1,t−1] < q otherwise the permutation contains R 4 . This forces α (1) [1,t−1] to be the interval [t −1] which would mean that the permutation is sum decomposable. So α (1) = 1 if it is not empty. In this case we must have q < α (1) < r , which yields the permutation 2413.

Partial sums of signed displacements.
Definition 5.2. The j th signed displacement of an n-permutation π for j ∈ [n] is defined as π j − j .
The i th partial sum of signed displacements of an n-permutation π for i ∈ [n] is defined as i j =1 π j − j , and denoted π i Σ .
Proof. We know that π j are positive and all distinct for all j ∈ [k]. So let i 1 , i 2 , . . . , i k be such that 1 ≤ π i 1 < π i 2 < · · · < π i k ≤ n. and let r j = π i j − j for all j ∈ [k]. Then r j is non-negative for all j ∈ [k], and The last statement is true if and only if r j = 0 for all j ∈ [k]. That is, we must have The proof of the following theorem was inspired by the proof on OEIS page on A214663. Proof. For n ≥ 5, observe that the number n can only occur as one of the last 3 terms of a conforming n-permutation. Note also that the sum of two conforming permutations is conforming. Let π be a conforming n-permutation. Then we have the following cases: • Case 1: π n = n. So π n − n = 0, and π is conforming if and only if π k Σ does not exceed 2 for all k ∈ [n − 1]. That is, π is of the form α ⊕ 1 where α is a conforming (n − 1)-permutation. • Case 2: π n−1 = n. So π n−1 − (n − 1) = 1, and π is conforming only if π n−2 Σ = 1 or 0. We can further break down into cases: (a) If π n−2 Σ = 0, then π [1,n−2] must itself be an (n − 2)-permutation by Lemma 5.2. Then we must have π n = n − 1 -that is, π is of the form α ⊕ 21 where α is a conforming (n − 2)-permutation. (b) If π n−2 Σ = 1 then π n−1 Σ = 2, so π n = n − 2.
Then θ is a bijection.
Proof. We know that θ is indeed a function from Av n (R 4 ) to S n by Theorems 5.1 and 5.3. It is clear from the definition that θ is an injection. Corollaries 5.1.1 and 5.3.1 demonstrate that |S n | = |Av n (R 4 )| for all n ≥ 1, so θ must be a bijection.

SIMPLE PERMUTATIONS AVOIDING 2413, 3412 AND 3421
Albert and Atkinson [2] proved that a permutation class with only finitely many simple permutations has a readily computable algebraic generating function and has a finite basis. So far, we have been dealing mostly with avoidance sets that contain only finitely many simple permutations. In this chapter, we will show an example of a permutation class with a finite basis that contains infinitely many simple permutations as well as construct an algorithm that allows us to obtain the entire set recursively. Definition 6.1. Let P be a pattern, a set of patterns, or a POP. Denote Av S n (P ) as the set of simple n-permutations avoiding P . 6.1. Partitioning the simple permutations into 3 sets. In order to enumerate the set of simple permutations avoid 2413, 3412 and 3421, we will identify the types of permutations that appear in it. Lemma 6.2. Let π be a simple n-permutation that avoids P for some n ≥ 4. Then π n−1 = n and π 1 = n − 1.
Next, we prove that π 1 = n−1. Let π be represented as the string of factors α (n−1) β n k where k ∈ [n − 2]. We know that β cannot be empty, since then (n − 1)n would be an nontrivial interval in π. Suppose α is not empty. Note that the subsequenceαβ k must reduce to 123 or 132 or 231 for allα ∈ α andβ ∈ β by elimination (since n − 1 is larger than the three points andα (n − 1)βk cannot reduce to 2413, 3412 or 3421). The set of patterns {123, 132, 231} is equivalent to the POP of size three where 1 < 2, so the above observation implies that α < β. If α > k then π would be skew sum decomposable, while if α < k then π would be sum decomposable, both of which contradict the simpleness of π. But this implies that β > k which makes (n − 1) β n a nontrivial interval of π. So α must be empty, meaning that π 1 = n − 1. Lemma 6.3. Let π be a simple n-permutation that avoids P where n ≥ 5. Then we have exactly 3 cases: a. π 2 = 1 and π 3 = n − 2, b. π 2 = n − 3 and π n−2 = n − 2, or c. π 2 = 1, π 3 = n − 3 and π n−2 = n − 2.
Remark 2. The above definition holds for all n ≥ 4 even if A n , B n or C n are empty. Table 6.1 summarizes the types of permutations in these sets due to Lemmas 6.2 and 6.3. Table 12 gives sample values of a n , b n and c n for 4 ≤ n ≤ 8.
Finally, we check that f A (π) avoids P . Suppose we have 1 ≤ i < j < k < ℓ ≤ n such that f A (π) i f A (π) j f A (π) k f A (π) ℓ reduces to a pattern in P . Since π avoids P , such a subsequence must contain the numbers n−1 or 1. However, the only term larger than n−1 is n = π n−3 +2 = f A (π) n−1 by Lemma 6.2, while all patterns in P have the largest term 4 as the third last number in the pattern, so it cannot contain the number n − 1. On the other hand, 1 is the second term of f A (π), but is the third or fourth term in the patterns in P . So it cannot contain 1 either. So f A (π) avoids P . Lemma 6.5. If π ∈ Av S n−2 (P ) and n ≥ 6, then f B (π) is simple and avoids P .
So it is a factor of length at least n − 1. But f B (π) [1,n−1] is not an interval since it omits f B (π) n = π n−2 which is in [2, n − 2]. So implies that i = 1 and j = n.
Finally, we prove that f B (π) avoids P . Suppose we have 1 ≤ i < j < k < ℓ ≤ n such that f B (π) i f B (π) j f B (π) k f B (π) ℓ reduces to a pattern in P . Then such a subsequence must contain the number n − 1 = f B (π) 1 or n = f B (π) n−1 since we know that π avoids P . Clearly it cannot contain the number n since it is the second last term in the permutation, but 4 never occurs as the last or second last term in patterns in 2413, 3412 or 3421. Then we must have i = 1. But no patterns in P start with 4, so f B (π) indeed avoids P . Lemma 6.6. If π ∈ B n−1 and n ≥ 6, then f C (π) is simple and avoids P .
It is easy to see that f C (π) avoids P . The only way that f C (π) could contain P due to the addition of the point 1 is if there are at least 2 terms preceding it. However, it is inserted in the second position, so f C (π) does not contain P .
Proof. The mapping g A removes the first two entries and then reduces the result. Since g A (σ) is a reduced subsequence of σ, it avoids P . Proof. The mapping g B removes the first entry and the second last entry of σ. Since g B (σ) is a reduced subsequence of the permutation σ, it avoids P . Lemma 6.9. If σ ∈ C n and n ≥ 6, then g C (σ) is simple and avoids P .
Proof. The mapping g C removes the second entry (which is 1) and then reduces the result. It is not hard to see that g C (σ) is a reduced subsequence of the permutation σ, so it must avoid P .   3. Proof of Theorem 6.1. It is well known that there are no simple permutations of length 3, so it is obvious that Av S 3 (P ) = 0 = F (0). For n = 4, 5, 6, 7, the values in Table 12 are easy to verify.
This concludes the proof of Theorem 6.1.

SUMMARY
In this paper, we elucidated connections between the avoidance sets of some POPs and other combinatorial objects by constructing explicit bijections between the relevant sets, as a direct response to five of the 15 open questions posed by Gao and Kitaev [5]. These bijections were derived primarily by analysing the simple permutations of the avoidance sets and how the rest of the set could be obtained from their inflations. This was made possible by illustrating the permutation matrices as lattice matrices, which is a novel concept introduced in this paper. The bijections constructed in this paper are a testament to the fundamental role that simple permutations play in the study of pattern-avoiding permutations. It also demonstrates the intricate connections that avoidance sets of POPs have with many other combinatorial objects, and provides a way to relate seemingly disparate combinatorial objects through their connections to the family of POPs. We also enumerated the number of simple n-permutations avoiding the patterns 2413, 3412 and 3421 for all n, giving a concrete example of an avoidance set with a finite basis and infinitely many simple permutations.

FURTHER WORK
The remaining ten questions posed by Gao and Kitaev [5] remain open. Given the bijections we have constructed, it would be interesting to know whether they can be generalized further, by studying generalizations of the POPs or of the combinatorial objects. The following questions are natural extensions of the problem that was discussed in Section 4: 1. Are there any combinatorial objects that have a natural bijective relationship with the avoidance set of P k for any k ≥ 5? 2. Is there a POP whose avoidance set is in bijection with the levels in compositions of ones, twos and threes? 3. Are there any combinatorial objects that have a natural bijective relationship with the avoidance set of the POP with k elements labelled 1, 2, . . . , k where 1 > 3 > 5, or, more generally, with 1 > 3 > · · · > 2i + 1 for some i ≥ 2?
The enumeration of Av n (R k ) for k ≥ 6, n ≥ 1, where R k is defined in Section 5, is an open question. It could also be interesting to enumerate S k,n , which we define as the set of permutations whose partial sums of signed displacements do not exceed k, for all k ≥ 3, and check if there exist any k and ℓ such that S k,n = |Av n (R ℓ )| for all n ≥ 1. Finally, Gao and Kitaev [5] observed that sequence |Av n−1 (R 4 )| n≥2 corresponds to sequence A232164 as well. The latter sequence counts the number of Weyl group elements, not containing an s r factor, which contribute nonzero terms to Kostant's weight multiplicity formula when computing the multiplicity of the zero-weight in the adjoint representation for the Lie algebra of type C and rank n. Using our analysis on the set Av (R 4 ), one may be able to construct a natural bijection between these two sets more easily.
During our study of the simple permutations that avoid the patterns 2413, 3412 and 3421, we discovered using the PermLab software that the addition of the pattern 2431 to the basis does not change the set of simple permutations for small n. It can be proved that the simple permutations constructed by the recursive functions to build the set Av S n (2413, 3412, 3421) indeed avoid 2431. This observation leads us to an interesting question: Which avoidance sets have the same set of simples?