A lifting of the Goulden-Jackson cluster method to the Malvenuto-Reutenauer algebra

The Goulden-Jackson cluster method is a powerful tool for counting words by occurrences of prescribed subwords, and was adapted by Elizalde and Noy for counting permutations by occurrences of prescribed consecutive patterns. In this paper, we lift the cluster method for permutations to the Malvenuto-Reutenauer algebra. Upon applying standard homomorphisms, our result specializes to both the cluster method for permutations as well as a q-analogue which keeps track of the inversion number statistic. We construct additional homomorphisms using the theory of shuffle-compatibility, leading to further specializations which keep track of various"inverse statistics", including the inverse descent number, inverse peak number, and inverse left peak number. This approach is then used to derive formulas for counting permutations by occurrences of two families of consecutive patterns -- monotone patterns and transpositional patterns -- refined by these statistics.


Introduction
Let S n denote the symmetric group of permutations on the set [n] := {1, 2, . . . , n} (where S 0 consists of the empty permutation), and let S := ∞ n=0 S n . We write permutations in one-line notation-that is, π = π 1 π 2 · · · π n -and the π i are called letters of π. The length of π is the number of letters in π, so that π has length n whenever π ∈ S n .
For a sequence of distinct integers w, the standardization of w-denoted std(w)-is defined to be the permutation in S obtained by replacing the smallest letter of w with 1, the second smallest with 2, and so on. As an example, we have std(73184) = 42153. Given permutations π ∈ S n and σ ∈ S m , we say that π contains σ (as a consecutive pattern) if std(π i π i+1 · · · π i+m−1 ) = σ for some i ∈ [n − m + 1], and in this case we call π i π i+1 · · · π i+m−1 an occurrence of σ (as a consecutive pattern) in π. For instance, the permutation 315497628 has three occurrences of the consecutive pattern 213, namely 315, 549, and 628. On the other hand, 137258469 has no occurrences of 213.
Let occ σ (π) denote the number of occurrences of σ in π. If occ σ (π) = 0, then we say that π avoids σ (as a consecutive pattern). If Γ ⊆ S, then we let S n (Γ) denote the subset of permutations in S n avoiding every permutation in Γ as a consecutive pattern. When Γ consists of a single permutation σ, we shall simply write S n (σ) as opposed to S n ({σ}). (We use the same convention for other notations involving a set Γ of permutations when Γ is a singleton.) As observed earlier, we have 137258469 ∈ S 9 (213).
For the rest of this paper, the notions of occurrence and avoidance of patterns in permutations always refer to consecutive patterns unless otherwise stated.
The study of consecutive patterns in permutations, initiated by Elizalde and Noy [9] in 2003, extends the study of classical patterns in permutations originating in the work of Simion and Schmidt [29]. Consecutive patterns in permutations are analogous to consecutive subwords in words, where repetition of letters is allowed. In the latter realm, the cluster method of Goulden and Jackson [19] provides a very general formula expressing the generating function for words by occurrences of prescribed subwords in terms of a "cluster generating function", which is easier to compute. By setting the variable keeping track of occurrences to zero, this yields a powerful approach for counting words avoiding a prescribed set of subwords. In 2012, Elizalde and Noy [10] adapted the Goulden-Jackson cluster method to the setting of permutations, which they used to obtain differential equations satisfied by ω σ (s, x) = ( ∞ n=0 π∈Sn s occσ(π) x n /n!) −1 for various families of consecutive patterns σ, including "monotone patterns", "chain patterns", and "non-overlapping patterns". Solving these differential equations for ω σ (s, x) then allows one to count permutations by the number of occurrences of σ.
Over the past decade, Elizalde and Noy's adaptation of the cluster method for permutations has become a standard tool in the study of consecutive patterns; see [2,3,6,7,8,22] for a selection of references. One recent development is a q-analogue of the cluster method for permutations which also keeps track of the inversion number statistic. This q-cluster method, due to Elizalde, was first mentioned in his survey [8] on consecutive patterns, and was applied to monotone patterns and non-overlapping patterns by Crane, DeSalvo, and Elizalde [3] in their study of the Mallows distribution.
To explain the philosophy which guides our work, let us briefly discuss a paper by Josuat-Vergès, Novelli, and Thibon [21], in which the authors study alternating permutations (and their analogues in other Coxeter groups) from the perspective of combinatorial Hopf algebras. Their starting point is André's [1] famous exponential generating function sec x + tan x for the number of alternating permutations. The authors note that André's formula has a natural lifting in the Malvenuto-Reutenauer algebra FQSym, a Hopf algebra whose basis elements correspond to permutations and whose multiplication encodes "shifted concatenation" of permutations. They then recover André's formula by applying a certain homomorphism φ to its lifting in FQSym, and in their words: "Such a proof is not only illuminating, it says much more than the original statement. For example, one can now replace φ by more complicated morphisms, and obtain generating functions for various statistics on alternating permutations." A similar approach to permutation enumeration was taken in a series of papers by Gessel and the present author [14,16,35,36], but instead utilizing homomorphisms on noncommutative symmetric functions.
The main result of this present paper is an analogous lifting of the Goulden-Jackson cluster method for permutations to the Malvenuto-Reutenauer algebra. Since the basis elements of the Malvenuto-Reutenauer algebra correspond to permutations, our cluster method in FQSym is in a sense the most general cluster method possible for permutations. By applying the same homomorphism φ used by Josuat-Vergès-Novelli-Thibon to our generalized cluster method, we can recover Elizalde and Noy's cluster method for permutations, and we can use another homomorphism to recover Elizalde's q-analogue. We also construct other homomorphisms which lead to new specializations of our cluster method that can be used to count permutations by occurrences of prescribed patterns while keeping track of other permutation statistics.

