Fillings of skew shapes avoiding diagonal patterns

A skew shape is the difference of two top-left justified Ferrers shapes sharing the same top-left corner. We study integer fillings of skew shapes. As our first main result, we show that for a specific hereditary class of skew shapes, which we call D-free shapes, the fillings that avoid a north-east chain of size $k$ are in bijection with fillings that avoid a south-east chain of the same size. Since Ferrers shapes are a subclass of D-free shapes, this result can be seen as a generalization of previous analogous results for Ferrers shapes. As our second main result, we construct a bijection between 01-fillings of an arbitrary skew shape that avoid a south-east chain of size 2, and the 01-fillings of the same shape that simultaneously avoid a north-east chain of size 2 and a particular non-square subfilling. This generalizes a previous result for transversal fillings.


Introduction
Wilf equivalence, and the closely related notion of Wilf order, are undoubtedly among the key notions in the study of combinatorics of permutations. Despite considerable amount of research, many key questions related to these concepts remain open.
One of the most successful approaches in the study of Wilf equivalence is based on the concept of pattern avoidance in fillings of specific shapes (see Section 2 for precise definitions). Of particular interest are the so-called transversal fillings, which contain exactly one 1-cell in each row and each column, and can be viewed as generalizations of permutation matrices. Transversal fillings of Ferrers shapes have played a crucial part in establishing most of the known results on Wilf equivalence [2,18], as well as in the study of many related combinatorial objects, such as involutions [3], words [9], matchings [11,14], graphs [6,7] or set partitions [5,13].
Most of the research into pattern-avoiding fillings focuses on the avoidance of diagonal patterns. We let δ k and ι k denote the decreasing and increasing diagonal pattern of size k, respectively. Backelin, West and Xin [2] have shown that the number of transversal fillings of a Ferrers shape that avoid δ k is the same as the number of such fillings that avoid ι k . This was later generalized to non-transversal fillings [15], and to more general shapes, such as stack polyominoes [10], moon polyominoes [17], or almost-moon polyominoes [16].
In this paper, we consider yet another family of shapes, namely the so-called skew shapes, which can be seen as a difference of two Ferrers shapes, or equivalently, as a shape whose boundary is a union of two nondecreasing lattice paths with common endpoints. Our interest in skew shapes is motivated by the following conjecture. Conjecture 1.1 (Skew shape conjecture). For any skew shape S and any number k, the number of transversal fillings of S that avoid ι k is greater than or equal to the number of such fillings that avoid δ k .
Verifying the skew shape conjecture for any particular value of k would imply that for any two permutations α and β, the pattern α δ k β is more Wilf-restrictive than α ι k β, where denotes the skew-sum of permutations (see, e.g., Vatter's survey [19] for permutation-related terminology). However, the conjecture has so far only been verified for k ≤ 2 [4,12].
In this paper, we prove two new results on diagonal-avoiding fillings of skew shapes, both of which indirectly support the skew shape conjecture. As our first main result, we will show that the conjecture holds for skew shapes that avoid the shape D from Figure 1 as subshape. In fact, we will show that for D-avoiding skew shapes the conjecture holds with equality, via a bijection that extends to general integer fillings. Since a Ferrers shape is a special case of a D-avoiding skew shape, this result can be seen as another generalization of the result of Backelin et al. [2] on transversals of Ferrers shapes and its generalization by Krattenthaler [15] to non-transversal fillings.
As our second main result, we show that for any skew shape S, the number of 01-fillings of S avoiding the pattern δ 2 is the same as the number of 01-fillings of S that avoid both ι 2 and the pattern φ D from Figure 1. This has been previously known for transversal fillings, where the proof follows from the fact that each skew shape that admits at least one transversal filling admits exactly one δ 2 -avoiding filling and exactly one {ι 2 , φ D }-avoiding filling. To extend the result to general, i.e., non-transversal, fillings, we devise a new bijective argument.

Preliminaries
Shapes. A cell is a unit square whose vertices are points of the Z 2 integer grid, and a shape is the union of finitely many cells. The coordinates of a cell are the Cartesian coordinates of its top-right corner. If two shapes differ only by a translation in the plane, we shall treat them as identical. We will henceforth assume that in each nonempty shape we consider, the leftmost cell has horizontal coordinate equal to 1, and the bottommost cell has vertical coordinate equal to 1, unless explicitly stated otherwise. We use the term cell (i, j) for the cell in column i and row j. The height of a shape is the vertical coordinate of its topmost cell, and its width is the horizontal coordinate of its rightmost cell. We say that a cell (i, j) is Fillings of skew shapes avoiding diagonal patterns 3 strictly to the left of a cell (i , j ) if i < i , and we say that it is weakly to the left if i ≤ i . We will also speak of (i , j ) being weakly (or strictly) to the right, above, or below (i, j), with obvious meanings.
Two cells are adjacent if their boundaries share an edge. For a shape S, the transitive closure of the adjacency relation on the cells of S yields an equivalence, whose blocks are the connected components of S. If S has a single component, we say that it is connected. Connected shapes are known as polyominoes. a b c d Fig. 2: Examples of shapes: (a) non-convex, (b) convex but not intersection-free, (c) moon polyomino, (d) bottom-justified moon polyomino.
A shape is convex if for any two of its cells in the same row or column it also contains every cell in between. Two columns of a shape are comparable if the set of row coordinates of one column is contained in the set of row coordinates of the other; comparable rows are defined analogously. We say that a shape is intersection-free if any two of its columns are comparable. Note that this is equivalent to having any two of its rows comparable. Convex intersection-free shapes are known as moon polyominoes (see Figure 2).
A shape is top-justified if the topmost cells of all of its columns are in the same row and it is left-justified if the leftmost cells of all of its rows are in the same column. Bottom-justified and right-justified shapes are defined analogously. A shape is top-left justified if it is both top-justified and left-justified, and similarly for other combinations of horizontal and vertical directions.
A northwest Ferrers shape, or NW Ferrers shape for short, is a top-left justified moon polyomino, and similarly, a SE Ferrers shape is a bottom-right justified moon polyomino; see  : Three types of shapes relevant for our paper. Left: a NW Ferrers shape; middle: a SE Ferrers shape; right: a skew shape.
A skew shape is a shape S that can be obtained by taking two NW Ferrers shapes F 1 and F 2 with a common top-left cell and putting S = F 1 \ F 2 , i.e., S is the union of those cells of F 1 that do not belong to F 2 . An equivalent characterisation of skew shapes is provided by the next observation.
Observation 2.1. A shape S is a skew shape if and only for any two columns i 1 < i 2 and any two rows j 1 < j 2 , if S contains both (i 1 , j 2 ) and (i 2 , j 1 ), then S contains all the cells from the set {(i, j); i 1 ≤ i ≤ i 2 and j 1 ≤ j ≤ j 2 }. Left: a shape T . Middle: a shape S which contains T as a subshape. The shaded cells correspond to an occurrence of T formed by columns (1, 3, 5) and rows (1,3,4). Right: a shape S that does not contain T .

Fillings of shapes.
A filling of a shape S is a function φ that assigns a nonnegative integer to every cell of S. We write φ(i, j) for the value assigned by φ to a cell (i, j). A binary filling (also known as 01-filling) is a filling that only uses the values 0 and 1. A cell that has been assigned the value 0 (or 1) by a binary filling φ is referred to as a 0-cell (or 1-cell, respectively) of φ. If a set X of cells of a shape S contains at least one 1-cell of a filling φ, we say that X is nonzero in φ, written as X = 0; otherwise X is zero, and we write X = 0. A binary filling φ of a shape S is sparse if every row and every column of S has at most one 1-cell. A binary filling φ is a transversal filling (or just a transversal) if every row and every column of S has exactly one 1-cell.
In figures, we will often represent 0-cells by empty boxes and 1-cells by boxes with crosses; see Figure 4 for examples.
Containment of shapes and fillings. Let S be a shape of height h and width w, and let T be a shape of height k and width . We say that S contains T , or that T is a subshape of S, if there is a sequence of row indices 1 ≤ r 1 < r 2 < · · · < r k ≤ h and column indices 1 ≤ c 1 < c 2 < · · · < c ≤ w, such that for every i and j, the cell (i, j) is contained in T if and only if the cell (c i , r j ) is in S. The rows (r 1 , . . . , r k ) and columns (c 1 , . . . , c ) together form an occurrence of T in S. If S does not contain T , we say that S Fillings of skew shapes avoiding diagonal patterns 5 avoids T . See Figure 5 for an example.
With S and T as above, if φ S is a filling of S and φ T a filling of T , we say that φ S contains φ T , or that φ T is a subfilling of φ S , if there is an occurrence of T in S in rows (r 1 , . . . , r k ) and columns (c 1 , . . . , c ) with the additional property that for every cell (i, j) of T , we have φ T (i, j) ≤ φ S (c i , r j ). We again say that the rows (r 1 , . . . , r k ) and columns (c 1 , . . . , c ) form an occurrence of φ T in φ S . In the case when φ T is binary, the condition φ T (i, j) ≤ φ S (c i , r j ) simply says that each 1-cell of φ T must get mapped to a nonzero cell of φ S by the occurrence.
Note that any subshape of a moon polyomino is again a moon polyomino, any subshape of a skew shape is a skew shape, and any subshape of a Ferrers shape is a Ferrers shape.
Let S n be the square shape of size n × n, i.e., the shape consisting of the cells (i, j) with 1 ≤ i ≤ n and 1 ≤ j ≤ n. The transversal fillings of S n correspond in a natural way to permutations of order n: given a permutation π = π 1 π 2 · · · π n of order n, represented by a sequence of numbers in which every value from 1 to n appears exactly once, we represent π by a transversal filling of S n whose 1-cells are the cells (i, π i ) for i = 1, . . . , n. Such a transversal filling is usually called the permutation diagram of π. In this paper, we shall make no explicit distinction between a permutation and its diagram, and if there is no risk of ambiguity, we will use the term permutation to refer both to the sequence of integers and to the diagram. Note that the containment relation defined above for binary fillings is a generalization of the classical Wilf containment of permutations.
In this paper, we shall be mostly working with two types of forbidden patterns, corresponding to increasing and decreasing permutations, respectively. For any k ≥ 1, let ι k denote the diagram of the increasing permutation 1, 2, 3, . . . , k; in other words, ι k is the filling of the k × k square shape with 1-cells (i, i) for 1 ≤ i ≤ k. Symmetrically, let δ k be the diagram of the decreasing permutation k, k − 1, . . . , 1. An occurrence of ι k in a filling φ is also referred to as a NE-chain of length k in φ, while an occurrence of δ k is a SE-chain of length k. See Figure 6 for examples.
Results. Our first main result deals with transversal fillings of skew shapes of a special type. Let D be the skew shape in Figure 1 (D stands for 'dented shape'). We say that a skew shape S is D-free if S avoids D.
Let Tr(S, π) be the number of transversal fillings of the shape S that avoid the filling π. Backelin et al. [2] have shown that for any k and any Ferrers shape F , we have the identity Tr(F, δ k ) = Tr(F, ι k ). This was later generalized by Krattenthaler [15] to general fillings of Ferrers shapes. Our first main result generalizes this identity to a broader class of shapes, namely to D-free skew shapes.
Theorem 2.2. For any D-free skew shape S, there is a bijection transforming a filling φ of S to a filling φ of S with these properties.
• For any k ≥ 1, φ avoids δ k if and only if φ avoids ι k .
• There is a permutation ρ of row-indices of S and a permutation σ of column-indices of S such that for any i, the entries in the i-th row of φ have the same sum as the entries in the ρ i -th row of φ , and the entries in the i-th column of φ have the same sum as the entries in the σ i -th row of φ .
The proof of this result is presented in Section 3. A direct consequence of the theorem is the following identity for transversals. Theorem 2.2 cannot in general be extended to non-D-free skew shapes. In fact, for the shape D itself, we easily verify that Tr(D, ι 2 ) = 2 and Tr(D, δ 2 ) = 1. However, computational evidence suggests the following conjecture. The conjecture is trivial for k = 1 and is known to be true for k = 2. Indeed, for the case k = 2, a more precise result is known, proven by Jelínek [ Theorem 2.5 ( [4,12]). For any skew shape S that admits at least one transversal, there is exactly one transversal of S that avoids δ 2 , and exactly one transversal of S that simultaneously avoids both ι 2 and the filling φ D from Figure 1.
Note that this theorem implies not only the case k = 2 of the skew shape conjecture, but also the case k = 2 of Corollary 2.3.
As our second main result, we will extend Theorem 2.5 to an identity for general (i.e., not necessarily transversal) binary fillings.
Theorem 2.6. For any skew shape S, the number of binary fillings of S that avoid δ 2 is the same as the number of binary fillings of S that avoid both ι 2 and φ D . Moreover, this identity is witnessed by a bijection that preserves the number of 1-cells in every row.
The proof of this result appears in Section 4. We note that the original approach used to prove Theorem 2.5 does not seem to be applicable to non-transversal fillings. Instead, our proof of Theorem 2.6 is based on a new bijective argument.

The structure of D-free skew shapes
An important feature of D-free skew shapes is that they admit a natural decomposition into a concatenation of Ferrers diagrams. Before describing this decomposition properly, we need some preparation. Let S be a shape, and let (i, j) be a cell of S. We let S[≤ i, ≤ j] denote the subshape of S formed by those cells (i , j ) of S that satisfy i ≤ i and j ≤ j. We also use the analogous notations Proof: Suppose that a skew shape S has an occurrence of D in columns (i 1 , i 2 , i 3 ) and rows (j 1 , j 2 , j 3 ). Then S[≤ i 2 , ≥ j 2 ] is not a rectangle, since it contains the two cells (i 1 , j 2 ) and (i 2 , j 3 ) but does not contain (i 1 , j 3 ), which is not a cell of S. Symmetrically, S[≥ i 2 , ≤ j 2 ] is not a rectangle either, and the right-hand side of the equivalence in the statement of the lemma fails for i = i 2 and j = j 2 .
Conversely, suppose that S contains a cell (i, j) such that neither S[≤ i, ≥ j] nor S[≥ i, ≤ j] is a rectangle; see Figure 7. Fix row indices j − and j + so that (i, j − ) is the bottommost cell of S in column i, and (i, j + ) is the topmost cell of S in column i. Note that j − < j < j + : if we had, e.g., j − = j, then S[≥ i, ≤ j] would consist of a single row, and therefore it would be a rectangle. Fix column indices i − and i + so that (i − , j) and (i + , j) are the leftmost and rightmost cell of S in row j. Again, we see that On the other hand, since S is a skew shape, it must contain both (i − , j − ) and (i + , j + ) by Observation 2.1. It follows that the columns (i − , i, i + ) and rows (j − , j, j + ) induce an occurrence of D in S.
Let S be a connected skew shape, and let a vertical line placed between two adjacent columns of S divide it into two skew shapes S 1 and S 2 , where the leftmost column of S 2 is directly to the right of the rightmost column of S 1 , and the bottommost row of S 2 is at least as high as the bottommost cell of Fig. 8: A D-free skew skew shape, with its Ferrers decomposition the rightmost column of S 1 . Then we say that S is a vertical concatenation of S 1 and S 2 and we write We say that a skew shape S is Ferrers-decomposable if it can be written as with the following properties (see Figure 8): (a) All F i are N W Ferrers shapes, and all G i are SE Ferrers shapes.
(b) All F i and G i are nonempty with the possible exception of G n .
(c) For i < n, if the dividing line between F i and G i is between columns c i and c i +1, then the topmost cell of S in column c i is below the topmost cell of S in column c i + 1. Similarly, if the dividing line between G i and F i+1 is between rows r i and r i + 1, then the rightmost cell of S in row r i is to the left of the rightmost cell of S in row r i + 1.
(d) For i < n, G i is to the left of the vertical line separating F i+1 from G i+1 , and F i is below the horizontal line separating G i from F i+1 .
We call this representation of S the Ferrers decomposition of S. We remark that the Ferrers decomposition bears a certain similarity to the concept of staircase decomposition, introduced in the study of patternavoiding permutations [1,8].

Lemma 3.2. A connected skew shape is D-free if and only if it is Ferrers-decomposable.
Proof: In a Ferrers-decomposable skew shape S, every cell is in either a N W Ferrers subshape or a SE Ferrers subshape and thus satisfies the condition of Lemma 3.1. Therefore S is D-free.
Fillings of skew shapes avoiding diagonal patterns : Decomposing a D-free skew shape into Ferrers diagrams To prove the converse, let S be a connected D-free skew shape; see Figure 9. We proceed by induction over the number of cells of S, noting that the statement is trivial if S has a single cell. Let (1, j) be the topmost cell in the first column of S. If j is the topmost row of S, then S is a NW Ferrers shape, and it admits the trivial Ferrers decomposition S = F 1 .
Suppose that j is not the topmost row of S. Since S is connected, it contains a cell in row j + 1, and let (i, j + 1) be the leftmost such cell. We define F 1 to be the subshape of S formed by the cells in the first i − 1 columns. Clearly, F 1 is a nonempty NW Ferrers shape. Since S is connected, the cell cannot be a rectangle, since S contains the cells (i − 1, j) and (i, j + 1) but not (i − 1, j + 1).
Let (i , j ) be the bottom-right cell of the rectangle S[≥ i, ≤ j]. If i is the rightmost column of S, then S \ F 1 is a SE Ferrers shape G 1 , and we have a Ferrers decomposition S = F 1 | v G 2 . Suppose that i is not the rightmost column, and let (i + 1, j ) be the bottommost cell of S in column i + 1. Note that j > j, otherwise S[≥ i, ≤ j] would not be a rectangle. We then let G 1 be the subshape of S formed by the cells in columns i, i + 1, . . . , i and rows j , . . . , j − 1. G 1 is then a SE Ferrers shape, and S can be written as n is a Ferrers decomposition of S. Clearly, it satisfies conditions (a), (b) and (c) in the definition of Ferrers decomposition. To verify condition (d), we only need to argue that the dividing line between F 2 and G 2 is to the right of G 1 . To see this, we note that by Lemma 3.1, S[≤ i , ≥ j ] is a rectangle, and in particular, the topmost cells in the columns intersecting this rectangle are all in the same row. Thus, by condition (c) of Ferrers decomposition, this rectangle cannot be separated by a vertical dividing line, and in particular the line separating F 2 from G 2 is to the right of G 1 .

Rubey's bijection
Rubey [17] has proved several general bijective results about fillings of moon polyominoes. Here we formulate a part of his results which will be useful in our argument.
Given a finite sequence s = (s 1 , s 2 , . . . , s n ) and a permutation σ of length n, we let σs be the sequence (s σ(1) , s σ(2) , . . . , s σ(n) ). In addition, given a moon polyomino M of width w and a permutation π of length w, we denote by σM the shape created by permuting the columns of M according to π. A maximal rectangle in a moon polyomino M is a rectangle R ⊆ M which is not a proper subset of any other rectangle contained in M . Note that a moon polyomino contains a maximal rectangle of width w if and only if it has a row with exactly w cells, and this maximal rectangle is then unique. The analogous property holds for columns as well. In fact, if M and M are moon polyominoes such that M is obtained from M by permuting its columns, then there is a size-preserving correspondence between the maximal rectangles of M and the maximal rectangles of M ; see Rubey [17]. The following theorem is a special case of a result of Rubey [17,Theorem 5.3].
Theorem 3.4 (Rubey [17]). Let M be a moon polyomino of height h and width w, and let σ be a permutation of its columns such that σM is again a moon polyomino. Let Λ be a function assigning nonnegative integers to maximal rectangles of M , let r and c be nonnegative integer vectors of length h and w, respectively. Then the two sets F N E (M, Λ, r, c) and F N E (σM, Λ, r, σc) have the same size, and there is an explicit bijection between them.

A bijection on Ferrers fillings
Using Rubey's bijection as our main tool, we will now state and prove a technical result on fillings of Ferrers shapes satisfying certain restrictions. Let F be a NW Ferrers shape, and let k and be integers. Suppose that the leftmost k columns of F all have the same length, and that the topmost rows of F all have the same length. We will call the leftmost k columns of F special columns and the topmost rows special rows of F . For any i ≤ k, let C i denote the rectangle formed by the i leftmost special columns of F (i.e., columns 1, . . . , i), and let C i be the rectangle formed by the i rightmost special columns of F (i.e., columns k − i + 1, k − i + 2, . . . , k). Similarly, for j ≤ , R j is the rectangle formed by the j topmost special rows of F , and R j the rectangle formed by the j bottommost special rows of F . Additionally, for i ≤ k, let c i and c i denote the i-th special column from the left and the i-th special column from the right, respectively (i.e., c i = i and c i = k + 1 − i), and for j ≤ , let r j and r j be the j-th special row from the top and the j-th special row from the bottom, respectively (i.e., r j = h + 1 − j and r j = h − + j, where h is the height of F ).
Lemma 3.5. With F , k and as above, there is a bijection Γ on the set of fillings of F , such that for any filling φ of F and its image φ = Γ(φ), the following holds.
1. The longest SE-chain in φ has the same length as the longest NE-chain in φ .
2. For every i ≤ k, the longest SE-chain of φ contained in C i has the same length as the longest NE-chain of φ contained in C i .
Fillings of skew shapes avoiding diagonal patterns 5. For any non-special row or column, the sum of its entries in φ is the same as the sum of its entries in φ .
Proof: Let φ be a filling of F . Refer to Figure 10 for the illustration of the steps of the construction. As the first step, we add new cells to F , filled with zeros, as follows: for every i ≤ k, we add i new cells to the bottom of column c i , and for every j ≤ , we add j new cells to the right of row r j . We refer to these newly added cells as dummy cells. We let F 1 denote the Ferrers shape obtained from F by the addition of the dummy cells, and φ 1 the corresponding filling.
The dummy cells will remain filled with zeros throughout all the steps of the construction and will not contribute to any chain; their purpose is to ensure that for every i ≤ k and j ≤ , the shape F 1 has a maximal rectangle containing the cells of C i and no other cell of F , and similarly for R j .
As the next step, we reverse the order of the columns of F 1 and φ 1 , while keeping the order of the rows preserved. Thus, we replace the filling φ 1 of F 1 with its 'mirror image' φ 2 of the shape F 2 , changing all SE-chains into NE-chains. Let σ be the permutation of the columns of F 2 which leaves the special columns of F 2 fixed, and places the non-special columns to the right of the special ones, in the same order as in F 1 . This permutation of columns yields a moon polyomino that only differs from F 1 by having the order of the special columns reversed. We call this polyomino F 3 . We now apply to φ 2 the bijection from Theorem 3.4, with σ as above, and let φ 3 be the resulting filling of F 3 .
Next, we permute the rows of F 3 , by reversing the order of the special rows. Let F 4 be the resulting moon polyomino. The corresponding filling φ 4 is obtained by again invoking Theorem 3.4, or more precisely its symmetric version for row permutations.
Finally, we remove from F 4 and φ 4 the dummy cells, to obtain a filling φ 5 of the original Ferrers shape F . We define Γ by Γ(φ) = φ 5 . It follows from Theorem 3.4 that Γ has all the properties stated in the lemma.

Proof of Theorem 2.2
We now have all the ingredients to prove the main result of this section.
Proof Proof of Theorem 2.2: Clearly, it suffices to prove the theorem for connected skew shapes, since for a disconnected skew shape, we may treat each component separately. Let S be a D-free connected skew shape. Fix its Ferrers decomposition For two consecutive Ferrers shapes F i and G i from the decomposition, say that a row is special if S contains a cell from both F i and G i in this row. In particular, F i and G i have the same number of special rows. Clearly, all the special rows have the same length in F i as well as in G i . Similarly, for consecutive Ferrers shapes G i and F i+1 , define a special column to be any column containing cells from both these shapes.
Fix now a filling φ of S. We transform φ by applying the bijection Γ separately to the restriction of φ in every Ferrers shape of the decomposition. More precisely, in F 1 , . . . , F n we apply Γ directly, while in G 1 , . . . , G n we first rotate the filling by 180 degrees, apply Γ, and then rotate back. Let φ be the resulting filling of S, obtained by combining the transformed fillings of the individual Ferrers shapes in the decomposition.
We claim that φ has all the properties stated in Theorem 2.2. Suppose first that φ contains δ k for some k, and let us show that φ contains ι k . If the occurrence of δ k in φ is confined to a single shape F i or G i , then φ contains ι k in the same shape by the properties of Γ: indeed, note that a filling of the shape F i (or G i ) contains δ k if and only if its longest SE-chain has length at least k, and it contains ι k if and only if its longest NE-chain has length at least k.
Suppose now that φ has an occurrence of δ k not confined to a single Ferrers shape of the decomposition. The occurrence must then be confined to the union of two consecutive shapes of the decomposition, since a pair of shapes further apart does not share any common row or column. Suppose, without loss of generality, that φ has an occurrence of δ k inside F i ∪ G i , with k 1 1-cells from the occurrence being in F i and k 2 = k − k 1 1-cells from the occurrence being in G i . Moreover, let s be the number of special rows in F i (and therefore also in G i ). There are then some values s 1 , s 2 with s 1 + s 2 = s, such that F i Fillings of skew shapes avoiding diagonal patterns 13 contains a SE-chain of length k 1 in its topmost s 1 special rows while G i has a SE-chain of length k 2 in its s 2 bottommost special rows (which will become topmost once G i is rotated before the application of Γ).
Consequently, in φ , the shape F i has a NE-chain of length k 1 in its bottommost s 1 special rows, and G i has a NE-chain of length k 2 in its topmost s 2 special rows. The two chains together form a NE-chain of size k, i.e., an occurrence of ι k in S. The same reasoning shows that an occurrence of ι k in φ implies an occurrence of δ k in φ.
Let us now consider the row sums of φ and φ . Let S i be the set of row indices of the special rows shared by F i and G i . The sets S 1 , S 2 , . . . , S n are pairwise disjoint. If a row r does not belong to any S i , then it intersects only one shape from the decomposition and is not special. Such a row then has the same sum in φ as in φ , by the properties of Γ. On the other hand, for the rows in a set S i , the properties of Γ ensure that the order of their row sums is reversed by the mapping φ → φ , that is, the sum of the topmost row of S i in φ is the same as the sum of the bottommost row of S i in φ , and so on. Thus, the row sums of φ are obtained from the row sums of φ by a permutation that reverses the order of each S i and leaves the remaining elements fixed. An analogous property holds for column sums.

Binary fillings avoiding a chain of length 2
In this section, we prove Theorem 2.6. Recall the skew shape D and its filling φ D from Figure 1.
Given a skew shape S with a total of N cells, we assign labels c 1 , c 2 , . . . , c N to every cell starting from the lower left corner, iterating over rows from the bottom to the top of S and labeling cells in a row from left to right, as indicated in Figure 11.
We associate with every cell c a three-part piecewise linear curve l(c) consisting of the ray going from the top-right corner of c to the left, the right border of c and the ray going from the bottom-right corner of c to the right. The curve l(c i ) of the cell c i of a skew shape S clearly divides S into two parts, with cells c 1 , . . . , c i below and c i+1 , . . . , c N above the curve, as illustrated in Figure 11. Let π ∈ {δ 2 , ι 2 , φ D } be a filling. Let S be a skew shape with cells numbered c 1 , . . . , c N as above, and let c i be one of its cells. We say that an occurrence of π in a filling ψ of S is i-low, if the top-right cell of the occurrence is one of the cells c 1 , . . . , c i . Intuitively, this means that the entire occurrence is below the line l(c i ). If an occurrence is not i-low, then it is i-high. Note that an occurrence may be i-high even when all its 1-cells are below l(c i ).
For a skew shape S with cells numbered c 1 , . . . , c N as above, let G i be the set of all the binary fillings of S that avoid any i-high occurrence of δ 2 as well as any i-low occurrence of ι 2 or φ D . See Figure 12 for an example. Fig. 12: Forbidden patterns of G 8 Note that G 1 is precisely the set of all δ 2 -avoiding binary fillings of S, while G N is the set of {ι 2 , φ D }avoiding binary fillings of S. Thus, Theorem 2.6 will follow directly from the next lemma. Most of the remainder of this section is devoted to the proof of Lemma 4.1. First, consider the case when the cells c i and c i+1 are not in the same row, i.e., c i+1 is the first cell of a new row and c i is the last cell of the previous row. In this case we will show that the sets G i and G i+1 are identical.
To see this, note that since the three relevant patterns δ 2 , ι 2 and φ D all have two cells in the topmost row, they can never have an occurrence whose top-right cell is mapped to c i+1 . Thus, in a filling ψ of S, an occurrence of any of these patterns is i-low if and only if it is (i + 1)-low, and hence G i = G i+1 .
Suppose now that c i and c i+1 are adjacent cells in a single row. Let R consist of all the cells in the same row as c i+1 and strictly to the left of it, let C consist of all the cells in the column of c i+1 and strictly below it, and let A be the rectangle consisting of all cells that are in a column intersecting R and a row intersecting C; see Figure 13. Note that A, R, C and c i+1 form a rectangle X which is maximal among all the rectangles contained in S with c i+1 as top-right corner. Therefore, in any occurrence of ι 2 with the upper 1-cell in c i+1 , the lower 1-cell is inside the rectangle A.
Let us make several observations about the structure of the fillings in G i and G i+1 which will be useful later in the proof.   In a filling ψ ∈ G i ∪ G i+1 , there is no copy of ι 2 inside either of the two rectangles A∪C and A∪R, since such a copy would necessarily be i-low (and hence also (i+1)-low). In particular, if C a and C b are two nonzero columns of A ∪ C (or A ∪ R) with C a to the left of C b , then all the 1-cells of c a are weakly above any 1-cell of C b .
We say that in a filling ψ ∈ G i ∪ G i+1 , the row R overlaps the rectangle A in column C , if the column C contains a 1-cell in row R as well as a 1-cell inside A. Note that if this happens, then row R contains no 1-cell to the right of column C , and A contains no 1-cell to the left of column C , otherwise we get a contradiction with Observation 4.4.
We will partition each of the sets G i and G i+1 into five pairwise disjoint subsets and construct bijections between corresponding subsets. The set G i is partitioned as follows: • G 1 i contains the fillings from G i in which c i+1 = 0 or A = 0.
• G 2 i contains the fillings from G i with c i+1 = 1, A = 0 and C = 0. Note that this implies R = 0, by Observation 4.2.
• G 3 i contains the fillings from G i with c i+1 = 1, R overlapping with A, and A having only one nonzero column. Note that this implies C = 0, by Observation 4.2.
• G 4 i contains the fillings from G i with c i+1 = 1, R overlapping with A, and A having at least two nonzero columns. Note that this again implies C = 0, by Observation 4.2.
• G 5 i contains the fillings from G i with c i+1 = 1, A = 0, R not overlapping A (possibly R = 0), and C = 0.

Vít Jelínek, Mark Karpilovskij
Note that each filling from G i belongs to exactly one of the five subsets defined above. We now define an analogous partition of G i+1 .
• G 2 i+1 contains the fillings from G i+1 in which C = 0, R contains exactly one 1-cell, and R overlaps with A. Note that this implies A = 0 and hence c i+1 = 0 by Observation 4.3.
• G 3 i+1 contains the fillings from G i+1 in which c i+1 = 1, and both R and C are nonzero. Note that this implies A = 0, by Observation 4.3.
• G 4 i+1 contains the fillings from G i+1 in which C = 0, R contains more than one 1-cell, and R overlaps with A. This again implies that A = 0 and hence c i+1 = 0 by Observation 4.3.
• G 5 i+1 contains the fillings from G i+1 in which R and C are both nonzero, c i+1 = 0, and R does not overlap A (possibly with A = 0).
Again, it follows from the definitions that each filling from G i+1 belongs to exactly one of the five sets above. Our plan is to show that for every j ∈ {1, . . . , 5}, the two sets G j i and G j i+1 have the same size. We first deal with the sets G 1 i and G 1 i+1 , which turn out to be identical. Claim 1. The set G 1 i is equal to the set G 1 i+1 .
Proof: To show that G 1 i ⊆ G 1 i+1 , choose a filling ψ ∈ G 1 i . Clearly, since ψ has no i-high occurrence of δ 2 , it has no (i + 1)-high occurrence either. Also, C or R must be zero in ψ, otherwise ψ would contain an i-high occurrence of δ 2 . The only possibility for ψ to have an (i + 1)-low occurrence of ι 2 or φ D is that c i+1 is actually the top-right corner of the occurrence. Since c i+1 or A is zero by the definition of G 1 i , there is no such occurrence of ι 2 . Since C or R is zero as we saw above, there is no such occurrence of φ D either. This shows that ψ belongs to G 1 i+1 . Conversely, to show that G 1 i+1 ⊆ G 1 i , choose ρ ∈ G 1 i+1 . We see that ρ has no i-low occurrence of ι 2 or φ D , since it has no such (i + 1)-low occurrence. It also has no i-high occurrence of δ 2 , because the top-right cell of such an occurrence would have to coincide with c i+1 , which is excluded by the definition of G 1 i+1 . Hence ρ is in G i . And since ρ has no (i + 1)-low occurrence of ι 2 , we may conclude that ρ is in G 1 i . This proves the claim.
To show that |G j i | = |G j i+1 | for j > 1, we will construct a bijection f : G + i → G + i+1 and its inverse g : G + i+1 → G i , such that for every j ∈ {2, 3, 4, 5} and every ψ ∈ G j i we have f (ψ) ∈ G j i+1 , and similarly, for any ρ ∈ G j i+1 , we have g(ρ) ∈ G j i . We first describe the two mappings f and g, and then show that they have the required properties. In all the cases, the mappings f and g will only modify the values of the cells inside the rectangle X, while the rest of the filling remains unchanged.
For a filling ψ ∈ G 2 i , let C ⊆ A be the leftmost nonzero column of A. The filling f (ψ) is then obtained from ψ by setting the cell of R directly above C to 1, and the cell c i+1 to 0, keeping the remaining cells of ψ unchanged.
Consider now a filling ρ ∈ G 2 i+1 . Recall from the definition of G 2 i+1 and from Observation 4.4 that R contains a single 1-cell of ρ, and this 1-cell is directly above the leftmost nonzero column of A. We define g(ρ) to be the filling obtained from ρ by setting the single 1-cell of R to 0 and the cell c i+1 to 1.
For a filling ψ ∈ G 3 i , let C ⊆ A be the unique nonzero column of A. Then f (ψ) is obtained from ψ by replacing the filling of C with the filling of C , and then filling C with zeros.
For a filling ρ ∈ G 3 i+1 , we let C ⊆ A be the column of A directly below the rightmost 1-cell of R, and we define g(ρ) as the filling obtained from ρ by replacing the filling of C with the values from C, and filling C with zeros.
Consider now ψ ∈ G 4 i . Let C 1 , C 2 , . . . , C k ⊆ A be the sequence of all the nonzero columns of A, in left-to-right order. Recall that by the definition of G 4 i and by Observation 4.4, the rightmost 1-cell of R is directly above the column C 1 . We create the filling f (ψ) from ψ as follows: we replace the filling of C by the filling of C k , then we replace, for every j = 1, . . . , k − 1, the filling of C j+1 by the filling of C j , and we fill C 1 with zeros. Finally, we set cell of R directly above C 2 to 1, and the cell c i+1 to 0. Now consider a filling ρ ∈ G 4 i+1 . We let C 2 , C 3 , . . . , C k be the nonzero columns of A ordered left to right. Note that by the definition of G 4 i+1 and by Observation 4.4, the rightmost 1-cell in R is directly above C 2 , and R has at least one other 1-cell to the left of it. Let C 1 be the rightmost column of A to the left of C 2 that has a 1-cell of R directly above it. We create g(ρ) from ρ as follows: for j = 1, . . . , k − 1 we fill C j with the values in C j+1 , then fill C k with the values in C, fill C with zeros, and finally set the cell of R directly above C 2 to 0 and the cell c i+1 to 1.
For a filling ψ ∈ G 5 i , let C 1 , C 2 , . . . , C k ⊆ A be again the sequence of all the nonzero columns of A in left-to-right order. If R has any 1-cells, they must all be strictly to the left of the cell above C 1 . We create f (ψ) from ψ by replacing C with C k , then replacing C j+1 with C j for every j = 1, . . . , k − 1, and filling C 1 with zeros. Finally, we set the cell of R directly above C 1 to 1 and c i+1 to 0.
For a filling ρ ∈ G 5 i+1 , let C 2 , . . . , C k be the nonzero columns of A ordered left to right, and let C 1 be the column of A directly below the rightmost 1-cell of R. Note that by the definition of G 5 i+1 , C 1 is strictly to the left of C 2 . We create g(ρ) by replacing, for j = 1, . . . , k − 1, C j with C j+1 , replacing C k with C, filling C with zeros, setting the cell of R above C 1 to 0 and c i+1 to 1.
Our next aim is to show that the two mappings f and g defined above cannot create any of the forbidden patterns. We first collect several useful observations about the properties of f and g, which can be verified by inspecting the definition of the two mappings.
Observation 4.5. Let ψ be a filling from G + i , and let ρ be a filling from G + i+1 . Recall that X is the rectangle formed by the union of C, R, A and c i+1 .
6. Suppose that (x, y) is a 1-cell of g(ρ) inside A. Then ρ contains a 1-cell (x , y) in A ∪ C for some x ≥ x, as well as a 1-cell (x, y ) in A ∪ R for some y ≥ y. (This again follows from Observation 4.4.) 7. The subfilling of ψ induced by its nonempty columns of A ∪ C is the same as the subfilling of f (ψ) induced by its nonempty columns of A ∪ C. The same is true for the two fillings ρ and g(ρ).
8. The mapping g does not change any 0-cell in R∪C into a 1-cell. In other words, if a cell c ∈ R∪C is a 1-cell in g(ρ) then it is also a 1-cell in ρ.
Proof: If f (ψ) has an (i + 1)-high copy of δ 2 , then at least one 1-cell of this copy must be in X, because in the rest of S, no 1-cells were modified. The other 1-cell must be strictly above or strictly to the right of X, otherwise the occurrence would be (i + 1)-low. However, by parts 1 and 2 of Observation 4.5, for every 1-cell of f (ψ) in X, there is a 1-cell of ψ in the same column of X and also a 1-cell of ψ in the same row of X. It follows that to any (i + 1)-high occurrence of δ 2 in f (ψ), we may also find an (i + 1)-high (and therefore i-high) occurrence in ψ as well, contradicting ψ ∈ G i .
Suppose now that f (ψ) has an (i + 1)-low occurrence of ι 2 , formed by two 1-cells u and v, where u is to the left and below v. Since the occurrence is (i + 1)-low, the cell v is either in R ∪ {c i+1 } or its row is below the row containing R. It follows that the row of u is below the row of R. This leaves the following cases to consider.
• u ∈ A and v ∈ R: this contradicts Observation 4.5 part 3.
• u ∈ A and v ∈ A ∪ C: by Observation 4.5 part 7, ψ also contains an occurrence of ι 2 in A ∪ C, which is impossible.
• u ∈ A ∪ C and v ∈ X: consequently, v is to the right of X and the row containing v intersects A.
Then v is also a 1-cell of ψ, and by Observation 4.5 part 1, ψ has a 1-cell u in A in the same row as u. Then u and v form an i-low copy of ι 2 in ψ, a contradiction.
• u ∈ A and v = c i+1 : this is impossible, since c i+1 is a 1-cell in f (ψ) only if ψ is in G 3 i , and in that case A = 0.
• u ∈ X: then v is in X, otherwise u and v would form a forbidden ι 2 in ψ. Consequently, u is in a row that is below the bottommost row of X, or in a column that is to the left of the leftmost column of X. If the row containing u is below the bottommost row of X, then the column containing C and c i+1 does not intersect the row of u inside the shape S (recall that X is the largest rectangle inside S with top-right corner c i+1 ). Hence v is in A ∪ R and by Observation 4.5 part 5, ψ has a 1-cell v ∈ A ∪ R in the same column as v and weakly below it. Then u and v form a forbidden ι 2 in ψ, a contradiction. Similarly, if the column of u is to the left of X, then v is in A ∪ C and by Observation 4.5 part 4, ψ has a 1-cell v ∈ A ∪ C in the same row as v and weakly to the left of it, forming again the forbidden ι 2 with u. Right: the situation when the row of u is below X.
The above cases cover all possibilities, and show that f (ψ) avoids an (i + 1)-low ι 2 .
Suppose now that f (ψ) has an (i + 1)-low occurrence of φ D . Let u, v and w be the three 1-cells of this occurrence, ordered left to right. We note that in order to get an occurrence of φ D , the column containing u must not intersect the row containing v inside S, and the row containing u must not intersect the column of w inside S. Since all the three 1-cells are below the line l(c i+1 ), this implies that u is strictly to the left of the leftmost column of A, otherwise the column of u would intersect the row of v inside S. Moreover, at least one of v and w must be inside X, otherwise the three 1-cells would form a forbidden copy of φ D in ψ.
Suppose first that the row containing u intersects X; see Figure 14 left. Then w must be strictly to the right of X, otherwise the column of w would intersect the row of u inside S, which cannot happen, as we pointed out above. This implies that v is in X, and more precisely v must be in A ∪ C, otherwise the copy of φ D would not be (i + 1)-low. But then, by Observation 4.5 part 4, ψ has a 1-cell v in the same row as v and weakly to its left, and {u, v , w} is a forbidden occurrence of φ D in ψ, a contradiction. This shows that the row of u cannot intersect X.
It remains to consider the case where the row of u is strictly below the bottommost row of X; see Figure 14 right. Define B to be the largest rectangle inside S whose bottom-left corner is u. Note that ψ has no 1-cell in X ∩ B, since such a 1-cell would form a forbidden occurrence of ι 2 with u. Note also that the column containing v intersects the row containing w inside B, otherwise u, v and w would not form a copy of φ D .
By Observation 4.5 parts 4 and 5, the filling ψ contains a 1-cell v in the same column as v and weakly below it, and it contains a 1-cell w in the same row as w and weakly to the left of it. Since ψ has no 1-cell inside B, neither v nor w are in B. Moreover, since the bottom-left corner of B is to the left and below X, we know that v is above B and w is to the right of B. Hence u, v and w form an (i + 1)-low occurrence of φ D in ψ. In fact, this occurrence must be i-low as well, otherwise we would have v ∈ R and w ∈ C, in which case v and w would form a forbidden i-high occurrence of δ 2 in ψ. We conclude that ψ has a forbidden occurrence of φ D . This contradiction shows that f (ψ) has no (i+1)-low occurrence of φ D , completing the proof of Claim 2.
Proof: Assume first that g(ρ) has an i-high copy of δ 2 , formed by two cells u and v, with u above and to the left of v. If the top-right corner of the copy of δ 2 is c i+1 , then u ∈ R and v ∈ C. However, this is impossible, since the column C of g(ρ) is only nonzero when ρ is in G 2 i+1 , and in that case we have R = 0. If follows that the copy of δ 2 is (i + 1)-high, and in particular, at most one of the two cells u and v is in X. If neither u nor v is in X, then u and v form an (i + 1)-high copy of δ 2 in ρ, which is impossible. If u is in X and v is not, then v is to the right of X, and by Observation 4.5 part 1, ρ has a 1-cell u ∈ X in the same row of X as u. Then {u , v} forms a forbidden copy of δ 2 in ρ. If, on the other hand, v is in X, then u is above X, and by Observation 4.5 part 2, ρ has a 1-cell v ∈ X in the same column as v. Now {u, v } forms a forbidden copy of δ 2 in ρ. In all cases we get a contradiction, concluding that g(ρ) has no i-high copy of δ 2 .
Suppose now that g(ρ) contains an i-low copy if ι 2 , and let u and v be its two 1-cells, with u left and below v. At least one of the two 1-cells must be in X, otherwise they would form an i-low (and therefore (i + 1)-low) copy of ι 2 in ρ. We distinguish several cases: • u ∈ A and v ∈ R: this is excluded by Observation 4.5 part 3.
• u ∈ A and v ∈ A ∪ C: then Observation 4.5 part 7 implies that ρ also has a forbidden ι 2 .
• u ∈ X and v ∈ X: then v must be to the right of X, and since the copy of ι 2 is i-low, the row containing v intersects X. By Observation 4.5 part 1, ρ has a 1-cell u of X in the same row as u, and this 1-cell forms a forbidden ι 2 with v.
• u ∈ X and the row containing u intersects X: then u is to the left of X, v is in X, and by Observation 4.5 part 1, ρ has a 1-cell v in the same row as v, forming a forbidden copy of ι 2 with u.
• u ∈ X and the column containing u intersects X: this is analogous to the previous case, except we use part 2 of Observation 4.5.
• u ∈ X and neither the row nor the column of u intersects X: then u is strictly bottom-left from X, and v is in X. By part 6 of Observation 4.5, ρ contains a 1-cell v ∈ X in the same column as v and weakly above it, as well as a 1-cell v ∈ X in the same row as v and weakly to the right of it. Let B be the largest rectangle inside S whose bottom-left corner is u. If v or v is inside B, it forms a forbidden copy of ι 2 in ρ. Otherwise v is strictly above B and v strictly to its right, and {u, v , v } is a forbidden copy of φ D in ρ.
We conclude that g(ρ) has no i-low copy of ι 2 . Finally, suppose g(ρ) contains an i-low copy of φ D , and let u, v and w be its 1-cells ordered left to right. The column containing u does not intersect the row of v, and the row of u does not intersect the column of w by the definition of φ D . Since the three cells are below the line l(c i ), it follows that the column of u is to the left of the leftmost column of X, otherwise it would intersect the row of v. In particular, u is also a 1-cell in ρ.
We will now show that ρ contains a pair of 1-cells v , w which form an (i + 1)-low copy of φ D with u or an (i + 1)-high copy of δ 2 , in both cases contradicting ρ ∈ G i+1 .

21
We define v as follows: if v is a 1-cell of ρ, we set v = v. If, on the other hand, v is a 0-cell in ρ this means that v is in A: indeed, since g modified the value of v, we know that v is in X, moreover, by part 8 of Observation 4.5, we have v ∈ R ∪ C; in addition, v is below (c i ) so v = c i+1 . By part 6 of Observation 4.5, ρ contains a 1-cell of A ∪ R in the same column as v and weakly above v; we then let v be one such 1-cell.
Similarly, if w is a 1-cell in ρ, we let w = w. If w is a 0-cell in ρ, then necessarily w is in A. By part 6 of Observation 4.5, there is a 1-cell of ρ in the same row as w and to its right, and we let w be one such 1-cell.
Since v is in the same column as v and weakly above it, while w is in the same row as w and weakly to the right of it, it follows that u, v and w together form a copy of φ D . If this copy is (i + 1)-high, then v and w by themselves form an (i + 1)-high copy of δ 2 , otherwise we have an (i + 1)-low copy of φ D . In both cases, we get a contradiction with ρ ∈ G i+1 .
It follows that g(ρ) is in G i , proving Claim 3.
With the help of Claims 2 and 3, it is routine to check, for any fixed j ∈ {2, 3, 4, 5}, that for every ψ ∈ G j i , the filling f (ψ) is in G j i+1 and g(f (ψ)) = ψ, while for every ρ ∈ G j i+1 , g(ρ) is in G j i and f (g(ρ)) = ρ. This means that f and q are mutually inverse bijections between G + i and G + i+1 . By construction, both f and g preserve the number of 1-cells in each row. Together with Claim 1, this completes the proof of Lemma 4.1.
Proof Proof of Theorem 2.6: Let N be the number of cells of S. From Lemma 4.1, we immediately get that there is a bijection between the fillings of G 1 and G N . As discussed above, G 1 is exactly the set of fillings avoiding δ 2 , while G N is exactly the set of fillings avoiding φ D and ι 2 . Moreover, all the individual bijections we constructed have the property that they preserve row sums. This completes the proof of Theorem 2.6.

Conclusion
Our main motivation for the study of fillings, and fillings of skew shapes in particular, stems from their close connection with the problem of enumeration of pattern-avoiding permutations. In particular, the skew shape conjecture offers a plausible way of obtaining an infinite family of Wilf-ordering relations. Specifically, the conjecture implies that for any two permutations α and β and any integer k, the permutation pattern α δ k β is avoided by fewer permutations than the pattern α ι k β; see [12,Section 3.2] and references therein. Although the results of this paper do not seem to yield any direct consequences for permutation enumeration, we believe that a better understanding of pattern-avoiding skew-shape fillings may pave the way for future progress in this area.