Permutations avoiding 4321 and 3241 have an algebraic generating function

We show that permutations avoiding both of the (classical) patterns 4321 and 3241 have the algebraic generating function conjectured by Vladimir Kruchinin.


Introduction
This paper is a companion to [1], which established the algebraic generating function for {1243, 2134}avoiding permutations conjectured by Vaclav Kotesovec [2, A164651].In similar vein, Vladimir Kruchinin [2, A165543] conjectured the generating function denotes the generating function for the Catalan numbers.
We will show that {4321, 3241}-avoiders do indeed have this generating function.First, we use the combinatorial interpretation of the Invert transform to reduce the problem to counting indecomposable, also known as sum-indecomposable, {4321, 3241}-avoiders.Then we exhibit a bijective mapping from the set of indecomposable {4321, 3241}-avoiders of length n to the union of Cartesian products , where I r (321) is the set of indecomposable 321-avoiding permutations of length r and C (r) k is the set of integer sequences (a 1 , a 2 , . . ., a k ) satisfying 1 ≤ a 1 ≤ r + 1 and 1 ≤ a i ≤ a i−1 + 1 for i ≥ 2. The counting sequences for the sets I r and C (r) k are known, and the result follows readily.
Section 2 recalls the notion of indecomposability and the application of the Invert transform to indecomposable permutations.Section 3 reviews nonnegative lattice paths and integer sequences whose successive entries increase by at most 1, that is, elements of C (r) k .Section 4 defines some notions relevant for our bijection.Section 5 presents the main bijection and Section 6 explains why it works.Section 7 ties everything together.

Indecomposability and the Invert transform
A standard permutation is one on an initial segment of the positive integers and to standardize a permutation on a set of positive integers means to replace its smallest entry by 1, next smallest by 2 and so on, thereby obtaining a standard permutation.In the context of pattern avoidance, we consider standard permutations written in one-line form (that is, as lists).When a standard permutation is written in two-line form, it may be possible to insert some vertical bars to obtain subpermutations, not necessarily standard, as in , we obtain the components of the permutation, here 3 1 2, 6 5 4, 7. A permutation is indecomposable, also called sum-indecomposable [3], if it has exactly one component.(Thus the permutation 1 is indecomposable but the empty permutation is not.) Let F (x) = 1 + x + 2x 2 + 6x 3 + • • • denote the generating function for {4321, 3241}-avoiders and G(x) = x+x 2 +3x 3 +• • • the generating function for indecomposable {4321, 3241}-avoiders.Clearly, a permutation avoids {4321, 3241} if and only if each of its components does so.Hence, the combinatorial interpretation of the Invert transform (see [1] or [4]) implies that and our problem is reduced to showing that G(x) = x C xC(x) .

Nonnegative lattice paths
It is well known that the "ballot number" A009766] counts nonnegative paths of n + m upsteps U = (1, 1) and n downsteps D = (1, −1), where nonnegative means the path never dips below ground level, the horizontal line through its initial vertex (see, e.g., [5]).A nonnegative path of n upsteps and n downsteps is a Dyck path and its size is n.A nonempty Dyck path is indecomposable if its only return to ground level is at the end.The returns to ground level split a Dyck path into its (indecomposable) components.The number of indecomposable Dyck paths of size n is C n−1 (delete the first and last steps to obtain a one-size-smaller Dyck path).Proposition 1. [6, 2.126] The number of indecomposable 321-avoiding permutations on [n] is C n−1 .
Proof: One method is to observe that Krattenthaler's bijection [7] from 321-avoiding permutations on [n] to Dyck paths of size n preserves components in the obvious sense and so sends indecomposable permutations to indecomposable paths.
Given a nonnegative path, successively delete the first peak (U D) recording its height above ground level until no peaks remain, as in Figure 1 (heights prepended to existing list).
The path on the left produces the list of heights 3442 and this is a map from nonnegative paths of n + m U s and n Ds to C (m) n .To reverse the map, suppose given (a 1 , a 2 , . . ., a n ) ∈ C (m) n .Start with a path of m U s. Then successively insert a peak at height a i into the initial ascent of the current path so that its top vertex is at height a i , 1 ≤ i ≤ n.This produces a path whose first peak is at height a i and the growth condition   .
The preceding construction will be mirrored in Section 6 below when we insert a "peak" entry into a permutation so that if it has "height" h, then there are h + 1 possibilities for the next insertion.

