A bijection between two subfamilies of Motzkin paths
aa r X i v : . [ m a t h . C O ] J u l A BIJECTION BETWEEN TWO SUBFAMILIES OF MOTZKINPATHS
NANCY S.S. GU AND HELMUT PRODINGER
Abstract.
Two subfamilies of Motzkin paths, with the same numbers of up, down,horizontal steps were known to be equinumerous with ternary trees and related ob-jects. We construct a bijection between these two families that does not use anyauxiliary objects, like ternary trees. Introduction
Motzkin paths are similar to Dyck paths, but allow also horizontal steps of unitlength. In this note, we concentrate on two subfamilies, where there are n up steps( u ), n down steps ( d ), and n horizontal steps ( h ). Both families are enumerated by1 + z + 3 z + 12 z + 55 z + 273 z + · · · , and the coefficients also enumerate ternary trees and many other objects, see sequenceA001764 in [2].The first family originates from Asinowski and Mansour [1]. They start from a Dyckpath of length 2 n and label each maximal sequence of up steps by a Dyck path. If wesay replace instead of label and use the steps h and u for the replaced sequence, wehave a Motzkin path with n horizontal steps. To clarify, we give a list of all 12 suchpaths of length 9:The second family was introduced to model frog hops from a question in a student’solympiad [3]: They were called S-Motzkin paths, have the same number of u , d , h ,and when deleting the down steps, the sequence must look like huhuhu . . . hu . Here isagain a list of all 12 objects of length 9:These paths and some of their properties were investigated in the recent paper [4]. Date : July 7, 2020.2010
Mathematics Subject Classification.
Key words and phrases.
Motzkin paths, bijections, ternary trees.
The goal of the present note is to describe a bijection between the two families,which operates strictly on the paths themselves, without involving any other objectsthat are equinumerous.Instead of drawing pictures, we use the more economical description with the letters u, d, h , and we always consider the paths from left to right.2.
From paths of the Asinowski/Mansour type to S-Motzkin paths
From paths given by Asinowski and Mansour, let A D A D . . . A t − D t denote apath where A i ( i = 0 , , . . . , t −
1) denotes a sub-path consisting of horizontal and upsteps, and D i ( i = 1 , , . . . , t ) denotes a sub-path consisting of consecutive down steps.Let d i ( i = 1 , , . . . , t ) denote the number of steps of D i . For completeness, we mentionthat all A i and D i are non-empty.First, we replace horizontal steps and up steps by up steps and down steps, respec-tively, in A i to get a Dyck path A i . Then for each A i , we insert horizontal steps intoit to form an S-Motzkin path A ′ i such that each horizontal step is in the first positionthat can be inserted from left to right. Observe that in A ′ i , there are no two horizontalsteps on the same height such that all the steps between these two steps are abovethat height, and each up step except for the last one must be followed (eventually) bya horizontal step.These canonically obtained S-Motzkin paths are the building stones of the finalobject, and the numbers d , d , . . . , d t − are used to tell us how to glue them together.Notice also that the number d t will not be used for the construction.Let u i denote the number of up steps of A ′ i . Notice that i X k =1 d k ≤ i − X k =0 u k (1 ≤ i ≤ t − , (2.1) t X k =1 d k = t − X k =0 u k . (2.2)First, we draw A ′ . Then according to d , d , . . . , d t − , we insert A , A , . . . , A t inturn. If d < u , then from the beginning of A ′ , find the d -th up step and insert A ′ behind it. If d = u , then insert A ′ behind the last step of A ′ .Assume that we have inserted A i − (1 ≤ i ≤ t − A ′ i − , find the d i -th up step. Notice that if d i < u i − , then the d i -th up step belongsto A ′ i − and is not the last up step of A ′ i − . We insert A ′ i behind this d i -th up step. If d i = u i − , then insert A ′ i behind the end of A ′ i − . If d i > u i − , then the d i -th up stepmay belong to A ′ , A ′ , . . . , or A ′ i − . This time, if this step is not any last up step of A ′ , A ′ , . . . , or A ′ i − , we insert A ′ i behind it. Otherwise, if this step is the last up step of A ′ s ( s ∈ { , , . . . , i − } ), then we put A ′ i behind A ′ s . Note that (2.1) and (2.2) ensurethat we can always find the aimed up step.Finally, we get an S-Motzkin path until we have inserted all A ′ i ( i = 0 , , . . . , t − BIJECTION BETWEEN TWO SUBFAMILIES OF MOTZKIN PATHS 3 From S-Motzkin paths to paths of the Asinowski/Mansour type
For an S-Motzkin path P , from left to right, we check the horizontal steps in turn.For a given horizontal step h i , look along the path from h i . If there is a closest horizontalstep on the same height and all the steps between these two steps denoted by P i arenot below this height, then h i P i is an S-Motzkin path. We call h i a paired horizontalstep. For the first horizontal step of the S-Motzkin path P , no matter whether it ispaired or not, we always call it a paired horizontal step denoted by h . If there are noother horizontal steps on height 0, then P = h P . Let h , h , . . . , h t − denote thesepaired horizontal steps of P .If there are no paired horizontal steps in P i , then h i P i is an S-Motzkin sub-pathwith all the horizontal steps located in their first positions. We assume h i P i as A ′ i .Back to the S-Motzkin path P , if the up step just before h i is the d i -th up step whenwe are counting from the beginning of A ′ i − , then we record d i . Then in the S-Motzkinpath P , we find the next paired horizontal step behind h i , and repeat the process.If there is a paired horizontal step h i +1 in P i , then we use h i +1 to find A ′ i +1 . Notethat now A ′ i contains the steps of h i P i without those steps in A ′ i +1 .In view of all the paired horizontal steps, and using the above method, we canidentify all A ′ i ( i = 0 , , . . . , t −
1) and d i ( i = 1 , , . . . , t − A ′ i (0 ≤ i ≤ t − A i . Let D i (1 ≤ i ≤ t −
1) be the sub-path consisting of d i consecutive down steps. Then we draw a path A D A D A . . . D t − A t − , and add enough consecutive down steps after it to form aMotzkin path given by Asinowski and Mansour.4. A detailed example
We consider a path given by Asinowski and Mansour hhhuuu d hhuuhu d hu dd hhuu ddddd . Then we can divide the paths into four parts A , A , A and A by using the consecutivedown steps which are in bold. Set A = hhhuuu, A = hhuuhu, A = hu, A = hhuu,d = 1 , d = 1 , d = 2 , d = 5 . In fact, we do not need d in the bijection.First, replacing horizontal steps and up steps by up steps and down steps, respec-tively, in A i ( i = 0 , , , A = uuuddd, A = uuddud, A = ud, A = uudd. Then inserting horizontal steps in A i ( i = 0 , , ,
3) in the first possible positions, weget A ′ = huhuhuddd, A ′ = huhuhddud, A ′ = hud, A ′ = huhudd. N.S.S. GU AND H. PRODINGER
Since d = 1, we find the first up step in A ′ . Then inserting A ′ behind this step, weobtain hu huhuhddud huhuddd. For the above path, since d = 1, we find the first up step from the beginning of A ′ .That is to say, deleting the first two steps in the above path, we get a sub-path. Forthis sub-path, we find the d -th up step, and then insert A ′ . Let u be the number ofup steps of A ′ . Note that if d < u , then A ′ is inserted in A ′ . If d = u , then put A ′ just behind A ′ . If d > u , then A is inserted between two steps of A ′ . Back tothis example, we have d < u . So huhu hud huhddudhuhuddd. For the above path, since d = 2, we find the second up step from the beginning of A ′ . That is to say, deleting the first four steps in the above path yields a sub-path. Inthis sub-path, we find the second up step. In this example, d > u , and the secondup step is not the last up step of A ′ or A ′ . So we insert A ′ behind the second up stepdirectly. we have huhuhudhu huhudd hddudhuhuddd which is an S-Motzkin path.Inversely, for the S-Motzkin path huhuhudhuhuhuddhddudhuhuddd, we can find the paired horizontal steps as follows: h u h u h udhu h uhuddhddudhuhuddd. The first horizontal step must be a paired horizontal step although there is no otherhorizontal step on level 0. We mark it as(¯ huhuhudhuhuhuddhddudhuhuddd ) . Here we use a pair of parentheses to identify A ′ .Then we find the next pair of horizontal steps(¯ hu (ˇ huhudhuhuhuddhddud )ˇ huhuddd ) . So we have d = 1, and we use a pair of parentheses to identify A ′ from A ′ .Next, we have (¯ hu (ˇ hu (ˆ hud )ˆ huhuhuddhddud )ˇ huhuddd )and d = 1. We add a pair of parentheses to identify A ′ .Finally, we obtain (¯ hu (ˇ hu (ˆ hud )ˆ hu ( ˙ huhudd ) ˙ hddud )ˇ huhuddd )and d = 2 where we use a pair of parentheses to identify A ′ .Therefore, we have A ′ = huhuhuddd, A ′ = huhuhddud, A ′ = hud, A ′ = huhudd,d = 1 , d = 1 , d = 2 . BIJECTION BETWEEN TWO SUBFAMILIES OF MOTZKIN PATHS 5
Deleting all the horizontal steps in A ′ , A ′ , A ′ and A ′ , and then replacing up anddown steps by horizontal and up steps, respectively, we obtain A = hhhuuu, A = hhuuhu, A = hu, A = hhuu. Combining A i ( i = 0 , , ,
3) and d i ( i = 1 , , hhhuuu d hhuuhu d hu dd hhuu. Finally, we add enough down steps at the end of the above path to form a Motzkinpath given by Asinowski and Mansour: hhhuuu d hhuuhu d hu dd hhuu ddddd . The objects of length 9 matched
For the reader’s convenience, we provide the correspondence of 12 objects. Thenumber 12 is very convenient; it is not too small and not too large. In [4], there werealso many explicit lists with 12 objects each.No. AM-paths AM-paths dec. S-Motzkin paths1 huhuhuddd ududud huhduhdud hhuuhuddd uuddud huhuhddud huhhuuddd uduudd huhduhudd hhuhuuddd uududd huhuhdudd hhhuuuddd uuuddd huhuhuddd huhuddhud udud ud huhdudhud hhuuddhud uudd ud huhuddhud hudhhuudd ud uudd hudhuhudd hudhuhudd ud udud hudhuhdud hhuudhudd uudd ud huhudhudd huhudhudd udud ud huhudhdud hudhudhud ud ud ud hudhudhud Table 1.
Paths from Asinowski and Mansour, also decomposed, andthe corrresponding S-Motzkin paths.
Acknowledgements:
This work was supported by the National Natural Science Foun-dation of China and the Fundamental Research Funds for the Central Universities(Nankai University).
N.S.S. GU AND H. PRODINGER
References [1] A. Asinowski and T. Mansour. Dyck paths with coloured ascents.
European Journal of Combina-torics , 29 (2008), 1262–1279.[2] The online encyclopedia of integer sequences. http://oeis.org.[3] F. Petrov and A. Vershik. International Mathematics Competition: Day 2 Problem 8, 2018. http://imc-math.ddns.net/pdf/imc2018-day2-questions.pdf.[4] H. Prodinger, S. J. Selkirk, and S. Wagner. On two subclasses of Motzkin paths and their relationto ternary trees. In V. Pillwein and C. Schneider, editor,
Algorithmic Combinatorics – EnumerativeCombinatorics, Special Functions and Computer Algebra . Springer, Austria, 2020.(N.S.S. Gu)
Center for Combinatorics, LPMC, Nankai University, Tianjin 300071,P.R. China
E-mail address : [email protected] (H. Prodinger) Department of Mathematics, University of Stellenbosch, 7602 Stel-lenbosch, South Africa
E-mail address ::