1 Introduction

The Möbius function of the consecutive pattern poset was determined by Bernini, Ferrari, and Steingrímsson [2]. We give another proof of their result using discrete Morse theory. In our demonstration, the definitions needed to state this formula naturally arise from the structure of the poset. Furthermore, the use of discrete Morse theory allows us to easily determine the homotopy type of the poset. Björner’s formula for the Möbius function of factor order [3] is remarkably similar to that of the consecutive pattern poset, so we will also consider the relationship between these two posets.

Let S d be the set of all permutations of the first d positive integers. A consecutive pattern σ=σ(1)σ(2)…σ(k)∈S k appears in a permutation τ=τ(1)τ(2)…τ(d)∈S d if the letters of some subsequence τ(i+1)τ(i+2)…τ(i+k) of τ appear in the same relative order as the letters in σ. For example, in τ=23415, σ=123 is the consecutive pattern corresponding to τ(1)τ(2)τ(3)=234, and σ=213 is the consecutive pattern corresponding to τ(3)τ(4)τ(5)=415.

The consecutive pattern poset is S=⋃ d>0 S d ordered with respect to consecutive pattern containment. The length of τ, denoted |τ|, is the number of positions in τ. In particular, if τS d , then |τ|=d. Note that this is the notion of length one uses in thinking of τ as a word rather than the other standard concept of length in terms of products of transpositions. A permutation is monotone if its letters are either strictly increasing or strictly decreasing. The standard form of a sequence of distinct integers s=s(1)s(2)…s(d) is the permutation p=p(1)p(2)…p(d) in S d whose letters appear in the same relative order as the letters in s. The examples of σ given in the previous paragraph are the standard forms of the corresponding sequences in τ. Note, in particular, that a consecutive subsequence of τ must be converted to standard form to get an element in the consecutive pattern poset.

To state the formula for the Möbius function of the consecutive pattern poset as a simple recursive formula, we make the following definitions. A prefix of length k of a permutation τS d is the standard form of the first k letters of τ. If k<d, then the prefix is proper. For example, prefixes of 53412 include 312 and 4231. Similarly, a suffix of length k of a permutation τS d is the standard form of the last k letters of τ. The reader should keep in mind that prefixes and suffixes are not actual subsequences of τ, but instead refer to the standardizations of certain subsequences. We define the interior of a permutation τ=τ(1)τ(2)…τ(d)∈S d for d>2 to be the standard form of the sequence τ(2)…τ(d−1). The interior of τ will be denoted i(τ). For example, i(23415)=231. We define the exterior of a permutation τ to be the longest permutation which is both a proper prefix and a suffix of τ. The exterior of τ will be denoted x(τ). For example, x(23415)=12, while x(326415)=213. Notice the exterior is always defined, since the standardization of a single integer is 1.

The following theorem is an equivalent statement of a theorem of Bernini, Ferrari, and Steingrímsson. For those familiar with this work, note that we use the condition \(x(\tau)\not\leq i(\tau)\) in place of the carrier element of τ.

Theorem 1.1

([2])

In the consecutive pattern poset S, if στ then

$$\mu(\sigma,\tau)=\begin{cases}\mu(\sigma,x(\tau)) & \mbox{\textit{if} } |\tau|-|\sigma|>2\mbox{ \textit{and} } \sigma \leq x(\tau)\not\leq i(\tau),\\[3pt]1 &\mbox{\textit{if} } |\tau|-|\sigma|=2, \tau\mbox{ \textit{is not monotone, and} }\sigma\in\{i(\tau),x(\tau)\},\\[3pt](-1)^{|\tau|-|\sigma|} &\mbox{\textit{if} } |\tau|-|\sigma|<2,\\[3pt]0 &\mbox{\textit{otherwise}.}\end{cases}$$

To state our proof of this result, we will need to use a theorem of Babson and Hersh [1]. This result gives a way of applying Forman’s discrete version of Morse theory [4] to partially ordered sets. For brevity, we are only going to state the minimum number of definitions to apply this theorem. A reader who is interested in learning more about discrete Morse theory is encouraged to begin with Forman’s outstanding introduction to this topic [5].

Let P be any poset. The notation xy will indicate that x covers y in P. Let \(C: x=z_{0} \stackrel{ }{\rightarrow }z_{1}\rightarrow \cdots\rightarrow z_{n}=y\) be a chain in P. Since each pair of adjacent elements is related by a cover, C is called a saturated chain. The closed interval of C from z i to z j is the chain C[z i ,z j ]:z i z i+1→⋯→z j . The open interval of C from z i to z j , C(z i ,z j ), is defined similarly. The closed interval C[z i ,z i ] consisting of the single element z i will also be written z i , but the context will always indicate whether we are referring to the element or the interval. Notice that the interval [x,y] is non-empty when xy in the poset P, while C[z i ,z j ] is non-empty when z i z j . A saturated chain C of the interval [x,y] is a maximal chain if z 0=y and z n =x.

