Equipopularity classes of 132-avoiding permutations

The popularity of a pattern p in a set of permutations is the sum of the number of copies of p in each permutation of the set. We study pattern popularity in the set of 132-avoiding permutations. Two patterns are equipopular if, for all n, they have the same popularity in the set of length-n 132-avoiding permutations. There is a well-known bijection between 132-avoiding permutations and binary plane trees. The spines of a binary plane tree are defined as the connected components when all edges connecting left children to their parents are deleted, and the spine structure is the sorted sequence of lengths of the spines. Rudolph shows that patterns of the same length are equipopular if their associated binary plane trees have the same spine structure. We prove the converse of this result using the method of generating functions, which gives a complete classification of 132-avoiding permutations into equipopularity classes.


Introduction
Let σ = σ 1 • • • σ n be a permutation in the symmetric group S n .The permutation σ contains the pattern n, such that σ is < σ it if and only if p s < p t , for 1 s, t k.If σ does not contain p, we say that σ avoids p.The set of all σ ∈ S n which avoids p is denoted by S n (p).
Note that σ may contain multiple copies of p, for example 43152 contains two copies of the pattern 312, one at indices 2,3,5, and another at indices 1,3,5.We use f (σ, p) to denote the number of copies of p that σ contains.Definition 1.The popularity P S (p) of a pattern p in a set S of permutations is defined as If S = S n , then patterns of the same length k have the same popularity n! k! n k , using the linearity of expectation.The interesting problem arises when S = S n (τ ) for some pattern τ .Joshua Cooper [4] first posed the problem: given permutations τ and σ, what is the expected number of copies of σ in a permutation chosen uniformly at random from S n (τ )?In this paper, we study the equivalent question: for given permutations τ and σ, what is the popularity of σ in S n (τ )?
For the remainder of this paper, we consider only popularity in 132-avoiding permutations.For two permutations p and q such that P Sn(132) (p) = P Sn(132) (q) for all n, we say that p and q are equipopular.
In [2], Bóna used generating functions to show that, for permutation patterns of length k, the increasing pattern 12 • • • k has the lowest popularity and the decreasing pattern k(k − 1) • • • 1 has the highest popularity in 132-avoiding permutations.In other words, for any length-k permutation p, P Sn(132) (12 Bóna extended this result in [3] to show that, for length-3 patterns, the patterns 213, 312 and 231 are equipopular, while 123 and 321 are the least popular and most popular respectively. In [5], Rudolph uses binary plane trees to generalize Bóna's result from [3].There is a well-known bijection between 132-avoiding permutations of length n and binary plane trees with n vertices, which are rooted unlabeled trees in which each vertex has at most two children, and each child is designated as either the left or right child of its parent.For a 132-avoiding permutation p, its corresponding binary plane tree T (p) can be constructed recursively.The root of T (p) is the entry n of p, the left (right) subtree of the root corresponds to the entries of p to the left (right) of n.If p is the empty sequence, then T (p) is the empty tree.
Note that since p is 132-avoiding, the entries of p to the left of n must all be greater than the entries to the right of n.Thus given a binary plane tree, we label the root with n, and if the left subtree has i vertices, then the values n − i, . . ., n − 1 must be in the left subtree, and the values 1, . . ., n − i − 1 must be in the right subtree.We can thus label the tree recursively, and the permutation it corresponds to can be recovered by doing an in-order reading of the vertices (left subtree, root, right subtree).An example is given in Figure 1.
In [5], Rudolph defines the spines of a binary tree T (p) to be the connected components of T (p) when all edges connecting left children to their parents are deleted, and the length the electronic journal of combinatorics 21(1) (2014), #P1.59 of a spine as the number of nodes in the spine.She also defines the spine structure as the sequence of lengths of spines sorted in descending order.Rudolph extended the results of Bóna to show the following.
Theorem 2 (Rudolph).Given 132-avoiding permutations p and q, if T (p) and T (q) have the same spine structure, then p and q are equipopular.
In [5], Rudolph also conjectured that the converse of Theorem 2 is true, and verified it numerically for all patterns of length less than or equal to 7.
Conjecture 3 (Rudolph).If the 132-avoiding permutations p and q are equipopular, then T (p) and T (q) have the same spine structure.
Aisbett proved a related result in [1], based on another conjecture by Rudolph in [5].
Theorem 4 (Aisbett).Given 132-avoiding permutations p and q, if the spine structure of T (p) is less than or equal to the spine structure of T (q) in refinement order, then for all n, P Sn(132) (p) P Sn(132) (q).In this paper, we prove Conjecture 3, by using the method of generating functions.This gives a complete classification of 132-avoiding permutations into equipopularity classes.
Section 2 consists of preliminary definitions and known results about generating functions.We focus in particular on the work of Bóna on the generating functions for the popularity of the increasing and decreasing patterns.Section 3 expands further upon these results in the case of the decreasing pattern.In Section 4, we prove Conjecture 3 by deriving an expression for the generating function for the popularity of a pattern with a given spine structure, and then applying the results from Section 3. We show that if two patterns have different spine structures, then the associated generating functions are different.

Preliminaries
In this section, we state preliminary definitions and known results about generating functions, focusing in particular on the generating functions for the popularity of the increasing the electronic journal of combinatorics 21(1) (2014), #P1.59 and decreasing patterns.These definitions and results are used in our work in subsequent sections.
In [2], Bóna finds equations for the generating functions for the popularity of increasing and decreasing patterns in 132-avoiding permutations.Let a n,k be the popularity of 12 • • • k in S n (132), and let the generating function be A k (x) = n 0 a n,k x n .Let C(x) be the generating function for the Catalan numbers: Theorem 5 (Bóna).For all positive integers k 1, we have ( For decreasing patterns, let d n,k be the popularity of k(k − 1) • • • 1 in S n (132), and let , and for larger values of k, we have the recurrence relation: This leads to the generating function identity: In order to derive bounds for D k (x), we define some notation regarding generating functions used by Bóna.Definition 6.Let G(x) = n 0 g n x n and H(x) = n 0 h n x n be two power series.If g n h n for all n 0, we say that G(x) H(x).
Proposition 7 (Bóna).Let G(x), H(x) and W (x) be three power series with non-negative real coefficients, such that G(x) H(x).Then Bóna showed the following useful results.
Corollary 8 (Bóna).For k 2, we have 3 Generating function for the decreasing pattern In this section, we expand Bóna's work to prove more results on the generating function for the decreasing pattern D k (x).These results are used in our proof of Conjecture 3 in Section 4.
Lemma 9.For positive integers k 2, there is a constant Proof.We prove this by induction.For k = 2, this holds trivially by Equation 9. We assume that Lemma 9 holds for all m such that 2 < m k − 1.Then there are positive Corollary 8 also implies that, for 1 j < m, We can use these inequalities to bound the sum in Equation 7.
The last inequality follow from Proposition 7 because The following proposition is immediate from Corollary 8 and Lemma 9. Proposition 10.For positive integers k 2 and some positive constant γ k 1, we have the following bounds on D k (x): Note that Proposition 10 implies that , where we use the Θ notation to mean that the coefficients are bounded above and below by a constant factor independent of x.
To get an explicit expression for D k (x), we define To simplify the notation, we do not explicity write the dependence on x and y of the generating functions and functions used.We can solve Equation 14 to get Proposition 11.For positive integers n > 1, we have Proof.From Equation 15, we can expand the square root as follows: the electronic journal of combinatorics 21(1) (2014), #P1.59 Substituting this into Equation 15, we note that the negative root should be chosen, and for n > 1, the coefficient of y n in D(x, y) is given by

Arguments using generating functions
With the preliminary definitions and results on generating functions in Sections 2 and 3, we now prove our main result, Conjecture 3, in this section.To do this, we first derive an expression for the generating function for the popularity of a pattern with a given spine structure.We then show that, if two patterns have different spine structures, then the generating functions for their popularity are different.
In her proof of Theorem 2, Rudolph defines a left-justified tree to be one in which every node that is a right child of its parent does not have a left child.She showed that every tree can be transformed into a left-justified tree with the same spine structure, while preserving the popularity.
Thus to prove Conjecture 3, without loss of generality, we can consider only permutations q such that T (q) is left-justified.For convenience, we can also assume that the spines are in sorted order by length, with the longer spines closer to the root.Any other permutation p with the same spine structure would have the same popularity as q.
We consider the structure of such left-justified, sorted binary trees, as shown in Figure 2. Let q be a 132-avoiding permutation of length k, and let the spine structure of q be {s 1 , . . ., s r }, with s 1 • • • s r .We first consider the case where there is a smallest index t such that s t+1 , . . ., s r are all 1, and 0 t r − 1.Since q is 132-avoiding, all the entries to the left of k must be greater than all entries to the right of k.Using this fact, we can determine that q starts with an ascending sequence of length r − t + 1: followed by a descending sequence of length s t − 1, and so on.This is illustrated in Figure 3.
Since q has length k, we can write q = q 1 kq 2 = q q 2 .Note that if q 2 is empty, then q is just the increasing pattern 12 • • • k, and the generating function for the popularity is A k (x).Similarly, if q 1 is empty, then q is the decreasing pattern k(k − 1) • • • 1, and the generating function is D k (x).Assume that q 1 and q 2 are nonempty.We first consider q .Let h n (q ) be the popularity of q in S n (132), and let H q (x) = n 0 h n (q )x n .We similarly define h n (q 1 ) and H q 1 (x).Lemma 12.For a 132-avoiding permutation q = q 1 k which ends in k, the following generating function identity holds Proof.According to Bóna [2], if a 132-avoiding permutation p of length n has an occurrence of q , then since q = q 1 k, one of the following must hold.
2. q occurs entirely to the right of n.
3. q 1 occurs to the left of n, and k occurs as n.
We thus have the recurrence relation which leads to the desired generating function identity.
We now consider patterns q such that T (q) is left-justified with sorted spines.Given a spine structure {s 1 , . . ., s r }, let g n ({s 1 , . . ., s r }) be the popularity of a pattern p with the given spine structure in S n (132), and let t be the smallest index such that s t+1 , . . ., s r are all 1.Let the generating function be G s 1 ,...,sr (x) = n 0 g n ({s 1 , . . ., s r })x n .Observe that in this notation, h n (q 1 ) = g n ({s 2 , . . ., s r }) and H q 1 (x) = G s 2 ,...,sr (x).
Theorem 13.The following generating function identity holds Proof.If a 132-avoiding permutation p of length n has an occurrence of q, then by a result of Bóna [2], one of the following must hold.
1. q occurs entirely to the left of n.
2. q occurs entirely to the right of n.
3. q occurs on the left of n and q 2 occurs on the right of n.
4. q 1 occurs on the left of n, q 2 occurs on the right of n, and k occurs as n.
We thus have the recurrence relation This leads to the generating function identity the electronic journal of combinatorics 21(1) (2014), #P1.59 Using Lemma 12, we get Note that since s t+1 = • • • = s r = 1, the pattern corresponding to the spine structure {s t+1 , . . ., s r } is the increasing pattern of length r − t.Thus G s t+1 ,...,sr (x) = A r−t (x), and we have the desired generating function identity.
For the case where q has no spine of length 1, we can repeat the analysis above to get In order to prove Conjecture 3, it thus suffices to show that, for different spine structures, the generating functions are different.Letting s = s 1 + • • • + s t , from Corollary 10, we know that , we can write this as From this expression, we want to show that two generating functions can only be equal if s − t and r each have the same value for both.To do this, we first prove some bounds on the function F (x).
Lemma 14.For k 1, we can write where for large n, Proof.Note that for k 1, the binomial coefficients are given by the electronic journal of combinatorics 21(1) (2014), #P1.59 We can write the binomial expansion of F k (x) as follows.
We define If k is odd, then we can write The expression on the right is a polynomial in n of degree k−1 2 , hence . If k is even, then we can write .
For large n, the expression on the right is a polynomial in n of degree k 2 , and we can bound the expression in parentheses as Similarly, we have Thus the expression in parentheses is Θ(n −1/2 ) for large n, and as desired.
Lemma 14 implies that, for large n, the coefficients of We next prove a related result for (F (x) − 1) k .
the electronic journal of combinatorics 21(1) (2014), #P1.59 Lemma 15.For k Proof.We first note that F (x) is the generating function for the central binomial coefficients, and Because 0 F (x) − 1 F (x), we have for large n, hence the lemma holds.
We now prove a result about the generating function for the spine structure.Recall the notation for G s 1 ,...,sr (x) such that s 1 , . . ., s t are all the spines greater than 1, and Lemma 16.If two generating functions G s 1 ,...,sr (x) and G s 1 ,...,s r (x) are equal, then s = s , t = t and r = r .
Proof.We refer back to Equation 21, restated here for convenience.
From Lemmas 14 and 15, we know that for large n and k 1, the coefficient of x n in (F (x) − 1) k and F k (x) have the same behavior as k varies.It follows that if we consider the coefficient of x n for large n in G s 1 ,...,sr (x), it should depend only on 2s − 2t + r.Hence if two generating functions G s 1 ,...,sr (x), G s 1 ,...,s r (x) are equal, then we must have 2s − 2t + r = 2s − 2t + r .Note that s − t + r = s 1 + • • • + s r = s − t + r holds trivially, thus this implies that s − t = s − t and r = r .
We now show that s = s and t = t must also hold if two generating functions are equal.Since s − t = s − t and r = r , from Equation 18, we can cancel out common factors on both sides of the equality G s 1 ,...,sr (x) = G s 1 ,...,s r (x) to get the electronic journal of combinatorics 21(1) (2014), #P1.59 Defining we can restate Equation 16 as follows: Substituting this into Equation 25 and simplifying, we get Observe that for the expression on the left, the term of lowest degree in x has degree t − t, whereas the lowest degree term in the expression on the right is a constant.Hence we must have t = t , from which it follows that s = s .
We now know that if two generating functions are the same, then s, t, r are the same.In order to prove Conjecture 3, it suffices to show the following.
From Equation 27, Proposition 17 can be simplified to a product of the polynomials E n defined in Equation 26.We first show that the E n can be written in a simpler form.
Lemma 18.For n 2, we have Proof.We first define the two-variable generating function E(x, y) as follows.
, the electronic journal of combinatorics 21(1) (2014), #P1.59 where the last line follows from the identity We denote the coefficient of y n in E(x, y) by [y n ]E(x, y).Observe that if x = 0, then This implies that E n (x) has constant term zero for n 2. Next, we find the coefficient of The last line follows from Summing this for k 1, we get the expression for E n (x) in Lemma 18.
Next we define the polynomials From Lemma 18, we have Hence to prove Proposition 17, it suffices to show that for n 2, F n has a root which is not shared with any F m for m < n.This would imply that if we have an equality then the largest of the s i 's must be equal to the largest of the u i 's, and repeating this argument would give that {s 1 , . . ., s t } = {u 1 , . . ., u t } as desired.
As n increases, the product 1 − 1 n • • • 1 − 4 n increases, and the middle expression becomes smaller.Hence if we prove the inequality for some n = a, then it holds for all n a.If we fix n = 40, the term in parentheses is a polynomial in b, and we can numerically compute its roots to verify that the inequality holds for 0 < b < 4. Thus the desired inequality holds for n 40.
Lemma 20.For n 3, F n has a root in − 4 n 2 , 0 .Proof.Since F n (0) = 1, in order to prove Lemma 20 it suffices to show that F n − 4 n 2 < 0. We substitute x = − 4 n 2 in F n (x) and claim that The above inequality is obvious when 3 n 9, so assume n 10.To prove the above inequality, it suffices to show that the total sum is less than the sum of the first four terms or equivalently, the sum of the remaining terms is negative.In order to show this, we pair up the 5th and 6th terms, the 7th and 8th terms, and so on, and show that the sum of each pair is negative.If n 2 is odd, then the last term is negative; if n 2 is even, we can pair it with the term preceding it.Thus it is enough to show that, for k 5, the following sum is negative.
This sum is negative if which holds for k 5.
Thus in order to show that F n − 4 n 2 < 0, it suffices to show the following inequality.
The sum on the left is a polynomial in 1 n , and by numerically computing its roots, we can verify this inequality for n 3.

Conclusion
In this paper we proved Rudolph's conjecture in [5].This implies that in the set of 132avoiding permutations, for patterns p, q of length k, the corresponding binary plane trees T (p) and T (q) have the same spine structure if and only if p, q are equipopular.This gives a complete classification of 132-avoiding permutations into equipopularity classes.
It would be interesting to study whether there is an analogous characterization of the equipopularity classes in 123-avoiding permutations, as well as in the sets of permutations which avoid patterns of lengths greater than 3.

Figure 1 :
Figure 1: Diagram of the binary plane tree corresponding to the permutation 5634271.

Figure 2 :
Figure 2: Diagram of a left-justified binary tree, with spine structure {s 1 , . . ., s r } and spines in sorted order.

Figure 3 :
Figure 3: Diagram of the permutation corresponding to the binary tree in Figure 2.