Permutation statistics
The permutation statistics that we shall consider are the "inverses" of several classical permutation statistics related to descents and peaks: the descent number des, the major index maj, the comajor index comaj, the peak number pk, and the left peak number lpk. We define these statistics below.
The comajor index comaj is a variant of the major index maj, and is defined by • We call i ∈ {2, 3, . . . , n − 1} a peak of π ∈ S n if π i−1 < π i > π i+1 . Then pk(π) is defined to be the number of peaks of π.
Let Γ be a set of consecutive patterns and occ Γ (π) the number of occurrences in π of patterns in Γ. In this paper, we will consider the polynomials A (ides,imaj) Γ,n (s, t, q) := π∈Sn s occ Γ (π) t ides(π)+1 q imaj(π) , 1 Equivalently, lpk(π) is the number of peaks of the permutation 0π obtained by prepending 0 to π. A (ides,icomaj) Γ,n (s, t, q) := π∈Sn s occ Γ (π) t ides(π)+1 q icomaj(π) , A ides Γ,n (s, t) := π∈Sn s occ Γ (π) t ides(π)+1 , P ipk Γ,n (s, t) := π∈Sn s occ Γ (π) t ipk(π)+1 , and where n ≥ 1, and with each of these polynomials defined to be 1 when n = 0. These polynomials give the joint distribution of the occurrence statistic occ Γ along with each of the statistics (ides, imaj), (ides, icomaj), ides, ipk, and ilpk. Setting s = 0 in any of these polynomials then gives the distribution of the corresponding statistic over the pattern avoidance class S n (Γ). For convenience, let us define A (ides,imaj) Γ,n (t, q) := A (ides,imaj) Γ,n (0, t, q) and the polynomials A (ides,icomaj) Γ,n (t, q), A ides Γ,n (t), P ipk Γ,n (t), and P ilpk Γ,n (t) analogously. The reason why we consider the statistics (ides, imaj), (ides, icomaj), ides, ipk, and ilpk is because they are inverses of "shuffle-compatible" statistics. Roughly speaking, a permutation statistic st is shuffle-compatible if the distribution of st over the set of shuffles of two permutations π and σ depends only on st(π), st(σ), and the lengths of π and σ. (See Section 2.3 for precise definitions.) If st is shuffle-compatible and is a coarsening of the descent set, then st induces a quotient of the algebra QSym of quasisymmetric functions, denoted A st . By composing the quotient map from QSym to A st with the canonical surjection from FQSym to QSym, we obtain a homomorphism on FQSym which can be used to count permutations by the corresponding inverse statistic. Applying these homomorphisms to our generalized cluster method in FQSym yields specializations that refine by the statistics (ides, icomaj), ides, ipk, and ilpk. 2