Given two maximal chains C:z 0z 1→⋯→z n and D:x 0x 1→⋯→x n in an interval [x,y], we say C and D agree to index k if z i =x i for all ik. We say C and D diverge from index k if C and D agree to index k and z k+1x k+1. A total ordering C 1<C 2<⋯<C n of the maximal chains of an interval is a poset lexicographic order if it satisfies the following: suppose C<D and C and D diverge from index k; if C′ and D′ agree to index k+1 with C and D, respectively, then C′<D′.

Suppose C 1<C 2<⋯<C n is an ordering of the maximal chains of the closed interval [x,y]. An interval C(z i ,z j ) is a skipped interval of a maximal chain C if

$$C-C(z_i,z_j) \subseteq C'\quad \mbox{for some}\ C' < C.$$

It is a minimal skipped interval (MSI) if it does not properly contain another skipped interval. We write I(C) for the set of all MSIs of a chain C. To find the set I(C), consider each interval IC(y,x) and see if CIC′ for any C′⊆C, then throw out any such interval that is nonminimal. In Table 1, we give examples of minimal skipped intervals in the context of the consecutive pattern poset.

Table 1 Comparing I(C) and J(C) for our poset lexicographic ordering of the maximal chains of [1,213546]. Note that I(C)=J(C) except for the last chain, which has ρ 2 in two I(C) intervals

Notice I(C) could contain distinct intervals with non-empty intersection. Babson and Hersh’s result requires a set of disjoint intervals derived from I(C), which we will denote J(C). We construct J(C)={J 1,J 2,…} as follows. Order the intervals of I(C) based on when they are first encountered in C. Thus, I 1 will contain the element z i of smallest index that appears in any interval in I(C), I 2 will contain the element z j of smallest index that appears in any interval in I(C) other than I 1, etc. Let J 1=I 1. Then consider the intervals \(I'_{2}=I_{2}-J_{1}\), \(I'_{3}=I_{3}-J_{1}\), and so forth. Throw out any that are not containment minimal, and pick as J 2 the first one which remains. Continue this process until no intervals remain.

The set of intervals J(C) covers C if its union equals the open interval C(z 0,z n ). A chain C is called critical if J(C) covers C. Finally, if a chain C is critical, the critical dimension of the chain is

$$d(C)=\#J(C)-1$$

where # denotes cardinality.

Theorem 1.2

([1])

For any poset lexicographic order on the maximal chains of [x,y],

$$\mu(x,y)=\sum_{C}(-1)^{d(C)},$$

where the sum is over all critical chains C in the poset lexicographic order.

The rest of the paper is organized as follows. In Sect. 2, we use Theorem 1.2 to reprove Bernini, Ferrari, and Steingrímsson’s formula in Theorem 1.1. In Sect. 3, we define factor order and consider the relationship between posets ordered by factor order and the consecutive pattern poset. In particular, we show that certain intervals in S are isomorphic to intervals in factor order using an alphabet of two letters. We also define a sequence of posets interpolating between S and factor order on the integers each of which has a Möbius function which can be described as in Theorem 1.1.

2 Discrete Morse theory and the consecutive pattern poset

Before we can use Babson and Hersh’s Theorem, we first need to use the structure of the consecutive pattern poset to define an appropriate lexicographic order. Once this ordering is identified, we must find a useful characterization of the corresponding minimally skipped intervals. This characterization gives us insight into why the interior and exterior of the word τ are essential to the statement of the formula for the Möbius function. Once we have a characterization of the MSIs, we will have enough information to understand the relationship between the sets J(C) and I(C), the explanation of which is the key component in our proof of this recursive formula for the Möbius function.

To get a sense of the structure of the consecutive pattern poset, we first consider the covering relations. The following lemma is easy to prove and so its demonstration is left to the reader.

Lemma 2.1

([2])

A permutation τ=τ(1)τ(2)…τ(d) in the consecutive pattern poset can only cover the standard form of the sequences τ(2)…τ(d) and τ(1)…τ(d−1). These two permutations are distinct unless τ is monotone, in which case they are equal and monotone.

An expansion of σS k has the form 0…0σ0…0. An embedding of σ into τ=τ(1)τ(2)…τ(d) is an expansion η of σ with length |τ| such that the nonzero entries, η(i+1),…,η(i+k) are the standard form of the sequence τ(i+1)τ(i+2)…τ(i+k). In addition, we say each entry τ(1),…,τ(i) and τ(i+k+1),…,τ(d) is reduced to 0 in η. Note that when τ covers σ, there is a unique embedding unless τ is monotone, in which case we will always be using the suffix embedding 0σ.

Let [σ,τ] be an interval in ⋃ d>0 S d . Let

$$C:\tau=\rho_0\stackrel{l_1}{\rightarrow}\rho_1\stackrel{l_2}{\rightarrow }\cdots \stackrel{l_{n-1}}{\rightarrow} \rho_{n-1}\stackrel {l_n}{\rightarrow}\rho_n=\sigma $$

be a maximal chain in [σ,τ], where the l i are defined as follows. Using the convention of the previous paragraph for the monotone case, each cover ρ i−1ρ i defines a unique embedding of ρ i in ρ i−1. Inductively, this defines an embedding η i of ρ i in τ. We let l i be the position zeroed out in passing from η i−1 to η i . Examples of maximal chains written in this form are given in Table 1.

