aa r X i v : . [ m a t h . C O ] S e p Counting Humps in Motzkin paths
Yun Ding and Rosena R. X. Du ∗ Department of Mathematics, East China Normal University500 Dongchuan Road, Shanghai, 200241, P. R. China.August 20, 2011
Abstract.
In this paper we study the number of humps (peaks) in Dyck, Motzkin and Schr¨oderpaths. Recently A. Regev noticed that the number of peaks in all Dyck paths of order n is onehalf of the number of super Dyck paths of order n . He also computed the number of humps inMotzkin paths and found a similar relation, and asked for bijective proofs. We give a bijectionand prove these results. Using this bijection we also give a new proof that the number of Dyckpaths of order n with k peaks is the Narayana number. By double counting super Schr¨oderpaths, we also get an identity involving products of binomial coefficients. Keywords : Dyck paths, Motzkin paths, Schr¨oder paths, humps, peaks, Narayana number.
AMS Classification: A Dyck path of order (semilength) n is a lattice path in Z × Z , from (0 ,
0) to (2 n, ,
1) (denoted by U ) and down-steps (1 , −
1) (denoted by D ) and never going belowthe x -axis. We use D n to denote the set of Dyck paths of order n . It is well known that D n iscounted by the n -th Catalan number (A000108 in [8]) C n = 1 n + 1 (cid:18) nn (cid:19) . A peak in a Dyck path is two consecutive steps U D . It is also well known (see, for example,[1, 4, 11]) that the number of Dyck paths of order n with k peaks is the Narayana number (A001263): N ( n, k ) = 1 n (cid:18) nk (cid:19)(cid:18) nk − (cid:19) . ∗ Email: [email protected]. n . Bysumming over the above formula over k we immediately get the following result: the totalnumber of peaks in all Dyck paths of order n is pd n = n X k =1 kN ( n, k ) = (cid:18) n − n (cid:19) . If we allow a Dyck path to go bellow the x -axis, we get a super Dyck path . Let SD n denotethe set of super Dyck paths of order n . By standard arguments we have sd n = SD n = (cid:18) nn (cid:19) = 2 (cid:18) n − n (cid:19) = 2 pd n , (1.1)That is, the number of super Dyck paths of order n is twice the number of peaks in all Dyckpaths of order n . This curious relation was first noticed by Regev [7], who also noticed thatsimilar relation holds for Motzkin paths, which we will explain next.A Motzkin path of order n is a lattice path in Z × Z , from (0 ,
0) to ( n, , , −
1) and flat-steps (1 ,
0) (denoted by F ) that never goes below the x -axis.Let M n denote all the Motzkin paths of order n . The cardinality of M n is the n -th Motzkinnumber m n (A001006), which satisfies the following recurrence relation m = 1 , m = 1 , m n = m n − + n X i =2 m i − m n − i , f or n ≥ , and have generating function X n ≥ m n x n = 1 − x − √ − x − x x . A hump in a Motzkin path is an up step followed by zero or more flat steps followed by adown step. We use hm n to denote the total number of humps in all Motzkin paths of order n . We can similarly define super Motzkin paths to be Motzkin paths that are allowed to gobelow the x -axis, and use SM n to denote the set of super Motzkin paths of order n . Using arecurrence relation and the WZ method [6, 12], Regev ([7]) proved that sm n = SM n = X j ≥ (cid:18) nj (cid:19)(cid:18) n − jj (cid:19) = 2 hm n + 1 (1.2)and asked for a bijective proof of (1.1) and (1.2). The main result of this paper is such abijective proof.Let SM UUn ( k ) ( SM UDn ( k )) denote the set of paths in SM n with k peaks and the firstnon-flat step is U , and the last non-flat step is U ( D ). Let SM U ∗ n denote all paths in SM n whose first non-flat step is U , and define HM n = { ( M, P ) | M ∈ M n , P is a hump of M } . The main result of this paper is the following:2 heorem 1.1
There is a bijection
Φ : HM n → SM U ∗ n such that if ( M, P ) ∈ HM n and L = Φ( M, P ) , then there are k humps in M if and only if L ∈ SM UUn ( k − ∪ SM UDn ( k ) . The outline of the paper is as follows. In Section 2 we define the bijection Φ and proveTheorem 1.1. In section 3 we apply Φ to Dyck paths and give a new proof of the Narayananumbers. In section 4 we apply Φ to Schr¨oder paths and get an identity involving products ofbinomial coefficients by double counting super Schr¨oder paths whose F steps are m -colored. Φ : HM n ↔ S M U ∗ n Note that a Motzkin path M of order n can also be considered as a sequence M = M M · · · M n , with M i ∈ { U, F, D } , and the number of U ’s is not less than the number of D ’s in every subse-quence M M · · · M k of M . Hence a hump in M is a subsequence P = M i M i +1 · · · M i + k +1 , k ≥
0, such that M i = U , M i +1 = M i +2 = · · · = M i + k = F and M i + k +1 = D . We call the endpoint of step M i a hump point , and will also denoted as P . Similarly, if there exists i such that M i = D , M i +1 = M i +2 = · · · = M i + k = F, k ≥ M i + k +1 = U , then we call the subsequence M i M i +1 · · · M i + k +1 a valley of M , and the end point of M i + k is called a valley point . The endpoint ( n,
0) of M is also considered as a valley point.Suppose L is a path in Z × Z from O (0 ,
0) to N ( n, A a lattice point on M , we use x A and y A to denote the x -coordinate and y -coordinate of A , respectively. The sub-path of L from point A to point B is denoted by L AB . We use ¯ L to denote the lattice path obtained from L by interchanging all the up-steps and down-steps in L , and keep the flat-steps unchanged.Now we are ready to define the map Φ and prove Theorem 1.1. Proof of Theorem 1.1 :(1) The map Φ : HM n → SM U ∗ n .For any ( M, P ) ∈ HM n , we define L = Φ( M, P ) by the following rules: • Let C be the leftmost valley point in M such that x C > x P ; • Let B be the rightmost point in M such that x B < x P , y B = y C ; • Let A be the rightmost point in M such that y A = 0 , x A ≤ x B ; • Set L = M OA , L = M AB , L = M BC , L = M CN (Note that L , L and L may beempty); • Define L = Φ( M, P ) = L L L L .Now we will prove that L ∈ SM U ∗ n . According to the above definition, L and L areboth Motzkin paths, therefore U = D in L and L . And for L , we have U − D = y B − y A = y B = y C , for L , U − D = − y C . Therefore the total number of U ’s is as muchas that of D ’s in L . Thus L is a super Motzkin path of order n . Moreover, the first non-flatstep in L must be in L (when L is not empty) or in L (when L is empty), and L , L are3oth Motzkin paths, hence the first step leaving the x -axis must be a U . Therefore we provedthat L = Φ( M, P ) ∈ SM U ∗ n .(2) The inverse of Φ.For any L ∈ SM U ∗ n , we define Ψ by the following rules: • Let B be the leftmost point such that y B = 0, and L goes below the x -axis after B . (Ifsuch a point does not exist, then set B = N ); • Let A be the rightmost point in L such that x A < x B , y A = 0; • Let C be the rightmost point in L such that x C ≥ x B , and ∀ G , x G ≥ x B implies that y C ≥ y G ; • Let P be the rightmost hump point in L such that x P < x B ; • Set L = L OA , L = L AB , L = L BC , L = L CN (Note that L , L and L may beempty); • Set M = L L L L , and Ψ( L ) = ( M, P ).Now we prove that Ψ = Φ − . Since C is the highest point in L , and L and L aresymmetric with respect to the line y = y C , C is mapped to the lowest point in L . Moreover, L and L are both Motzkin paths, then L L L does not go below the x -axis, and the y -coordinate of the end point of L L L is y C . In L , the end point is the lowest point, andthe start point of L is y C higher than the end point. So M = L L L L ends on the x -axisand never goes below it, i.e., M ∈ M n . Thus Ψ( L ) ∈ HM n , and it is not hard to see thatΨ = Φ − .(3) There are k humps in M if and only if Φ( M, P ) ∈ SM UDn ( k ) ∪ SM UUn ( k − . Since Φ( M ) = L L L L = L , the number of humps changes only in sub-paths L and L when M is converted to L . If the last step of L is U , then the last step in L becomes D . Thenumber of humps in L is the same as the number of humps in L , and the number of humpsin L is 1 less than the number of humps in L . The last step in L is U step, so concatenating L with L yields a new hump. Therefore the total number of humps in L is the same as in M . Thus we have Φ( M, P ) ∈ SM UDn ( k ) . If the last step in L is D , then the last step in L is U . The number of humps in L is 1less than the number of humps in L , and the humps in L is 1 less than the number of humpsin L . Moreover, the last step in L is U , so concatenating L with L yields a new hump.Therefore the total number of humps in L is 1 less than the number humps in M . Thus wehave Φ( M, P ) ∈ SM UUn ( k − . As an example, Figure 1 shows a Motzkin path M ∈ M with a circled hump point P ,and Figure 2 shows a super Motzkin path L ∈ SM U ∗ = Φ( M, P ).From Theorem 1.1 we can easily get the following result.4 r r r r r r r r r s r r r r r r r r r r r s r r❞ r r r r s r r r r r r r r r r r s ✲ ✲ ✲✛ ✛ ✛✲✛ L L L L (cid:0) (cid:0)(cid:0)❅❅❅ (cid:0)(cid:0)(cid:0)(cid:0)(cid:0)❅ ❅❅❅(cid:0) (cid:0)(cid:0) ❅ ❅ (cid:0) ❅❅❅(cid:0)(cid:0)(cid:0)❅❅❅ O A NB P CFigure 1: A Motzkin path M ∈ M with a circled hump point P . s r r r r r r r r r s r r r r r r s r r r r r r r r r r r s r r r r r r r r r r r s ✲ ✲ ✲✛ ✛ ✛✲✛ L L L L (cid:0) (cid:0)(cid:0)❅❅❅ (cid:0)(cid:0) ❅ ❅ ❅ (cid:0)(cid:0)(cid:0)❅❅❅(cid:0)(cid:0)(cid:0) ❅❅❅❅❅(cid:0) (cid:0)(cid:0)(cid:0)❅ O A NBP CFigure 2: A super Motzkin path L = Φ( M, P ). Corollary 2.2
For all n ≥ , we have sm n = 2 hm n + 1 , (2.1) and hm n = 12 X j ≥ (cid:18) nj (cid:19)(cid:18) n − jj (cid:19) − . (2.2) Proof.
Equation (2.1) follows immediately from Theorem 1.1. To prove (2.2) we count superMotzkin paths with j U steps. We can first choose the j U steps among the total n steps, thenchoose j steps as D steps among the remaining n − j steps. Thus we have sm n = X j ≥ (cid:18) nj (cid:19)(cid:18) n − jj (cid:19) . Combine with equation (2.1) we get equation (2.2).
Note that when restricted to Dyck paths, Φ is a bijection between super Dyck paths and peaksin Dyck paths. Therefore we have the following result.
Corollary 3.3
For all n ≥ , we have sd n = 2 pd n , and pd n = (cid:18) n − n (cid:19) . Lemma 3.4
Let SD UDn ( k ) ( SD UUn ( k ) ) denote the set of super Dyck paths of order n with k peaks whose first step is U and last step is D ( U ), then we have SD UDn ( k ) = (cid:18) n − k − (cid:19) , (3.1) SD UUn ( k ) = (cid:18) n − k − (cid:19)(cid:18) n − k (cid:19) , (3.2) and the number of super Dyck paths with k peaks of order n is (cid:0) nk (cid:1) . Proof.
Each L ∈ SD UDn ( k ) can be written uniquely as a word L = U x D y U x D y · · · U x k D y k ,such that ( x + x + · · · + x k = n, x , x , · · · , x k ≥ ,y + y + · · · + y k = n, y , y , · · · , y k ≥ . The number of solutions for the x i ’s and for the y i ’s both equal to (cid:0) n − k + k − k − (cid:1) = (cid:0) n − k − (cid:1) . Henceequation (3.1) is proved.Each L ′ ∈ SD UUn ( k ) can be written uniquely as a word L ′ = U x D y U x D y · · · U x k D y k U x k +1 ,such that ( x + x + · · · + x k + x k +1 = n, x , x , · · · , x k +1 ≥ y + y + · · · + y k = n, y , y , · · · , y k ≥ (cid:0) n − k + k +1 − k (cid:1) = (cid:0) nk (cid:1) solutions for the x i ’s and (cid:0) n − k − (cid:1) solutions for the y i ’s. Henceequation (3.2) is proved.From (3.1) and (3.2) we have that the number of super Dyck paths with k peaks of order n is (cid:18) n − k − (cid:19) + (cid:18) n − k (cid:19) + 2 (cid:18) n − k − (cid:19)(cid:18) n − k (cid:19) = (cid:18) nk (cid:19) . Corollary 3.5
The number of Dyck paths of order n with k peaks is: N ( n, k ) = 1 n (cid:18) nk (cid:19)(cid:18) nk − (cid:19) . Proof.
From theorem 1.1 we know that each Dyck path of order n with k peaks is mappedto k super Dyck paths, and each of the k super Dyck paths is either in SD UUn ( k −
1) or in SD UDn ( k ). Therefore we have kN ( n, k ) = SD UUn ( k −
1) + SD UDn ( k ) . From Proposition 3.4we can conclude that N ( n, k ) = 1 k (cid:18) n − k − (cid:19) + (cid:18) n − k − (cid:19)(cid:18) n − k − (cid:19)! = 1 n (cid:18) nk (cid:19)(cid:18) nk − (cid:19) . Bijective proof of this result can also be found in [11, Exercise 6.36(a)].6
Humps in Schr¨oder paths
In this section we count the number of humps in a third kind of lattice paths: Schr¨oder paths.A
Schr¨oder path of order n is a lattice path in Z × Z , from (0 ,
0) to ( n, n ), using up-steps (0 , ,
0) and flat-steps (1 ,
1) (denoted by U , D , F , respectively) and never going belowthe line y = x . Note that Schr¨oder paths are different from rotating Motzkin paths 45 degreescounterclockwise, since the F steps in these two kinds of paths are different. However, thebijection Φ still works when counting humps in Schr¨oder paths. Let ss n denote the number ofsuper Schr¨oder paths of order n , and hs n denote the number of humps in all Schr¨oder pathsof order n . We have the following result. Corollary 4.6
For all n ≥ , we have ss n = 2 hs n + 1 , (4.1) and hs n = 12 n X k =0 (cid:18) n + k k (cid:19)(cid:18) kk (cid:19) − ! . (4.2) Proof.
Apply the bijection Φ to Schr¨oder paths we immediately get (4.1). Next we will count ss n . Let L be a super Schr¨oder path of order n with k humps, then there are k U steps, k D steps, and n − k F steps in L . We can first choose a super Dyck path of order k andthen “insert” n − k F steps to get L . There are (cid:0) kk (cid:1) ways to choose a super Dyck paths, and (cid:0) n − k +2 k +1 − k (cid:1) = (cid:0) n + k k (cid:1) ways for the insertion. Therefore we have ss n = n X k =0 (cid:18) n + k k (cid:19)(cid:18) kk (cid:19) . From the above formula and (4.1) we get (4.2).The above proof inspired us to get the following identity, which is listed as an exercise in[9, Exercise 3(g) of Chapter 1].
Corollary 4.7
For all n ≥ , we have n X k =0 (cid:18) nk (cid:19) ( m + 1) k = n X k =0 (cid:18) n + k k (cid:19)(cid:18) kk (cid:19) m n − k . (4.3) Proof.
We will first prove (4.3) m = 1. From the proof of Corollary 4.6 we know that the righthand side of (4.3) is the number of super Schr¨oder paths of order n when m = 1 . Now wecount ss n with a different method to obtain the left hand. Let L be a super Dyck path of order n with k peaks, for each peak of L , we can either keep it invariant or change it into a F stepto we get two super Schr¨oder paths. Hence each L is mapped to 2 k super Schr¨oder paths, thusthe left hand side of (4.3) when m = 1 also equals ss n . Therefore we proved (4.3) for m = 1.For general m we count the number of super Schr¨oder paths in which the F steps are m -colored. Now every super Dyck path with k peaks is mapped to ( m +1) k colored super Schr¨oder7aths. So the total number of such path is P nk =0 (cid:0) nk (cid:1) ( m + 1) k . On the other hand, from theproof of Theorem 4.6 we know that the right hand side of (4.3) also counts the number of suchpaths, hence we proved (4.3). Acknowledgments.
This work is partially supported by the National Science Foundation ofChina under Grant No. 10801053, Shanghai Rising-Star Program (No. 10QA1401900), andthe Fundamental Research Funds for the Central Universities.
References [1] E. Deutsch,
Dyck path enumeration , Discrete Math. 204 (1999), no. 1-3, 16–202.[2] T. Mansour,
Counting Peaks at Height k in a Dyck Path , Journal of Integer Sequences, Vol. 5(2002), Article 02.1.1.[3] T. Mansour, Statistics on Dyck Paths , Journal of Integer Sequences, Vol. 9:1 (2006), Article 06.1.5.[4] T.V. Narayana,
A partial order and its applications to probability , Sankhya 21 (1959) 91–98.[5] P. Peart and W. Woan,
Dyck Paths With No Peaks At Height k , Journal of Integer Sequences, Vol.4 (2001), Article 01.1.3.[6] M. Petkovesk, H. S. Wilf and D. Zeilberger, em A=B, AK Peters Ltd. (1996)[7] A. Regev, Humps for Dyck and for Motzkin paths , arXiv: 1002. 4504 v1 [math. CO] 24 Feb 2010.[8] N. J. A. Sloane,
Online Encyclopedia of Integer Sequence ∼ rstan/ec/ec1.pdf, 2011.[10] R. P. Stanley, Enumerative Combinatorics , vol. 1, Cambridge Studies in Advanced Mathematics,vol. 49, Cambridge University Press, Cambridge, 1997.[11] R. P. Stanley,
Enumerative Combinatorics , vol. 2, Cambridge Studies in Advanced Mathematics,vol. 62, Cambridge University Press, Cambridge, 1999.[12] D. Zeilberger,
The method of creative telescoping , J. Symbolic Computation, 11 (1991) 195–204., J. Symbolic Computation, 11 (1991) 195–204.