Outline
The structure of this paper is as follows. Section 2 is devoted to background material. We first give a brief expository account of the Goulden-Jackson cluster method, both for words and for permutations. Then, we define quasisymmetric functions and the Malvenuto-Reutenauer algebra, and review some basic symmetries on permutations (reversal, complementation, and reverse-complementation) which will play a role in our work.
The focus of Section 3 is on our main result, the cluster method in Malvenuto-Reutenauer. We prove our generalized cluster method and show how it specializes to Elizalde and Noy's cluster method for permutations as well as its q-analogue. In this section, we also use the theory of shuffle-compatibility to construct homomorphisms which we then use to obtain further specializations of our generalized cluster method for the statistics (ides, icomaj), ides, ipk, and ilpk.
In Sections 4 and 5, we apply our general results from Section 3 to produce formulas for the polynomials A ides σ,n (s, t), P ipk σ,n (s, t), and P ilpk σ,n (s, t)-and their s = 0 evaluations-where σ is a specific type of consecutive pattern. Section 4 focuses on monotone patterns, i.e., the patterns 12 · · · m and m · · · 21. Section 5 focuses on the patterns 12 · · · (a − 1)(a + 1)a(a + 2)(a + 3) · · · m where m ≥ 5 and 2 ≤ a ≤ m − 2; these patterns were considered in [10] as a subfamily of "chain patterns", and here we call them transpositional patterns because 12 · · · (a−1)(a+1)a(a+2)(a+3) · · · m is precisely the elementary transposition (a, a+1). Most of our formulas involve the Hadamard product operation on formal power series, although some "Hadamard product-free" formulas are obtained for monotone patterns. In the case of monotone patterns, we also give a formula for counting 12 · · · m-avoiding permutations by inverse descent number and inverse major index. We conclude this paper in Section 6 with a brief discussion of ongoing work and future directions of research. See [38] for an extended abstract summarizing the results of this paper, as well as [34] for proofs of two observations (Claims 4.6 and 4.9) which are left unproven here.

The cluster method for words
We first introduce the Goulden-Jackson cluster method for words, which we will use to prove our lifting of the cluster method for permutations to the Malvenuto-Reutenauer algebra. The exposition in this section follows that in [37].
For a finite or countably infinite set A, let A * be the set of all finite sequences of elements of A, including the empty sequence. We call A an alphabet, the elements of A letters, and the elements of A * words. The length |w| of a word w ∈ A * is the number of letters in w. For v, w ∈ A * , we say that v is a subword of w if w = uvu for some u, u ∈ A * , and in this case we also say w contains v and that v is an occurrence of w. The total algebra of A * over Q, denoted Q A * , is the Q-algebra of formal sums of words in A * where multiplication is the concatenation product.
Given a word w = w 1 w 2 · · · w n ∈ A * and a set B ⊆ A * , we say that that is, v is a subword of w starting at position i. Moreover, we say that (w, T ) is a marked word on w (with respect to B) if w ∈ A * and T is a set of some marked occurrences in w of words in B.
To illustrate, suppose that A = {a, b, c} and B = {cab, bc}. Then is a marked word on w = cabcabbca with respect to B. Informally, we will display a marked word (w, T ) as the word w with the marked occurrences in T circled, so that (2) is displayed as We define the concatenation of two marked words in the obvious way. For example, (2) can be obtained by concatenating A marked word is called a cluster if it is not a concatenation of two nonempty marked words. (In particular, we will call a cluster with respect to B a B-cluster.) So, (2) is not a cluster, but b c a b c a b is a cluster.
For a word w ∈ A * , let occ B (w) be the number of occurrences in w of words in B and let C B,w be the set of all B-clusters on w. If c is a B-cluster, then we let mk B (c) be the number of marked occurrences in c. Define   This is a noncommutative version of the original cluster method of Goulden and Jackson, but the proofs are essentially the same; see, e.g., [37, Theorem 1] for details.

The cluster method for permutations
Next, we describe Elizalde and Noy's [10] adaptation of the cluster method for permutations, as well as its q-analogue which refines by the inversion number. The terms marked occurrence, marked permutation, concatenation, and cluster are defined for permutations in the analogous way as for words, but with the notion of word containment replaced by permutation containment (in the sense of consecutive patterns). It is worth pointing out that, unlike concatenation of marked words, concatenation of marked permutations is not unique. For instance, both However, this does not make a difference in defining clusters for permutations or in adapting the cluster method to the setting of permutations.
Let Γ ⊆ S. Recall that occ Γ (π) is the number of occurrences in π of patterns in Γ, and let C Γ,π be the set of all Γ-clusters on π. If c is a Γ-cluster, let mk Γ (c) be the number of marked occurrences in c. Define where r Γ,n,k is the number of Γ-clusters of length n with k marked occurrences.
Theorem 2.2 (Cluster method for permutations). Let Γ ⊆ S be a set of permutations, each of length at least 2. Then Elizalde and Noy give Theorem 2.2 in the special case where Γ consists of a single pattern [10, Theorem 1.1], but in Section 3 we will recover this more general result from our cluster method in the Malvenuto-Reutenauer algebra.
We say that (i, j) ∈ [n] 2 is an inversion of π ∈ S n if i < j and π i > π j . Let inv(π) denote the number of inversions of π. Define where r Γ,n,k,j is the number of Γ-clusters of length n with k marked occurrences and whose underlying permutation has j inversions. The next result is [3, Theorem 2.3], but for a set Γ of patterns rather than a single pattern σ.
See [27, Corollary 1] for a related result. Like with Theorem 2.2, we will later recover Theorem 2.3 as a specialization of our generalized cluster method.
Let us give one more definition before continuing. Given σ ∈ S m , let be the overlap set of σ. The notion of overlap set is useful for characterizing Γ-clusters where Γ consists of a single pattern σ, and we will do this in Sections 4.1 and 5.1.