Note that this construction gives each maximal chain its own unique sequence l 1l n which we can use to identify it. We call this sequence a maximal chain’s chain id. It is easy to see that lexicographically ordering these chain ids produces a poset lexicographic order on the maximal chains of [σ,τ]. This is the order we will use to find the MSIs of the maximal chains C, and ultimately the sets J(C) which will allow us to apply Theorem 1.2.

Table 1 also contains an example of this poset lexicographic ordering and the resulting MSIs. The table signifies the MSIs of each maximal chain by surrounding the appropriate permutations with brackets, and contains one example of a maximal chain with overlapping MSIs, namely, the last chain which has ρ 2 in two intervals of I(C).

To facilitate the exposition, we make the following definitions. A descent in a maximal chain is a permutation ρ i where l i >l i+1. We say ρ i is a strong descent if l i >l i+1+1, and a weak descent if l i =l i+1+1. An ascent in a maximal chain is a permutation ρ i where l i <l i+1. In Table 1, the chain with chain id 6−5−1−2−3 has ρ 1=21354 as a weak descent, ρ 2=2134 as a strong descent, and ρ 3=123 as an ascent.

Lemma 2.3

Let \(C:\tau=\rho_{0}\stackrel{l_{1}}{\rightarrow}\rho_{1}\stackrel {l_{2}}{\rightarrow}\cdots\stackrel{l_{n-1}}{\rightarrow}\rho_{n-1}\stackrel{l_{n}}{\rightarrow}\rho_{n}=\sigma\) be a maximal chain in [σ,τ]. If ρ i is a strong descent, then ρ i is an MSI in C.

Proof

Since l i l i+1>1, we know that ρ i is the standard form of the longest proper prefix of ρ i−1 and ρ i+1 is the standard form of the interior of ρ i−1. Let u be the longest proper suffix of ρ i−1.

Suppose u is not a monotone permutation. Then

$$C':\rho_0\stackrel{l_1}{\rightarrow}\cdots\stackrel{l_{i-2}}{\rightarrow } \rho_{i-2}\stackrel{l_{i-1}}{\rightarrow} \rho_{i-1}\stackrel {l_{i+1}}{\rightarrow}u\stackrel{l_{i}}{\rightarrow}\rho_{i+1}\stackrel {l_{i+2}}{\rightarrow}\cdots \stackrel{l_{n}}{\rightarrow} \rho_n$$

is a lexicographically earlier chain than C. Hence, ρ i is a skipped interval in C. Since ρ i is an interval consisting of a single element, ρ i is an MSI.

Suppose u is a monotone permutation. Then l i cannot be reduced in u. However, the chain

$$D':\rho_0\stackrel{l_1}{\rightarrow}\cdots\stackrel{l_{i-2}}{\rightarrow } \rho_{i-2}\stackrel{l_{i-1}}{\rightarrow} \rho_{i-1}\stackrel {l_{i+1}}{\rightarrow}u\stackrel{l_{i+2}}{\rightarrow}\rho_{i+1}\stackrel{l_{i+3}}{\rightarrow}\cdots \stackrel{l_{n}}{\rightarrow } \rho_{n-1}\stackrel{l_{n}+1}{\rightarrow} \rho_{n}$$

is a lexicographically earlier chain than C because each ρ j for j>i is monotone. Hence, ρ i is an MSI in this case as well. □

Considering this result in Table 1 suggests that Lemma 2.3 accounts for a small proportion of the MSIs in this poset lexicographic order. The next result, however, gives a great deal of information about the critical chains in this order.

Lemma 2.4

Let \(C:\tau=\rho_{0}\stackrel{l_{1}}{\rightarrow}\rho_{1}\stackrel {l_{2}}{\rightarrow}\cdots\stackrel{l_{n-1}}{\rightarrow}\rho_{n-1}\stackrel{l_{n}}{\rightarrow}\rho_{n}=\sigma\) be a maximal chain in [σ,τ]. If ρ i is an ascent, then it is not contained in any MSI.

Proof

We will prove this lemma by contradiction. Suppose C[ρ r ,ρ s ] is an MSI that contains ρ i . Notice that ρ i may only be preceded by ascents in this interval because if there are descents, the last one that occurs before ρ i would be a strong descent. By Lemma 2.3, this would be an MSI, contradicting the minimality of C[ρ r ,ρ s ]. Thus, it suffices to derive a contradiction for ρ i =ρ r , the first ascent in the interval C[ρ r ,ρ s ].

Since C[ρ r ,ρ s ] is an MSI of C[τ,σ] if and only if it is an MSI of C[ρ r−1,ρ s+1], it suffices to consider the case r=1. However, if r=1 then ρ 1 being an ascent forces l 1=1. This implies ρ 1 appears in all chains preceding C. Therefore, ρ 1 can be removed from any skipped interval in which it appears and that interval will still be skipped, contradicting the fact that C[ρ 1,ρ s ] is minimal. □

Notice that Lemma 2.4 implies that all MSIs of a chain C consist entirely of descents. Thus, only the lexicographically last chain in an interval can possibly be critical. The next lemma covers the two basic cases of MSIs in a chain C. We have already encountered the first case, while the second case is new.

Lemma 2.5

