---
abstract: 'We enumerate three specific permutation classes defined by two forbidden patterns of length four. The techniques involve inflations of geometric grid classes.'
author:
- |
    Michael H. Albert\
    Department of Computer Science\
    University of Otago\
    Dunedin, New Zealand\
    M. D. Atkinson\
    Department of Computer Science\
    University of Otago\
    Dunedin, New Zealand\
    Vincent Vatter[^1]\
    Department of Mathematics\
    University of Florida\
    Gainesville, Florida USA\
title: 'Inflations of Geometric Grid Classes: Three Case Studies'
---

Introduction {#infinite-simples-intro}
============

*Classes* of permutations are sets that are closed downwards under taking subpermutations. They are often presented as sets ${\mathcal{C}}$ that avoid a given set $B$ of permutations (i.e. the members of ${\mathcal{C}}$ have no subpermutation in the set $B$). We express this by the notation ${\mathcal{C}}={\operatorname{Av}}(B)$. We may take $B$ to be an antichain (a set of pairwise incomparable permutations), in which case we say that $B$ is the *basis* of ${\mathcal{C}}$.

Much of the inspiration for the early work on permutation classes was driven by the enumeration problem: given ${\mathcal{C}}={\operatorname{Av}}(B)$, how many permutations of each length does ${\mathcal{C}}$ contain? The answer to such a question could be a formula giving this number $|{\mathcal{C}}_n|$ in terms of the length, $n$, a generating function $\sum |{\mathcal{C}}_n|x^n$ or simply an asymptotic result about the behaviour of $|{\mathcal{C}}_n|$ as $n\rightarrow\infty$.

Recently, Albert, Atkinson, Bouvel, Ruškuc, and Vatter [@albert:geometric-grid-:] have developed the theory of geometric grid classes, and Albert, Ruškuc, and Vatter [@albert:inflations-of-g:] have continued this exploration by investigating the theory of inflations of such classes. Our aim in this paper is to:

-   demonstrate the effectiveness of this approach, and

-   illustrate how one might implement these techniques in a “real world” setting, bypassing what would otherwise be thorny theoretical issues.

It should be noted that this presentation is historically backward; the results of this paper preceded and inspired the two more theoretical papers cited above.

In this work, our examples are exclusively classes with two basis elements of length four, which we call *2 $\times$ 4 classes*. It must be admitted that the attention paid to 2 $\times$ 4 classes is not entirely in proportion to their intrinsic importance. Nevertheless, these classes represent a significant dataset which seems to contain some difficult enumerative problems. Thus they pose a good challenge for new approaches to the enumeration of restricted permutations.

There are $56$ essentially different (i.e. inequivalent under symmetries) 2 $\times$ 4 classes. Some of these classes nevertheless share the same enumeration (a phenomenon called *Wilf-equivalence*), so the 2 $\times$ 4 classes have only $38$ different enumerations [@bona:the-permutation:; @kremer:permutations-wi:; @kremer:postscript:-per:; @kremer:finite-transiti:; @le:wilf-classes-of:]. This paper brings the number of $2\times 4$ Wilf classes which have been enumerated to $24$ (see Wikipedia [@wikipedia:enumerations-of:], which contains a list of such enumerations).

A central part of our approach depends on analysing the simple permutations in a class. An *interval* in the permutation $\pi$ is a set of contiguous indices $I=\{a,a+1,\dots,b\}$ such that the set $\{\pi(i){\::\:}i\in I\}$ is also contiguous. Every permutation $\pi$ of length $n$ has *trivial intervals* of lengths $0$, $1$, and $n$, and other intervals are called *proper*. A permutation with no proper intervals is called *simple*. Another way to think about simple permutations arises repeatedly throughout our arguments. Any subset $p_1,\dots$ of entries of the permutation $\pi$ defines a minimal axes-parallel rectangle (or simply, *box*), whose left edge slices through the leftmost of these entries, top edge slices through the greatest of these entries, and so on. A simple permutation is one in which the box defined by any proper subset of two or more of its entries is *separated* by an entry outside the box, by which we mean that this entry lies either

-   vertically amongst these entries but to the left (or right) of all of them (*vertical separation*), or

-   horizontally amongst these entries but above (or below) all of them (*horizontal separation*).

Simple permutations are precisely those that do not arise from a non-trivial inflation, in the following sense. Given a permutation $\sigma$ of length $m$ and nonempty permutations $\alpha_1,\dots,\alpha_m$, the *inflation* of $\sigma$ by $\alpha_1,\dots,\alpha_m$, denoted $\sigma[\alpha_1,\dots,\alpha_m]$, is the permutation of length $|\alpha_1|+\cdots+|\alpha_m|$ obtained by replacing each entry $\sigma(i)$ by an interval that is order isomorphic to $\alpha_i$ in such a way that the intervals are order isomorphic to $\sigma$. For example, $$2413[1,132,321,12]=4\ 798\ 321\ 56.$$ We give two particular types of inflations special terminology and notation. The inflation $12[\alpha_1,\alpha_2]$ is called a *(direct) sum* and denoted by $\alpha_1\oplus\alpha_2$. A permutation is *sum decomposable* if it can be expressed as a nontrivial sum, and *sum indecomposable* otherwise. The inflation $21[\alpha_1,\alpha_2]$ is called a *skew sum*, similarly denoted $\alpha_1\ominus\alpha_2$, and accompanied by analogous terms *skew decomposable* and *skew indecomposable*. We extend the notion of direct and skew sum to classes, defining $${\mathcal{C}}\oplus{\mathcal{D}}=\{\pi\oplus\sigma{\::\:}\pi\in{\mathcal{C}}\mbox{ and }\sigma\in{\mathcal{D}}\},$$ with an analogous definition for ${\mathcal{C}}\ominus{\mathcal{D}}$.

The precise connection between simple permutations and inflations is furnished by the following result.

For every permutation $\pi$ there is a unique simple permutation $\sigma$ such that $\pi=\sigma[\alpha_1,\alpha_2,\ldots,\alpha_m]$. Furthermore, except when $\sigma=12$ or $\sigma=21$, the intervals of $\pi$ that correspond to $\alpha_1,\alpha_2,\ldots,\alpha_m$ are uniquely determined. In the case that $\sigma=12$ (respectively $\sigma=21$), the intervals are unique so long as we require the first of the two intervals to be sum (respectively skew) indecomposable.

One of the first general enumeration results is the following from [@albert:simple-permutat:]:

\[thm-fin-simples-alg\] If the class ${\mathcal{C}}$ contains only finitely many simple permutations, then ${\mathcal{C}}$ has an algebraic generating function.

This theorem has since been generalised in two different directions. Brignall, Huczynska, and Vatter [@brignall:simple-permutat:] introduced the notion of “query-complete sets of properties” to show that if a class satisfies the hypotheses of Theorem \[thm-fin-simples-alg\], then such subsets as the even permutations or the involutions in ${\mathcal{C}}$ have algebraic generating functions. More relevant to our investigation, [@albert:inflations-of-g:] significantly weakened the hypotheses of Theorem \[thm-fin-simples-alg\], showing that its conclusion holds even when ${\mathcal{C}}$ contains infinitely many simple permutations, so long as these simple permutations lie in a geometric grid class, a notion introduced in Section \[sec-geom-grid-review\]. Before this, we consider an example which gives the flavour of our approach without requiring much additional machinery.

Example \#1: Avoiding 4213 and 3142 {#sec-4213-3142}
===================================

Before describing our first example we need to introduce a family of simple permutations and quote a result. A [*parallel alternation*]{} is a permutation whose plot can be divided into two parts, by a single horizontal or vertical line, so that the points on either side of this line are both either increasing or decreasing and for every pair of points from the same part there is a point from the other part which [*separates*]{} them, i.e., there is a point from the other part which lies either horizontally or vertically between them. It is easy to see that a parallel alternation of length at least four is simple if and only if its length is even, it does not begin with its smallest entry, and it does not end with its greatest entry. Thus there are precisely four simple parallel alternations of each even length at least six, shown in Figure \[fig-par-alts\], and no simple parallel alternations of odd length.

[ccccccc]{}

(0,0)(80,80) (0,0)(80,80) (10,20)[0.04in]{} (20,40)[0.04in]{} (30,60)[0.04in]{} (40,80)[0.04in]{} (50,10)[0.04in]{} (60,30)[0.04in]{} (70,50)[0.04in]{} (80,70)[0.04in]{}

&

------------------------------------------------------------------------

&

(0,0)(80,80) (0,0)(80,80) (10,50)[0.04in]{} (20,10)[0.04in]{} (30,60)[0.04in]{} (40,20)[0.04in]{} (50,70)[0.04in]{} (60,30)[0.04in]{} (70,80)[0.04in]{} (80,40)[0.04in]{}

&

------------------------------------------------------------------------

&

(0,0)(80,80) (0,0)(80,80) (10,70)[0.04in]{} (20,50)[0.04in]{} (30,30)[0.04in]{} (40,10)[0.04in]{} (50,80)[0.04in]{} (60,60)[0.04in]{} (70,40)[0.04in]{} (80,20)[0.04in]{}

&

------------------------------------------------------------------------

&

(0,0)(80,80) (0,0)(80,80) (10,40)[0.04in]{} (20,80)[0.04in]{} (30,30)[0.04in]{} (40,70)[0.04in]{} (50,20)[0.04in]{} (60,60)[0.04in]{} (70,10)[0.04in]{} (80,50)[0.04in]{}

Schmerl and Trotter [@schmerl:critically-inde: Corollary 5.10] proved a result (in the more general context of irreflexive binary relational structures) which in our context states that every simple permutation of length $n$ which is not a parallel alternation contains simple subpermutations of every length $5\le m\le n$. Therefore, in order to establish that the permutation class ${\mathcal{C}}$ contains *only* parallel alternations, we just need to check that it does not contain any simple permutation of length $5$, i.e., that $${\mathcal{C}}\subseteq{\operatorname{Av}}(24153, 25314, 31524, 35142, 41352, 42513).$$ Clearly this holds for the class ${\operatorname{Av}}(4213,3142)$, because $4213$ is contained in $25314$ and $42513$ while $3142$ is contained in $24153$, $31524$, $35142$, and $41352$. Moreover, it is easily seen (because of the basis element $3142$) that ${\operatorname{Av}}(4213,3142)$ can contain only parallel alternations oriented as on the left of Figure \[fig-par-alts\], i.e., those of the form $$246\cdots(2m)135\cdots(2m-1).$$

With the simple permutations characterised, we now describe the allowed inflations. It is easy to see that $\pi\oplus\sigma\in{\operatorname{Av}}(4213,3142)$ for all $\pi,\sigma\in{\operatorname{Av}}(4213,3142)$, or in other words, that the class is [*sum closed*]{}. Thus, letting $f$ denote the generating function for nonempty permutations in ${\operatorname{Av}}(4213,3142)$ and $f_\oplus$ denote the generating function for sum decomposable permutations, we see that $f_\oplus=\left(f-f_\oplus\right)f$, from which it follows that $$f_\oplus=\frac{f^2}{1+f}.$$ For skew sums, we have that $\pi\ominus\sigma\in{\operatorname{Av}}(4213,3142)$ if and only if $\pi\in{\operatorname{Av}}(4213,3142)$ and $\sigma\in{\operatorname{Av}}(213)$. Letting $$c=\frac{1-2x-\sqrt{1-4x}}{2x}$$ denote the generating function for the Catalan numbers (with constant term zero), which is well-known as the generating function of nonempty permutations in ${\operatorname{Av}}(213)$, we have $f_\ominus=\left(f-f_\ominus\right)c$, so $$f_\ominus=\frac{cf}{1+c}.$$

Now we must count the inflations of the parallel alternations $246\cdots (2m)135\cdots (2m-1)$ for $m\ge 2$. This is relatively straightforward:

-   the interval inflating $2m-1$ must avoid $213$,

-   all other intervals inflating odd entries must be increasing, and

-   even entries may be inflated by any element of ${\operatorname{Av}}(4213,3142)$.

This shows that the contribution of inflations of $246\cdots (2m)135\cdots (2m-1)$, for each $m\ge 2$, is $$f^m\left(\frac{x}{1-x}\right)^{m-1}c,$$ showing that $$f
=
x+f_\oplus+f_\ominus+\sum_{m=2}^\infty f^m\left(\frac{x}{1-x}\right)^{m-1}c
=
x+\frac{f^2}{1+f}+\frac{cf}{1+c}+\frac{xcf^2}{1-x-xf}.$$ From this we obtain:

\[thm-3142-4213\] The generating function $f$ for ${\operatorname{Av}}(4213,3142)$ satisfies $$\begin{array}{rclcc}
x^3f^6
&+&
(7x^3-7x^2+2x)f^5&&\\
&+&
(x^4+14x^3-21x^2+10x-1)f^4&&\\
&+&
(4x^4+8x^3-19x^2+11x-2)f^3&&\\
&+&
(6x^4-5x^3-2x^2+2x)f^2&&\\
&+&
(4x^4-7x^3+4x^2-x)f&&\\
&+&
x^4-2x^3+x^2
&=&0.
\end{array}$$

The first several terms of this sequence are $$1,2,6,22,89,379,1664,7460,33977,156727,730619,3436710,16291842,77758962,$$ sequence [A165541]{} in the [OEIS [@sloane:the-on-line-enc:]]{}. The discriminant of the polynomial defining the generating function has a smallest positive root $\rho \approx 0.1895$, which is therefore the radius of convergence of the generating function and as ${\operatorname{Av}}(4213,3142)$ is sum closed (and hence the sequence $f_n$ is supermultiplicative) we can conclude that $f_n^{1/n} \to 1/\rho \approx 5.2778$. More detailed on the asymptotic behaviour of $f_n$ could be determined by standard methods as found for instance in Flajolet and Sedgewick [@flajolet:analytic-combin: Section VII.7].

[ccccccc]{}

(0,0)(80,80) (0,0)(80,80) (10,20)[0.04in]{} (20,40)[0.04in]{} (30,60)[0.04in]{} (40,80)[0.04in]{} (50,10)[0.04in]{} (60,70)[0.04in]{} (70,50)[0.04in]{} (80,30)[0.04in]{}

&

------------------------------------------------------------------------

&

(0,0)(80,80) (0,0)(80,80) (10,30)[0.04in]{} (20,50)[0.04in]{} (30,70)[0.04in]{} (40,10)[0.04in]{} (50,80)[0.04in]{} (60,60)[0.04in]{} (70,40)[0.04in]{} (80,20)[0.04in]{}

&

------------------------------------------------------------------------

&

(0,0)(80,80) (0,0)(80,80) (10,40)[0.04in]{} (20,80)[0.04in]{} (30,10)[0.04in]{} (40,70)[0.04in]{} (50,20)[0.04in]{} (60,60)[0.04in]{} (70,30)[0.04in]{} (80,50)[0.04in]{}

&

------------------------------------------------------------------------

&

(0,0)(80,80) (0,0)(80,80) (10,50)[0.04in]{} (20,10)[0.04in]{} (30,80)[0.04in]{} (40,20)[0.04in]{} (50,70)[0.04in]{} (60,30)[0.04in]{} (70,60)[0.04in]{} (80,40)[0.04in]{}

This is not the only 2 $\times$ 4 class to which such elementary techniques apply. For example:

-   ${\operatorname{Av}}(4213,1342)$ contains precisely two simple permutations of each length $n\ge 4$, both of which are wedge simple permutations oriented as the first two permutations shown in Figure \[fig-wedge-simples\]. This family of simple permutations is well enough behaved that we could enumerate the class, but this has already been done by Kremer and Shiu [@kremer:finite-transiti:] and can now be performed automatically using the Maple package [FinLabel]{} described in Vatter [@vatter:finitely-labele:].

-   ${\operatorname{Av}}(4213,3124)$ contains precisely two simple permutations of each length $n\ge 4$, oriented as the rightmost two permutations shown in Figure \[fig-wedge-simples\]. This class was enumerated by Bóna [@bona:the-permutation:].

Grid Classes and Regular Languages {#sec-geom-grid-review}
==================================

Given a permutation $\pi$ of length $n$ and sets $X,Y\subseteq[n]$, we write $\pi(X\times Y)$ for the permutation that is order isomorphic to the subsequence of $\pi$ with indices from $X$ and values in $Y$. For example, $286435179([4,9]\times[5,9])$ consists of the subsequence of entries in indices $4$ through $9$ which have values between $5$ and $9$; in this case the subsequence is $579$, so $286435179([4,9]\times[5,9])=123$.

Suppose that $M$ is a $t\times u$ matrix[^2]with entries from $\{0,\pm 1\}$. A *gridded permutation* is a permutation $\pi$ equipped with *row* and *column divisions* denoted respectively by $1=c_1\le\cdots\le c_{t+1}=n+1$ and $1=r_1\le\cdots\le r_{u+1}=n+1$ (where $n$ is the length of $\pi$). This gridded permutation (or simply, gridding of $\pi$) is *compatible* with the matrix $M$ (in which case we sometimes call it an $M$-gridding of $\pi$) if $\pi([c_k,c_{k+1})\times[r_\ell,r_{\ell+1}))$ is increasing whenever $M_{k,\ell}=1$, decreasing whenever $M_{k,\ell}=-1$, and empty whenever $M_{k,\ell}=0$. The [*(monotone) grid class of $M$*]{}, written ${\operatorname{Grid}}(M)$, consists of all permutations which possess a gridding compatible with $M$. Figure \[fig-grid-geom-three-pane\] shows an example.

As illustrated by Murphy and Vatter [@murphy:profile-classes:], monotone grid classes can display chaotic and unstructured behaviour. However, it has recently been shown that these classes contain subclasses with especially amenable structure. To define these subclasses, consider the point set in $\mathbb{R}^2$ (called the *standard figure* of the ${0/\mathord{\pm} 1}$ matrix $M$) consisting of cells $C_{kl}$ whose contents are:

-   the line segment from $(k-1,\ell-1)$ to $(k,\ell)$ if $M_{k,\ell}=1$ or

-   the line segment from $(k-1,\ell)$ to $(k,\ell-1)$ if $M_{k,\ell}=-1$ or

-   empty if $M_{kl}=0$.

The *geometric grid class* of $M$, denoted by ${\operatorname{Geom}}(M)$, is then the set of all permutations that can be drawn on this figure in the following manner. Choose $n$ points in the figure, no two on a common horizontal or vertical line. Then label the points from $1$ to $n$ from bottom to top and record these labels reading left to right. The centre pane of Figure \[fig-grid-geom-three-pane\] shows a permutation from a geometric grid class, while the right pane demonstrates that $2413$ is not in this geometric grid class.

It sometimes happens that ${\operatorname{Grid}}(M)={\operatorname{Geom}}(M)$; to characterise this phenomenon, we need to introduce a graph. The *row-column graph* of a $t\times u$ matrix $M$ is the bipartite graph on the vertices $x_1$, $\dots$, $x_t$, $y_1$, $\dots$, $y_u$ where $x_k$ is adjacent to $y_\ell$ if and only if $M_{k,\ell}\neq 0$. Albert, Atkinson, Bouvel, Ruškuc, and Vatter [[@albert:geometric-grid-: Theorem 3.2]]{} showed that ${\operatorname{Grid}}(M)={\operatorname{Geom}}(M)$ if and only if the row-column graph of $M$ is a forest (in this case we say that $M$ *is* a forest). As it happens, all gridding matrices encountered in this paper are forests.

Geometric grid classes are especially tractable because their elements can be encoded by words over a finite alphabet, and for the rest of this section we describe this encoding and its properties. We say that a ${0/\mathord{\pm} 1}$ matrix $M$ of size $t\times u$ is a *partial multiplication matrix* if there exist *column and row signs* $$f_1,\ldots,f_t,g_1,\ldots,g_u\in \{1,-1\}$$ such that every entry $M_{k,\ell}$ is equal to either $f_kg_\ell$ or $0$. It is not hard to prove that every geometric grid class is equal to ${\operatorname{Geom}}(M)$ for a partial multiplication matrix $M$, and this is especially trivial for forests.

[ccccc]{}

(0,0)(100,100) (35,0)(35,100) (0,45)(100,45) (0,0)(98,98) (10,20)[0.04in]{} (20,80)[0.04in]{} (30,60)[0.04in]{} (40,40)[0.04in]{} (50,30)[0.04in]{} (60,50)[0.04in]{} (70,10)[0.04in]{} (80,70)[0.04in]{} (90,90)[0.04in]{}

&

------------------------------------------------------------------------

&

(0,0)(100,100) (0,0)(100,100) (0,100)(100,0) (50,0)(50,100) (0,50)(100,50) (0,0)(100,0)(100,100)(0,100)(0,0) (10,10)[0.04in]{} (20,80)[0.04in]{} (30,70)[0.04in]{} (40,40)[0.04in]{} (60,60)[0.04in]{} (70,30)[0.04in]{} (80,20)[0.04in]{} (90,90)[0.04in]{}

&

------------------------------------------------------------------------

&

(0,0)(100,100) (20,20)(100,20) (20,20)(20,100) (25,75)(100,75) (70,70)(70,0) (0,0)(100,100) (0,100)(100,0) (50,0)(50,100) (0,50)(100,50) (0,0)(100,0)(100,100)(0,100)(0,0) (20,20)[0.04in]{} (25,75)[0.04in]{} (70,70)[0.04in]{} (60,10)[0.04in]{}

The column and row signs essentially specify an order in which the monotone entries in a cell of a gridded permutation should be read. Cells corresponding to $M_{k\ell}=f_kg_{\ell}$ are read from left to right (respectively right to left) if $f_k=1$ (respectively $f_k=-1$) and bottom to top (respectively top to bottom) if $g_{\ell}=1$ (respectively $g_{\ell}=-1$). These directions are sometimes marked on our diagrams. The [*base point*]{} of a cell is the corner from which its reading begins.

To describe the encoding of ${\operatorname{Geom}}(M)$ we introduce a *cell alphabet* $\Sigma$ associated to $M$ which consists of a unique letter $a_{kl}$ for each nonempty cell $C_{kl}$ of the standard figure of $M$. Then, to every word $w=w_1\cdots w_n\in\Sigma^\ast$ we associate a permutation ${\varphi}(w)$. First we choose arbitrary distances $$0<d_1<\cdots<d_n<1.$$ For each $1\le i\le n$, we choose a point $p_i$ corresponding to $w_i$ in the following manner. Let $w_i=a_{k\ell}$; the point $p_i$ is chosen from the line segment in cell $C_{k,\ell}$, at infinity-norm distance $d_i$ from the base point of this cell. Finally, ${\varphi}(w)$ denotes the permutation defined by the set $\{p_1,\dots,p_n\}$ of points. It can be seen that ${\varphi}$ does not depend on the particular choice of $d_1,\dots,d_n$, and thus ${\varphi}{\::\:}\Sigma^\ast\to {\operatorname{Geom}}(M)$ is a well-defined mapping.

The mapping ${\varphi}$ is many-to-one, and so for enumerative applications we must restrict its domain to a set $L\subseteq\Sigma^\ast$ on which ${\varphi}$ is injective. We seek to choose $L$ to be a *regular language*. The regular languages are those that can be obtained from the empty language and the singleton languages using the operations of union, concatenation, and Kleene star (where $K^*$ is the set of all concatenations of 0 or more words from $K$). Alternatively, regular languages can also be characterised as those accepted by deterministic finite state automata. From this latter viewpoint it follows (e.g., by the transfer matrix method) that regular languages have rational generating functions (either when enumerated by length, or with a separate variable $x_a$ for each $a \in \Sigma$). We refer readers to [@flajolet:analytic-combin: Section I.4 and Appendix A.7] for more information on regular languages.

The following theorem from [@albert:geometric-grid-:] demonstrates the connection between subclasses of geometric grid classes and regular languages. Essentially, it says that all such classes are extremely well behaved.

\[thm-geom-griddable-all\] Suppose that ${\mathcal{C}}\subseteq{\operatorname{Geom}}(M)$ is a permutation class and $M$ is a partial multiplication matrix with cell alphabet $\Sigma$. Then the following hold:

1.  ${\mathcal{C}}$ is partially well-ordered.

2.  ${\mathcal{C}}$ is finitely based.

3.  There is a regular language $L\subseteq\Sigma^\ast$ such that the mapping ${\varphi}{\::\:}L\rightarrow{\mathcal{C}}$ is a bijection.

4.  There is a regular language $L_S$, contained in the regular language $L$ from (iii), such that the mapping ${\varphi}$ is a bijection between $L_S$ and the simple permutations in ${\mathcal{C}}$.

Note that the proof of Theorem \[thm-geom-griddable-all\] is nonconstructive, so while we use the encoding ${\varphi}$ throughout this work, we construct the regular languages we use from first principles.

Albert, Atkinson, and Brignall [@albert:the-enumeration:2143:4231; @albert:the-enumeration:3] demonstrate four concrete examples of using these techniques to enumerate $2\times 4$ classes.

The examples considered in this paper are inflations of geometric grid classes. The theoretical issues of such classes were studied by Albert, Ruškuc, and Vatter [@albert:inflations-of-g:], who proved that every subclass of $\langle{\operatorname{Geom}}(M)\rangle$ has an algebraic generating function (essentially by showing that it is in bijection with a context-free language). From this perspective, Section \[sec-4213-3142\] considers the case of a class contained in $\langle{\operatorname{Geom}}(\begin{footnotesize}\begin{array}{rr}1&1\end{array}\end{footnotesize})\rangle$, while the next two sections consider classes whose simple permutations are contained in more complicated geometric grid classes.

Example \#2: Avoiding $4312$ and $3142$ {#sec-4312-3142}
=======================================

We begin our next example with a characterisation of its simple permutations.

\[prop-4312-3142-simples\] The simple permutations of ${\operatorname{Av}}(4312,3142)$ and ${\operatorname{Geom}}{\mbox{\begin{footnotesize}$\left(\begin{array}{rrr}0&1&1\\1&0&-1\end{array}\right)$\end{footnotesize}}}$ coincide.

First observe that $${\operatorname{Grid}}{\mbox{\begin{footnotesize}$\left(\begin{array}{rrr}0&1&1\\1&0&-1\end{array}\right)$\end{footnotesize}}}
=
{\operatorname{Geom}}{\mbox{\begin{footnotesize}$\left(\begin{array}{rrr}0&1&1\\1&0&-1\end{array}\right)$\end{footnotesize}}}
\subseteq
{\operatorname{Av}}(4312, 3142),$$ so it suffices to prove that the simple permutations in ${\operatorname{Av}}(4312, 3142)$ are contained this grid class. Specifically, we will show that in any simple permutation of ${\operatorname{Av}}(4312, 3142)$ the entries that follow the maximum make up a “wedge permutation” oriented as $<$ (which is equivalent to avoiding both 132 and 312), and those preceding the maximum form an increasing sequence.

So, let a simple permutation $\pi \in {\operatorname{Av}}(4312, 3142)$ be given. Because $\pi$ avoids 4312 there can be no 312 pattern after its maximum so, for the sake of contradiction, assume that there is a $132$ pattern. Specifically, choose such a pattern $acb$ where $a$ is as low as possible, and $c$ is as high as possible (for the chosen $a$). This yields the situation depicted on the left in Figure \[fig-ex2-simple-no-132-after-max\]. Now, in order that the cell bounded by $\{b,c\}$ not form an interval, there must be some entry $d$ in the cell immediately to its left. Taking the leftmost such entry yields the diagram on the right in Figure \[fig-ex2-simple-no-132-after-max\]. In this diagram we see that the entries of $\pi$ lying in the box bounded by $\{b,c,d\}$ (including those three entries) form a proper interval, contradicting the simplicity of $\pi$.

[ccc]{}

(0,0)(50,40) (0,20)(10,20)(10,30)(0,30) (10,0)(20,0)(20,10)(10,10) (10,20)(20,20)(20,30)(10,30) (10,30)(20,30)(20,40)(10,40) (20,0)(30,0)(30,10)(20,10) (20,30)(30,30)(30,40)(20,40) (30,0)(40,0)(40,10)(30,10) (30,10)(40,10)(40,20)(30,20) (30,30)(40,30)(40,40)(30,40) (40,20)(50,20)(50,30)(40,30) (10,40)[2.0]{} (20,10)[2.0]{} (20,10)[$a$]{} (30,30)[2.0]{} (30,30)[$c$]{} (40,20)[2.0]{} (40,20)[$b$]{} (0,0)(0,40) (0,0)(50,0) (10,0)(10,40) (0,10)(50,10) (20,0)(20,40) (0,20)(50,20) (30,0)(30,40) (0,30)(50,30) (40,0)(40,40) (0,40)(50,40) (50,0)(50,40)

&

------------------------------------------------------------------------

&

(0,0)(60,50) (0,20)(10,20)(10,30)(0,30) (0,30)(10,30)(10,40)(0,40) (10,0)(20,0)(20,10)(10,10) (10,20)(20,20)(20,30)(10,30) (10,30)(20,30)(20,40)(10,40) (10,40)(20,40)(20,50)(10,50) (20,0)(30,0)(30,10)(20,10) (20,20)(30,20)(30,30)(20,30) (20,30)(30,30)(30,40)(20,40) (20,40)(30,40)(30,50)(20,50) (30,0)(40,0)(40,10)(30,10) (30,10)(40,10)(40,20)(30,20) (30,40)(40,40)(40,50)(30,50) (40,0)(50,0)(50,10)(40,10) (40,10)(50,10)(50,20)(40,20) (40,40)(50,40)(50,50)(40,50) (50,20)(60,20)(60,30)(50,30) (50,30)(60,30)(60,40)(50,40) (10,50)[2.0]{} (20,10)[2.0]{} (20,10)[$a$]{} (30,30)[2.0]{} (30,30)[$d$]{} (40,40)[2.0]{} (40,40)[$c$]{} (50,20)[2.0]{} (50,20)[$b$]{} (0,0)(0,50) (0,0)(60,0) (10,0)(10,50) (0,10)(60,10) (20,0)(20,50) (0,20)(60,20) (30,0)(30,50) (0,30)(60,30) (40,0)(40,50) (0,40)(60,40) (50,0)(50,50) (0,50)(60,50) (60,0)(60,50)

We can now argue in a similar fashion that the entries preceding the maximum entry of $\pi$ form an increasing sequence, i.e., that there cannot be a $21$ pattern before the maximum entry of $\pi$. Suppose to the contrary that there were one, and choose such a pattern $ba$ where $b$ is as high as possible, and $a$ is as low as possible (for the chosen $b$). Now the cell defined by $\{a,b\}$ must be split either to the left or to the right. The picture on the left of Figure \[fig-ex2-simple-no-21-after-max\] shows that $\{a,b\}$ cannot be split solely to the right, as then taking $c$ to be the rightmost such separator we see that $\{a,b,c\}$ would lie in a proper interval. Similarly, $\{a,b\}$ cannot be split solely to the left. Thus $\{a,b\}$ must be split on both the left and the right. Now, taking $c$ to be the rightmost separator and $d$ the leftmost separator, we have two cases, depicted in the centre and right of Figure \[fig-ex2-simple-no-21-after-max\]. In both cases it is clear that $\{a,b,c,d\}$ is contained in a proper interval, and this contradiction completes the proof.

[ccccc]{}

(0,0)(50,40) (0,10)(10,10)(10,20)(0,20) (0,20)(10,20)(10,30)(0,30) (0,30)(10,30)(10,40)(0,40) (0,30)(10,40) (10,0)(20,0)(20,10)(10,10) (10,20)(20,20)(20,30)(10,30) (10,30)(20,30)(20,40)(10,40) (20,0)(30,0)(30,10)(20,10) (20,30)(30,30)(30,40)(20,40) (30,0)(40,0)(40,10)(30,10) (30,10)(40,10)(40,20)(30,20) (30,20)(40,20)(40,30)(30,30) (40,10)(50,10)(50,20)(40,20) (40,20)(50,20)(50,30)(40,30) (10,30)[2.0]{} (10,30)[$b$]{} (20,10)[2.0]{} (20,10)[$a$]{} (30,20)[2.0]{} (30,20)[$c$]{} (40,40)[2.0]{} (0,0)(0,40) (0,0)(50,0) (10,0)(10,40) (0,10)(50,10) (20,0)(20,40) (0,20)(50,20) (30,0)(30,40) (0,30)(50,30) (40,0)(40,40) (0,40)(50,40) (50,0)(50,40)

&

------------------------------------------------------------------------

&

(0,0)(60,50) (0,10)(10,10)(10,20)(0,20) (0,20)(10,20)(10,30)(0,30) (0,30)(10,30)(10,40)(0,40) (0,40)(10,40)(10,50)(0,50) (10,0)(20,0)(20,10)(10,10) (10,10)(20,10)(20,20)(10,20) (10,20)(20,20)(20,30)(10,30) (10,40)(20,40)(20,50)(10,50) (10,40)(20,50) (20,0)(30,0)(30,10)(20,10) (20,20)(30,20)(30,30)(20,30) (20,30)(30,30)(30,40)(20,40) (20,40)(30,40)(30,50)(20,50) (30,0)(40,0)(40,10)(30,10) (30,30)(40,30)(40,40)(30,40) (30,40)(40,40)(40,50)(30,50) (40,0)(50,0)(50,10)(40,10) (40,10)(50,10)(50,20)(40,20) (40,20)(50,20)(50,30)(40,30) (40,30)(50,30)(50,40)(40,40) (50,10)(60,10)(60,20)(50,20) (50,20)(60,20)(60,30)(50,30) (50,30)(60,30)(60,40)(50,40) (10,30)[2.0]{} (10,30)[$d$]{} (20,40)[2.0]{} (20,40)[$b$]{} (30,10)[2.0]{} (30,10)[$a$]{} (40,20)[2.0]{} (40,20)[$c$]{} (50,50)[2.0]{} (0,0)(0,50) (0,0)(60,0) (10,0)(10,50) (0,10)(60,10) (20,0)(20,50) (0,20)(60,20) (30,0)(30,50) (0,30)(60,30) (40,0)(40,50) (0,40)(60,40) (50,0)(50,50) (0,50)(60,50) (60,0)(60,50)

&

------------------------------------------------------------------------

&

(0,0)(60,50) (0,10)(10,10)(10,20)(0,20) (0,20)(10,20)(10,30)(0,30) (0,30)(10,30)(10,40)(0,40) (0,40)(10,40)(10,50)(0,50) (10,0)(20,0)(20,10)(10,10) (10,40)(20,40)(20,50)(10,50) (10,40)(20,50) (20,0)(30,0)(30,10)(20,10) (20,30)(30,30)(30,40)(20,40) (20,40)(30,40)(30,50)(20,50) (30,0)(40,0)(40,10)(30,10) (30,40)(40,40)(40,50)(30,50) (40,0)(50,0)(50,10)(40,10) (40,10)(50,10)(50,20)(40,20) (40,20)(50,20)(50,30)(40,30) (40,30)(50,30)(50,40)(40,40) (50,10)(60,10)(60,20)(50,20) (50,20)(60,20)(60,30)(50,30) (50,30)(60,30)(60,40)(50,40) (10,20)[2.0]{} (10,20)[$d$]{} (20,40)[2.0]{} (20,40)[$b$]{} (30,10)[2.0]{} (30,10)[$a$]{} (40,30)[2.0]{} (40,30)[$c$]{} (50,50)[2.0]{} (0,0)(0,50) (0,0)(60,0) (10,0)(10,50) (0,10)(60,10) (20,0)(20,50) (0,20)(60,20) (30,0)(30,50) (0,30)(60,30) (40,0)(40,50) (0,40)(60,40) (50,0)(50,50) (0,50)(60,50) (60,0)(60,50)

(-3,0)(120,85) (0,0)(80,80) (80,40)(120,0) (80,40)(120,80) (0,0)(0,80) (40,0)(40,80) (80,0)(80,80) (120,0)(120,80) (0,0)(120,0) (0,40)(120,40) (0,80)(120,80) (-3,2)(-3,38) (-3,42)(-3,78) (2,83)(38,83) (42,83)(78,83) (82,83)(118,83) (35,35)[2.0]{} (90,30)[2.0]{} (25,25)[2.0]{} (100,60)[2.0]{} (105,15)[2.0]{} (110,70)[2.0]{} (75,75)[2.0]{} (40,0)[${\textsf{a}}$]{} (80,40)[${\textsf{b}}$]{} (80,0)[${\textsf{c}}$]{} (120,40)[${\textsf{d}}$]{}

We now consider the encoding ${\varphi}$ over the cell alphabet $\Sigma=\{{\textsf{a}},{\textsf{b}},{\textsf{c}},{\textsf{d}}\}$ as indicated in Figure \[fig-2473516\], which also shows an example of ${\varphi}$. This mapping is not injective on $\Sigma^\ast$ for the following two reasons.

-   The same gridded permutation may be the image of multiple words (in our example, this occurs because the pairs $\{{\textsf{a}},{\textsf{b}}\}$, $\{{\textsf{a}},{\textsf{d}}\}$, and $\{{\textsf{b}},{\textsf{c}}\}$ “commute”, i.e., they may be interchanged without affecting the gridded permutation obtained). A method to handle this issue in general (by appealing to the theory of “trace monoids”) is presented in [@albert:geometric-grid-: Section 7].

-   A given permutation may have several different $M$-griddings. A (nonconstructive) method to handle this issue in general is presented in [@albert:geometric-grid-: Section 8].

In the class we are considering, ${\operatorname{Av}}(4312,3142)$, it is possible to deal with the issues concretely.

First we address (G1). For any particular gridded permutation, we prefer the lexicographically minimal word encoding it. For example, suppose that a word contained a factor of the form $\{{\textsf{b}},{\textsf{d}}\}^+{\textsf{a}}$ (here the $+$ superscript signifies that this portion of the word contains at least one letter). We could then replace this factor by a factor of the form ${\textsf{a}}\{{\textsf{b}},{\textsf{d}}\}^+$ and obtain a lexicographically lesser word which is mapped to the same permutation. Therefore we forbid factors of the form $\{{\textsf{b}},{\textsf{d}}\}^+{\textsf{a}}$. The other factor we need to forbid is ${\textsf{c}}{\textsf{a}}^\ast{\textsf{b}}$ (which could be replaced by a factor of the form ${\textsf{b}}{\textsf{c}}{\textsf{a}}^\ast$).

Now we address (G2), which requires us to choose a preferred (geometric) $M$-gridding for every permutation in ${\operatorname{Geom}}(M)$. Among all $M$-griddings of a permutation, we prefer the one that has the most entries in the first column, then the most entries in the second column, and then the most entries in the first row. Thus in terms of column divisions $1=c_1\le c_2\le c_3\le c_4=n+1$ and row divisions $1=r_1\le r_2\le r_3=n+1$, we seek to maximise $c_2$, then $c_3$, and then $r_2$. The words which correspond to such griddings can now be characterised as those which do not begin with ${\textsf{a}}^\ast{\textsf{d}}$, ${\textsf{b}}$, $\{{\textsf{a}},{\textsf{c}}\}^\ast{\textsf{b}}$, or ${\textsf{d}}$ and are not of the form ${\textsf{c}}\{{\textsf{a}},{\textsf{c}},{\textsf{d}}\}^\ast$.

With this language we may enumerate the grid class itself[^3], but we are interested instead in the simple permutations. The additional rules for the words encoding simple permutations of length at least four are:

[ccc]{}

(-6,0)(120,88) (80,20)(100,60) (0,0)(80,80) (80,40)(120,0) (80,40)(120,80) (0,0)(0,80) (40,0)(40,80) (80,0)(80,80) (120,0)(120,80) (0,0)(120,0) (0,40)(120,40) (0,80)(120,80) (-6,2)(-6,38) (-6,42)(-6,78) (2,86)(38,86) (42,86)(78,86) (82,86)(118,86) (40,0)[${\textsf{a}}$]{} (80,40)[${\textsf{b}}$]{} (80,0)[${\textsf{c}}$]{} (120,40)[${\textsf{d}}$]{}

&&

(-6,0)(120,88) (20,20)(100,60) (0,0)(80,80) (80,40)(120,0) (80,40)(120,80) (0,0)(0,80) (40,0)(40,80) (80,0)(80,80) (120,0)(120,80) (0,0)(120,0) (0,40)(120,40) (0,80)(120,80) (-6,2)(-6,38) (-6,42)(-6,78) (2,86)(38,86) (42,86)(78,86) (82,86)(118,86) (40,0)[${\textsf{a}}$]{} (80,40)[${\textsf{b}}$]{} (80,0)[${\textsf{c}}$]{} (120,40)[${\textsf{d}}$]{}

-   To prevent intervals solely contained within an individual cell, we prohibit repetitions ${\textsf{a}}{\textsf{a}}$, ${\textsf{b}}{\textsf{b}}$, ${\textsf{c}}{\textsf{c}}$, or ${\textsf{d}}{\textsf{d}}$ as factors.

-   To prevent intervals of the form shown in the first pane of Figure \[fig-4312-3142-grid-intervals\], we forbid words beginning with $\{{\textsf{c}},{\textsf{d}}\}^2$.

-   To prevent intervals of the form shown in the second pane of Figure \[fig-4312-3142-grid-intervals\], we forbid words of the form $\{{\textsf{a}},{\textsf{b}},{\textsf{c}},{\textsf{d}}\}^\ast\{{\textsf{a}},{\textsf{c}},{\textsf{d}}\}^+$.

With these restrictions, we can then use the package [@delgado:automata-----a-:] for  [@:gap----groups-a:] to count the simple permutations of this grid class[^4]. For future reference, we record that the multivariate generating function for these words of length at least four which begin with ${\textsf{a}}$ is $$s({x_{\textsf{a}}},{x_{\textsf{b}}},{x_{\textsf{c}}},{x_{\textsf{d}}})=\frac{{x_{\textsf{a}}}{x_{\textsf{b}}}{x_{\textsf{c}}}{x_{\textsf{d}}}}{1-{x_{\textsf{a}}}{x_{\textsf{c}}}-{x_{\textsf{b}}}{x_{\textsf{d}}}-{x_{\textsf{c}}}{x_{\textsf{d}}}-{x_{\textsf{a}}}{x_{\textsf{c}}}{x_{\textsf{d}}}- {x_{\textsf{b}}}{x_{\textsf{c}}}{x_{\textsf{d}}}},$$ while the words of length at least four which begin with ${\textsf{c}}$ have multivariate generating function ${x_{\textsf{c}}}s({x_{\textsf{a}}},{x_{\textsf{b}}},{x_{\textsf{c}}},{x_{\textsf{d}}})$. Note that our rules preclude words encoding simple permutations from beginning with ${\textsf{b}}$ or ${\textsf{d}}$.

Now we characterise the inflations. Because $3142$ is simple, it will not occur when inflating a $3142$-avoiding permutation by $3142$-avoiding intervals, so we need only avoid $4312$. Since the class is sum closed, we have that $f_\oplus=f^2/(1+f)$, as in Section \[sec-4213-3142\]. The skew decomposable permutations are a bit more complicated, but divide into a union: $$\left({\operatorname{Av}}(21)\ominus{\operatorname{Av}}(312)\right)\cup\left({\operatorname{Av}}_{\not\ominus}(4312,3142)\ominus{\operatorname{Av}}(12)\right),$$ where ${\operatorname{Av}}_{\not\ominus}(4312,3142)$ denotes the set of skew indecomposable permutations in this class. As the intersection of these two is simply ${\operatorname{Av}}(21)\ominus{\operatorname{Av}}(12)$, $f_\ominus=mc+(f-f_\ominus)m-m^2$, where $$m=\frac{x}{1-x}$$ denotes the generating function for the nonempty decreasing (or, increasing) permutations. Solving this shows $$f_\ominus
=
\frac{m(f+c-m)}{1+m}.$$ Inflations of simple permutation of length at least four are a bit more complicated, as there are several cases. In all such inflations, each entry which corresponds to a ${\textsf{b}}$ may only be inflated by an increasing permutation (but may be inflated by any such permutation), while each entry which corresponds to a ${\textsf{d}}$ may only be inflated by a $312$-avoiding permutation (but may be inflated by any such permutation). If the word begins with a ${\textsf{c}}$, then it follows that the entry corresponding to the first ${\textsf{c}}$ may be inflated by any permutation in ${\operatorname{Av}}(312)$, while each subsequent entry corresponding to a ${\textsf{c}}$ may only be inflated by a decreasing permutation. Otherwise, it follows from our rules that the word must begin with an ${\textsf{a}}$, and there are two cases. If the entry corresponding to the first ${\textsf{a}}$ is inflated by a permutation containing a descent, then each entry corresponding to a ${\textsf{c}}$ must be inflated with a decreasing permutation. Otherwise, if the entry corresponding to the first ${\textsf{a}}$ is inflated by an increasing permutation, then the entry corresponding to the first ${\textsf{c}}$ must be inflated by a permutation from ${\operatorname{Av}}(312)$, while each subsequent entry corresponding to a ${\textsf{c}}$ must be inflated by a decreasing permutation. From our multivariate generating function for these simple permutations, it follows that the contribution of their inflations is $$\left(\frac{f-m}{f}+\frac{c}{f}+\frac{c}{m}\right)s(f,m,m,c)
=
\frac{cm^2(c-m+f+cf)}{1-2cm-cm^2-mf-cmf}.$$ Combining this with the generating functions for $f_\oplus$ and $f_\ominus$ and solving for $f$ yields the generating function for the class (or, rather, its minimal polynomial).

\[thm-4312-3142\] The generating function $f$ for ${\operatorname{Av}}(4312,3142)$ satisfies $$\begin{array}{rclcc}
(x^3-2x^2+x)f^4
&+&
(4x^3-9x^2+6x-1)f^3&&\\
&+&
(6x^3-12x^2+7x-1)f^2&&\\
&+&
(4x^3-5x^2+x)f&&\\
&+&
x^3
&=&0.
\end{array}$$

The first several terms of this sequence are $$1,2,6,22,88,367,1568,6810,29943,132958,595227, 2683373,12170778,55499358,$$ sequence [A165538]{} in the [OEIS [@sloane:the-on-line-enc:]]{}. Though the form of the equation for $f$ is complicated, the close link with the Catalan numbers which can be seen in the previous development is enough to ensure that the radius of convergence is quite simple, exactly $1/5$, and in particular $f_n^{1/n} \to 5$.

Example \#3: Avoiding $4231$ and $3124$ {#sec-4231-3124}
=======================================

Before our final example we review a well-studied class. A permutation is [*layered*]{} if it is the direct sum of decreasing permutations (these decreasing permutations are called the [*layers*]{}). The class of [*layered permutations*]{} has the basis $\{312, 231\}$. To restrict the number of layers, we merely need to add an additional restriction, of the form $12\cdots k$.

\[prop-4231-3124-simples\] The simple permutations of ${\operatorname{Av}}(4231, 3124)$ and ${\operatorname{Geom}}{\mbox{\begin{footnotesize}$\left(\begin{array}{rrr}0&1&-1\\1&-1&0\end{array}\right)$\end{footnotesize}}}$ coincide.

First, it is straightforward to observe that $${\operatorname{Geom}}{\mbox{\begin{footnotesize}$\left(\begin{array}{rrr}0&1&-1\\1&-1&0\end{array}\right)$\end{footnotesize}}}
=
{\operatorname{Grid}}{\mbox{\begin{footnotesize}$\left(\begin{array}{rrr}0&1&-1\\1&-1&0\end{array}\right)$\end{footnotesize}}}
\subseteq{\operatorname{Av}}(4231, 3124),$$ so it suffices to prove that the simple permutations of ${\operatorname{Av}}(4231, 3124)$ are contained in this grid class.

Consider a simple permutation $\pi\in{\operatorname{Av}}(4231,3124)$ of length $n$. We analyse the entries of $\pi$ to the left of $n$ and to the right of $n$ separately, beginning with the entries on the right.

The entries to the right of $n$ form a layered permutation with at most two layers.

By the $4231$-avoidance of $\pi$ the entries to the right of $n$ avoid $231$, so to show that they are layered it suffices to show that they also avoid $312$. Suppose otherwise. Among all occurrences of $312$ choose one, $cab$, in which the ‘$1$’ and ‘$2$’ are as close together in position as possible (they will in fact be adjacent). Since $\pi$ is simple, $\{a,b\}$ cannot be an interval and thus (because they are adjacent) must be separated vertically. We claim that there is at least one such separator to the left of $n$. Let $x$ denote an arbitrary separator of $\{a,b\}$. We see that $x$ cannot lie horizontally between $n$ and $c$ by $4231$-avoidance. If $x$ were to lie horizontally between $c$ and $a$, then $\{x,a\}$ cannot be separated horizontally anywhere, nor vertically to the right of $n$, owing to the avoidance conditions, so must be separated vertically to the left of $n$. This separator therefore separates $\{a,b\}$ vertically to the left of $n$, as desired. The only other case is if $x$ lies to the right of $b$. In this case choose $x$ to be the bottommost such separator. Then $\{b,x\}$ must be separated. This can only occur to the left of $n$ (giving the separator we desire) or to the right of $x$. In this latter case it is easy to see that the region which consists of those points from $b$ to the right and which are also vertically between $x$ and $b$ (which contains $b$, $x$, and this new separator) can only be separated to the left of $n$, again giving the separator we desired. Therefore in all cases we may assume that there is an entry, $x$, to the left of $n$ which vertically separates $a$ and $b$. This situation is depicted on the left of Figure \[fig-4231-3124-claim-a\].

Now consider $\{n,c\}$. From Figure \[fig-4231-3124-claim-a\], we see that these entries can only possibly be separated vertically by an entry to the left of $n$ and to the right of $x$. Choose the leftmost such separator and label it $v$. We now have the situation depicted in the centre of Figure \[fig-4231-3124-claim-a\]. However, it is now clear that the entries $\{c,n,v\}$ lie in a proper interval, contradicting the simplicity of $\pi$. This contradiction shows that the entries to the right of $n$ must form a layered permutation.

[ccc]{}

(0,0)(60,50) (0,40)(10,40)(10,50)(0,50) (10,0)(20,0)(20,10)(10,10) (20,0)(30,0)(30,10)(20,10) (20,10)(30,10)(30,20)(20,20) (20,20)(30,20)(30,30)(20,30) (20,30)(30,30)(30,40)(20,40) (30,0)(40,0)(40,10)(30,10) (30,40)(40,40)(40,50)(30,50) (40,0)(50,0)(50,10)(40,10) (40,10)(50,10)(50,20)(40,20) (40,10)(50,20) (40,20)(50,20)(50,30)(40,30) (40,30)(50,30)(50,40)(40,40) (40,40)(50,40)(50,50)(40,50) (50,0)(60,0)(60,10)(50,10) (50,40)(60,40)(60,50)(50,50) (10,20)[2.0]{} (10,20)[$x$]{} (20,50)[2.0]{} (20,50)[$n$]{} (30,40)[2.0]{} (30,40)[$c$]{} (40,10)[2.0]{} (40,10)[$a$]{} (50,30)[2.0]{} (50,30)[$b$]{} (0,0)(0,50) (0,0)(60,0) (10,0)(10,50) (0,10)(60,10) (20,0)(20,50) (0,20)(60,20) (30,0)(30,50) (0,30)(60,30) (40,0)(40,50) (0,40)(60,40) (50,0)(50,50) (0,50)(60,50) (60,0)(60,50)

&&

(0,0)(70,60) (0,40)(10,40)(10,50)(0,50) (0,50)(10,50)(10,60)(0,60) (10,0)(20,0)(20,10)(10,10) (10,40)(20,40)(20,50)(10,50) (10,50)(20,50)(20,60)(10,60) (20,0)(30,0)(30,10)(20,10) (20,10)(30,10)(30,20)(20,20) (20,20)(30,20)(30,30)(20,30) (20,30)(30,30)(30,40)(20,40) (30,0)(40,0)(40,10)(30,10) (30,10)(40,10)(40,20)(30,20) (30,20)(40,20)(40,30)(30,30) (30,30)(40,30)(40,40)(30,40) (40,0)(50,0)(50,10)(40,10) (40,40)(50,40)(50,50)(40,50) (40,50)(50,50)(50,60)(40,60) (50,0)(60,0)(60,10)(50,10) (50,10)(60,10)(60,20)(50,20) (50,10)(60,20) (50,20)(60,20)(60,30)(50,30) (50,30)(60,30)(60,40)(50,40) (50,40)(60,40)(60,50)(50,50) (50,50)(60,50)(60,60)(50,60) (60,0)(70,0)(70,10)(60,10) (60,40)(70,40)(70,50)(60,50) (60,50)(70,50)(70,60)(60,60) (10,20)[2.0]{} (10,20)[$x$]{} (20,50)[2.0]{} (20,50)[$v$]{} (30,60)[2.0]{} (30,60)[$n$]{} (40,40)[2.0]{} (40,40)[$c$]{} (50,10)[2.0]{} (50,10)[$a$]{} (60,30)[2.0]{} (60,30)[$b$]{} (0,0)(0,60) (0,0)(70,0) (10,0)(10,60) (0,10)(70,10) (20,0)(20,60) (0,20)(70,20) (30,0)(30,60) (0,30)(70,30) (40,0)(40,60) (0,40)(70,40) (50,0)(50,60) (0,50)(70,50) (60,0)(60,60) (0,60)(70,60) (70,0)(70,60)

Having established that these entries are layered, it is easy to see that there are at most two layers. Otherwise the entries to the right of $n$ would contain a copy of $123$. The ‘$2$’ and ‘$3$’ in this copy of $123$ must be separated by an entry to the left of $n$ (because the entries to the right of $n$ form a layered permutation), but this would create a copy of $3124$. This contradiction completes the proof of Claim \[prop-4231-3124-simples\].a.

The entries to the left of $n$ and above $\pi(n)$ are increasing.

Let $a=\pi(n)$ and suppose to the contrary that the entries to the left of $n$ and above $a$ contain an inversion. Choose such an inversion $yx$ with $y$ as far left as possible and $x$ as close to $y$ as possible. This gives the situation depicted on the left of Figure \[fig-4231-3124-claim-b\]. As can be seen in this diagram, $\{x,y\}$ could only possibly be separated horizontally. Let $z$ denote a topmost such separator. This gives the situation depicted on the right of Figure \[fig-4231-3124-claim-b\]. However, as this diagram indicates, $y$ and $z$ now belong to a proper interval, contradicting the simplicity of $\pi$.

[ccc]{}

(0,0)(40,40) (0,20)(10,20)(10,30)(0,30) (0,30)(10,30)(10,40)(0,40) (10,0)(20,0)(20,10)(10,10) (10,10)(20,10)(20,20)(10,20) (10,20)(20,20)(20,30)(10,30) (20,20)(30,20)(30,30)(20,30) (20,20)(30,30) (30,20)(40,20)(40,30)(30,30) (10,30)[2.0]{} (10,30)[$y$]{} (20,20)[2.0]{} (20,20)[$x$]{} (30,40)[2.0]{} (30,40)[$n$]{} (40,10)[2.0]{} (40,10)[$a$]{} (0,0)(0,40) (0,0)(40,0) (10,0)(10,40) (0,10)(40,10) (20,0)(20,40) (0,20)(40,20) (30,0)(30,40) (0,30)(40,30) (40,0)(40,40) (0,40)(40,40)

&&

(0,0)(50,50) (0,20)(10,20)(10,30)(0,30) (0,30)(10,30)(10,40)(0,40) (0,40)(10,40)(10,50)(0,50) (10,0)(20,0)(20,10)(10,10) (10,10)(20,10)(20,20)(10,20) (10,20)(20,20)(20,30)(10,30) (10,40)(20,40)(20,50)(10,50) (20,0)(30,0)(30,10)(20,10) (20,10)(30,10)(30,20)(20,20) (20,20)(30,20)(30,30)(20,30) (20,40)(30,40)(30,50)(20,50) (30,20)(40,20)(40,30)(30,30) (30,20)(40,30) (30,30)(40,30)(40,40)(30,40) (40,20)(50,20)(50,30)(40,30) (40,30)(50,30)(50,40)(40,40) (10,30)[2.0]{} (10,30)[$y$]{} (20,40)[2.0]{} (20,40)[$z$]{} (30,20)[2.0]{} (30,20)[$x$]{} (40,50)[2.0]{} (40,50)[$n$]{} (50,10)[2.0]{} (50,10)[$a$]{} (0,0)(0,50) (0,0)(50,0) (10,0)(10,50) (0,10)(50,10) (20,0)(20,50) (0,20)(50,20) (30,0)(30,50) (0,30)(50,30) (40,0)(40,50) (0,40)(50,40) (50,0)(50,50) (0,50)(50,50)

Let $c$ denote the leftmost entry of $\pi$ greater than $\pi(n)$ (note that $c$ may equal $n$). The entries to the left of $c$ (which lie below $\pi(n)$ by Claim \[prop-4231-3124-simples\].b) are increasing.

The proof follows well-travelled lines. Suppose to the contrary that there is an inversion among these entries, and choose one such $ba$ where $b$ is as far left as possible, and $a$ is as small as possible. The cell bounded by $\{a,b\}$ can only be split above, and we may choose a split point $d$ which is as large as possible. Now the box bounded by $\{a,b,d\}$ defines a proper interval, a contradiction.

We are now in position to complete the proof of the proposition, after a brief recap of the structure we have established. Let $b=\pi(n)$, let $c$ denote the leftmost entry which is greater than $b$ (note that $c=n$ is a possibility), and finally let $a$ denote the bottommost entry which lies horizontally between $c$ and $n$ (such an entry need not exist, but this does not affect the argument). We then have the situation depicted on the left of Figure \[fig-4231-3124-finale\].

[ccccccc]{}

(0,0)(40,40) (0,20)(10,20)(10,30)(0,30) (0,30)(10,30)(10,40)(0,40) (10,0)(20,0)(20,10)(10,10) (10,0)(20,10) (10,20)(20,20)(20,30)(10,30) (20,0)(30,0)(30,10)(20,10) (20,10)(30,10)(30,20)(20,20) (20,20)(30,20)(30,30)(20,30) (10,30)[2.0]{} (10,30)[$c$]{} (20,10)[2.0]{} (20,10)[$a$]{} (30,40)[2.0]{} (30,40)[$n$]{} (40,20)[2.0]{} (40,20)[$b$]{} (5,10)[$R_1$]{} (20,35)[$R_2$]{} (15,15)[$R_3$]{} (35,25)[$R_4$]{} (35,15)[$R_5$]{} (35,35)[$R_6$]{} (35,5)[$R_7$]{} (0,0)(0,40) (0,0)(40,0) (10,0)(10,40) (10,10)(40,10) (20,0)(20,30) (0,20)(40,20) (30,0)(30,40) (0,30)(40,30) (40,0)(40,40) (0,40)(40,40)

&&

(0,0)(50,50) (0,20)(10,20)(10,30)(0,30) (0,30)(10,30)(10,40)(0,40) (0,40)(10,40)(10,50)(0,50) (10,0)(20,0)(20,10)(10,10) (10,20)(20,20)(20,30)(10,30) (10,30)(20,30)(20,40)(10,40) (20,0)(30,0)(30,10)(20,10) (20,10)(30,10)(30,20)(20,20) (20,20)(30,20)(30,30)(20,30) (20,30)(30,30)(30,40)(20,40) (30,10)(40,10)(40,20)(30,20) (30,20)(40,20)(40,30)(30,30) (30,30)(40,30)(40,40)(30,40) (40,0)(50,0)(50,10)(40,10) (40,30)(50,30)(50,40)(40,40) (40,40)(50,40)(50,50)(40,50) (10,40)[2.0]{} (10,40)[$c$]{} (20,10)[2.0]{} (20,10)[$a$]{} (30,50)[2.0]{} (30,50)[$n$]{} (40,30)[2.0]{} (40,30)[$x$]{} (50,20)[2.0]{} (50,20)[$b$]{} (0,0)(0,50) (0,0)(50,0) (10,0)(10,50) (10,10)(50,10) (20,0)(20,40) (0,20)(50,20) (30,0)(30,50) (0,30)(50,30) (40,0)(40,50) (0,40)(50,40) (50,0)(50,50) (0,50)(50,50)

&&

(0,0)(40,40) (0,20)(10,20)(10,30)(0,30) (0,30)(10,30)(10,40)(0,40) (10,0)(20,0)(20,10)(10,10) (10,0)(20,10) (10,20)(20,20)(20,30)(10,30) (20,0)(30,0)(30,10)(20,10) (20,10)(30,10)(30,20)(20,20) (20,20)(30,20)(30,30)(20,30) (30,10)(40,10)(40,20)(30,20) (30,20)(40,20)(40,30)(30,30) (10,30)[2.0]{} (20,10)[2.0]{} (30,40)[2.0]{} (40,20)[2.0]{} (0,0)(0,40) (0,0)(40,0) (10,0)(10,40) (10,10)(40,10) (20,0)(20,30) (0,20)(40,20) (30,0)(30,40) (0,30)(40,30) (40,0)(40,40) (0,40)(40,40) (0.5,1)(10,20) (10,20)(20,10) (10,30)(30,40) (30,10)(35,0) (35,40)(40,30)

The first three labeled regions are further restricted as follows:

-   $R_1$ must be increasing by Claim \[prop-4231-3124-simples\].c.

-   $R_2$ must be increasing by Claim \[prop-4231-3124-simples\].b.

-   $R_3$ must be decreasing because $\pi$ avoids $3124$.

Next we claim that $R_4$ and $R_5$ are both empty. First suppose to the contrary that $R_4$ is nonempty, and take $x$ to be the topmost entry in this region. We then have the situation depicted in the centre of Figure \[fig-4231-3124-finale\], which shows that $\{b,x\}$ can only be separated by an entry in $R_5$. Let $y$ denote the bottommost such separator. It can then be seen that there is no way to separate $\{b,x,y\}$. Showing that $R_5$ is empty is very similar. Suppose to the contrary that this region is nonempty and let $x$ denote the bottommost entry in the region. It can be seen that there are two ways to separate $\{b,x\}$: vertically with an entry in $R_5$ or horizontally with an entry in $R_4$. In each case, though, these new entries cannot be separated from either $b$ or $x$.

Finally, regions $R_6$ and $R_7$ must both be decreasing because $\pi$ avoids $4231$ and $3124$ respectively. Then Claim \[prop-4231-3124-simples\].a shows that regions $R_5$ and $R_6$ must together form a layered permutation with at most two layers. The structure of $\pi$ is now displayed on the right of Figure \[fig-4231-3124-finale\], which shows that $\pi$ does indeed lie in the grid class desired, completing the proof.

Having restricted our attention to this (geometric) grid class, we now seek to place it in bijection with a regular language, following points (G1) and (G2) of Section \[sec-4312-3142\]. The first is the easiest to deal with since we need only forbid factors of the forms $\{{\textsf{c}},{\textsf{d}}\}^+{\textsf{a}}$ and ${\textsf{d}}^+{\textsf{b}}$.

(-3,0)(120,85) (0,0)(40,40) (40,40)(80,80) (40,40)(80,0) (80,80)(120,40) (0,0)(0,80) (40,0)(40,80) (80,0)(80,80) (120,0)(120,80) (0,0)(120,0) (0,40)(120,40) (0,80)(120,80) (-3,2)(-3,38) (-3,42)(-3,78) (2,83)(38,83) (42,83)(78,83) (82,83)(118,83) (40,0)[${\textsf{a}}$]{} (40,0)[${\textsf{b}}$]{} (80,40)[${\textsf{c}}$]{} (80,40)[${\textsf{d}}$]{}

To handle (G2), we use the same preference for $M$-griddings as in Section \[sec-4312-3142\]: among all $M$-griddings of a permutation, we prefer the one that has the most entries in the first column, then the most entries in the second column, and then the most entries in the first row. The words that correspond to these preferred griddings are those which do not begin with ${\textsf{b}}$ or ${\textsf{a}}^\ast{\textsf{c}}$, do not end with ${\textsf{d}}$, and are not of the forms ${\textsf{d}}\{{\textsf{a}},{\textsf{b}}\}^\ast$ or ${\textsf{a}}^\ast\{{\textsf{c}},{\textsf{d}}\}^+$.

This language allows us to enumerate the grid class itself[^5], and now we restrict to encoding the simple permutations.

[ccccc]{}

(-6,0)(120,88) (20,20)(120,80) (0,0)(40,40) (40,40)(80,80) (40,40)(80,0) (80,80)(120,40) (0,0)(0,80) (40,0)(40,80) (80,0)(80,80) (120,0)(120,80) (0,0)(120,0) (0,40)(120,40) (0,80)(120,80) (-6,2)(-6,38) (-6,42)(-6,78) (2,86)(38,86) (42,86)(78,86) (82,86)(118,86) (40,0)[${\textsf{a}}$]{} (40,0)[${\textsf{b}}$]{} (80,40)[${\textsf{c}}$]{} (80,40)[${\textsf{d}}$]{}

&&

(-6,0)(120,88) (60,60)(100,80) (0,0)(40,40) (40,40)(80,80) (40,40)(80,0) (80,80)(120,40) (0,0)(0,80) (40,0)(40,80) (80,0)(80,80) (120,0)(120,80) (0,0)(120,0) (0,40)(120,40) (0,80)(120,80) (-6,2)(-6,38) (-6,42)(-6,78) (2,86)(38,86) (42,86)(78,86) (82,86)(118,86) (40,0)[${\textsf{a}}$]{} (40,0)[${\textsf{b}}$]{} (80,40)[${\textsf{c}}$]{} (80,40)[${\textsf{d}}$]{}

&&

(-6,0)(120,88) (20,20)(60,60) (0,0)(40,40) (40,40)(80,80) (40,40)(80,0) (80,80)(120,40) (0,0)(0,80) (40,0)(40,80) (80,0)(80,80) (120,0)(120,80) (0,0)(120,0) (0,40)(120,40) (0,80)(120,80) (-6,2)(-6,38) (-6,42)(-6,78) (2,86)(38,86) (42,86)(78,86) (82,86)(118,86) (40,0)[${\textsf{a}}$]{} (40,0)[${\textsf{b}}$]{} (80,40)[${\textsf{c}}$]{} (80,40)[${\textsf{d}}$]{}

-   To prevent intervals contained within individual cells, we prohibit repetitions ${\textsf{a}}{\textsf{a}}$, ${\textsf{b}}{\textsf{b}}$, ${\textsf{c}}{\textsf{c}}$, ${\textsf{d}}{\textsf{d}}$ as factors.

-   To prevent intervals of the form shown in the first pane of Figure \[fig-4231-3124-grid-intervals\], we insist that the last ${\textsf{a}}$ is followed by a ${\textsf{b}}$, i.e., we prohibit words which end in ${\textsf{a}}\{{\textsf{c}},{\textsf{d}}\}^\ast$,

-   To prevent intervals of the form shown in the second pane of Figure \[fig-4231-3124-grid-intervals\], we require that there is a ${\textsf{b}}$ after the last letter in $\{{\textsf{c}},{\textsf{d}}\}$; by the previous two rules, this means we need only prohibit words which end in ${\textsf{c}}{\textsf{d}}$ or ${\textsf{d}}{\textsf{c}}$.

-   To prevent intervals of the form shown in the third pane of Figure \[fig-4231-3124-grid-intervals\], we prohibit words which begin with two or more letters from $\{{\textsf{a}},{\textsf{b}},{\textsf{c}}\}$.

Finally, we exclude the word ${\textsf{d}}{\textsf{c}}{\textsf{b}}$, which is mapped by ${\varphi}$ to the nonsimple permutation $312$.

We can then compute (again using the package [@delgado:automata-----a-:] for  [@:gap----groups-a:]) that the multivariate generating function (counting occurrences of each letter) for the simple permutations in this geometric grid class is $$s({x_{\textsf{a}}},{x_{\textsf{b}}},{x_{\textsf{c}}},{x_{\textsf{d}}})=\frac{{x_{\textsf{b}}}{x_{\textsf{c}}}{x_{\textsf{d}}}({x_{\textsf{a}}}+{x_{\textsf{c}}}+{x_{\textsf{a}}}{x_{\textsf{b}}}+{x_{\textsf{a}}}{x_{\textsf{c}}}+{x_{\textsf{b}}}{x_{\textsf{c}}}+{x_{\textsf{c}}}{x_{\textsf{d}}}+{x_{\textsf{a}}}{x_{\textsf{b}}}{x_{\textsf{c}}}+{x_{\textsf{b}}}{x_{\textsf{c}}}{x_{\textsf{d}}})}
{1-{x_{\textsf{a}}}{x_{\textsf{b}}}-{x_{\textsf{b}}}{x_{\textsf{c}}}-{x_{\textsf{c}}}{x_{\textsf{d}}}-{x_{\textsf{a}}}{x_{\textsf{b}}}{x_{\textsf{c}}}-{x_{\textsf{b}}}{x_{\textsf{c}}}{x_{\textsf{d}}}}.$$ It remains only to determine the allowed inflations. First, the sum decomposable permutations all have unique representations in the form ${\operatorname{Av}}_{\not\oplus}(312)\oplus {\operatorname{Av}}(4231,3124)$, where ${\operatorname{Av}}_{\not\oplus}(312)$ denotes the sum indecomposable permutations in ${\operatorname{Av}}(312)$. As ${\operatorname{Av}}_{\not\oplus}(312)$ is well-known to be enumerated by the shifted Catalan numbers, we get $$f_\oplus=(xc+x)f.$$

The skew decomposable permutations are of the form ${\operatorname{Av}}(312)\ominus {\operatorname{Av}}(231,3124)$, and so (deviating slightly from our usual conventions) they all have a unique representation of the form ${\operatorname{Av}}(312)\ominus {\operatorname{Av}}_{\not\ominus}(231,3124)$. The skew indecomposable permutations in ${\operatorname{Av}}(231,3124)$ are counted by the Fibonacci numbers of odd index ($1$, $1$, $3$, $8$, $21$, $\dots$), giving that $$f_\ominus=\frac{x-2x^2+x^2}{1-3x+x^2}c.$$ We now come to inflations of simple permutations of length at least four. Each entry corresponding to an ${\textsf{a}}$ or ${\textsf{c}}$ may be inflated by an arbitrary member of ${\operatorname{Av}}(312)$. Each entry corresponding to a ${\textsf{b}}$ or non-initial ${\textsf{d}}$ may be inflated only by a decreasing interval. Finally, the first entry corresponding to a ${\textsf{d}}$ (and we see from the multivariate generating function $s$ that every word encoding simple permutations in this class contains at least one ${\textsf{d}}$) may be inflated by an arbitrary member of ${\operatorname{Av}}(231,3124)$, a class counted by the Fibonacci numbers of even index ($1$, $2$, $5$, $13$, $34$, $\dots$). Therefore, the generating function we are interested in is given by $$f
=
(xc+x)f
+
\frac{x-2x^2+x^2}{1-3x+x^2}c
+
\frac{s(c,m,c,m)}{m}\frac{x-x^2}{1-3x+x^2}.$$ As this equation is linear in $f$, it is trivial to obtain our final result.

The generating function for ${\operatorname{Av}}(4231, 3124)$ is $$\frac{1-8x+20x^2-20x^3+10x^4-2x^5 - (1-4x+2x^2)\sqrt{1-4x}}
{2(1-3x+x^2)(-1+5x-4x^2+x^3)}.
$$

The first several terms of this sequence are $$1, 2, 6, 22, 88, 363, 1508, 6255, 25842, 106327, 435965, 1782733, 7275351, 29648647,$$ sequence [A165535]{} in the [OEIS [@sloane:the-on-line-enc:]]{}. The radius of convergence is the smallest positive root of the cubic factor in the denominator, approximately 0.2451, and hence $f_n^{1/n} \to 4.0796\dots$

Conclusion {#sec-infinite-conclusion}
==========

It should be noted that the three examples presented in this paper are not the only $2\times 4$ classes which have been enumerated using these techniques. In [@albert:counting-1324-4:], the present authors used a precursor of this approach to enumerate ${\operatorname{Av}}(4231,1324)$; in the language of this paper, they proved that the simple permutations in this class are contained in $${\operatorname{Geom}}{\mbox{\begin{footnotesize}$\left(\begin{array}{rrr}1&0&-1\\0&\bullet&0\\-1&0&1\end{array}\right)$\end{footnotesize}}}.$$ (Here the $\bullet$ entry denotes a cell in the standard figure filled with a unique point; this notion is formally defined in [@albert:geometric-grid-: Section 10].)

Finally, we point out that there may be other $2\times 4$ classes to which these techniques apply. While there is a decision procedure to determine whether a given class lies in a monotone grid class (see Huczynska and Vatter [@huczynska:grid-classes-an:]), there is no known procedure to determine whether a given class lies in a *geometric* grid class (and indeed, there are indications that this question may be quite difficult). Needless to say, deciding whether the simple permutations of a given class lie in a geometric grid class is expected to be more difficult still.

[10]{}

Simple permutations and pattern restricted permutations. , 1-3 (2005), 1–15.

Geometric grid classes of permutations. *Trans. Amer. Math. Soc.*, to appear.

The enumeration of permutations avoiding $2143$ and $4231$. (2011), 87–98.

The enumeration of three pattern classes using monotone grid classes. , 3 (2012), P20 (34 pp.).

Counting $1324$, $4231$-avoiding permutations. , 1 (2009), Research Paper 136, 9.

Inflations of geometric grid classes of permutations. arXiv:1202.1833v1 \[math.CO\].

Restricted permutations. , 1-3 (1999), 27–38.

The permutation classes equinumerous to the smooth class. (1998), Research paper 31, 12 pp.

Simple permutations and algebraic generating functions. , 3 (2008), 423–441.

Automata — a [GAP]{} package, [V]{}ersion 1.10. `http://www.gap-system.org/Packages/automata.html`, 2007.

. Cambridge University Press, Cambridge, 2009.

. , 2012.

Grid classes and the [F]{}ibonacci dichotomy for restricted permutations. (2006), R54, 14 pp.

Permutations with forbidden subsequences and a generalized [S]{}chröder number. , 1-3 (2000), 121–130.

Postscript: “[P]{}ermutations with forbidden subsequences and a generalized [S]{}chröder number”. , 1-3 (2003), 333–334.

Finite transition matrices for permutations avoiding pairs of length four patterns. , 1-3 (2003), 171–183.

Wilf classes of pairs of permutations of length $4$. (2005), R25, 27 pp.

Profile classes and partial well-order for permutations. , 2 (2003), R17, 30 pp.

Critically indecomposable partially ordered sets, graphs, tournaments and other binary relational structures. , 1-3 (1993), 191–205.

The [O]{}n-line [E]{}ncyclopedia of [I]{}nteger [S]{}equences. Available online at [http://www.research.att.com/\~njas/sequences/]{}.

Finitely labeled generating trees and restricted permutations. , 5 (2006), 559–572.

. Enumerations of specific permutation classes — [W]{}ikipedia[,]{} [T]{}he [F]{}ree [E]{}ncyclopedia, 2012. .

[^1]: Vatter’s research was sponsored by the National Security Agency under Grant Number H98230-12-1-0207. The United States Government is authorized to reproduce and distribute reprints not-withstanding any copyright notation herein.

[^2]: Note that in order for the cells of the matrix $M$ to be compatible with plots of permutations, we use Cartesian coordinates for our matrices, indexing them first by column, from left to right starting with $1$, and then by row, from bottom to top.

[^3]: This grid class (which, because it can be viewed as a “juxtaposition” in the sense of Atkinson [@atkinson:restricted-perm:], can be shown to have basis $\{2143,3142,4132,4312\})$ has the generating function $$\frac{1-6x+11x^2-5x^3}{(1-x)(1-3x)(1-3x+x^2)}.
    $$

[^4]: These simple permutations have the generating function $$\frac{x+x^2-4x^3-3x^3}{(1+x)(1-2x)},$$ showing that for $n\ge 3$ the simple permutations in this class are counting by the Jacobsthal numbers ([A001045]{} in the [OEIS [@sloane:the-on-line-enc:]]{}).

[^5]: The generating function for this grid class is $$\frac{1-5x+7x^2-x^3}{(1-x)(1-2x)(1-3x)},
    $$ (sequence [A083323]{} in the [OEIS [@sloane:the-on-line-enc:]]{}). Our computations suggest that the basis of this class is $$\{4312, 4231, 4123, 3124, 32541, 21534, 21435\},
    $$ but we have not verified this with a formal proof.
