A size-preserving injection from almost-321 to almost-231 avoiders

Brignall, Ekhad, Smith and Vatter asked for a length-preserving injection from permutations that almost avoid \(321\) to permutations that almost avoid \(231\). A permutation almost avoids a pattern if deleting at most one entry leaves no occurrence of that pattern. An occurrence is a subsequence with the specified relative order. The construction takes the permutation itself as input and works at every finite length, including zero. Its inverse identifies which target permutations are in the image and gives a tree code for every permutation outside it. Almost avoiding permutations, §4, Problem 10, author PDF p. 8 · Journal version, §4, Problem 10 Use \(X\) for one unit of size and \(1\) for a single empty object. Sums of classes are disjoint choices, products are ordered tuples, and a coefficient such as \(2\) supplies two labelled choices. Let \(C\) be the class of plane rooted trees, whose children are ordered and whose size is the number of edges. A branch consists of an edge and the tree below it. With \(\operatorname{Seq}\) denoting finite ordered lists, including the empty list, set \[Y=XC,\qquad C=\operatorname{Seq}(Y),\qquad B=YC,\qquad T=\operatorname{Seq}(\{\mathrm{left},\mathrm{right}\}\times Y),\qquad H=\operatorname{Seq}(X). \] Here \(B\) is a nonempty branch list. In the first-child, next-sibling binary representation, each plane edge is a binary node. A chosen plane vertex corresponds to the empty slot just after its child list. The path to that slot is a \(T\)-list recording each direction and storing the current node and its other subtree. A chosen edge corresponds to choosing its lower vertex. The path then has a left step, and splitting at the first such step gives the code \(M=XC^2T\). For an ordered pair of chosen vertices the code is \(U=T+2XT^3\). The first term records a repeated mark. The second records the path to the branching node, the node itself, the two paths below it and the assignment of marks to sides. For a permutation that contains \(321\) and almost avoids it, the inherited Robinson–Schensted shape characterisation gives two standard tableaux of common shape \((a,b,1)\), with \(a\ge b\ge1\). In each tableau read the row numbers in increasing label order, remove the single \(3\), and record the gap as the number of symbols before it. Read row \(1\) as an upstep and row \(2\) as a downstep. Each remaining word is a path of length \(N=a+b\) that stays at or above its starting height. Join the insertion tableau's path to the recording tableau's path read backwards with upsteps and downsteps interchanged. The result is a Dyck path of semilength \(N\), hence the contour of a plane tree with \(N\) edges. If the initial rise and final fall have lengths \(l\) and \(r\), the two legal gap ranges are \([l+1,N]\) and \([r+1,N]\), with integer endpoints included. Use the first gap as the red edge's index in left-to-right depth-first preorder and the second as the blue edge's index in right-to-left depth-first preorder, both starting at one. These conditions put red off the leftmost spine and blue off the rightmost spine. The marks may coincide. Reading the two indices recovers the gaps and hence both tableaux. For a pure \(321\)-avoider, use the same path construction on its at-most-two-row tableaux and decode the resulting tree by the ordinary maximum decomposition of a \(231\)-avoider. A binary node in that decomposition is the maximum of its word, with all left-subtree values below all right-subtree values. Almost avoiding permutations, §2, Proposition 3 To encode the two marks, let \(L=XC^2BT\) code a red edge off the leftmost spine. Read the path down that spine to the first vertex where the marked branch is a later child. Store the preceding spine steps, the nonempty list before the marked branch, the following list, and the marked branch with a chosen vertex in its subtree. Reflection gives the corresponding code for blue. If red has its restriction and blue can be any edge, the code is \[J=C\bigl(XCL+XBCU+X^2C^2LT+X^2C^2(C+B)T^2\bigr). \] The initial \(C\) records the maximal chain along which both marks lie strictly below the first child. At the next vertex the terms record, in order, both marks in the first branch with blue on its edge, both in a shared later branch, red strictly below the first child and blue in a later branch, or distinct branches with red in a later branch. In the last case the list before the earlier mark is arbitrary if blue comes first and nonempty if red comes first. For both restrictions, remove the maximal initial chain of single-child vertices with both marks below them. The code for permutations containing \(321\) is \[G=XH\bigl(2XB(L+J)+XB^2U+X^2C(L+BT)^2+X^2C^3T^2\bigr). \] The initial \(X\) restores the third-row cell and \(H\) stores the chain. The four terms use the first remaining vertex and distinguish a shared first or last branch, a shared interior branch, red's branch before blue's, and blue's branch before red's. In a shared end branch the surviving restriction is on one mark, while the other can be on the branch edge or below it. In the red-before-blue case, \(L+BT\) for each mark distinguishes an end branch subject to its spine restriction from a branch with a nonempty sibling list on the outside. In the blue-before-red case all three sibling lists are arbitrary. For the target, call a point essential if every \(231\) occurrence uses it. From a permutation containing \(231\), descend through the maximum decomposition while the maximum is in no occurrence. At each such step all left values are below all right values, and exactly one side contains occurrences. Store the direction and the maximum with the other subtree in a \(T\)-list. At the stopping maximum \(m\), use the inherited five cases with the following reversible codes. Almost avoiding permutations, §3, Propositions 5–8 The insertion code \(E=X^3C^4T\) inserts a new maximum into a \(231\)-avoider at a gap with an inversion across it. Follow left subtrees while the gap is before the current maximum. At the first maximum before the gap, mark the right-subtree entry immediately after the gap. The same class \(E\) codes a rightmost insertion that creates \(231\). Follow right subtrees while every left-subtree value lies below the insertion threshold, and at the stopping node mark the smallest left-subtree value above that threshold. The latter mark specifies the gap in value ranks. Reflecting the greatest-insertion code across the anti-diagonal of the permutation plot gives the leftmost-insertion code. Its subfamily with inserted value \(2\) is \(D=X^3C^3=X\cdot C\cdot XB\). In the underlying avoider, follow the left spine to its end, where the right subtree must be nonempty. This encodes exactly the insertions of a leading \(2\) that create an occurrence. The five core codes give \[F=T\bigl(E+X^2M^2+XCE+XME+B(E-D)\bigr). \] - Use \(E\) when \(m\) is essential. - If \(m\) is nonessential and all occurrences share their minimum \(b\), delete \(b,m\). The left and right words are independently avoiding and all remaining left values lie below all remaining right values. With \(b\) after at least one right-word entry, use \(X^2M^2\). Mark the smallest left value above \(b\) and the right entry immediately before \(b\) to recover its value rank and position. - If that same \(b\) is the first entry to the right of \(m\), use \(XCE\). The rightmost-insertion code adjoins \(b\) to the left word and must create an occurrence there. The remaining right word is arbitrary. - If \(m\) is nonessential and occurrences have multiple minima, the common essential point \(a\) is the first point of every occurrence using \(m\) and the maximum of the left word. Removing \(a,m\) leaves two avoiding words with all left values below all right values. If restoring \(a\) creates an occurrence in the left word, use \(XME\). The left greatest-insertion code fixes the position of \(a\), and the largest right value below \(a\) fixes its rank among the right values. - If the left word with \(a\) restored avoids \(231\), use \(B(E-D)\). The nonempty left word gives the position of its maximum \(a\). The right word with \(a\) prepended uses the leftmost-insertion code, with at least two right values below \(a\). Thus \(E-D\) means excluding the actual subfamily with inserted value \(2\). The two factors each record a unit for \(a\), accounting for the size of \(a\) and \(m\) together. The injection uses a deterministic signed pairing between \(F\) and the disjoint choice of \(G\) and a complement class \[R=(1+Y)Y^4TH. \] To construct it, use the displayed encoders for the factors and represent \(E-D\) by pairing the excluded insertions of \(E\) with the negative copy of \(D\). For a list class \(S=\operatorname{Seq}(A)\), pair each nonempty list with the negative copy of its first element and remaining list. This identifies \((1-A)S\) with the single empty object by signed cancellation. Use the pairing for the three alphabets defining \(C,T,H\). Set \[P=C^7T^3H,\qquad D_0=(1-Y)^7(1-2Y)^3(1-X). \] Here \(2Y\) uses the two direction labels. Expand \(D_0(F-G-R)\) in the displayed factor and summand order, keeping separate tags for the choices and the ordered factor slots. Match the first available list factors with their corresponding clearing factors, using the list pairing. Replace every remaining \(X\) by the signed expression \(Y-Y^2\). The branch bijection behind this replacement splits a branch with a nonempty child list into its first child branch and its original edge with the remaining children. A branch with an empty child list gives \(X\). After expansion, for each number of \(Y\) factors there are equally many positive and negative expression tags. Pair these in their respective left-to-right expansion orders, carrying the ordered tuple of branches unchanged. Take the product of that pairing with \(P\) and compose using the list pairings of \(PD_0\) with \(1\). Composition glues copies of