Suppose τ is not monotone and |τ|≥2:

  1. 1.

    There are two maximal chains in the interval [i(τ),τ], and if C is the second chain, then it has a decreasing chain id and a unique MSI, C(τ,i(τ)).

  2. 2.

    If \(x(\tau)\not\leq i(\tau)\), then there are two maximal chains in the interval [x(τ),τ]. If C is the second chain, then it has a decreasing chain id and a unique MSI, C(τ,x(τ)).

Proof

The first case follows from Lemma 2.3. For the second case, once we remove the first or last element, there is only one copy of x(τ) left in τ. Therefore, there are two maximal chains in the interval [x(τ),τ]: the first chain, which ends at the suffix embedding, and the last chain, which ends at the prefix embedding. Since x(τ) is the longest prefix of τ which is also a suffix, and the first chain contains only suffixes of τ while the last chain contains only prefixes of τ, these two chains have only x(τ) and τ in common. Therefore, C(τ,x(τ)) is an MSI, completing the proof. □

We can illustrate this lemma using the intervals [123,21354] and [21,21354]. Note the interior of 21354 is 123, so that the maximal chains of [123,21354] are 21354→1243→123 and 21354→2134→123, giving C(21354,123) as an MSI in the second chain. The exterior of 21354 is 21 and the interior is 123 with \(21\not\leq123\), so the maximal chains of [21,21354] are 21354→1243→132→21 and 21354→2134→213→21, giving C(21354,21) as an MSI in the second chain.

Note that there can be no overlap between these two types of MSI. Proposition 2.6 generalizes Lemma 2.5(2), and the theorem that follows shows that we have identified all cases of MSIs. It will be convenient to adopt the convention that a sequence l i+1 consisting of a single label is not decreasing, corresponding to the fact that the interval C(ρ i ,ρ i+1) is empty and so not an MSI.

Proposition 2.6

Let \(C:\tau=\rho_{0}\stackrel{l_{1}}{\rightarrow}\rho_{1}\stackrel {l_{2}}{\rightarrow}\cdots\stackrel{l_{n-1}}{\rightarrow}\rho_{n-1}\stackrel{l_{n}}{\rightarrow}\rho_{n}=\sigma\) be a maximal chain in the interval [σ,τ]. Suppose there are i and j such that \(\rho_{j}=x(\rho_{i})\not\leq i(\rho_{i})\), and the sequence l i+1,…,l j is decreasing. Then C(ρ i ,ρ j ) is an MSI in C.

Proof

Since the sequence l i+1,…,l j is decreasing, ρ i cannot be monotone and ji+2. So Lemma 2.5(2) implies that C(ρ i ,ρ j ) is an MSI in the subchain of C that is its intersection with [ρ j ,ρ i ]. The proof is concluded by noting that if ρϕ are elements of any maximal chain C then C(ϕ,ρ) is an MSI of C[ϕ,ρ] if and only if it is an MSI of C. □

Theorem 2.7

The interval C(ρ i ,ρ j ) is an MSI of a maximal chain C if and only if C(ρ i ,ρ j )=ρ i+1 and ρ i+1 is a strong descent, or \(\rho_{j}=x(\rho_{i})\not\leq i(\rho_{i})\), and the sequence l i+1,…,l j is decreasing.

Proof

The reverse implication follows from Lemma 2.3 and Proposition 2.6.

Suppose C(ρ i ,ρ j ) is an MSI in C. By Lemma 2.4, the sequence l i+1,…,l j is a decreasing sequence. If ρ i+1 is a strong descent, then ρ i+1 is an MSI by Lemma 2.3. This implies C(ρ i ,ρ j )=ρ i+1. If ρ i+1 is not a strong descent, then, by containment-minimality, none of the descents are strong descents. Also, our sequence is decreasing, so we conclude that ρ j is a prefix of the permutation ρ i .

Since there is only one chain ending at the prefix embedding of ρ j in ρ i , and [ρ i ,ρ j ] contains another chain previous to C(ρ j ,ρ i ), there must be a second embedding of ρ j in ρ i . Let k be the largest index so that ρ k contains at least two embeddings of ρ j . Then ρ k+1 contains only the prefix embedding of ρ j , implying that ρ j is a suffix of ρ k and ρ k contains exactly these two embeddings of ρ j . But ρ j is also a prefix of ρ k . Thus x(ρ k )=ρ j because if a permutation longer than ρ j was x(ρ k ), then ρ k+1 would have more than one embedding of ρ j . Since ρ k contains exactly two embeddings of ρ j , a prefix embedding and a suffix embedding, it follows that \(\rho_{j}\not\leq i(\rho_{k})\). So by Proposition 2.6, C(ρ k ,ρ j ) is an MSI of C. Thus, by containment-minimality, it must be the case that k=i. □

Theorem 2.7 completes the characterization of the MSIs in an interval [σ,τ] of the consecutive pattern poset. Notice the definitions of the interior and exterior, and the inequality between them, naturally arise when determining the MSIs. In particular, they are determined by the lexicographic ordering of the maximal chains.

We are now ready to prove Bernini, Ferrari, and Steingrímsson’s formula using discrete Morse theory. We have broken the proof up into several cases to make it easier to follow.

Theorem 1.1

([2])