Quasisymmetric functions and shuffle-compatibility
A permutation in S n can be characterized as a word in [n] * of length n consisting of distinct letters. Let P be the set of positive integers, and let P n denote the set of words in P * of length n consisting of distinct letters-not necessarily from 1 to n. Also, let P := ∞ n=0 P n . In this section only, we will use the term "permutation" to refer more generally to elements of P. Observe that any statistic st defined on permutations in S can be extended to P by letting st(π) := st(std(π)) for π ∈ P.
Every permutation in P can be uniquely decomposed into a sequence of maximal increasing consecutive subsequences, which we call increasing runs. Equivalently, an increasing run of π is a maximal consecutive subsequence containing no descents. The descent composition of π, denoted Comp(π), is the composition whose parts are the lengths of the increasing runs of π in the order that they appear. For instance, the increasing runs of π = 85712643 are 8, 57, 126, 4, and 3, so the descent composition of π is Comp(π) = (1, 2, 3, 1, 1). We use the notations L n and |L| = n to indicate that L is a composition of n, so that L n and |L| = n whenever L is the descent composition of a permutation in P n . For a composition L = (L 1 , L 2 , . . . , L k ), let Des(L) := {L 1 , L 1 + L 2 , . . . , L 1 + · · · + L k−1 }. It is easy to see that if L is the descent composition of π, then Des(L) is the descent set of π.
If π ∈ P m and σ ∈ P n are disjoint-that is, if they have no letters in common-then we call τ ∈ P m+n a shuffle of π and σ if both π and σ are subsequences of τ . The set of shuffles of π and σ is denoted S(π, σ). For example, we have S(31, 25) = {3125, 3215, 3251, 2315, 2351, 2531}.
QSym n denote the set of quasisymmetric functions homogeneous of degree n. As a vector space, QSym n has as a basis the fundamental quasisymmetric functions {F L } L n defined by If L m and K n, then where π and σ are any disjoint permutations satisfying Comp(π) = L and Comp(σ) = K. Hence, ; this is the algebra of quasisymmetric functions (over Q). Motivated by Stanley's theory of P -partitions, quasisymmetric functions were first defined and studied by Gessel [13] and are now ubiquitous in algebraic combinatorics. References on quasisymmetric functions include [32,Section 7.19], [20,Section 5], and [23].
In [17], Gessel and the present author develop a theory of shuffle-compatibility for descent statistics: statistics st such that Comp(π) = Comp(σ) implies st(π) = st(σ). The statistics des, maj, comaj, pk, and lpk are all examples of shuffle-compatible descent statistics. If st is a descent statistic and if L is a composition, then we let st(L) denote the value of st on any permutation with descent composition L. Two compositions L and K are called st-equivalent if st(L) = st(K) and |L| = |K|. The following is Theorem 4.3 of [17], and provides a necessary and sufficient condition for a descent statistic to be shuffle-compatible. Gessel and the present author call A st the shuffle algebra of st, because the basis elements u α can be viewed as encoding the distribution of st over shuffles of permutations. Theorem 2.4 implies that A st is isomorphic to a quotient of QSym whenever st is a shuffle-compatible descent statistic. We will not be working with the algebras A st themselves, but rather with the homomorphisms φ st . Note that in the special case of the descent set, φ Des is an isomorphism and the basis {u α } of A Des corresponds directly to the fundamental basis of QSym.
Note that the Malvenuto-Reutenauer algebra is graded by the length of the permutation, and that its identity element is the empty permutation. Rather than using the original construction of the Malvenuto-Reutenauer algebra as given above, we will follow the approach of Duchamp, Hivert, and Thibon [5], who gave another realization of the Malvenuto-Reutenauer algebra as a subalgebra of Q A * where A consists of the noncommuting variables X 1 , X 2 , . . . . In order to describe their construction, we must revisit the standardization map std. We extend the map std to all words on the alphabet P of positive integers using the following rule: if a letter repeats, then they are viewed as increasing from left to right. For example, std(145411) = 146523. We will later use the following fact, which is Proposition 5.3.2 of [20].
Proposition 2.5. Let w = w 1 w 2 · · · w n be a word in P * of length n, and let τ = τ 1 τ 2 · · · τ n = std(w). Then τ is the unique permutation in S n such that, whenever 1 ≤ i < j ≤ n, we have For the remainder of this section, let A = {X 1 , X 2 , . . . } where the X i are noncommuting variables. Given a monomial X = X i 1 X i 2 · · · X in , define std(X) := std(i 1 i 2 · · · i n ). Then we associate to each permutation π ∈ S an element G π ∈ Q A * defined by It can be shown that the G π are linearly independent and multiply by the rule so {G π } π∈S spans a Q-subalgebra of Q A * , called the algebra of free quasisymmetric functions and denoted FQSym. Since π → G π is clearly a Q-algebra isomorphism between Q[S] and FQSym, we will henceforth refer to FQSym as the Malvenuto-Reutenauer algebra. We use FQSym instead of Q[S] because, by identifying permutations with elements of Q A * , we can prove our generalized cluster method for permutations using the cluster method for words. 3 The Malvenuto-Reutenauer algebra FQSym contains an important subalgebra related to descent sets. Given a composition L, let r L be the sum of all G π for which π has descent composition L; that is, let The {r L } L n, n≥0 is a linearly independent set and spans a Q-subalgebra of FQSym called the algebra of noncommutative symmetric functions, denoted Sym. Noncommutative symmetric functions were introduced in the seminal paper [12] of Gelfand et al., but implicitly appeared earlier in Gessel's Ph.D. thesis [18].
Let ι : Sym → FQSym denote the canonical inclusion map from Sym to FQSym. There is also a natural surjection ρ : FQSym → QSym given by The map ρ explains the name "free quasisymmetric functions", as the elements of FQSym lift quasisymmetric functions to a noncommutative setting. We will need ρ to define the homomorphisms on FQSym that we will use to study inverse statistics. It is worth mentioning that QSym, FQSym, and Sym are prototypical examples of combinatorial Hopf algebras, but we only need the algebra structure in our work. See [20] for a survey on Hopf algebras in combinatorics, including more on the relationship between QSym, FQSym, and Sym.
Let us define Γ r := { π r : π ∈ Γ } for a set Γ ⊆ S of permutations, and we define Γ c and Γ rc in the analogous way. The next proposition tells us that if two sets of patterns Γ and ∆ are related by one of these symmetries, then we may be able to compute A (ides,imaj) Γ,n (s, t, q), A ides Γ,n (s, t), or P ipk Γ,n (s, t) using the corresponding polynomials for ∆. For example, once we obtain a generating function formula for the polynomials A (ides,imaj) 12···m,n (t, q) in Section 4.2, we can use this formula along with Proposition 2.7 (a) to compute the polynomials A (ides,imaj) m···21,n (t, q). Proposition 2.7. For any π ∈ S n with n ≥ 1, we have Proof. Each of these identities follows from algebraic manipulations, Proposition 2.6, and the fact that an occurrence of a pattern σ in π directly corresponds to an occurrence of σ r (respectively, σ c and σ rc ) in π r (respectively, π c and π rc ). We demonstrate the proof for (a) and leave the rest to the reader:

Main result
Given a set of permutations Γ ⊆ S, definē which are liftings of the exponential generating functions F Γ (s, x) and R Γ (s, x) from Section 2.2.
We will prove Theorem 3.1 using Theorem 2.1, the noncommutative version of the original Goulden-Jackson cluster method for words. Our proof will rely on several preliminary lemmas, which we establish below.
Proof. Recall from Proposition 2.5 that if τ = std(u), then whenever 1 ≤ i < j ≤ n, we have For the remainder of this section, let A be the set of noncommuting variables {X 1 , X 2 , . . . }, let M (π) be the set of monomials in these variables whose standardization is π, and let B = σ∈Γ M (σ). Proof. Write π = π 1 π 2 · · · π n and X = X i 1 X i 2 · · · X in . Since X ∈ M (π), we have that std(i 1 i 2 · · · i n ) = π. Suppose that X i k X i k+1 · · · X i k+m is an occurrence of a word from B, so X i k X i k+1 · · · X i k+m ∈ M (σ) for some σ ∈ Γ and thus Since std(i 1 i 2 · · · i n ) = π and std(i k i k+1 · · · i k+m ) = σ, it follows from Lemma 3.2 that std(π k π k+1 · · · π k+m ) = σ. In other words, π k π k+1 · · · π k+m is an occurrence of σ in π. We can go backward to see that there is a bijection between occurrences of words from B in X and patterns from Γ in π, which shows occ B (X) = occ Γ (π).
Proof. Similar reasoning as above can be used to show that there is a bijection between B-clusters on X and Γ-clusters on π which preserves the number (and positions) of marked occurrences; we omit the details.
We are now ready to prove Theorem 3.1.
Proof of Theorem 3.1. As a consequence of Lemma 3.3, we have that where occ B (π) := occ B (X) for any X ∈ M (π). Hencē Similarly, Lemma 3.4 implies where C B,π := C B,X for any X ∈ M (π). Thus Finally, we use Theorem 2.1 along with Equations (6) and (7) to concludē