Some preliminary definitions
By (slight) abuse of language, to delete an entry y ∈ [n] from a permutation p on [n] means to erase y and then subtract 1 from each entry > y; p \ {y} denotes the resulting permutation.The non-y entries of p correspond in an obvious way to the entries of p \ {y}.Conversely, to insert y in position i means to increment by 1 each entry ≥ y and then place y in position i; we use p ⊕ i y to denote the result.Thus, for p = 3142, i = 4, y = 2, p ⊕ i y = 41523.Again, the entries of p correspond naturally to the non-y entries of p ⊕ i y.The adjective/noun LRMax is short for left-to-right maximum in a permutation.
A key-2 entry in an avoider is an entry that serves as the "2" in either a 321 pattern or a 4312 pattern.For example, the key-2 entries in 6174235 are 4 and 3. Clearly, an avoider with no key-2 entries is a 321-avoider.The term key-2 is mnemonic but somewhat ungainly and to add a little color, we will refer to a key-2 entry as a blue entry.The peak blue entry in an avoider that contains (one or more) 321 patterns is the larger of the last "1" of a 321 and its (immediate) predecessor.The terminology is justified because the peak blue is indeed a blue: suppose a is the last "1" of a 321 in an avoider, say the last "1" of cba, and y is the predecessor of a.If y < a, then a is the "2" of the 4312 pattern cbya.If y > a, then y = b or y = b.In the former case, y is the "2" of the 321 pattern cba; in the latter case, y < c (else cbya is a proscribed 3241) and so y is the "2" of the 321 pattern cya.See Figure 2 for some examples of avoiders with blue entries so colored and peak blue entry highlighted.
We let I n (3241, 4321) denote the set of avoiders (indecomposable {3241, 4321}-avoiding permutations) of length n, and similarly I n (321) is the set of indecomposable 321-avoiding permutations.Set I n,k (3241, 4321) = {p ∈ I n (3241, 4321) : p has k blue entries}.5 The bijection Theorem 3.For 0 ≤ k ≤ n − 2, there is a bijection Here is its description.Suppose given p ∈ I n,k (3241, 4321).If k = 0, then p is already 321-avoiding and (p, ) is the image pair, where denotes the empty list.If k ≥ 1, the idea is to successively delete the (current) peak blue entry recording, in the same right to left fashion as in Figure 1, its "height", appropriately defined, until a 321-avoider q is obtained.Then the image pair is (q, L), where L is the list of heights.The trick is to find the correct definition of height, and it's a doozy.
To this end, associate to each 321-containing permutation p a triple a < b < c, all integers except that c may be infinite: a is the last "1" of a 321 in p, b is the rightmost entry to the left of a that exceeds a, and c is the first non-LRMax entry after a (with c := ∞ if there is no such non-LRMax).Thus, for p = 321, we have (a, b, c) = (1, 2, ∞) and for p = 4631275, we have (a, b, c) = (2, 3, 5).Proposition 4. If p is a 321-containing avoider with associated triple (a, b, c), then there is an entry w in p such that wba is a 321 pattern in p.
Proof: Since a is the "1" of a 321, there is a sublist vua in p with v > u > a.By definition of b, u must lie weakly to the left of b and so v = b.If v > b, take w = v.Otherwise, v and u must both be < b and vuba is a forbidden 3241 pattern.Proof: If not, wbc would be a 321, violating the definition of a as the last "1" of a 321.
We now define what we call, for reasons to become clear, the peak-insertion set of an avoider.For a 321-containing avoider on [n] with associated triple (a, b, c), the peak-insertion set is the disjoint union otherwise, in the 321-containing case, a would not be the last "1" of a 321, and in the 321-avoiding case, a 321 would actually be present.Split A into maximal runs of consecutive integers A 1 , A 2 , . . ., A t .Likewise, split B into maximal runs of consecutive integers but this time written as b 1 B 1 , b 2 B 2 , . . ., b t B t , where b i is the first entry of the i-th run and B i may be empty.There is the same number of runs in A as in B because (i) the smallest run contains b 1 = c and comes from B since c is not a LRMax, (ii) thereafter the runs alternate between A and B, and (iii) the largest run contains n, a LRMax, and so comes from A.
The peak-insertion list of p is now defined to be the peak-insertion set of p listed in the following order (L r denotes the reversal of the list L): Here, t = 3 and the ordering in the peak-insertion list is We can now define the height of the peak blue entry y in a 321-containing avoider p : it is the position of y in the peak-insertion list of p \ {y}.(We will see later that y must be in the peak-insertion set of p \ {y}.) There is a graphical way to visualize the ordering in the peak-insertion list.As illustrated in Figure 3, for each y in the peak-insertion set [a + 1, b + 1] ∪ [c + 1, n] of p, insert a bullet at vertex (x − 1, y − 1) in the matrix diagram of p where the abscissa x is determined as follows.For y > c, insert the bullet as far right as possible so that the region below and to the right of the bullet is nonempty.For y ∈ [a + 1, b + 1], let i denote the position of a in p.Then, for y ∈ [a + 1, b], x = i + 1, and for y = b + 1, x = i.If the bullets are arranged in order of distance from the vertical line x = n and, for bullets at the same distance from x = n, in order of distance from the horizontal line y = c or y = n if c = ∞ (heavy line in Figure 3), then their y's form the peak-insertion list.