In the consecutive pattern poset, if στ then

$$\mu(\sigma,\tau)= \begin{cases}\mu(\sigma,x(\tau)) & \mbox{\textit{if} } |\tau|-|\sigma|>2\mbox{ \textit{and} } \sigma \leq x(\tau)\not\leq i(\tau),\\[3pt]1 &\mbox{\textit{if} } |\tau|-|\sigma|=2,\ \tau \mbox{ \textit{is not monotone}, \textit{and} }\sigma\in\{i(\tau),x(\tau)\},\\[3pt](-1)^{|\tau|-|\sigma|} &\mbox{\textit{if} } |\tau|-|\sigma|<2,\\[3pt]0 &\mbox{\textit{otherwise}.}\end{cases} $$

Proof

Let [σ,τ] be an interval in the consecutive pattern poset. Suppose first that |τ|−|σ|<2. Then σ=τ or |σ|=|τ|−1. By the definition of the Möbius function, we have μ(σ,τ)=1 in the first case and μ(σ,τ)=−1 in the second case. Thus, the formula for μ(σ,τ) holds when |τ|−|σ|<2.

Now suppose |τ|−|σ|=2. Then, by the usual Möbius function recursion, μ(σ,τ)=0 if there is one element in the interval (σ,τ) and μ(σ,τ)=1 when there are 2 elements in the interval (σ,τ). Since τ covers at most two elements, these are the only possibilities. If τ is monotone, then μ(σ,τ)=0 since (σ,τ) contains a single element. If τ is not monotone and σ=i(τ), then reducing either the first or last position of τ gives us an element in (σ,τ), implying μ(σ,τ)=1. If τ is not monotone and σ=x(τ), then regardless of whether we reduce the first two positions or last two positions of τ, we get σ. Thus, (σ,τ) has 2 elements implying μ(σ,τ)=1. If the above cases do not hold, then σ is either a prefix or a suffix of τ, but not both. In these cases, (σ,τ) has 1 element implying μ(σ,τ)=0. Thus, the formula for μ(σ,τ) holds when |τ|−|σ|=2.

We now turn to the case |τ|−|σ|>2. We will use Theorem 1.2 to calculate μ(σ,τ) from the critical chains in [σ,τ]. By Lemma 2.4, the chain id of a critical chain must be decreasing. Since a strong descent is followed by an ascent unless it is the last element in a chain, all the descents must be weak descents except possibly the last one. It follows that the only maximal chain in [σ,τ] that could be critical is the one which is lexicographically last. Call this chain

$$C:\tau=\rho_0\stackrel{l_1}{\rightarrow}\rho_1\stackrel{l_2}{\rightarrow }\cdots \stackrel{l_{n-1}}{\rightarrow} \rho_{n-1}\stackrel {l_n}{\rightarrow}\rho_n=\sigma.$$

Suppose first that \(\sigma\leq x(\tau)\not\leq i(\tau)\). We wish to show that x(τ) is an element in the chain C. Let k=|τ|−|x(τ)|. Since x(τ) is not contained in i(τ), the prefix of τ of length |x(τ)|+1 cannot be monotone even if x(τ) is monotone. This observation, along with the fact that σx(τ), allows us to conclude that |τ|,|τ|−1,…,|τ|−(k−1) is a valid beginning for the chain id of a maximal chain D in [σ,τ]. Notice that each of these entries is the largest possible entry that does not already appear in the sequence. Thus, any chain whose chain id differs from the chain id of D in the first k entries is lexicographically earlier than D. So in the chain C, l 1=|τ|, l 2=|τ|−1,…,l k =|τ|−(k−1) which forces ρ k =x(τ).

Consider the subcase when σ=x(τ). The previous paragraph implies that the sequence l 1,…,l k is decreasing and this is the full chain id. Thus Theorem 2.7 implies C(τ,x(τ)) is the only interval in J(C). So by Theorem 1.2, μ(σ,τ)=1. Of course, in this case μ(σ,x(τ))=μ(σ,σ)=1 as well, so the formula holds.

Next we consider σ<x(τ). Since l k was the largest possible entry remaining, l k+1<l k , implying that x(τ) is a descent. Let C′ be the restriction of C to the interval [σ,x(τ)]. We will show that #J(C)=2+#J(C′), allowing us to apply Theorem 1.2 to complete the case \(\sigma\leq x(\tau)\not\leq i(t)\).