Two basic homomorphisms
We now demonstrate how Elizalde and Noy's cluster method for permutations, as well as Elizalde's q-analogue, can be recovered from the cluster method in FQSym. Given π ∈ S n , define the maps Ψ : and extending linearly.
Proposition 3.5. The maps Ψ and Ψ q are Q-algebra homomorphisms.
Proof. Let π ∈ S m and σ ∈ S n . Using the multiplication rule for the G π , the definition of the map Ψ q , and the identity τ ∈C(π,σ) q inv(τ ) = q inv(π)+inv(σ) m + n n q (see [3, Lemma 2.1]), we obtain hence, Ψ q is a homomorphism. Setting q = 1 above yields which shows that Ψ is a homomorphism as well.
The homomorphism Ψ is precisely the homomorphism φ of Josuat-Vergès, Novelli, and Thibon mentioned in the introduction of this paper. It is easy to see that upon applying Ψ to our cluster method in FQSym (Theorem 3.1), we recover Elizalde and Noy's cluster method for permutations (Theorem 2.2). Applying Ψ q instead yields a proof of Elizalde's q-cluster method (Theorem 2.3).
We also note that Ψ and Ψ q are closely related to two homomorphisms, denoted Φ and Φ q , which appear in [36]. (The map Φ also appears in [14,16,35].) These two homomorphisms are defined on the algebra Sym of noncommutative symmetric functions by the formulas where h n := i 1 ≤···≤in X i 1 X i 2 · · · X in = G 12···n . In fact, Φ and Φ q are related to our homomorphisms Ψ and Ψ q by where ι is the canonical inclusion from Sym to FQSym.

A note on the Hadamard product
Our next goal is to define a family of homomorphisms on FQSym that can be used to produce other specializations of our generalized cluster method. Our starting point is Theorem 2.4, which states that every shuffle-compatible descent statistic st gives rise to a homomorphism φ st from the algebra QSym of quasisymmetric functions to the shuffle algebra A st of st. Many of these algebras A st can be characterized as subalgebras of various formal power series algebras in which the multiplication is the "Hadamard product" in a variable t, which we define below. The operation of Hadamard product * on formal power series in t is defined by ∞ n=0 a n t n * ∞ n=0 b n t n := ∞ n=0 a n b n t n .
In our notation for formal power series algebras, we write t * to indicate that multiplication is the Hadamard product in t. For example, Q[[t * , x]] is the Q-algebra of formal power series in the variables t and x, where multiplication is ordinary multiplication in x but is the Hadamard product in t. Thus we have .
We write f * n to mean the n-fold Hadamard product of f , and f * −1 the inverse of f with respect to Hadamard product. For example, we have We will always use the notations * , * n , or * −1 for any expression involving the Hadamard product; all other expressions should be interpreted as using ordinary multiplication.

