Resolving Two Conjectures on Staircase Encodings and Boundary Grids of $132$ and $123$-avoiding permutations

This paper analyzes relations between pattern avoidance of certain permutations and graphs on staircase grids and boundary grids, and proves two conjectures posed by Bean, Tannock, and Ulfarsson. More specifically, this paper enumerates a certain family of staircase encodings and proves that the downcore graph, a certain graph established on the boundary grid, is pure if and only if the permutation corresponding to the boundary grid avoids the classical patterns 123 and 2143.


Introduction and Preliminaries
The study of permutation pattern avoidance became a significant topic in combinatorics starting in 1968, when Donald Knuth [3] noted that stacksortable permutations corresponded to avoiding the permutation pattern 231 (which we will explain shortly). Common problems include counting the number of permutations in S n (the set of permutations of [n] = {1, . . . , n}) avoiding a certain pattern or set of patterns, or determining asymptotics of these numbers in terms of n, or establishing Wilf-equivalences, i.e. showing that the number of permutations in S n avoiding a certain permutation (or set of) equals the number of permutations avoiding a different permutation (or set of). In this paper, we do not address these questions, but look at some related combinatorial objects explored in [1] and prove the conjectures that appear there.
We recall the definitions of order-isomorphic and containing a classical pattern. Definition 1.1. We say that two sequences (a 1 , . . . , a k ) and (b 1 , . . . , b k ) are order-isomorphic if for any 1 ≤ i, j ≤ k, we have a i < a j if and only if b i < b j . In this case, we write a 1 · · · a k ∼ b 1 · · · b k . Definition 1.2. Let σ ∈ S k . A permutation π ∈ S n (n ≥ k) contains σ as a classical pattern if there exists 1 ≤ i 1 < · · · < i k ≤ n such that π i 1 π i 2 · · · π i k ∼ σ 1 σ 2 · · · σ k .
Alternatively, if a permutation does not contain σ, it is said to avoid σ. We also define a key set of permutations. Definition 1.4. For each n and a permutation σ, we define Av n (σ) as the set of permutations in S n that avoid σ. We also say that for a permutation π ∈ Av n (σ), π is σ-avoiding. We can generalize this to avoiding more than one permutation pattern, by defining Av n (σ 1 , ..., σ k ) as the set of permutations in S n that avoid all of the permutations σ 1 , ..., σ k . Definition 1.5. For a permutation π = π 1 π 2 · · · π n , we define π i to be a left-to-right minimum if π j > π i for all j < i.
Analogously define a left-to-right maximum, right-to-left minimum, and right-to-left maximum. Example 1.6. In the permutation 536241, 5, 3, 2, 1 are the left-to-right minima and 1, 4, 6 are the right-to-left maxima.
For the remainder of the paper, we look primarily either at 123-avoiding or 132-avoiding permutations, so we note that it is well known that both 123avoiding permutations [4] and 132-avoiding permutations [3] are enumerated by the Catalan numbers, i.e. |Av n (123)| = |Av n (132)| = 1 2n+1 · 2n n . In Section 2, we look at staircase grids, a combinatorial structure relating to permutations which is especially interesting in relation to 132-avoiding patterns, and enumerate a certain family of staircase grids, proving Conjecture 3.7 in [1]. In Section 3, we look at boundary grids and downcore graphs, combinatorial structures relating to 123-avoiding permutations, and show that the downcore graph of a grid is pure if and only if the permutation it relates to is both 123-avoiding and 2143-avoiding. This proves conjecture 6.1 in [1].