Since the sequence l 1,…,l k is decreasing, Theorem 2.7 implies C(τ,x(τ)) is the first interval in J(C). We claim that x(τ) is the second interval in J(C). If x(τ) is a strong descent, then this follows from the same theorem. If x(τ) is a weak descent, then ρ k+1 is the longest prefix of x(τ), implying there are at least two copies of ρ k+1 contained in τ. Let j be the largest value such that ρ j contains at least two copies of ρ k+1. Since j was picked to be maximum and ρ 1,…,ρ j are weak descents, ρ j must contain exactly two copies of ρ k+1 and they must be the prefix and suffix embeddings. It follows that ρ k+1i(ρ j ). Furthermore, x(ρ j )=ρ k+1 because the prefix with one additional letter, x(τ), appears only once in ρ j . Thus, \(x(\rho_{j})\not\leq i(\rho_{j})\). Since the sequence l j+1,…,l k+1 is decreasing, Theorem 2.7 implies C(ρ j ,ρ k+1) is an MSI in C. By the process of constructing J(C) from I(C), x(τ)=C(ρ j ,ρ k+1)−C(ρ 0,ρ k ) is the second MSI in J(C), proving the claim. Since x(τ) is an MSI consisting of one element, all the remaining intervals in J(C) are contained in the interval (σ,x(τ)). Therefore, J(C)=J(C′)∪{C(τ,x(τ)),x(τ)} and #J(C)=2+#J(C′). So by Theorem 1.2, μ(σ,τ)=μ(σ,x(τ)), proving the formula for |τ|−|σ|>2 and \(\sigma\leq x(\tau)\not\leq i(\tau)\).

It remains to consider what happens when |τ|−|σ|>2 and σx(τ)≰i(τ) does not hold. To show μ(σ,τ)=0, we proceed by contradiction. If μ(σ,τ)≠0, then, by Theorem 1.2, J(C) must cover C. This implies that J 1=C(ρ 0,ρ j ) is an MSI for some ρ j . Recall that Theorem 2.7 gives two possibilities for MSIs. If J 1=ρ 1 and ρ 1 is a strong descent, then since |τ|−|σ|>2, ρ 2 is an ascent. This contradicts the fact that C has a decreasing chain id. Alternatively, we must have ρ j =x(τ) and, by Theorem 2.7, σρ j =x(τ)≰i(τ), contradicting our assumption that this does not hold. So μ(σ,τ)=0, completing the proof. □

We can also provide a simple characterization of the homotopy type of an interval in the consecutive pattern poset. Given two elements x and y of a poset P, the order complex Δ(x,y) is the abstract simplicial complex whose simplices are the chains in the open interval (x,y). By using discrete Morse theory to investigate the chains of (σ,τ), one can easily obtain information about the homotopy type of the order complex.

Theorem 2.8

Let [σ,τ] be an interval in the consecutive pattern poset. Then Δ(σ,τ) is homotopic to a sphere or is contractible, depending on whether the interval has 1 or 0 critical chains, respectively. In the former case, the dimension of the sphere is d(C), the critical dimension of the critical chain C.

Proof

In [1], Babson and Hersh showed that the order complex of a poset is homotopy equivalent to a CW complex with exactly one cell of dimension d for each critical chain of critical dimension d in the interval (as well as a dimension 0 cell). In particular, the cell corresponds to a critical simplex in C containing the lowest rank element from each of the intervals in J(C).

In the case of the consecutive pattern poset, Lemma 2.4 implies that a critical chain must have a decreasing chain id. Thus, only the lexicographically last chain can be critical. If [σ,τ] does not have a critical chain, then Δ(σ,τ) is homotopy equivalent to a CW complex with only the 0-cell. Thus, the order complex is contractible in this case. If [σ,τ] has one critical chain C, then Δ(σ,τ) is homotopy equivalent to a CW complex with a 0-cell and one cell of dimension d(C). The unique way to attach this cell to the 0 cell is through a map which is constant on the boundary, resulting in a sphere of dimension d(C). □

3 Factor order and the consecutive pattern poset

The Möbius function of factor order was determined by Björner [3]. We begin this section by defining this partial order.

Let A be any set. The Kleene closure, A , is the set of all finite length words over A. So if w is a word and w(i) is the ith letter in w, then

$$A^*=\bigl\{w=w(1)w(2)\ldots w(n): 0\le n<\infty\text{ and } w(i)\in A \text{ for all } i\bigr\}.$$

The length of w, denoted |w|, is the number of letters in w. Factor order on A is the partial order on A defined by letting uw if w contains a subsequence of consecutive letters w(i+1)w(i+2)…w(i+n) such that u(j)=w(i+j) for 1≤jn=|u|. When uw, we call u a factor of w. If we take ℤ+ to be the set A, the word 1121 is a factor of the word 2112121. A word u is flat if u(1)=⋯=u(n), where n=|u|.

A prefix of a word wA is a factor of w that includes the first letter of w. Similarly, a suffix of w is a factor of w that contains the last letter of w. A prefix or suffix is proper if it is not equal to w. Define the outer word o(w) of w to be the longest factor that appears as both a proper prefix and suffix in w. For example, o(2112121)=21. Notice that o(w) can be the empty word, as is the case for o(2111). Define the inner word i(w) of w to be the factor i(w)=w(2)…w(n−1), where n=|w|. For example, i(2112121)=11212.

The following theorem of Björner gives a formula for the Möbius function of factor order.

Theorem 3.1

([3])

In factor order, if uw then

$$\mu(u,w)= \begin{cases}\mu(u,o(w)) & \mbox{\textit{if} } |w|-|u|>2 \mbox{ \textit{and} } u\leq o(w)\not\leq i(w),\\[3pt]1 &\mbox{\textit{if} } |w|-|u|=2,\ w \mbox{ \textit{is not flat}, \textit{and} } u\in\{o(w), i(w)\}\\[3pt](-1)^{|w|-|u|} &\mbox{\textit{if} } |w|-|u|<2,\\[3pt]0 &\mbox{\textit{otherwise}.}\end{cases}$$