Further specializations of the generalized cluster method
We now use the homomorphisms defined in the previous section to produce further specializations of our generalized cluster method which can be used to relate the polynomials A (ides,icomaj) Γ,n (s, t, q), A ides Γ,n (s, t), P ipk Γ,n (s, t), and P ilpk Γ,n (s, t)-defined in Section 1.1-to "refined cluster polynomials". These specializations are similar in spirit to Elizalde's q-cluster method in that they count permutations by occurrences of prescribed patterns but also keep track of additional statistics.
We begin with (ides, icomaj). Given a set Γ ⊆ S, let which counts Γ-clusters of length k by the number of marked occurrences as well as the inverse descent number and inverse comajor index of the underlying permutation.
We note that this formula lives inside the formal power series algebra Q[[s, t * , q, x]], although the Hadamard product is only present on the right-hand side.
It follows that A (ides,imaj) Γ,n (s, t, q) = q −n A (ides,icomaj) Γ,n (s, tq n , q −1 ), so we can compute the polynomials A (ides,imaj) Γ,n (s, t, q) from the A (ides,icomaj) Γ,n (s, t, q). In other words, having a formula for the polynomials A (ides,icomaj) Γ,n (s, t, q) is equivalent to having one for the A (ides,imaj) Γ,n (s, t, q). Furthermore, in using Theorem 3.7 to compute the polynomial A (ides,icomaj) Γ,j (s, t, q), one only needs to sum from n = 0 to n = j on the right-hand side. This is because, by the definition of Hadamard product in t, the coefficient of is zero unless n ≤ j. The same is true for the other formulas in this section. We now specialize Theorem 3.7 to an analogous result solely for the inverse descent number. Let be the refined cluster polynomial for ides.
Theorem 3.8. Let Γ ⊆ S be a set of permutations, each of length at least 2. Then Proof. This follows immediately from setting q = 1 in Theorem 3.7 and simplifying.
Then the following two theorems can be proven in the same way as Theorem 3.7, but using the homomorphisms Ψ ipk and Ψ ilpk . We outline the steps for Theorem 3.9 but omit the proof of Theorem 3.10.
Theorem 3.9. Let Γ ⊆ S be a set of permutations, each of length at least 2. Then Proof. We shall apply Ψ ipk to both sides of (5). Observe that Theorem 3.10. Let Γ ⊆ S be a set of permutations, each of length at least 2. Then 4. Monotone patterns 12 · · · m and m · · · 21
We begin with a lemma establishing closed-form generating functions for refined 12 · · · mcluster polynomials, which we need in order to apply our results from Section 3.5. Note that, in general, there is no straightforward way to count clusters by inverse statistics. As a matter of fact, the simpler problem of counting clusters (without keeping track of any statistic) is equivalent to counting linear extensions of a certain poset [10], which is itself difficult in general. Yet, counting σ-clusters by our inverse statistics is essentially trivial when σ is a monotone pattern.
Proof. It is easy to see that there exists a 12 · · · m-cluster on π if and only if π is itself of the form 12 · · · n where n ≥ m, and that the overlap set of 12 · · · m is given by O 12···m = {1, 2, . . . , m − 1}. Hence, we can uniquely generate 12 · · · m-clusters by first taking the permutation 12 · · · m, and then repeatedly appending the next l largest integers (for any 1 ≤ l ≤ m − 1) in increasing order-each iteration creates an additional marked occurrence of 12 · · · m. Figure 1 provides an illustration for the case m = 4. Thus, we have the formula (see also [10, p. 356]). Moreover, since 12 · · · m-clusters are themselves monotone increasing, their inverses are also monotone increasing and therefore have no descents, peaks, or left peaks. Using (8) our formulas for ∞ k=2 R ipk 12···m,k (s, t)x k and ∞ k=2 R ilpk 12···m,k (s, t)x k are obtained in the same way. Lastly, since our formula for ∞ k=2 R (ides,icomaj) 12···m,k (s, t, q)x k does not depend on q, we have the same formula for ∞ k=2 R ides 12···m,k (s, t)x k .

A sequence of algebraic manipulations yields
thus completing the proof.
Let A n (t, q) := π∈Sn t des(π)+1 q maj(π) for n ≥ 1 and A 0 (t, q) := 1; these are called q-Eulerian polynomials and encode the joint distribution of des and maj over S n . Observe that 12···m,n (t, q) = π∈Sn t ides(π)+1 q imaj(π) = π∈Sn t des(π)+1 q maj(π) = A n (t, q); we can exploit this limit to recover from Theorem 4.2 a classical identity involving q-Eulerian polynomials. By taking the limit as m → ∞ of both sides of Theorem 4.2 (b), we obtain and extracting coefficients of x n yields the famous Carlitz identity [26, Corollary 6.1] [k] n q t k .
Next, we have the following formulas for the polynomials A ides 12···m,n (s, t) and A ides 12···m,n (t).
Clearly, all of these permutations have exactly one descent and the lengths of their reading sequences are all less than 3. A careful case analysis shows that these are the only permutations in S n with these properties; we omit the details.

Monotone patterns and inverse peak number
Next, we proceed to the polynomials P ipk 12···m,n (s, t) and P ipk 12···m,n (t), which are equal to the polynomials P ipk m···21,n (s, t) and P ipk m···21,n (t) by Proposition 2.7 (e). Theorem 4.5. Let m ≥ 2. We have Proof. Part (a) follows immediately from Theorem 3.9 and Lemma 4.1. Setting s = 0 in part (a), we obtain thus proving part (b). For part (c), we shall use the well-known identities Then, continuing from (11), we have this completes the proof.
In order to use Theorem 4.5 to compute the polynomials P ipk 12···m,n (s, t) and P ipk 12···m,n (t), one must "invert" the expression u = 4t/(1 + t) 2 . Let us first replace the variable t with v, and u with t, to obtain t = 4v/(1 + v) 2 . Then, solving t = 4v Thus, Theorem 4.5 (b) is equivalent to (Note that substitution does not commute with Hadamard product, so we cannot simply replace t with v inside the Hadamard product.) With some additional algebraic manipulations, we get the formula where z and v are the same as above; this formula can be used to compute the polynomials P ipk 12···m,n (t). We can carry out a similar process with Theorem 4.5 (a) and (c), as well as with Theorems 4.7, 4.8, 5.3, and 5.4 appearing later in this paper.
Claim 4.6. Let n ≥ 1 and m ≥ 3. The number of permutations π in S n (12 · · · m) with ipk(π) = 0 is equal to the (m − 1)th order Fibonacci number f (m−1) n . 4 Note that [30] uses a different indexing for these sequences.

