Major index distribution over permutation classes
For a permutation the major index of is the sum of all indices such that . It is well known that the major index is equidistributed with the number of inversions over all permutations of length . In this paper, we study the distribution of the major index over pattern-avoiding permutations of length . We focus on the number of permutations of length with major index and avoiding the set of patterns .
First we are able to show that for a singleton set other than some trivial cases, the values are monotonic in the sense that . Our main result is a study of the asymptotic behaviour of as goes to infinity. We prove that for every fixed m and and large enough, is equal to a polynomial in and moreover, we are able to determine the degrees of these polynomials for many sets of patterns.
Let be the set of permutations of the letters . We write a permutation as a sequence . A permutation statistic is a function . For a permutation , an inversion is a pair of different indices such that and the number of inversions is denoted by . The number of inversions is the oldest and best-known permutation statistic. Already in 1838, Stern [Stern1838] proposed a problem of how many inversions there are in all the permutations of length . The distribution of the number of inversions was given shortly after that by Rodrigues [Rodrigues1839].
However, we will focus on a different well-known permutation statistic in this paper. For a permutation , we say that there is a descent on the -th position if . The major index of , denoted by , is then the sum of the positions, where the descents occur. The major index statistic is younger than the number of inversions, as it was first defined by MacMahon [MacMahon1916] in 1915. Among other results, MacMahon proved its equidistribution with the number of inversions by showing that their generating functions are equal and started the systematic study of permutation statistics in general. That is why we call the statistics equidistributed with the number of inversions Mahonian. Then it took a long time before Foata [Foata1968] proved the equidistribution by constructing his famous bijection. Since then many new Mahonian statistics appeared in the literature, most of which are included in the classification given by Babson and Steingrímsson [Babson2000]. For the actual values of Mahonian statistics’ distribution see the Mahonian numbers sequence A008302 [oeisA008302].
We say that two sequences and are order-isomorphic if the permutations required to sort them are the same. A permutation contains a pattern if there is a subsequence of order-isomorphic to . Otherwise we say that avoids the pattern . Pattern avoidance is an active area of research in combinatorics and although the systematic study of pattern avoidance started relatively recently, there is already an extensive amount of literature. A good illustration of an application of pattern avoidance in computer science is that stack-sortable permutations are exactly the ones avoiding pattern 231, which was proved by Knuth [Knuth1969].
Let be the set of permutations of length avoiding and its cardinality. We say that patterns and are Wilf-equivalent if for every . For a permutation statistic st, we say that patterns and are st-Wilf-equivalent if there is a bijection between and which preserves the statistic st. This refinement of Wilf equivalence has been extensively studied for short patterns of length 3, see [Bloom2009, Bloom2010, Elizalde2011, Robertson2002]. An exhaustive classification of Wilf-equivalence and permutation statistics among these patterns was given by Claesson and Kitaev [Claesson2008]. On the other hand, not much is known about permutation statistics and patterns of length 4 and greater. Recently, Dokos et al. [Dokos2012] presented an in-depth study of major index and number of inversions including st-Wilf-equivalence. They conjectured maj-Wilf-equivalence between certain patterns of length 4, which was proved by Bloom [Bloom2014]. Another conjecture from Dokos et al. concerning maj-Wilf-equivalent patterns of a specific form was partly proved by Ge, Yan and Zhang [Yan2015].
Claesson, Jelínek and Steingrímsson [Jelinek2012] analysed the inversion number distribution over pattern-avoiding classes. Let be the number of -avoiding permutations with length and inversions. Claesson et al. studied for a fixed and a single pattern as a function of . Our goal is to provide similar analysis for the distribution of major index.
For a pattern let be the set of -avoiding permutations with length and major index , and let denote its cardinality. For a set of patterns , let and its cardinality. Claesson et al. [Jelinek2012] conjectured that for every , unless is an increasing pattern (i.e. a pattern of the form ). In Section 3, we will prove the analogous claim for major index by constructing an injective mapping for every . Furthermore, we show that the claim does not hold in general for an arbitrary set of multiple patterns.
In Section 4, we focus on the asymptotic behaviour of for a fixed and as goes to infinity. We note that the asymptotic behaviour for the number of inversions is known only for sets avoiding a single pattern. In contrast, our results apply to general (possibly infinite) set of patterns. It turns out that the values are eventually equal to a polynomial in , which is consistent with the behaviour of . The natural question to ask is how the degrees of these polynomials depend on and .
Let be the degree of the polynomial such that for . Similarly, let be the degree of the polynomial such that for . In the case of the number of inversions, there are just two types of patterns. For a pattern , we have either for every , or there is a constant such that . All these results about and were shown in the aforementioned paper by Claesson et al. [Jelinek2012].
However, the situation gets more complicated when dealing with major index. We show how depends on the structure of and determine for many types of , including all the cases when is a singleton set. There are still patterns for which , but for many patterns is a complicated function of which tends to infinity slower than linearly (approximately as ). Note that there are unfortunately sets for which we are not able to precisely determine . In these cases, our results provide at least an upper bound.
Finally, we conclude Section 4 by using our results to show that the asymptotic probability of a random permutation with major index avoiding is either 0 or 1. This again corresponds with the number of inversions, where the analogous claim was proved for singleton sets of patterns.
In this section, we recall some standard notions related to permutation patterns and introduce a simple decomposition of permutations.
Let be the set of permutations of the letters . A permutation will be represented as a sequence of its values , where . We say that two sequences of integers and are order-isomorphic if for every we have . For and , let denote the permutation in which is order-isomorphic to the sequence . A permutation contains a permutation if there exists an such that . We write to denote this. If does not contain we say that avoids . In this context we usually call a pattern. Similarly, for a set of patterns we say that a permutation is -avoiding if it is -avoiding for every . For a pattern let be the set of all -avoiding permutations of length , and its cardinality. More generally for a set of permutations , let denote the set of all -avoiding permutations of length , and its cardinality.
The descent set of is the set and the major index is the sum of all its members . We will consider the distribution of major index over pattern-avoiding permutations.
Let denote the set of all -avoiding permutations of length with major index , and its cardinality. Similarly let be the set of all permutations from with major index , and its cardinality. For an example of the values for a specific pattern, see Table 1.
Now we will introduce a decomposition which will later prove to be very useful. Let be the set of -tuples of non-negative integers and for every define its size . We will decompose an arbitrary permutation into a smaller permutation and a tuple of non-negative integers. Let be a permutation and a natural number, such that the sequence is strictly increasing. Then we can store the structure of such permutation in a shorter permutation order-isomorphic to , and a -tuple which describes the vertical gaps between the letters .
Let be a permutation and such that the sequence is strictly increasing. Let be the permutation order-isomorphic to the sequence and the only -tuple of size such that holds for every . Then we say that can be decomposed into and , denoted by .
We can also look at the decomposition from the other side as an operation, which increases the vertical gaps between the letters of and then fills them with increasing suffix. See Figure 1.
For a permutation that can be expressed as for some and , we call the core of and the padding profile of if is the last descent of . In other words, is a decomposition into a core and a padding profile of if there is such that . For , the core of is the empty permutation and its padding profile is equal to the length of .
Observe that the major index of a permutation is determined only by its core. Therefore, let us define the following statistic which characterizes the cores of permutations with a given major index.
For a permutation , let the extended major index of , denoted by , be the sum of its major index and its length, i.e.,
For every permutation with a core , we have . Notice also that for any , if contains then .
3 Monotonicity of columns
In this section, we will focus on the distribution of major index over permutations avoiding a single pattern. Observe that each column of Table 1 is weakly increasing from top to bottom. In other words, for a fixed major index the number of -avoiding permutations of length is at least the number of -avoiding permutations of length . We will show that this claim holds in general for any single pattern except for the increasing patterns (i.e., the patterns of the form ).
First let us define a simple operation of inserting an element into a permutation. Later we will prove two elementary properties of this operation.
For a permutation and , let be a permutation created by inserting the letter at the -th position. In other words is the permutation order-isomorphic to the sequence . See Figure 2.
Let , and . If there is such that , then .
Suppose that we have such that . Let be a subset of defined by
Since restricted to indices other than is order-isomorphic to we obtain , contradicting the fact that avoids . ∎
Let , and . If , and either or the sequences and are order-isomorphic, then .
As before restricted to indices other than is order-isomorphic to . Therefore for every index , if and only if . And since we know that all the elements of are smaller than , we get . We are left with the two indices and . Observe that because . And from the last condition we obtain if and only if . ∎
For every and with we have the inequality .
To prove this theorem we will construct an injective mapping from to . In order to find an image for we introduce the following permutation statistics.
First we solve the easy case where . We simply extend by inserting the letter at the end, i.e.,
It is clear that preserves the descent set, which implies . Now suppose there is such that . Lemma 3.2 implies . But that would lead to which contradicts the assumption that .
Suppose now that and . Then we create the image of by expanding the element at the position into two. See Figure 4.
Because all the conditions from Lemma 3.3 are met, we get which implies .
Next we want to show that avoids . Suppose there is such that . Again from Lemma 3.2 we obtain for some . Observe that since there are only indices in larger than , we get a lower bound .
Now we will use different arguments depending on whether this holds as an equality or not. First suppose that . This means that also contains all the indices larger than , in particular . Following Definition 3.5, is then the largest index such that , implying . This means there is a letter to the left of such that and all the letters to the right of are larger than . Therefore, looking at the indices , and we have and the same inequality goes for . Translated to the indices of the inequality must hold. But recalling the definition of there is no index such that .
Suppose now that . In this case there must be such that . We aim to show that satisfies , which would lead to a contradiction since contains .
We know that are all fixed points following Definition 3.5. Observe that for every index we have the inequality with equality on the indices smaller than . Therefore, and restricted to the first letters are order-isomorphic. The only thing left is to check that the other letters of are fixed points. The sequence is increasing, thus its subsequence is also increasing and moreover . Then and subsequently all the succeeding letters of must be fixed points. Together, this means that indeed .
Finally, suppose that and . Then we simply insert the letter at the rightmost possible position without creating a new descent. See Figure 5.
In Theorem 3.4, the assumption is necessary, because in the case of a pattern and fixed there is such that for every larger than we have . This follows directly from the Erdős–Szekeres theorem [Erdos1935], which states that any permutation of length contains either the increasing pattern of length or the decreasing pattern of length , forcing the major index to be larger than .
Applying a similar argument as in the proof of Theorem 3.4, we could show that for any set of patterns with the same tail which does not contain any increasing pattern. One could think that indeed for any set of patterns the columns are either eventually zero or weakly increasing. But this is not true even for small sets of short patterns. For example, consider a set of just two patterns. In this case and (see Table 2). But we can easily show that tend to infinity for . Let and , then for and . Therefore, tends to infinity because there are linearly many for a fixed .
4 Asymptotic behaviour
We have seen that for most single patterns the inequality holds (recall Theorem 3.4). Let us now focus on the asymptotic behaviour of for a fixed as tends to infinity. More generally, we are interested in the asymptotic behaviour of for a (possibly infinite) set of permutations . Our first goal is to show that for a fixed and arbitrary , is eventually equal to a polynomial.
By recalling Definition 2.3, observe that a permutation is uniquely determined by its core and its padding profile while its major index is determined only by the core. Furthermore, for any permutation all the elements of are smaller than , thus making the core of any such permutation shorter than . This means that all the permutations with major index have only a finite number of unique cores.
Let denote the finite set of all the distinct cores of permutations from , where the set of all -avoiding permutations with major index , i.e. .
Note that every core satisfies (recall Definition 2.4). Therefore the permutation statistic which assigns to each permutation its core, is in fact a refinement of the major index.
For , let be the set of permutations from which have the core , and let be its cardinality.
Clearly . This means that in order to prove the polynomial behaviour of for a fixed , it is enough to prove the polynomial behaviour of for a fixed core . And because the decomposition of a permutation into its core and its padding profile is unique, we can enumerate by counting all the possible padding profiles.
Let be any set of permutations and a permutation. Then there exists a polynomial and an integer such that for every , .
We will use a known property of down-sets of integer compositions. Define a partial order on as if for every we have . A set is a down-set in if for every and , belongs to as well. Unfortunately the set of all padding profiles from is not a down-set, but we can express it as a difference of two down-sets. Define the following sets
Let us check that both and are down-sets in . If belongs to and , then the permutation contains the permutation and therefore must be -avoiding and belongs to . To show that is down-set, consider and . We know from previous argument that also belongs to and the second condition holds since for every we have implying .
The padding profiles of permutations from have at least one of the first values positive, because such permutation has a descent at the -th position. But these are exactly the tuples which belong to but not to . Since is a subset of we get . To complete the proof, we will use the following fact due to Stanley [Stanley1975, Stanley1976].
Proposition 4.4 (Stanley).
Let be a positive integer and let be a down-set in . Let be the number of elements of with size . Then there exists a polynomial and an integer such that for every , .
From this fact, we obtain that and are both polynomials for sufficiently large , therefore is eventually equal to a polynomial as well. ∎
For a set of permutations and , there exists a polynomial and an integer such that for every , .
Since we now know that the numbers are eventually equal to a polynomial, we can introduce the following notation.
For a set of permutations , let be the degree of the polynomial such that for large enough. For a zero polynomial , let .
Observe that for an arbitrary set of permutations and , it follows that . This holds since any -avoiding permutation is trivially -avoiding too.
Now we would like to know how these degrees depend on and on the structure of permutations in . It turns out that there is one important statistic of patterns which affects the degree .
For a permutation we will define the magnitude of as
For a set of permutations the magnitude of , denoted by , is the minimal magnitude of a permutation . For the empty set of patterns, .
Let us make an important observation about magnitude. If a permutation contains a pattern then necessarily .
As we will show, the magnitude of plays a key role in determining the value of . To prove this, let us first focus on the sets of infinite magnitude. In this particular case, we can also determine the leading coefficient of the polynomial , which will prove to be useful later.
Let be a set of permutations with . Then and as .
First observe that for the proposition simply states that for . But that is clear since . Therefore, in the rest of the proof suppose that .
In order to prove our proposition, it is sufficient to prove the following claims.
For the core we have .
For every there is a constant such that .
To prove the first claim, simply observe that any permutation with the core has a finite magnitude, which makes it -avoiding. By choosing the first letters we uniquely get every permutation with the core plus the permutation . That gives us the desired enumeration .
To prove the second claim, fix a core of length . First observe that for necessarily . We will bound from above by the number of all the permutations of length which can be expressed as for some tuple . This yields the upper bound for some .
These claims together with Corollary 4.5 give the desired polynomial behaviour. ∎
Let us now focus on the problem of determining for a set of finite magnitude. As we will show in this section, the asymptotic behaviour of these sets is far more complicated than that of sets with infinite magnitude. Our main result is providing the values as a function of . As in Proposition 4.8, we will construct a suitable core and bound from below by counting all the possible padding profiles. On the other hand, we will use a different approach for obtaining the upper bound. For a fixed core , we will bound in terms of how many coordinates of a padding profile can be large if avoids .
Let be a finite set of permutations and let and be non-negative integers. If every permutation with and length contains a core of some permutation in , then .
Let be the length of the longest permutation in . We will prove the claim by showing that for every there is a constant such that .
Fix a core . For a padding profile we will say that its coordinate is bad if . We claim that every permutation in has a padding profile with at most bad coordinates. Suppose for a contradiction that there is a permutation with at least bad coordinates in its padding profile. Let be the permutation order-isomorphic to elements from the core of which separate the bad coordinates. Because is contained in the core it satisfies . But since it has length greater than it must contain a core of some permutation . Furthermore, let be the tuple of only the bad coordinates from the padding profile of . Observe that since contains and every coordinate of is larger than then must contain . But that is clearly a contradiction because is contained in .
Now it suffices to show that the number of permutations with core and at most bad coordinates is smaller than for some . Let be the length of the core . First we have ways to choose the potentially bad coordinates. We have only constantly many options for the remaining coordinates of the padding profile, which we can bound with . And finally, we will bound the number of options how to split the remaining elements into the bad coordinates by enumerating the number of ways to split elements into boxes which is .
This yields the upper bound and since the only non-constant factor is , this indeed implies for some . ∎
By combining Lemma 4.9 with the Erdős–Szekeres theorem [Erdos1935], we obtain a precise characterization of the sets for which the degrees are bounded by a constant independent of . This illustrates that sets of patterns containing permutations with both finite and infinite magnitude can behave very miscellaneously.
For a set of permutations , is bounded by a constant independent of , if and only if there is with the core and with the core for some and .
To prove one implication, assume that contains such and . We know that . From the Erdős–Szekeres theorem [Erdos1935], it follows that every permutation longer than contains either or . Therefore, we obtain the inequality from Lemma 4.9.
We will prove the other implication by proving its contrapositive. Assume that does not contain any permutation with an increasing core. In other words and Proposition 4.8 implies that . Therefore, is unbounded.
Finally, assume that does not contain any permutation with a decreasing core. In this case we cannot precisely express . However, if for some integer then every permutation with the core is -avoiding and has major index . Since there are such permutations of length , we get the inequality . And again is unbounded. ∎
Now we will focus on determining the values for sets of finite magnitude. As we already discussed in Section 3, for any set of permutations with magnitude , we have for . It is not hard to show that the values eventually get constant in the case of sets with magnitude .
If is a set of permutations with magnitude , then .
We know that for every and . Therefore, it is sufficient to bound from above. Fix a permutation with magnitude 1. Since and every non-empty permutation contains the pattern 1, we get directly from Lemma 4.9. ∎
The next result determines for all sets of permutations of magnitude at least 3 where every permutation has a finite magnitude.
Let be a set of permutations such that every permutation has a finite magnitude and , where is an integer larger than 2. Then and for
Any permutation with major index is strictly increasing, therefore avoids and . In the rest of the proof suppose .
We will prove the theorem by showing that the following values are equal.
The degree of the polynomial .
The largest integer such that there is a -avoiding permutation with .
The largest integer such that there is a -avoiding permutation with .
The value , where .
First observe that trivially . We will prove by constructing a -avoiding permutation of length satisfying . For a permutation we say that is co-layered if avoids both and . Observe that any co-layered permutation is uniquely determined by its descent set. Let be the smallest positive integer such that . Furthermore, let be the largest integer such that and let . Note that because otherwise the first inequality would also hold for . We also know that because otherwise the above inequalities would hold for and , which contradicts our choice of .
Let be a co-layered permutation of length with the descent set , where
To see that is correctly defined, we will show that the are strictly increasing and positive. From the inequalities and , it follows that , and that for every index . Note that this is where the proof would fail for sets with magnitude , since for we would have and we could not construct such permutation.
Observe that avoids because the longest increasing subsequence in any co-layered permutation is between two adjacent descents and for any we have . We see that satisfies
Furthermore, we will show that has length . By solving the equations we get
Notice that we subtract 1 during the calculation of if and only if which happens when is not an integer. This justifies the following equation