Enumerating a Class of Lattice Paths
Total Page:16
File Type:pdf, Size:1020Kb
View metadata, citation and similar papers at core.ac.uk brought to you by CORE provided by Elsevier - Publisher Connector Discrete Mathematics 271 (2003) 13–28 www.elsevier.com/locate/disc Enumerating a class oflattice paths Curtis Coker Department of Mathematics, Gonzaga University, Spokane, WA, USA Received 10 February 2000; received in revised form 5 November 2002; accepted 15 November 2002 Abstract Let D0(n) denote the set oflattice paths in the xy-plane that begin at (0,0), terminate at (n; n), never rise above the line y = x and have step set S = {(k; 0) : k ∈ N+}∪{(0;k):k ∈ N+}. Let E0(n) denote the set oflattice paths with step set S that begin at (0,0) and terminate at (n; n). Using primarily the symbolic method (R. Sedgewick, P. Flajolet, An Introduction to the Analysis ofAlgorithms, Addison-Wesley, Reading, MA, 1996) and the Lagrange inversion formulawe study some enumerative problems associated with D0(n) and E0(n). c 2003 Elsevier B.V. All rights reserved. Keywords: Lattice path; Lagrange inversion formula; Narayana number 1. Introduction For any positive integer n let C0(n) denote the set oflattice paths in the xy-plane that: (i) have step set S(1) = {(1; 0); (0; 1)}, (ii) begin at (0,0) and terminate at (n; n), (iii) never rise above the line y = x. 2n It is ofcourse well known that |C0(n)|=[1=(n+1)]( n ). More generally if n ¿ k ¿ 0 n+k then the ballot number [(n − k +1)=(n + 1)]( k ) counts the lattice paths that begin at (0,0), terminate at (n; k), never rise above the line y = x and have step set S(1). The present work originated in an attempt to enumerate the class D0(n) oflattice paths that satisfy conditions (ii) and (iii) and have step set S={(k; 0) : k ∈ N+}∪{(0;k):k ∈ N+}. E-mail address: [email protected] (C. Coker). 0012-365X/03/$ - see front matter c 2003 Elsevier B.V. All rights reserved. doi:10.1016/S0012-365X(03)00037-2 14 C. Coker / Discrete Mathematics 271 (2003) 13–28 Given a subset S of N × N we deÿne a (lattice) path with step set S to be a ÿnite sequence = s1s2 ···sk where si ∈ S for all i. Suppose si =(pi;qi) for each i =1; 2;:::;k.If begins at (p0;q0) then passes sequentially through the lattice points (p0;q0), (p0 + p1;q0 + q1), (p0 + p1 + p2;q0 + q1 + q2), and so on, terminating k k at (p; q) where p = i=0 pi and q = i=0 qi.Byanunderdiagonal path we mean a path in the xy-plane that begins at (0,0) and never rises above the line y = x. For integers n ¿ r ¿ 0 let dn;r denote the number ofunderdiagonal paths that termi- nate at (n; r) and have step set S={(k; 0) : k ∈ N+}∪{(0;k):k ∈ N+}. For any integer k ¿ 0 we denote by Dk the set ofall underdiagonal paths that terminate on the line n x − y = k and have step set S. We deÿne Dk (t)= n¿k dn;n−k t . Here is a summary ofthe paper’s contents. In Section 2 we enumerate paths in D0. In Section 3, we present several recurrences for the generating functions Dk (t). One k−1 ofthese recurrences implies that dk+r;r is divisible by 2 for any integers k¿0 and r ¿ 0. We discuss in Section 4 a second enumeration ofpaths in D0 in terms of Narayana numbers. Interrupting our study of D0 we present in Section 5 an example ofa class ofunderdiagonal paths with unrestricted steps. In Section 6 we enumerate paths in D0 with respect to the number ofsteps. In Section 7 we brieKy study a second class oflattice paths with step set S. 2. Enumerating paths in D0 In this section, we enumerate paths in D0 by ÿrst ÿnding a functional equation satisÿed by D0. To lend concreteness to the exposition let us calculate dn;n for a few small values of n. Ifwe set d0;0 = 1 and initially set all other dn;k to zero, then using k−1 n−k the relation dn;k = j=0 dn;j + j=1 dn−j;k we can generate recursively the following partial array d: dn;k k =01234567 n =0 1 11 1 22 35 34 81729 4 8 20 50 107 185 5 16 48 136 336 721 1257 6 32 112 352 968 2370 5091 8925 7 64 256 880 2640 7116 17304 37185 65445 Our ÿrst goal is to enumerate the sets D0(n); their cardinalities appear along the main diagonal of d. To facilitate our work we introduce another generating function: L for each integer n ¿ 1 let D0(n) denote the set ofpaths in D0(n) that do not intersect L the line y = xexcept at(0,0) and (n; n). Paths in D0(n) are called primitive.Wenow L L n L L deÿne D0(t)= n¿1 dnt where dn=|D0(n)|. Henceforth, we shall often abbreviate dn;n C. Coker / Discrete Mathematics 271 (2003) 13–28 15 by dn. Let J denote the set ofnonempty paths in D0 and let J be the corresponding generating function. Clearly D0 =1+J: (2.1) L We begin with a basic relation between the generating functions D0 and D0. L Lemma 2.1. The generating functions D0 and D0 satisfy L D0 = t +4t(D0 − 1): L n n Proof. We verify that n¿1 dnt = t +4t n¿1 dnt . This is equivalent to showing L that dn =4dn−1 for all n ¿ 2. To prove this we note that any path in D0(n − 1), say L = s1s2s3 ···sk , gives rise to four paths in D0(n). In order to construct these four paths, say 1, 2, 3, 4, let us assume that s1 =(p; 0) for some p ¿ 1 and sk =(0;q) + + for some q ¿ 1. Put s1 =(p +1; 0), sk =(0;q+ 1), e1 =(1; 0) and e2 =(0; 1). Deÿne + + + + 1 = s1 s2s3 ···sk , 2 = s1 s2s3 ···sk e2, 3 = e1s1s2s3 ···sk and 4 = e1s1s2s3 ···sk e2. L Clearly these new paths i belong to D0(n). L In this construction every path in D0(n) arises exactly once from some path in D0(n − 1), as is easily seen by reversing the process. The result now follows. By applying (2.1) we can rewrite the statement ofLemma 2.1 in the form L D0 = t(1+4J): (2.2) L We obtain a further relation between D0 and J by noting that every path in J decom- L poses uniquely into a path in D0 followed by a path in D0 (the ÿrst return decompo- sition). This immediately implies L J = D0(1 + J): (2.3) Eliminating J from (2.1) and (2.3) gives L D0(1 − D0)=1: (2.4) L Eliminating D0 from (2.2) and (2.3) gives J = t(1+4J)(1 + J): (2.5) Eliminating J from (2.1) and (2.5) gives D0 − 1=tD0[1+4(D0 − 1)]. Rearranging terms in this last equation yields 2 4tD0 − (1+3t)D0 +1=0; (2.6) which implies that n−1 dn +3dn−1 =4 dn−k−1dk (2.7) k=0 for all n ¿ 1. 16 C. Coker / Discrete Mathematics 271 (2003) 13–28 The referee outlined an elegant derivation of (2.5) that subsumes Lemma 2.1; here are the details. Consider underdiagonal paths with step set S(1) ={E; N} where E=(1; 0) and N =(0; 1). We call the vertex between a pair ofconsecutive Esadouble-east point and that between a pair ofconsecutive Nsadouble-north point. These are the counterparts ofthe better-known doublerise and doublefallpoints [ 5] ofclassical Dyck paths. Assume the double-east and double-north points come in two colors, say red and blue. Let P0 denote the set ofthese two-colored underdiagonal paths. It is easy to see that P0 and D0 are in bijective correspondence. Furthermore, every nonempty path ∈ P0 is the concatenation ofa primitive path ∗ E1N with a path 2.If1 is nonempty then E1N has one of the four forms Er rN, Er∗bN, Eb∗rN and Eb∗bN, where r and b indicate the colors ofthe corresponding ∗ double points and ∈ P0. It follows that if we let G denote the generating function ofthe paths in P0 then G =1+t[4(G − 1)+1]G; this is equivalent to (2.5) since J = G − 1. Let us now enumerate paths in D0. Theorem 2.2. (a) The generating function D0(t) is given by D0(t)=1=8t[1+3t − 2 1=2 n 2k k+1 (9t − 10t +1) ]. Moreover, for all n ¿ 1, dn = k=n=2 [1=(k + 1)]( k )( n−k ) × n−k 2k−n+1 n+3 (−9) 5 =2 . (b) For all n ¿ 1, d = n (1=n)( n )( n )4n−k . n k=1 k k−1 n n+1 2n−k k (c) For all n ¿ 1, dn =(1=4) k=0 [1=(n + 1)]( k )( n−k )3 . L L 2 1=2 (d) The generating functionD0(t) is given by D0(t)=(1=2)[1−3t−(9t −10t+1) ]. L n−1 2k k+1 n−k−1 2k−n+2 n Moreover, for all n ¿ 2, dn= [1=(k+1)]( )( )(−9) 5 =2 . k=(n−1)=2 k n−k−1 L n−1 n 2n−k−2 k (e) For all n ¿ 2, dn = k=0 (1=n)( k )( n−k−1 )3 .