Pairing two ordered forests gives the Baril–Barry bijection

Baril and Barry proved that two families of lattice paths have the same number of members at each size and asked for an explicit bijection. The construction below answers their question for every integer \(n\geq 0\), including the empty path. It converts both families to ordered rooted trees and uses a reversible rearrangement of a forest to match their different branching rules. Baril and Barry, §2.1, p. 6, Corollary 2.3 and the question immediately following it. A first-kind Motzkin excursion with air pockets starts and ends at height zero, stays at nonnegative height and uses steps \(U=(1,1)\), \(H=(1,0)\) and \(D_k=(1,-k)\) for integers \(k\geq 1\). Down steps cannot be consecutive, and each step counts once towards the length \(n\). The corresponding Dyck path stays at nonnegative height and has \(n\) unit up steps and \(n\) unit down steps. It excludes maximal runs of exactly two up steps whose starting height is odd. To encode the excursion as a tree, reverse its sequence of vertical increments, negate them and append \(-1\). Read each resulting increment \(d-1\) as the number \(d\) of children of the next vertex in preorder, beginning with the root and visiting children from left to right. This gives an ordered tree with \(n\) edges in the class \(\mathcal A\), where the first child of every vertex with at least two children is a leaf or has exactly one child. In reverse, record the preorder child counts minus one, discard the final \(-1\), then reverse and negate the remaining increments. For the Dyck path, use the tree contour, stepping up when entering a child and down when returning to its parent. To recover the tree from the contour, create a new last child on each up step and return to its parent on each down step. The root has depth zero. A maximal ascent starts on the first edge from the root or on the edge to a nonfirst child, then follows first children until it reaches a leaf. Thus the restriction forbids an odd-depth vertex from having a nonfirst child whose own first child is a leaf. Let \(\mathcal E\) be the class of subtrees obeying this rule with an even-depth root, using the corresponding depth parities throughout each subtree. Let \(\mathcal G\subseteq\mathcal E\) consist of leaves and trees whose first child is nonleaf. Every nonfirst child of an odd-depth vertex must belong to \(\mathcal G\). Write \(z\) for one edge, \(1\) for the empty datum, \(\sqcup\) for disjoint union and \(\operatorname{Seq}\) for a finite ordered list, which may be empty. Products retain the order of their factors. With \(\mathcal S=\operatorname{Seq}(z\mathcal G)\), the size-preserving correspondence at the centre of the construction is \[(1\sqcup z\mathcal E)\operatorname{Seq}(z\mathcal E) \longleftrightarrow \mathcal E\mathcal S. \] Its input is an optional even tree \(b\) with one accompanying edge and a list \(L\) of even trees with one attachment edge per item. Split \(L\) as \(S_0,B_1,S_1,\ldots,B_r,S_r\), where the \(S_i\) are runs of items in \(\mathcal G\) and each \(B_i\) has an odd leaf as its first child. Delete that leaf and its edge from \(B_i\), leaving an even tree \(R_i\). Start an even output tree as a leaf if \(b\) is absent. If \(b\) is present, use its tree and prepend an odd leaf with the accompanying edge. For \(i=r,r-1,\ldots,1\), prepend an odd child to the output root, giving that child \(R_i\) as its first child and \(S_i\) as its remaining children. The two new connecting edges come from the list attachment of \(B_i\) and its deleted leaf edge. The output is the resulting even tree together with \(S_0\). To undo this operation, repeatedly remove the first child of the even output root while that child is nonleaf. Each removal gives \(R_i\) as the odd child's first child and \(S_i\) as its remaining children, in increasing order of \(i\). Prepend an odd leaf to each \(R_i\) to recover \(B_i\) and restore its list attachment. Assemble \(L\) from \(S_0\) and the recovered pairs \(B_i,S_i\). The tree left at the end is either a leaf, giving absent \(b\), or has a first child that is an odd leaf. In the latter case, delete that leaf to recover the tree and edge in \(b\). The map from \(\mathcal A\) to \(\mathcal E\) sends a leaf to a leaf. For a root with one child, map the child recursively and prepend an odd leaf at the resulting root. At a branching root, map the second child to an even tree \(Q\). Take \(b\) absent if the first child is a leaf. If the first child has one child of its own, map that subtree to the tree in \(b\), using its connecting edge as the accompanying edge. Map the children after the second to \(L\), keeping their order and attachment edges. Apply the forest correspondence to \((b,L)\) to obtain \((R,S)\). Prepend to \(Q\) an odd child whose first child is \(R\) and whose remaining children are \(S\), using the two edges from the source root to its first and second children. In the reverse map, a leaf gives a leaf and an even root whose first child is a leaf gives a source root with one child, recovered recursively from the tree left after deleting that leaf. If the first odd child is nonleaf, detach it to recover \(Q\), read its first child as \(R\) and its remaining children as \(S\), and undo the forest operation. Recursively invert \(Q\) for the second source child, use \(b\) to restore the first source child as a leaf or a vertex with one child, and invert the trees in \(L\) for the later source children. The recursive calls use fewer edges and the map preserves the total edge count. The two path encodings therefore give a direct conversion in either direction at the same size.

Authors

Institutions

Publication Details

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

Pairing two ordered forests gives the Baril–Barry bijection

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

