An Erd\H{o}s--Hajnal analogue for permutation classes

Let $\mathcal{C}$ be a permutation class that does not contain all layered permutations or all colayered permutations. We prove that there is a constant $c$ such that every permutation in $\mathcal{C}$ of length $n$ contains a monotone subsequence of length $cn$.

Ramsey's Theorem tells us that every graph on n vertices has a clique or independent set of size at least a constant times log n. In 1989, Erdős and Hajnal conjectured that one can do much better when avoiding a fixed induced subgraph: The Erdős-Hajnal Conjecture [2]. For every graph H there is a constant δ > 0 such that every graph on n vertices which does not contain H as an induced subgraph has a clique or independent set of size at least n δ .
We refer to Chudnovsky's survey [1] for an account of the progress that has been made toward the Erdős-Hajnal Conjecture. Here we investigate a version of this conjecture for permutations. In this context, the analogue of the induced subgraph order is the permutation pattern order and the analogues of cliques and independent sets are decreasing and increasing subsequences, respectively. Thus the naive translation of the Erdős-Hajnal Conjecture to permutations is well known to hold with δ = 1 /2: The Erdős-Szekeres Theorem [3]. Every permutation of length at least (k − 1)(ℓ − 1) + 1 contains either a decreasing subsequence of length k or an an increasing subsequence of length ℓ.
We instead ask for a stronger conclusion. A permutation class is a downset of permutations under the containment order. We show (Theorem 1) that unless a permutation class contains all layered permutations or all colayered permutations, its members contain monotone subsequences of linear size.
The Erdős-Szekeres Theorem is best possible in that there are permutations of length (k − 1)(ℓ − 1) which have neither decreasing subsequences of length k nor increasing subsequences of length ℓ. Focusing on the case k = ℓ, we call a permutation of length k 2 Erdős-Szekeres extremal if it does not contain a monotone subsequence of length k + 1. If follows from the Robinson-Schensted correspondence and the Hook Length Formula that the number of Erdős-Szekeres extremal permutations of length k 2 is sequence A079402 in the OEIS [15]. One of the earliest references to this formula is Stanley's Monthly solution [12] from 1969. There has also been some recent interest in these permutations. In particular, Romik [11] computed the limit shape of Erdős-Szekeres extremal permutations. Additional results in this direction have been obtained by Kim [9], Pittel and Romik [10], and Su [13].
Despite the fact that there are a great many extremal Erdős-Szekeres permutations, we need to define only two families, the layered and colayered extremal Erdős-Szekeres permutations, of which examples are plotted in Figure 1. It is convenient to use the sum and skew sum operations in defining these permutations, which can be defined pictorially as below.
We use the symbols ⊕ k and ⊖ k to denote repeated sums and skew sums, respectively, so the extremal Erdős-Szekeres layered permutation of length k 2 is We show that these two families of extremal permutations are the only obstructions preventing a class from having a linear bound on monotone subsequences:

Theorem 1. Let C be a permutation class that does not contain the class of layered permutations or the class of colayered permutations.
There is a constant c > 0 such that every permutation of length n in C contains a monotone subsequence of length at least cn.
One special case of Theorem 1 is quite easy. By the folklore result that every permutation avoiding k · · · 21 can be written as the union of k − 1 increasing sequences (which can also be viewed as a consequence of Greene's Theorem [4]), we obtain the following.

Proposition 2.
Let C be a permutation class that does not contain k · · · 21 (or, by symmetry, 12 · · · k). Then every permutation of length n in C contains a monotone subsequence of length at least n/(k − 1). To establish Theorem 1 we first recall some results on transversals of (nonhomogeneous † ) d-intervals (although we only appeal to the case d = 2 in what follows). Let L 1 , . . . , L d be disjoint copies of the real line. A d-interval I is a nonempty subset of L 1 ∪ · · · ∪ L d such that each component I ∩ L i is either empty or a closed interval. The packing number of a set I of d-intervals is the maximum number of pairwise disjoint elements of I, and this quantity is denoted ν(I). A subset of L 1 ∪ · · · ∪ L d which intersects every member of I is called a transversal of I and the minimum size of a transversal of I is its transversal number, τ (I).
An example of a set of 2-intervals is shown on the left of Figure 2. In this example, the two copies of the real line are L x and L y and the 2-intervals are I = {I 1 , I 2 , I 3 }. We have ν(I) = 1 because the 2-intervals are pairwise intersecting, while τ (I) = 2 because 2 points of L x ∪ L y are required to intersect each of I 1 , I 2 , and I 3 .
It is trivial to see that τ (I) ≥ ν(I). In the other direction, building on and improving work of Gyárfás and Lehel [5] and Károlyi and Tardos [8], Tardos established the following.
Note that the bound in Theorem 3 is best possible given the example from Figure 2. Henceforth we adopt a geometric viewpoint of permutations where a permutation π is identified with its plot, the set of points {(i, π(i))} in the plane. Given two intervals X and Y of real numbers, we denote by X × Y the axis-parallel rectangle consisting of the points {(x, y) : x ∈ X, y ∈ Y }. We further define π(X × Y ) to be the subpermutation of π formed by the entries of π whose indices lie in X and values lie in Y .
Given a set of closed axis-parallel rectangles R we can naturally associate to it a set I of 2-intervals in the following manner. Let L x and L y be disjoint copies of the real line. For each R ∈ R we create a 2-interval I R such that I R ∩ L x is the projection of R onto the x-axis and I R ∩ L y is the projection of R onto the y-axis. The set of three rectangles shown on the right of Figure 2 corresponds in this manner to the set of 2-intervals shown on the left of the figure.
We say that two rectangles are independent if both their xand y-axis projections are disjoint. A set of rectangles is said to be independent if they are pairwise independent, and we define the independence number of a set of axis-parallel rectangles to be the size of the largest independent set of rectangles it contains.
It follows readily that if R is a set of closed axis-parallel rectangles and I is the corresponding set of 2-intervals then the independence number of R is equal to the packing number of I. Therefore Theorem 3 shows that I has a transversal of size at most 2ν(I). That is, there is a set of at most 2ν(I) points of L x ∪ L y which intersect every 2-interval in I. We want to convert this transversal of I into a set of vertical and horizontal lines that slice (i.e., intersect the interior) of every rectangle in R, but we must be careful because the transversal is allowed to contain endpoints of 2-intervals. Thus given a transversal T ⊆ L x ∪ L y we associate to it a set of vertical and horizontal lines L T in the following way: if t ∈ T is from L x we associate the two vertical lines x = t ± ǫ while if t ∈ T is from L y we associate the two horizontal lines y = t ± ǫ where ǫ > 0 is a small constant (depending on R). These are the dotted lines shown in Figure 2. This construction yields the following result.

Corollary 4. If a finite collection R of axis-parallel rectangles has independence number at most m then there is a collection of 4m vertical and horizontal lines which slice every rectangle in R.
We need one more definition. An increasing sequence of rectangles is a sequence R 1 , . . . , R m of independent rectangles such that R i+1 lies above and to the right of R i for all i. Decreasing sequences of rectangles are defined analogously. We are now ready to prove Theorem 1.
Proof of Theorem 1: Let C be a permutation class which does not contain the class of layered permutations or the class of colayered permutations. Thus there is an integer k such that C contains neither ⊕ k (k · · · 21) nor ⊖ k (12 · · · k). Now choose a permutation π ∈ C and let R π denote the collection of all axis-parallel rectangles R such that π(R) contains both k · · · 21 and 12 · · · k. If R π were to contain an independent set of (k − 1) 2 + 1 rectangles then the Erdős-Szekeres Theorem would imply that R π contained an increasing or decreasing sequence of k rectangles, but that would imply that π (and hence also C) contained ⊕ k (k · · · 21) or ⊖ k (12 · · · k), a contradiction. Thus the independence number of R π is at most (k − 1) 2 .
Corollary 4 now shows that there is a collection of at most 4(k − 1) 2 vertical and horizontal lines which slice every rectangle in R π . These lines divide the plot of π into a t × u grid of unsliced regions for integers t and u satisfying t + u ≤ 4(k − 1) 2 + 2. Moreover, each unsliced region avoids either k · · · 21 or 12 · · · k and thus can be expressed as the union of k − 1 increasing or decreasing permutations by Proposition 2. All of the entries of π in regions avoiding k · · · 21 can be expressed as the union of at most (t + u − 1)(k − 1) ≤ 4k 3 increasing permutations while the entries lying in regions avoiding 12 · · · k can be expressed as the union of the same number of decreasing permutations. Therefore π itself can be expressed as the union of at most 8k 3 monotone permutations and thus π must contain a monotone subsequence of length at least n/8k 3 , proving the theorem.
In the language of generalized grid classes introduced in Vatter [16], the proof of Theorem 1 shows that all permutation classes that do not contain the layered or colayered permutations are Av(k · · · 21) ∪ Av(12 · · · k)-griddable. In fact, this follows from [16, Theorem 3.1], though the bounds given in the proof above are better than that theorem gives.
Theorem 1 can also be interpreted in the context of splittability, which has recently been studied in general by Jelínek and Valtr [6]. Given two permutation classes C and D, their merge, C ⊙ D, consists of those permutations whose entries can be partitioned into two subsequences, one order isomorphic to a permutation in C and the other order isomorphic to a permutation in D. Thus Theorem 1 shows that every class which does not contain the layered or colayered classes can be expressed as the merge of a finite number of monotone classes (i.e., classes of the form Av(21) or Av (12)). Note that the converse-if a class does contain all layered or colayered permutations then it is not the merge of a finite number of monotone classes-holds trivially. The proof of Theorem 1 also gives a bound on how many monotone classes are required: Corollary 5. If a permutation class avoids both ⊕ k (k · · · 21) and ⊖ k (12 · · · k) then it can be expressed as the merge of at most 8k 3 monotone classes.