First Conjecture
Consider an arbitrary permutation π with the set of left-to-right minima as π k 1 , π k 2 , ..., π ka . Definition 2.1. Define the staircase grid B a as a staircase-like grid with a rows and a columns such that the top row and right column have a boxes, the second-to-top row and second-to-right column have a − 1 boxes, and so on. See Figure 1 for clarification.
More specifically, define the staircase encoding of π as the grid B a combined with a number in each box. For the box in the ith row from the top and the jth column from the bottom, fill in the number of elements in π which are strictly between π k i and π k i−1 as a value and between position k j and k j+1 in the order of the permutation (assume π k 0 = k a+1 = n + 1). For an example, see Figure 1.
It turns out that staircase encodings have an interesting relation with 132-avoiding permutations.  Figure 1. The staircase encoding of π = 58634127. The staircase grid is the same, without numbers. The figure has 3 left-to-right minima: 5, 3, 1. The top-left corner is 2 since 8, 6 are greater than 5 but come between 5 and 3 in the permutation. The other values are calculated similarly.
Proof. To avoid 132 subsequences, note that in each row and column of the staircase encoding, the elements corresponding to the row or column must be in increasing order, or else a 132 subsequence will occur because of the left-to-right minima. The conclusion clearly follows.
However, not all staircase encodings correspond to a 132-avoiding permutations. For a staircase grid, consider the following graph. Definition 2.3. The downcore graph of a staircase grid of size n (i.e. n rows, n columns) is the undirected graph with the vertex set {(i, j) : 1 ≤ i ≤ j ≤ n} where (i, j) refers to the box at the ith row from top and jth column from left. An edge exists between (i, j) and (k, l) if • i < k ≤ j < l or • k < i ≤ l < j. We can alternatively think of this as requiring i < k and j < l or vice versa, and that (i, l) and (k, j) are boxes in the staircase grid.
A staircase encoding corresponds to a 132-avoiding permutation if and only if the nonzero elements in the staircase grid correspond to an independent set in the downcore [1].
As a result, it is of interest to determine the number of distinct independent sets of size k in the downcore of size n. If we denote this value I(n, k), Bean et al. proved the following: The generating function F (x, y) = n,k∈Z ≥0 I(n, k)x n y k satisfies the functional equation , and this means I(n, k) = 1 n n−1 j=0 n k − j n j + 1 We can now consider for the 132-avoiding permutations of length l, the ones that have a staircase encoding with k nonzero elements.
Proposition 2.5. If we denote the number of 132-avoiding permutations of length l with k nonzero elements in the staircase encoding as J(l, k), then which can be seen using the stars and bars method [1].
Bean, Tannock, and Ulfarsson then pose the following conjecture, which we in fact prove using Theorem 2.4 and Proposition 2.5. Conjecture 2.6. [1] For fixed l, if we consider the largest k such that i . We begin by proving the following.
For J(l, k) to be positive, there must exist some n such that I(n, k) and l−n−1 k−1 are positive. In other words, we must have that l − n ≥ k and that are both positive for some n. But the sum being positive means that there is some j such that n ≥ k − j and n ≥ j + 1 as well as l − n ≥ k. Adding the first two equations plus twice the second tells us that 2l ≥ 3k + 1. Basic manipulation gives k ≤ 2l−1 3 . Specifically, if l = 3i + 2, then k ≤ 2i + 1; if l = 3i + 1, then k ≤ 2i; and if l = 3i, then k ≤ 2i − 1.
Proof. Note that if I(n, k) is positive, there must exist some j such that n ≥ k − j and n ≥ j + 1. Thus, 2n ≥ k + 1. Thus, But the summands are only positive if 3i + 1 − n ≥ 2i, or if n ≤ i + 1. Thus, this summation in fact equals Again, the summands are positive only if i + 1 ≥ 2i + 1 − j and i + 1 ≥ j + 1, i.e. if j ≥ i and i ≥ j, which gives i = j. Thus, this becomes Finally, we prove part 2 of Conjecture 2.6. i . Proof. Again, we must have for a nonzero summand that 2n ≥ k + 1 = 2i + 1 but that (3i Now, we have the summands in I(i+1, 2i) are positive only if i+1 ≥ 2i−j and i + 1 ≥ j + 1. Thus, i ≥ j ≥ i + 1. In other words,

Second Conjecture
First, we note that left-to-right minima and right-to-left maxima are especially important in the study of 123-avoiding permutations for the following reason: Proposition 3.1. A permutation π ∈ S n is 123-avoiding if and only if π i is a left-to-right minimum or a right-to-left maximum for every 1 ≤ i ≤ k.
Proof. If π is 123-avoiding and π i is not a left-to-right minimum, then ∃j < i such that π j < π i . Also, if π i is not a a right-to-left maximum, then ∃k > i such that π k > π i . Thus, i < j < k and π i < π j < π k , so π contains 123.
Else if π i is a left-to-right minimum or a right-to-left maximum for every 1 ≤ i ≤ k, then if ∃i < j < k such that π i < π j < π k , then π j is either a left-to-right minimum, meaning π i > π j for any i < j, or a right-to-left maximum, meaning π j > π k for any k > j. This proves the proposition.
Next, similarly to the staircase grid, we now consider the related boundary grid, specifically for 123-avoiding permutations.
Definition 3.2. Given a 123-avoiding permutation π of length n, define the boundary grid of π as a subset of an n−1×n−1 grid of boxes such that if we label the vertices of the squares from (0, 0) to (n, n) in a standard Cartesian coordinate way, a box is in the boundary grid if and only if it is up and to the right of at least one left-to-right minimum and down and to the left of at least one right-to-left maximum.
The boundary grid, however, isn't always connected. It is easy to see that the boundary grid is connected if and only if the permutation is skewindecomposable [1]. It is also easy to see that any connected boundary grid (or any connected component of a boundary grid) has the shape of a skew Young diagram.
Similar to the downcore on the staircase grid, we can define the downcore graph on any boundary grid. Definition 3.3. The downcore graph on the boundary grid of π is a graph with the boxes of the boundary grid as vertices. If (x, y) denotes the box in the xth row from top and yth column from left, there is an edge between (i, j) and (k, ℓ) if • i < k, j < ℓ or k < i, j < ℓ and • (i, ℓ), (k, j) are in the boundary grid. The second condition is equivalent to the rectangle created with corner boxes (i, j), (i, ℓ), (k, j), (k, ℓ) being entirely contained within the boundary grid.
Definition 3.4. We define a graph to be pure if every maximal independent set has the same size, i.e. its complement graph has all maximal cliques be the same size. This is closely related to the definition of a pure simplicial complex.
Bean et al. makes the following conjecture.
Conjecture 3.5. The downcore graph of the boundary grid of 123-avoiding permutation π is pure if and only if π avoids 2143.
While they do not fully address the "if" direction, they prove most of the main ideas for this direction, so we spend most of this section focusing on the other direction.
Lemma 3.6. Suppose we have a maximal independent set of a skew Young diagram. Then, every row must contain at least one element of the independent set.
Proof. Fix a row h. Assume for general row x that the first element in the row is in column a x and the last element is in column b x . Then, if a h < a h+1 , the element at position (a h , h) is a lower-left corner and thus has degree 0 in the down-core. Similarly, if b h > b h−1 , then the box at position (b h , h) is an upper-right corner and thus has degree 0 in the down-core. Therefore, it suffices to prove the lemma for row h when a h = a h+1 , b h = b h−1 .
Next, choose the smallest k < h such that b k = b h . Consider the rectangle spanning rows k to h − 1 and columns a h to b h . If a maximal independent set does not contain boxes in this rectangle, then row h being empty would be a contradiction, since we can add (b h , h) as it only shares edges in the downcore with elements of this rectangle. Now, if the independent set contains a box in the rectangle, consider the largest ℓ such that k ≤ ℓ ≤ h − 1 and the independent set contains a box in row ℓ of the rectangle. Consider the leftmost element in this row which is in the independent set and say it is at position c (a h ≤ c ≤ b h ). We show that (c, h) does not share any edges with the independent set.
Suppose that (c, h) and (c ′ , h ′ ) share an edge. If c > c ′ and h > h ′ , then clearly ℓ > h ′ also. But then (c ′ , h ′ ) and (c, ℓ) share an edge, so they can't both be in the independent set. Else, suppose c < c ′ and h < h ′ . But then (c, h) and (c ′ , h ′ ) sharing an edge means that (c, h ′ ) is a box in the grid, and (c ′ , ℓ) is also in the grid as c ′ ≤ b h . This means (c, ℓ) and (c ′ , h ′ ) share an edge, so (c ′ , h ′ ) is not in the independent set. Therefore, row h must contain at least one element in any maximal independent set. Lemma 3.7. Suppose that a certain skew Young diagram is not pure and one of its rows is duplicated, i.e. a horizontal line goes through the middle of a row and makes each box two boxes. This skew Young diagram is also not pure.
Proof. Choose a maximal independent set for the original grid. For the new grid, choose the boxes so that the bottom duplicated row and all unduplicated rows are identical to the original rows, but only chose the rightmost box of the independent set and duplicated row's intersection for the top duplicate. There are clearly no edges in the downcore between two elements of the set in the two duplicated rows. There are therefore no edges in the downcore between two elements of the set since any edge between two elements of the set where they aren't both in the duplicated rows would imply that they share an edge in the original diagram.
This diagram is also maximal. Suppose that another box on the grid does not share any edges with any of the elements of this set. Consider the location of the box on the original grid (if the box were on one of the duplicated rows, choose it to be the relative box on the original row). Note that if the location on the original grid coincided with one of the boxes, then on the duplicated grid there would be two pairs of boxes in the set that would make a rectangle, which clearly has an edge on the downcore.
Otherwise, if the new box did not coincide with one of the other boxes, when brought back to the original grid we must have that the new box shares an edge with one of the other boxes (or else the original diagram's boxes would not be a maximal independent set). But it would clearly share an edge with the corresponding box (or two boxes) on the duplicated row grid, thus establishing a contradiction. We are therefore done.
Proof. Suppose first that n = 4. Then, the shaded boxes in Figure 3 represent maximal independent sets (this is trivial to verify). But the left diagram has 6 elements and the right diagram has 5, proving that the boundary grid is not pure. Now, suppose that n ≥ 5. Consider the set of boxes on the perimeter. This set is independent since the n − 2 elements on the bottom left staircase (shaded green in Figure 4) have degree 0 in the downcore. It is also obvious that the n − 2 boxes in the topmost row and the n − 2 boxes in the rightmost column do not share any edges between them (as the top-right corner is missing) and do not share any edges among them (as the top boxes are in the same row and the right boxes are in the same column). This set is also maximal since for any unshaded box in the k + 1th row from the top (where 1 ≤ k ≤ n − 3), the kth box from the left in the top row shares an edge with it. Now, consider the set generated by removing the second rightmost element of the top row and the rightmost element of the bottom row and adding the middle element of the second bottom row (as shown in yellow in the right half of the diagram below). To see why this is an independent set, note that the only element we have to check is the middle element of the second bottom row. However, the only elements it shares a rectangle with in the top row is the rightmost element, which is in the same column as it, and the second rightmost element, which is not in the set. Also, every element in the rightmost column is in the same row or in a higher row, except the bottom element, which is not in the set. Finally, as the elements in the bottom left staircase all have degree 0, this set is an independent set.
To show the set is maximal, note that the two deleted boxes each share an edge with the added box, so they cannot be added. The remaining boxes not in the set are in rows 2 to n − 3 and thus share edges with some box in the top row and columns 1 to n − 4, which are all in the set. Therefore, the set is maximal.
It is clear that there are 3(n − 2) elements in the maximal set in the left diagram and 3(n − 2) − 1 elements in the maximal set in the right diagram. Thus, for n ≥ 5, the boundary grid's downcore graph is not pure. Proof. Suppose otherwise. Consider the smallest n such that a permutation in Av n (123) ∩ Av n (2143) c has a boundary grid with a pure downcore graph. Call the permutation π. Note that the permutation must be skewindecomposable or else it would be split into two boundary grids, both of which must be pure and one of which must contain 2143. Thus, π 1 is only a left-to-right minimum. If π 2 is a right-to-left maximum, then it clearly cannot be part of a 2143-avoiding permutation. This also means π 2 = n and π 1 = n − 1 so removing π 2 from the permutation would only remove a box which is the only box in the top row. This box therefore does not share any edges in the downcore, meaning that removing it will not change whether the downcore is pure or not. Now, we have the first two rows duplicated, so if this grid is pure, we can remove one of the duplicate rows to have a pure boundary grid of π 1 π 3 · · · π n . This is a contradiction to n's minimality, so π 2 is a left-to-right minimum. Now, assume that π 1 , ..., π k are left-to-right minima (k ≥ 2) and π k+1 is a right-to-left maximum. Also, suppose that π k+ℓ is the next right-to-left maximum (there must be at least two or else 2143 would not be able to exist). If π k+ℓ < π k , then π i < π k for all i > k, which contradicts skewindecomposability.
If π k−1 > π k+ℓ > π k , the rows between π k−1 and π k+ℓ have one box in the boundary grid, in the column between k and k + 1. As a result, these boxes do not share any edges in the downcore, and the boxes above do not share any edges with the boxes below them. Thus, the downcore is pure if and only if the downcore of the rows above π k and the rows below π k+ℓ are pure. However, note that for π 1 , ..., π k−1 , there is only one element to the right of it that is larger than it (π k+1 ) and that π k+1 = n. Thus, none of π 1 , ..., π k−1 , π k+1 can be the first element of a 2143 classical pattern. Therefore, any 2143 pattern must begin at least at π k . But since π k+1 can only be the 4 element, it cannot be in a 2143 classical pattern, so the reduction of π k π k+2 · · · π n must contain a 2143. However, the diagram of the rows of the boundary grid of π below π k+ℓ is equivalent to the boundary grid of π k π k+2 · · · π n with the first column duplicated, meaning that the downcore of the boundary grid of π k π k+2 · · · π n must be pure, a contradiction to n's minimality. Now, suppose that π i−1 > π k+ℓ > π i , where 1 ≤ i ≤ k − 1 and π 0 = π k+1 . If i > 1, then it is easy to see that the leftmost column contains only one element (in the top row) and thus shares no edges in the downcore. As a result it can be eliminated, i.e. it suffices to prove that the boundary grid after removing the element in the top left corner is not pure. But then the top two rows are identical, so Lemma 3.7 tells us that we can remove one of the top two rows. This new diagram is equivalent to the boundary grid of π 2 · · · π n which means to prevent contradicting minimality, we can assume i = 1.
Next, note that all elements to the right of π k+1 are at most π k+ℓ . This means that if we consider the first k + 1 columns of the grid, it will look like the diagrams except with perhaps some of the rows duplicated. Using the method in Lemma 3.7 and original maximal independent sets in Lemma 3.8, we can create two maximal independent sets for the first k + 1 columns, the second one having one less element in the set. Now, if there are any additional columns, select elements so that when combined with the second (right) selection of elements for the first k + 1 columns, it forms a maximal independent set for the entire boundary grid. We show that the same selection, when combined with the first selection of elements for the first k + 1 columns, forms an independent set for the entire boundary grid.
Note that the only way for this selection to not form an independent set is for one of the boxes in the first set to share an edge with one of the elements not in the first k + 1 rows but for none of the boxes in the second set share an edge with the same element.
The only elements in the first set but not in the second set which can actually have an edge with any element beyond the first k + 1 columns must be in the k + 1th column. But then if (a, k + 1) and (b, ℓ) are connected where ℓ > k + 1, it is clear that (a, k) and (b, ℓ) do as well, since (b, k + 1) being in the grid means (b, k) is also in the grid. It is easy to see from Figure  5 that if (a, k + 1) is in the first set but not in the second set, then (a, k) is in the second set. This completes our proof.
We now continue to prove the "if" direction. Bean et al. [1] proved that the boundary grid of every skew-indecomposable 2143-avoiding permutation can be decomposed into a series of staircase grids (with the diagonal going from top-left to bottom-right), consecutive staircases sharing one corner square. As a result, no two elements in different Figure 6. Suppose, for example, that n = 9 and a 1 = 1, a 2 = 3, a 3 = 6, a 4 = 8, a 5 = 9. Then, the blue squares are the only other squares not in column 1 that do not share an element in the downcore graph. Therefore, any maximal independent set with these conditions must have size 17. staircases can share an edge, and therefore it suffices to prove that the downcore graph of staircase grid is pure.
Theorem 3.10. The downcore graph of a staircase grid with the diagonal going from top-left to bottom-right is pure, and if the size of the staircase is n, then every maximal independent set has size 2n − 1.
Proof. We proceed by induction. Note for n = 1 and n = 2 this is trivial. Now, suppose that n ≥ 3. Also, assume without loss of generality that the staircase contains the bottom-left but not top-right corner, and that the squares are of the form (i, j), where j ≥ i ≥ 1.
Next, choose a maximal independent set with the selected elements in the left column (1, a 1 ), . . . , (1, a k ) where a 1 < · · · < a k . Note that a 1 = 1 and a k = n because (1, 1) and (1, n) do not share any vertices in the downcore graph. Now, any element of the form (i, j) where j > a t ≥ i > 1 for some a t cannot be included in the boundary grid. Therefore, if (i, j) is in the independent set, a t+1 ≥ j ≥ i > a t for some 1 ≤ t ≤ k − 1. Therefore, the only allowable tiles in the independent set form a disjoint set of staircase grids of size a 2 − a 1 , . . . a k − a k−1 (see Figure 6 for an example). If (i, j) and (k, ℓ) are in different staircase grids, then if we assume without loss of generality that i > k, then a t+1 ≥ j ≥ i > a t ≥ ℓ ≥ k, which means that (i, j) and (k, ℓ) cannot share an element in the downcore, since i > ℓ which means the rectangle formed by corner vertices (i, j) and (k, ℓ) is not contained in the grid.
Therefore, we are left with k elements in the first column and staircases of size a t+1 −a t which can be filled to the maximum of 2(a t+1 −a t )−1 elements since they do not overlap with any selected elements in the first column or in other staircase grids. Then, by our induction hypothesis, any maximal independent set with first column (1, a 1 ), . . . , (1, a k ) must have size k + k−1 t=1 2(a t+1 − a t ) − 1 = k + 2(n − 1) − (k − 1) = 1 + 2n − 2 = 2n − 1, as desired.
Combining Theorems 3.9 and 3.10 concludes our proof of the second conjecture.