Monotone patterns and inverse left peak number
Finally, we produce analogous formulas for the inverse left peak polynomials P ilpk 12···m,n (s, t) and P ilpk 12···m,n (t). We omit the proofs of these formulas, as they follow essentially the same steps as the proof of Theorem 4.5.

Cluster generating functions for transpositional patterns
In this section, we turn our attention to patterns of the form σ = 12 · · · (a−1)(a+1)a(a+2)(a+ 3) · · · m where m ≥ 5 and 2 ≤ a ≤ m − 2. These are precisely the elementary transpositions (a, a + 1) of S m -aside from the transpositions (1, 2) and (m − 1, m)-and form another family of patterns for which it is straightforward to obtain closed-form generating functions for our refined cluster polynomials.
By the symmetry present in Theorem 5.2, the polynomials A ides 13245,n (t) displayed above are the same as the polynomials A ides 12435,n (t) for corresponding n.
We give the first ten polynomials P ipk 13245,n (t)-which are also the first ten polynomials P ipk 12435,n (t)-in Table 10.

Conclusion
In summary, we have proven a lifting of Elizalde and Noy's adaptation of the Goulden-Jackson cluster method for permutations to the Malvenuto-Reutenauer algebra FQSym. By applying two homomorphisms to the cluster method in FQSym, we recover both Elizalde and Noy's cluster method and Elizalde's q-cluster method as special cases. We have also defined several other homomorphisms, by way of the theory of shuffle-compatibility, which lead to new specializations of our generalized cluster method that keep track of various inverse statistics. Finally, we applied these results to two families of patterns: the monotone patterns 12 · · · m and m · · · 21, and the transpositional patterns 12 · · · (a − 1)(a + 1)a(a + 2)(a + 3) · · · m where m ≥ 5 and 2 ≤ a ≤ m − 2.
We chose to study monotone patterns as well as the transpositional patterns of the form above because, for these patterns, it is easy to count clusters by the inverse statistics that we consider. In particular, these patterns have two nice properties: 1. These patterns are chain patterns. Elizalde and Noy [10] showed that counting clusters is equivalent to counting linear extensions in a certain poset, and the poset associated with a chain pattern is a chain. This means that if we fix the length of a cluster as well as the positions of the marked occurrences within the cluster, then there is at most one cluster of that length and with that set of positions.
2. Clusters formed from any one of these patterns are involutions, so counting clusters by ist is the same as counting them by st.
In forthcoming work, joint with Sergi Elizalde and Justin Troyka, we study the transpositional patterns 2134 · · · m and 12 · · · (m − 2)m(m − 1) for m ≥ 3. Interestingly, the enumeration of 2134 · · · m-clusters and 12 · · · (m − 2)m(m − 1)-clusters by ides, ipk, and ilpk turns out to have connections to generalized Stirling permutations [15] and 1/k-Eulerian polynomials [28]. Although these are not chain patterns and their clusters are not involutions, they are examples of non-overlapping patterns: patterns whose overlap set is equal to {m − 1}. Both the non-overlapping condition and the condition of being a chain pattern greatly restrict how clusters can be formed, making them easier to characterize and thus more amenable to study. As such, one direction of future work is to apply our results to other families of non-overlapping patterns and chain patterns.
We also present the following conjecture, which is suggested by computational evidence.
In particular, Conjecture 6.1 would imply that-for all patterns σ considered in this paper-the polynomials A ides σ,n (t), P ipk σ,n (t), and P ilpk σ,n (t) are unimodal and log-concave, and that the distributions of the statistics ides, ipk, and ilpk over S n (σ) converge to a normal distribution as n → ∞. It is worth noting that the Eulerian, peak, and left peak polynomials are all real-rooted (see, e.g., [25,26,33]). In light of this fact, one might intuitively expect the polynomials A ides σ,n (t), P ipk σ,n (t), and P ilpk σ,n (t) to be real-rooted as well, since avoiding a single consecutive pattern is not a very restrictive condition (especially when compared to classical pattern avoidance) and therefore might be expected to preserve unimodality or asymptotic normality.
One can use the theory of shuffle-compatibility from [17] to define other homomorphisms on FQSym which can be used to count permutations by inverses of shuffle-compatible statistics other than the ones we consider here. For example, the bistatistic (pk, des) is shuffle-compatible, so we can define a homomorphism Ψ (ipk,ides) that can be used to produce yet another specialization of our generalized cluster method that simultaneously refines by ipk and ides. Finally, in a different direction, one may apply our homomorphisms to other formulas in FQSym which lift classical formulas in permutation enumeration-such as the lifting of André's exponential generating function considered in [21]-leading to new refinements of these classical formulas by inverse statistics.