Why it works
We need to establish several facts to show the map does all it claims to and is invertible.Proposition 6. Suppose y is the peak blue entry of a 321-containing avoider p. Then (i ) p \ {y} is again an avoider, (ii ) the blue entries of p other than y become the blue entries of p \ {y}, and (iii ) y is in the peak-insertion set of p \ {y}.
Proof: (i) p \ {y} inherits the {4321, 3241}-avoiding property from p.If p \ {y} was decomposable then the entries other than y in the 321 or 4312 pattern containing y in p would correspond to entries in the same component of p \ {y}.But then p would also be decomposable, obviously in the 321 case, and because the "1" and "2" can be chosen adjacent in the 4312 case.(ii) No new blue entry can be introduced and no non-peak blue entry is lost because if the deleted entry y is the "1" of a 321, then the "2", a blue entry in p, is still the "2" of a 321 in p \ {y} since the predecessor of y in p is < y and so serves as a "1" in place of y.Also, the peak blue entry cannot possibly be the "4", "3", or "1" of a 4312, so no blue entry in p that is the "2" of a 4312 loses its blue status in p \ {y}.(iii) This will be proved in contrapositive form in Proposition 9 below.Proof: (i) All entries after c are > c else a would not be the last "1" of a 321.If the assertion fails, take y to be the rightmost offending entry in p.Clearly, y lies between a and c in p and a < y < c and region Q in the schematic of Figure 5 is empty because y is the rightmost offender.Also, P is empty since y is a LRMax (by definition of c), R is empty else a is the "2" of a 321, and S is empty else c is the "2" of a 321.These empty regions force y to be a fixed point and p to be decomposable.
(ii) First, b + 1 cannot lie between b and a in p by definition of b.If c = ∞, we are done by part (i).So suppose c is finite.The entry w > b whose existence is guaranteed by Prop. 4 implies that b + 1 is not a LRMax, violating the definition of c if b + 1 lies between a and c.If b + 1 lies to the right of c, then c b + 1 is the "21" of a 321 (since c is not a LRMax), contradicting the assumption that a is the last "1" of a 321.
(iii) If not, then all entries after a would be LRMax entries, and the last entry would be n, violating indecomposability.
(iv) Suppose z > b is an offender.If c = ∞, z lies to the left of b by part (iii) and the definition of b.If c is finite, z lies to the left of a by definition of c, and so lies to the left of b by definition of b.In either case, z is a non-LRMax lying to the left of b.Then zba is the "321" of a forbidden 4321.Proposition 8.For each y in the peak-insertion set of an avoider p on [n], there is exactly one position i such that q := p ⊕ i y (insertion of y at position i ) satisfies (i ) q is an avoider, (ii ) the peak blue entry of q is y, and (iii ) q has just one more blue entry than p.Also, for y not in the peak-insertion set of p, there is no such i.
Proof: First, suppose y ∈ [c + 1, n].Let z be the rightmost entry of p that is < y.Insert y immediately to the left of z.Suppose p has the matrix form depicted schematically in Figure 6 where the bullet represents the inserted entry and z its successor.Then S is empty (contains no entries) by definition of y.If P were also empty, p would be decomposable.Thus y is the "2" of a 321, making y blue in p ⊕ and, clearly, it is the peak blue entry.On the other hand, if y is inserted to the right of z it will not be blue, and if inserted to the left of z but not adjacent to c, it may be blue but will not be the peak blue.Now suppose y ∈ [a + 1, b + 1].If y = b + 1, insert y just before a (y will be the "2" of a 321), and if y ∈ [a + 1, b], insert y just after a (y will be the "2" of a 4312).Similar considerations show that, for this insertion point, y will be the peak blue entry in p ⊕ y and the only new blue entry.Also no other insertion point will do.
As for the last assertion, if p is 321-avoiding, the peak-insertion set is [2, n] and 1 cannot be a blue entry in p ⊕ 1 because, by definition, blue entries exceed 1.Now suppose p is 321-containing with associated a, b, c.If y ≤ a is inserted to the left of a, it cannot be the larger of the last "1" of a 321 and its predecessor in p⊕y; if inserted to the right of a, a descending quadruple is present in p⊕y.Next, suppose y ∈ [b+2, c] (y ≥ b + 2 in case c = ∞).If y is inserted to the left of a, then it is not the larger of a and the predecessor of a unless it actually is the predecessor of a, but in that case b + 1 b y a is a forbidden 3241 by Lemma 7 (ii); if y is inserted between a and c in case c is finite or after a in case c = ∞, y cannot be the "1" of a 321 in p ⊕ y by Lemma 7 (iv) and so y is certainly not the larger of the last "1" of a 321 and its predecessor in p ⊕ y; if y is inserted after c, then it is the last "1" of a 321 in p ⊕ y, but is not larger than its predecessor and so is not peak.Proposition 9.For an avoider p, as y ranges from left to right over the peak-insertion list of p, the length of the peak-insertion list of p ⊕ iy y ranges from left to right over the interval 2, 3, . . ., r + 1, where r denotes the length of the peak-insertion list of p and i y is the i of the preceding Proposition.
Proof: Recall that every avoider p is associated with an (a, b, c) triple if it is 321-containing and with a singleton c = 1 otherwise, and the peak-insertion set for p is [a + 1, b + 1] ∪ [c + 1, n] with the first interval absent if p is 321-avoiding and the second interval absent if c = ∞.We need to determine the triples, denoted (a y , b y , c y ), for each p ⊕ iy y with y in the peak-insertion list of p.In the peak-insertion list of p, the entries > c all occur before the entries < c.Split the entries > c into segments consisting 22 23 24 25 " 21 " 20 " 18 19 " 17 " 16 " 15 " 11 12 13 14 " 10 " 9 "" 5 a = 21 21 21 21 " 20 " 19 " 17 17 " 16 " 15 " 14 " 10 10 10 10 " 9 " 8 "" 5 b = 22 23 24 25 " 21 " 20 " 18 19 " 17 " 16 " 15 " 11 12 13 14 " 10 " 9 "" 6 c = ∞ ∞ ∞ ∞ " 22 " 21 " 20 20 " 18 " 17 " 16 " 15 15 15 15 " 11 " 10 "" 9 SPS = 2 3 4 5 " 6 " 7 " 8 9 " 10 " 11 " 12 " 13 14 15 16 " 17 " 18 "" 19 Then for y > c in the peak-insertion list of p, the a y , b y and c y of p ⊕ iy y are as follows: (i) a y is one less than the smallest entry in the segment containing y, (ii) b y = y, and (iii) c y is one more than the largest entry in the segment containing y (or ∞ if this largest entry is n).For y < c in the peak-insertion list of p, the b y is b + 1, the c y is c + 1, while a y = y for y ∈ [a + 1, b] and a y = a for y = b.We leave the reader to verify the truth of these assertions with the visual aid that each pair (i y , y) is shown as a bullet at vertex (i y − 1, y − 1) in Figure 7. So, "expanding" the (i y , y) bullet into a cell containing the entry y gives the matrix diagram of p ⊕ iy y.
It is now clear that the size of the peak-insertion set (SPS in Figure 7) starts at 2 and increases by 1 thereafter as y ranges across the peak-insertion list of p.