Pairing two ordered forests gives the Baril–Barry bijection

Zixuan He
preprint en

Abstract

Baril and Barry proved that two families of lattice paths have the same number of members at each size and asked for an explicit bijection. The construction below answers their question for every integer \(n\geq 0\), including the empty path. It converts both families to ordered rooted trees and uses a reversible rearrangement of a forest to match their different branching rules. Baril and Barry, §2.1, p. 6, Corollary 2.3 and the question immediately following it. A first-kind Motzkin excursion with air pockets starts and ends at height zero, stays at nonnegative height and uses steps \(U=(1,1)\), \(H=(1,0)\) and \(D_k=(1,-k)\) for integers \(k\geq 1\). Down steps cannot be consecutive, and each step counts once towards the length \(n\). The corresponding Dyck path stays at nonnegative height and has \(n\) unit up steps and \(n\) unit down steps. It excludes maximal runs of exactly two up steps whose starting height is odd. To encode the excursion as a tree, reverse its sequence of vertical increments, negate them and append \(-1\). Read each resulting increment \(d-1\) as the number \(d\) of children of the next vertex in preorder, beginning with the root and visiting children from left to right. This gives an ordered tree with \(n\) edges in the class \(\mathcal A\), where the first child of every vertex with at least two children is a leaf or has exactly one child. In reverse, record the preorder child counts minus one, discard the final \(-1\), then reverse and negate the remaining increments. For the Dyck path, use the tree contour, stepping up when entering a child and down when returning to its parent. To recover the tree from the contour, create a new last child on each up step and return to its parent on each down step. The root has depth zero. A maximal ascent starts on the first edge from the root or on the edge to a nonfirst child, then follows first children until it reaches a leaf. Thus the restriction forbids an odd-depth vertex from having a nonfirst child whose own first child is a leaf. Let \(\mathcal E\) be the class of subtrees obeying this rule with an even-depth root, using the corresponding depth parities throughout each subtree. Let \(\mathcal G\subseteq\mathcal E\) consist of leaves and trees whose first child is nonleaf. Every nonfirst child of an odd-depth vertex must belong to \(\mathcal G\). Write \(z\) for one edge, \(1\) for the empty datum, \(\sqcup\) for disjoint union and \(\operatorname{Seq}\) for a finite ordered list, which may be empty. Products retain the order of their factors. With \(\mathcal S=\operatorname{Seq}(z\mathcal G)\), the size-preserving correspondence at the centre of the construction is \[(1\sqcup z\mathcal E)\operatorname{Seq}(z\mathcal E) \longleftrightarrow \mathcal E\mathcal S. \] Its input is an optional even tree \(b\) with one accompanying edge and a list \(L\) of even trees with one attachment edge per item. Split \(L\) as \(S_0,B_1,S_1,\ldots,B_r,S_r\), where the \(S_i\) are runs of items in \(\mathcal G\) and each \(B_i\) has an odd leaf as its first child. Delete that leaf and its edge from \(B_i\), leaving an even tree \(R_i\). Start an even output tree as a leaf if \(b\) is absent. If \(b\) is present, use its tree and prepend an odd leaf with the accompanying edge. For \(i=r,r-1,\ldots,1\), prepend an odd child to the output root, giving that child \(R_i\) as its first child and \(S_i\) as its remaining children. The two new connecting edges come from the list attachment of \(B_i\) and its deleted leaf edge. The output is the resulting even tree together with \(S_0\). To undo this operation, repeatedly remove the first child of the even output root while that child is nonleaf. Each removal gives \(R_i\) as the odd child's first child and \(S_i\) as its remaining children, in increasing order of \(i\). Prepend an odd leaf to each \(R_i\) to recover \(B_i\) and restore its list attachment. Assemble \(L\) from \(S_0\) and the recovered pairs \(B_i,S_i\). The tree left at the end is either a leaf, giving absent \(b\), or has a first child that is an odd leaf. In the latter case, delete that leaf to recover the tree and edge in \(b\). The map from \(\mathcal A\) to \(\mathcal E\) sends a leaf to a leaf. For a root with one child, map the child recursively and prepend an odd leaf at the resulting root. At a branching root, map the second child to an even tree \(Q\). Take \(b\) absent if the first child is a leaf. If the first child has one child of its own, map that subtree to the tree in \(b\), using its connecting edge as the accompanying edge. Map the children after the second to \(L\), keeping their order and attachment edges. Apply the forest correspondence to \((b,L)\) to obtain \((R,S)\). Prepend to \(Q\) an odd child whose first child is \(R\) and whose remaining children are \(S\), using the two edges from the source root to its first and second children. In the reverse map, a leaf gives a leaf and an even root whose first child is a leaf gives a source root with one child, recovered recursively from the tree left after deleting that leaf. If the first odd child is nonleaf, detach it to recover \(Q\), read its first child as \(R\) and its remaining children as \(S\), and undo the forest operation. Recursively invert \(Q\) for the second source child, use \(b\) to restore the first source child as a leaf or a vertex with one child, and invert the trees in \(L\) for the later source children. The recursive calls use fewer edges and the map preserves the total edge count. The two path encodings therefore give a direct conversion in either direction at the same size.

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