This formula is remarkably similar to Bernini, Ferrari, and Steingrímsson’s formula. Willenbring’s proof of Björner’s formula, which utilizes discrete Morse theory, parallels the one given in the previous section [7]. It is thus natural to wonder whether there is some relationship between these two posets. We will give two reasons for this correspondence. For the first, we will show that certain intervals in S are isomorphic to intervals in factor order over a two letter alphabet. For the second, we will construct a sequence of posets interpolating between factor order on the positive integers and a poset containing S. All these posets have Möbius functions satisfying the same recursion and this can be proved uniformly.

Let A={a,b} and partially order A by factor order. Then it is clear that the number of words of length n is 2n. Consider the set of 213 and 231 avoiding permutations (where these are general, not consecutive, patterns). Simion and Schmidt [6] were the first to show that the set of such permutations in S n is counted by 2n−1. They gave two proofs, one inductive and one combinatorial, and we will use a different combinatorial proof. Consider constructing a σ=σ(1)σ(2)…σ(n) avoiding 213 and 231 by choosing the elements σ(i) in increasing order of the index i. Then at each stage, σ(i) must be either the largest or the smallest of the elements not already chosen, for if it was not then it would act as the 2 in a copy of either 213 or 231. So there are two choices for σ(i) for all i<n (and only one choice left over for σ(n)). Thus, the total number of choices is 2n−1.

The map suggested by the paragraph above, in which a word in A of length n−1 is mapped to a 213 and 231 avoiding permutation of length n based on the letter that appears at each position i, gives a bijection between these two sets. Indeed, for the forward map f, when we see an a in position i<n, we will record the lowest number remaining from the set {1,…,n} in position i of the permutation, and when we see a b, we will record the highest number remaining from the set {1,…,n}. The unused number appears as the last number in the permutation. Clearly, the inverse map f −1 considers each position i of the permutation from left to right (except the last), recording an a if it is the lowest number remaining in the set {1,…,n+1}, and a b if it is the highest number.

For example, f(abbab)=165243 and f(babab)=615243, while we have f −1(1)=∅, f −1(12345)=aaaa, and f −1(15234)=abaa. We now show that this bijection is an order isomorphism if we consider factor order on {a,b} and consecutive pattern order on the permutations avoiding 213 and 231.

Proposition 3.2

Let A={a,b}. Then the map f described above is an isomorphism from the poset A in factor order to the subposet of the consecutive pattern poset S consisting of all permutations that avoid the non-consecutive patterns 213 and 231.

Proof

We will only show that f is order preserving as the proof for f −1 is similar. Suppose uw in A and let w′ be the factor of w with w′=u. At each stage of the algorithm for f we always pick the smallest or largest remaining element in constructing f(w). It follows that f(w′)=f(u) is a consecutive pattern in f(w) and so f(u)≤f(w) as desired. □

Question 3.3

For every interval [σ,τ] of the consecutive pattern poset S, does there exist an alphabet A and an interval [u,w] in factor order on A with [σ,τ]≅[u,w] (isomorphism of posets)? What about the same question with the roles of S and A reversed?

We will now give another explanation of the similarity of the two Möbius recursions by exhibiting infinitely many posets satisfying such a formula. Let [0,∞] be the totally ordered set 0<1<2<⋯<∞. Consider ℙ where ℙ is the positive integers. We are going to construct a partially ordered set P k on ℙ for each k∈[0,∞] such that P 0 will be factor order on ℙ and S will be a subposet of P .

We first need to generalize the notion of standardization. If w∈ℙ then define the height of w(i) to be

$$h\bigl(w(i)\bigr)=\#\bigl\{j\ |\ \mbox{$1\le j\le w(i)$ and $j\not\in w$}\bigr\}.$$

For example, if w=24825 then h(w(1))=h(w(4))=1, h(w(2))=h(w(5))=2, h(w(3))=4. For k∈[0,∞] and w=w(1)w(2)…w(n) we define the k-standardization of w to be

$$\operatorname {st}_k(w)=u(1)u(2)\ldots u(n)\ \mbox{where}\ u(i)=w(i)-\min\bigl\{h\bigl(w(i)\bigr),k\bigr\}$$

for 1≤in. Continuing our example,

for all k≥4. It should be clear that \(\operatorname {st}_{k}(w)\) gives the same sequence as repeatedly applying \(\operatorname {st}_{1}\) to w a total of k times. Note that \(\operatorname {st}_{0}(w)=w\) and \(\operatorname {st}_{\infty}(w)\) is the usual standardization of a sequence of positive integers. In particular, if the elements of w are distinct then \(\operatorname {st}_{\infty}(w)\) is the standard form of w.

To define the poset P k , it suffices to define its covers and then take the transitive closure. So we let w=w(1)(2)…w(n) cover \(\operatorname {st}_{k}(w(1)\ldots w(n-1))\) and \(\operatorname {st}_{k}(w(2)\ldots w(n))\). Continuing our example, in P 2 the word w=24825 would cover \(\operatorname {st}_{2}(2482)=1261\) and \(\operatorname {st}_{2}(4825)=2613\). This partial order can be given another description as follows. Call u a k-factor of w if there is a factor w′=w(i+1)w(i+2)…w(i+j). Such that