Putting it all together
From Propositions 1 and 2 and the preceding bijection, we find that the number u n of indecomposable {4321, 3241}-avoiding permutations of length n is given by u 0 = 0, u 1 = 1 and, for n ≥ 2, This is sequence A127632 in OEIS [2] with generating function where C(x) is the generating function for the Catalan numbers, and by Section 2, the claimed generating function for {4321, 3241}-avoiding permutations follows.The counting sequence for {4321, 3241}avoiders can be succinctly described as the Invert transform of the Catalan transform of the Catalan numbers.
Addendum After this paper was posted to the ArXiv in 2013, a more transparent proof was obtained by Bloom and Vatter [8].

Corollary 5 .
If p is a 321-containing avoider with associated triple (a, b, c), then c > b.

Lemma 7 .
Suppose p is a 321-containing avoider with associated triple (a, b, c).(i ) If c is finite, then all entries after a in p are ≥ c. (ii ) If c = ∞ or c is finite and c > b + 1, then b + 1 lies to the left of b in p. (iii ) If c = ∞, then a is the last entry of p. (iv ) Suppose z > b is an entry of p. Then z is a LRMax in p provided z lies to the left of c in p in case c is finite.

Fig. 7 :
Fig. 7: Example showing a, b, c and size of peak-insertion set for each y.
1 is just what is needed to enable the next step.So the map is a bijection and we have