Authors

Institutions

Publication Details

Journal
Zenodo (CERN European Organization for Nuclear Research)
Published
2026-12-03
DOI
https://doi.org/10.5281/zenodo.24767036
Primary Topic
Advanced Combinatorial Mathematics
Type
preprint
Controls
|||
ALL TIME
JAN
FEB
MAR
APR
MAY
JUN
JUL
AUG
SEP
OCT
NOV
preprint

A size-preserving injection from almost-321 to almost-231 avoiders

Zixuan He
Zenodo (CERN European Organization for Nuclear Research)
Advanced Combinatorial Mathematics
preprint

A size-preserving injection from almost-321 to almost-231 avoiders

Zixuan He
preprint en

Abstract

Brignall, Ekhad, Smith and Vatter asked for a length-preserving injection from permutations that almost avoid \(321\) to permutations that almost avoid \(231\). A permutation almost avoids a pattern if deleting at most one entry leaves no occurrence of that pattern. An occurrence is a subsequence with the specified relative order. The construction takes the permutation itself as input and works at every finite length, including zero. Its inverse identifies which target permutations are in the image and gives a tree code for every permutation outside it. Almost avoiding permutations, §4, Problem 10, author PDF p. 8 · Journal version, §4, Problem 10 Use \(X\) for one unit of size and \(1\) for a single empty object. Sums of classes are disjoint choices, products are ordered tuples, and a coefficient such as \(2\) supplies two labelled choices. Let \(C\) be the class of plane rooted trees, whose children are ordered and whose size is the number of edges. A branch consists of an edge and the tree below it. With \(\operatorname{Seq}\) denoting finite ordered lists, including the empty list, set \[Y=XC,\qquad C=\operatorname{Seq}(Y),\qquad B=YC,\qquad T=\operatorname{Seq}(\{\mathrm{left},\mathrm{right}\}\times Y),\qquad H=\operatorname{Seq}(X). \] Here \(B\) is a nonempty branch list. In the first-child, next-sibling binary representation, each plane edge is a binary node. A chosen plane vertex corresponds to the empty slot just after its child list. The path to that slot is a \(T\)-list recording each direction and storing the current node and its other subtree. A chosen edge corresponds to choosing its lower vertex. The path then has a left step, and splitting at the first such step gives the code \(M=XC^2T\). For an ordered pair of chosen vertices the code is \(U=T+2XT^3\). The first term records a repeated mark. The second records the path to the branching node, the node itself, the two paths below it and the assignment of marks to sides. For a permutation that contains \(321\) and almost avoids it, the inherited Robinson–Schensted shape characterisation gives two standard tableaux of common shape \((a,b,1)\), with \(a\ge b\ge1\). In each tableau read the row numbers in increasing label order, remove the single \(3\), and record the gap as the number of symbols before it. Read row \(1\) as an upstep and row \(2\) as a downstep. Each remaining word is a path of length \(N=a+b\) that stays at or above its starting height. Join the insertion tableau's path to the recording tableau's path read backwards with upsteps and downsteps interchanged. The result is a Dyck path of semilength \(N\), hence the contour of a plane tree with \(N\) edges. If the initial rise and final fall have lengths \(l\) and \(r\), the two legal gap ranges are \([l+1,N]\) and \([r+1,N]\), with integer endpoints included. Use the first gap as the red edge's index in left-to-right depth-first preorder and the second as the blue edge's index in right-to-left depth-first preorder, both starting at one. These conditions put red off the leftmost spine and blue off the rightmost spine. The marks may coincide. Reading the two indices recovers the gaps and hence both tableaux. For a pure \(321\)-avoider, use the same path construction on its at-most-two-row tableaux and decode the resulting tree by the ordinary maximum decomposition of a \(231\)-avoider. A binary node in that decomposition is the maximum of its word, with all left-subtree values below all right-subtree values. Almost avoiding permutations, §2, Proposition 3 To encode the two marks, let \(L=XC^2BT\) code a red edge off the leftmost spine. Read the path down that spine to the first vertex where the marked branch is a later child. Store the preceding spine steps, the nonempty list before the marked branch, the following list, and the marked branch with a chosen vertex in its subtree. Reflection gives the corresponding code for blue. If red has its restriction and blue can be any edge, the code is \[J=C\bigl(XCL+XBCU+X^2C^2LT+X^2C^2(C+B)T^2\bigr). \] The initial \(C\) records the maximal chain along which both marks lie strictly below the first child. At the next vertex the terms record, in order, both marks in the first branch with blue on its edge, both in a shared later branch, red strictly below the first child and blue in a later branch, or distinct branches with red in a later branch. In the last case the list before the earlier mark is arbitrary if blue comes first and nonempty if red comes first. For both restrictions, remove the maximal initial chain of single-child vertices with both marks below them. The code for permutations containing \(321\) is \[G=XH\bigl(2XB(L+J)+XB^2U+X^2C(L+BT)^2+X^2C^3T^2\bigr). \] The initial \(X\) restores the third-row cell and \(H\) stores the chain. The four terms use the first remaining vertex and distinguish a shared first or last branch, a shared interior branch, red's branch before blue's, and blue's branch before red's. In a shared end branch the surviving restriction is on one mark, while the other can be on the branch edge or below it. In the red-before-blue case, \(L+BT\) for each mark distinguishes an end branch subject to its spine restriction from a branch with a nonempty sibling list on the outside. In the blue-before-red case all three sibling lists are arbitrary. For the target, call a point essential if every \(231\) occurrence uses it. From a permutation containing \(231\), descend through the maximum decomposition while the maximum is in no occurrence. At each such step all left values are below all right values, and exactly one side contains occurrences. Store the direction and the maximum with the other subtree in a \(T\)-list. At the stopping maximum \(m\), use the inherited five cases with the following reversible codes. Almost avoiding permutations, §3, Propositions 5–8 The insertion code \(E=X^3C^4T\) inserts a new maximum into a \(231\)-avoider at a gap with an inversion across it. Follow left subtrees while the gap is before the current maximum. At the first maximum before the gap, mark the right-subtree entry immediately after the gap. The same class \(E\) codes a rightmost insertion that creates \(231\). Follow right subtrees while every left-subtree value lies below the insertion threshold, and at the stopping node mark the smallest left-subtree value above that threshold. The latter mark specifies the gap in value ranks. Reflecting the greatest-insertion code across the anti-diagonal of the permutation plot gives the leftmost-insertion code. Its subfamily with inserted value \(2\) is \(D=X^3C^3=X\cdot C\cdot XB\). In the underlying avoider, follow the left spine to its end, where the right subtree must be nonempty. This encodes exactly the insertions of a leading \(2\) that create an occurrence. The five core codes give \[F=T\bigl(E+X^2M^2+XCE+XME+B(E-D)\bigr). \] - Use \(E\) when \(m\) is essential. - If \(m\) is nonessential and all occurrences share their minimum \(b\), delete \(b,m\). The left and right words are independently avoiding and all remaining left values lie below all remaining right values. With \(b\) after at least one right-word entry, use \(X^2M^2\). Mark the smallest left value above \(b\) and the right entry immediately before \(b\) to recover its value rank and position. - If that same \(b\) is the first entry to the right of \(m\), use \(XCE\). The rightmost-insertion code adjoins \(b\) to the left word and must create an occurrence there. The remaining right word is arbitrary. - If \(m\) is nonessential and occurrences have multiple minima, the common essential point \(a\) is the first point of every occurrence using \(m\) and the maximum of the left word. Removing \(a,m\) leaves two avoiding words with all left values below all right values. If restoring \(a\) creates an occurrence in the left word, use \(XME\). The left greatest-insertion code fixes the position of \(a\), and the largest right value below \(a\) fixes its rank among the right values. - If the left word with \(a\) restored avoids \(231\), use \(B(E-D)\). The nonempty left word gives the position of its maximum \(a\). The right word with \(a\) prepended uses the leftmost-insertion code, with at least two right values below \(a\). Thus \(E-D\) means excluding the actual subfamily with inserted value \(2\). The two factors each record a unit for \(a\), accounting for the size of \(a\) and \(m\) together. The injection uses a deterministic signed pairing between \(F\) and the disjoint choice of \(G\) and a complement class \[R=(1+Y)Y^4TH. \] To construct it, use the displayed encoders for the factors and represent \(E-D\) by pairing the excluded insertions of \(E\) with the negative copy of \(D\). For a list class \(S=\operatorname{Seq}(A)\), pair each nonempty list with the negative copy of its first element and remaining list. This identifies \((1-A)S\) with the single empty object by signed cancellation. Use the pairing for the three alphabets defining \(C,T,H\). Set \[P=C^7T^3H,\qquad D_0=(1-Y)^7(1-2Y)^3(1-X). \] Here \(2Y\) uses the two direction labels. Expand \(D_0(F-G-R)\) in the displayed factor and summand order, keeping separate tags for the choices and the ordered factor slots. Match the first available list factors with their corresponding clearing factors, using the list pairing. Replace every remaining \(X\) by the signed expression \(Y-Y^2\). The branch bijection behind this replacement splits a branch with a nonempty child list into its first child branch and its original edge with the remaining children. A branch with an empty child list gives \(X\). After expansion, for each number of \(Y\) factors there are equally many positive and negative expression tags. Pair these in their respective left-to-right expansion orders, carrying the ordered tuple of branches unchanged. Take the product of that pairing with \(P\) and compose using the list pairings of \(PD_0\) with \(1\). Composition glues copies of

Zenodo (CERN European Organization for Nuclear Research)
University of Glasgow (GB)
Advanced Combinatorial Mathematics
AI Navigator

Ask Laika to Summarize, Analyze, and Connect papers live on the map.

Summarize Papers & Methodologies

Extract key findings, datasets, and comparative methods across publications.

Benchmark Rankings & Visual Analytics

Rank top research institutions, authors, funders, topics, and journals by Field-Weighted Citation Impact (FWCI) and paper volume with instant charts.

Connect Distant Disciplines

Bridge topological clusters on the map to find hidden collaborative intersections.

Laika access coming soon