$$\operatorname {st}_k^{|w|-|u|}\bigl(w'\bigr)=u.$$

Then uw in P k if and only if u is a k-factor of w. Returning to our example again, a 2-factor of w=24825 is \(u=\operatorname {st}_{2}^{2}(482)=241\) and in P 2 we have the interval [u,w]={241,1261,2613,24825}.

Directly from the definitions one sees that P 0 is factor order on ℙ, and that the consecutive pattern poset S is the subposet of P consisting of all words which are permutations. It is also easy to see that S is a convex subposet of P , which means that if u,wS, then all elements of the interval [u,w] in P are in S. It follows that μ(u,w) is the same in P and in S.

To state the recursive formula for the Möbius function of P k , we need the natural analogues of interior/inner and exterior/outer. Define the k-interior of w=w(1)…w(n) to be

$$i_k(w)=\operatorname {st}_k^2\bigl(w(2)\ldots w(n-1)\bigr).$$

A k-prefix of w is a k-factor where the subword standardized contains w(1). A k-suffix is defined similarly. The k-exterior of w is x k (w), the longest proper k-factor which is both a k-prefix and a k-suffix.

The last ingredient of the recursive formula for μ in P k is the analogue of a monotone permutation in S and of a flat word in factor order. We say that an element wP k is k-irreducible if it covers only one element. The reason for this terminology is that, in a poset which is a lattice, an element is join-irreducible if it covers only one element. To see why this is the correct notion to capture monotonicity and flatness, we will prove a lemma. In it, a word w of length n is monotone increasing if w(1)<w(2)<⋯<w(n) and similarly for monotone decreasing.

Lemma 3.4

In P k a word w=w(1)w(2)…w(n), n≥1, is k-irreducible if and only

  1. 1.

    w is monotone increasing and w(i)≤k+i−1 for 1≤in, or

  2. 2.

    w(1)=w(2)=⋯=w(n), or

  3. 3.

    w is monotone decreasing and w(i)≤ni+k for 1≤in.

Proof

It is easy to check that any word satisfying one of the three given conditions covers a unique element, so we will only prove the forward direction. Let

$$u=\operatorname {st}_k(w(1)\ldots w(n-1),\qquad v=\operatorname {st}_k\bigl(w(2)\ldots w(n)\bigr).$$

Assume that w is k-irreducible so that u=v.

Suppose first that w(1)<w(2). It follows that h(w(1))≤h(w(2)). This implies u(1)<u(2). But u=v, so v(1)<v(2) which gives w(2)<w(3). Continuing in this way, we find that w is monotone increasing. Assuming w(1)>w(2) or w(1)=w(2) lead to the monotone decreasing or all equal cases, respectively.

From here on, we will assume that w is monotone increasing as the third case is similar and the second is easier. Also assume, toward a contradiction, that w(1)>k. Since w is increasing, h(w(1))=w(1)−1≥k. So u(1)=w(1)−k. Applying the same reasoning to w(2)>k+1 when producing v gives v(1)=w(2)−k. But then u(1)=w(1)−k<w(2)−k=v(1), contradicting the fact that u=v. If follows that w(1)≤k.

We now show that w(1)≤k implies w(2)≤k+1 as the same argument can be used to inductively show that w(i)≤k+i−1 for all 1≤in. Indeed, w(1)≤k gives u(1)=1 and so v(1)=1 as well. But this forces w(2)≤k+1 from the computation for v. This finishes the proof. □

Note that in P 0, the first of these cases cannot happen as it would require w(1)≤0+1−1=0. Similarly, the third case cannot happen by considering w(n). So 0-irreducible corresponds to flat words. In S, case 2 cannot happen by definition. Furthermore, since k=∞, the restrictions on w(i) hold trivially. So we are left with only the monotone conditions.

Theorem 3.5

In P k , k∈[0,∞], if uw then

$$\mu(u,w)= \begin{cases}\mu(u,x_k(w)) & \mbox{\textit{if} } |w|-|u|>2\mbox{ \textit{and} } u\leq x_k(w)\not\leq i_k(w),\\[3pt]1 &\mbox{\textit{if} } |w|-|u|=2,\ w\mbox{ \textit{is not} $k$-\textit{irreducible}, \textit{and}}\\[3pt]& u\in\{i_k(w),x_k(w)\},\\[3pt](-1)^{|w|-|u|} &\mbox{\textit{if} } |w|-|u|<2,\\[3pt]0 &\mbox{\textit{otherwise}.}\end{cases} $$

Furthermore, Δ(u,w) is homotopic to a sphere or is contractible, depending on whether the interval has 1 or 0 critical chains, respectively. In the former case, the dimension of the sphere is d(C), the critical dimension of the critical chain C.

The proof of this theorem is virtually identical to the proofs of Theorems 1.1 and 2.8 given previously. One need only use either the definition of k-irreducible or Lemma 3.4 as appropriate every time a fact about monotone permutations is needed. So it turns out that consecutive pattern order and factor order are just two extremes of an infinite family of posets whose Möbius functions have the same structure.