Part II Permutation Classes
6.8 Applicability and Application
6.8.2 Linear Time Membership
Out of some of the machinery developed in this chapter comes an indication that, given a permutation classCcontaining only finitely many simple permutations, it may be decided
in linear time whether an arbitrary permutation π of lengthn lies in C. The approach
relies first and foremost on the fact that we may compute the substitution decomposition of any permutation in linear time, as per Chapter 4. We begin by first performing some precomputations specific to the class C, all of which may be done essentially in constant
time:
• ComputeSi(C), the number of simple permutations inC.
5We cannot say anything about the other case,Av(123), since it contains infinitely many simple permu-
tations, and hence so doesAv(123≤r). The classAv(123≤1)was, however, counted by Noonan [99], while
Av(123≤2)was counted by Fulmek [57], proving a conjecture of Noonan and Zeilberger [100]. No results for
larger values are known, although Fulmek conjectures formulas forr= 3andr= 4, and thatAv(123≤r)has
6.8 APPLICABILITY ANDAPPLICATION 135
• Compute the basis B of C, noting that permutations in B can be no longer than
max
σ∈Si(C)|σ|+ 2by the Schmerl-Trotter Theorem2.1.
• For everyβeither lying inBor contained in a permutation lying inB, list all expres-
sions ofβas a lenient inflation of eachσ ∈Si(C).
(Recall that a lenient inflation is an inflationσ[γ1, . . . , γm]in which the γis are allowed to
be empty.)
With these precomputations performed, we now take our candidate permutationπ of
lengthnand compute its substitution decomposition,π =σ[α1, . . . , αm]. Now, after first
trivially checking that the skeletonσlies inC, we look at all the expressions of eachβ∈B
as lenient inflations ofσ. Note that ifβ ≤π, there must exist an expression ofβas a lenient
inflationβ =σ[γ1, . . . , γm]so thatγi≤αifor everyi= 1, . . . , m.
Thus, taking each lenient inflationβ=σ[γ1, . . . , γm]in turn, we look recursively at each
block, testing to see if γi ≤ αi is true. Though this recursion makes the linear-time com-
plexity non-obvious, note that the number of levels of recursion that are required cannot be more than the maximum depth of the substitution decomposition tree, which itself can- not have more than2nnodes. The recursion will eventually reduce the problem to making
only trivial comparisons, each of which is immediately answerable in constant time. The author would be keen to see a more rigourous treatment of this problem, and indeed an implementation of any subsequent algorithm.
CHAPTER
7
DECIDABILITY AND
UNAVOIDABLE
SUBSTRUCTURES
7.1 Introduction
H
AVING DEFINEDpermutation classes and observed in Section5.4and Chapter6howsimple permutations control many of their properties, it seems essential now to ask which finitely based classes contain only finitely many simple permutations. Our decom- position of simple permutations and identification of their unavoidable substructures in Chapter2puts us in a strong position to establish whether this question is decidable. Our main result establishes that this can be done algorithmically:
Theorem 7.1. It is possible to decide if a permutation class given by a finite basis contains infinitely many simple permutations.
We first begin by reminding the reader of pin sequences, as defined in Chapter 2. In particular, here we will be constructing pin sequences from scratch, before studying their possible subsequences. As we saw in Section2.4, this treatment requires us to consider a slight variant of the original definition of pin sequences, namely that a proper pin sequence
p1, . . . , pmmust satisfy the following two conditions:
• Separation condition: pi+1 mustseparate pi from{p1, . . . , pi−1}. That is, pi+1 must lie horizontally or vertically betweenrect(p1, . . . , pi−1)andpi.
• Externality condition: pi+1must lie outsiderect(p1, . . . , pi).
p1 p2 p3 p4 p5 p6 p7 x y
Figure 7.1: The pointsp1, . . . , p7form a proper pin sequence, andrect(p1, . . . , p7)is denoted by the
grey box. The pointxsatisfies the externality and separation conditions for this pin sequence and
thus could be chosen asp8;y, however, fails the separation condition.
(See Figure7.1for an illustration.) To consider subsequences of a given pin sequence, as we must, we refer the reader to the discussion on pin words given in Section 2.4.
Proper pin sequences are intimately connected with simple permutations. In one di- rection, we recall:
Theorem 2.7. If p1, . . . , pm is a proper pin sequence of length m ≥ 5 then one of the sets of points{p1, . . . , pm},{p1, . . . , pm} \ {p1}, or{p1, . . . , pm} \ {p2}is order isomorphic to a simple
permutation.
While proper pin sequences are simple or nearly so, we also saw that there were other “fundamental” types of simple permutation – in particular, we recall the definitions of parallel and wedge alternations. Whereas every parallel alternation contains a long simple permutation (to form this simple permutation we need, at worst, to remove two points), wedge alternations do not. However, there are two different ways to add a single point to a wedge alternation to form simple permutations (calledwedge simple permutations of types
1and2). These three families are plotted in Figure7.2.
We recall that these families of permutations capture, in a sense, the diversity of simple permutations:
7.2 THEEASYDECISIONS 139
Figure 7.2: From left to right: a parallel alternation, a wedge simple permutation of type1, and a
wedge simple permutation of type2.
Theorem2.14. Every sufficiently long simple permutation contains either a proper pin sequence of length at leastk, a parallel alternation of length at leastk, or wedge simple permutation of length at leastk.
Theorems 2.7 and 2.14 show that Theorem 7.1 will follow if we can decide when a class has arbitrarily long parallel alternations, wedge simple permutations and proper pin sequences. The first two of these considerations are straightforward, and form the subject of the next section, while the question for proper pin sequences requires a little more work. Essentially, the problem of deciding whether a permutation class contains arbitrarily long pin sequences is equivalent to the problem of determining whether a permutation class admits arbitrarily long pin words. Thus converting the problem to one of languages, we will review in Section 7.3 the required results from formal language theory before going on to prove in Section 7.4 that the language of pins is regular, and hence the problem is decidable.