Lattice paths not touching a given boundary

Lattice paths not touching a given boundary

Journal of Statistical Planning and Inference 105 (2002) 433–448 www.elsevier.com/locate/jspi Lattice paths not touching a given boundary Ulrich Tam...

134KB Sizes 0 Downloads 37 Views

Journal of Statistical Planning and Inference 105 (2002) 433–448

www.elsevier.com/locate/jspi

Lattice paths not touching a given boundary Ulrich Tamm Department of Computer Science, University of Chemnitz, 09107 Chemnitz, Germany Received 13 December 2000; received in revised form 20 July 2001; accepted 30 July 2001

Abstract Lattice paths are enumerated which -rst touch a periodic boundary at time n. Following a probabilistic method introduced by Gessel, for period length 2 formulae are obtained for a wide class of boundaries. This allows to give the generating function for paths not crossing or touching the diagonal cx = 2y for odd c and to obtain a closed formula similar to the ballot numbers for c 2001 Elsevier the sum of the entries of two two-dimension arrays related to these boundaries.  Science B.V. All rights reserved. MSC: 05A15; 05A19; 60G50 Keywords: Lattice path enumeration; Catalan numbers; Ballot numbers; Lagrange inversion; Two-dimensional arrays

1. Introduction A path starting at the origin of the lattice {(x; y): x; y integers} of pairs of integers here is a sequence of pairs (xi ; yi ) of nonnegative integers, where (x0 ; y0 ) = (0; 0) and (xi ; yi ) is either (xi−1 + 1; yi−1 ) or (xi−1 ; yi−1 + 1). So, a particle following such a path can move either one step to the right, i.e. xi = xi−1 + 1, or one step upwards, i.e. yi = yi−1 + 1 in each time unit i. Several methods for the enumeration of lattice paths are discussed in the books by Mohanty (1979) and Narayana (1979). For the number of paths N (u; n) -rst touching the boundary (0; u0 ); (1; u1 ); (2; u2 ); : : : at (n − 1; un−1 ) (and not touching or crossing this boundary before) characterized by the in-nite nondecreasing sequence u = (u0 ; u1 ; u2 ; : : :) of nonnegative integers the following recursion is presented in Narayana (1979, p. 21).   n u + 1  n−j N (u; n) = N (u; n − j): (−1) j−1 j j=1 One might further be interested in an expression of closed form. For instance, if the boundary is given by the sequence u = (1; 2; 3; : : :), then N (u; n) is the nth Catalan E-mail address: [email protected] (U. Tamm). c 2001 Elsevier Science B.V. All rights reserved. 0378-3758/01/$ - see front matter  PII: S 0 3 7 8 - 3 7 5 8 ( 0 1 ) 0 0 2 7 3 - 7

434

U. Tamm / Journal of Statistical Planning and Inference 105 (2002) 433–448

number [1=(2n + 1)] ( 2n+1 n ) and, more generally, for u = (1 + (p − 1) · n)n=0; 1; 2; ::: as counting function arise the generalized Catalan numbers [1=(pn+1)]( pn+1 n ). (The notion “generalized Catalan numbers” as in Hilton and Pedersen (1991) is not standard, for instance, in Graham et al. (1988, pp. 344 –350) it is suggested to denote them as “Fuss numbers”.) Note that this describes the case in which the sequence of diKerences (um − um−1 )m=1; 2; ::: is periodic with period length 1. We shall derive similar identities for period length 2, thereby following a probabilistic method introduced by Gessel (1986), which allows to apply Lagrange inversion. For instance, it can be shown that if (1) (2) (1) (2) u (1) and u (2) are such that u2i = u2i = s+ci, u2i+1 = s++ci and u2i+1 = s+(c−)+ci, then   (c + 2)n + 1 2 (1) (2) : (1) N (u ; 2n) + N (u ; 2n) = (c + 2)n + 1 2n By the same approach, a new expression for the number of paths not crossing or touching the line cx = 2y for odd c will be obtained. Further, an application of (1) in the analysis of two-dimensional arrays will be studied. For i = 1; 2; : : : let i() denote the frequency of the number i in the sequences u () describing two boundaries for  = 1; 2 and let () = (1() ; 2() ; : : :). Denoting by () (n; k) the number of paths from the origin to (n; k) not touching or crossing the boundary described by u () , in the case that (1) = (; c−; ; c−; : : :) and (2) = (c−; ; c − ; ; : : :) are both periodic with period length 2 we have     n+k n+k (1) (2) −c (2)  (n; k) +  (n; k) = 2 k k −1 which can be derived using (1). Further, (2) can be regarded as a generalization of n+k the ballot numbers ( n+k k ) − ( k−1 ). From (2) results are immediate for the numbers () (n; k) = () (n + k; k). Such a two-dimensional array (n; k) had been found by Berlekamp in the study of burst-error correcting convolutional codes and thoroughly analyzed by Carlitz et al. (1971). 2. Gessel’s probabilistic approach We shall consider paths in an integer lattice from the origin (0; 0) to the point (n; un ), which never touch any of the points (m; um ), m = 0; 1; : : : ; n − 1. Gessel (1986) introduced a general probabilistic method to determine the number of such paths, denoted by fn , which he studied for the case that the subsequence (um )m=1; 2; ::: is periodic. In this case, the elements of the sequence (um )m=0; 1; 2; ::: are on the d lines (for i = 0; 1; 2; : : :) udi = 0 + ci;

udi+1 = 0 + 1 + ci; : : : ; udi+d−1 = 0 + 1 + · · · + d−1 + ci (3)

so 0 = u0 ¿ 0, and c = 1 + 2 + · · · + d , where j = uj − uj−1 for j = 1; : : : ; d.

U. Tamm / Journal of Statistical Planning and Inference 105 (2002) 433–448

435

Gessel’s probabilistic method is as follows. A particle starts at the origin (0; 0) and successively moves with probability p one unit to the right and with probability q = 1 − p one unit up. The particle stops if it touches one of the points (i; ui ). The probability that the particle stops at (n; un ) is pn qun fn , which is pn q0 +···+j +cn fn if n ≡ j mod d. Setting f(t) =

∞  n=0

fn t n =

d−1  j=0

t j f( j) (t d )

∞ ∞ (so f( j) (t) = n=0 fn( j) t dn = n=0 fdn+j t n are the generating functions for thefn ’s with indices congruent j modulo d), the probability that the particle eventually stops is qu0 f(0) (pd qc )+ pqu1 f(1) (pd qc )+ p2 qu2 f(2) (pd qc ) + · · · + pd − 1 qud − 1 f(d − 1) (pd qc ); where uj = 0 + · · · + j . If p is suNciently small, the particle will touch the boundary (m; um )m=0; 1; ::: , or equivalently, enter the forbidden area, i.e. the lattice points on and behind this boundary, with probability 1. So for small p and with t = pqc=d we have q(t)u0 f(0) (t d ) + p(t)q(t)u1 f(1) (t d ) + · · · + p(t)d−1 q(t)ud−1 f(d−1) (t d ) = 1: For p suNciently small one may invert t = p(1 − p)c=d to express p as a power series in t, namely p = p(t). Then changing t to !i t, i = 1; : : : ; d − 1, where ! is a primitive dth root of unity, yields the system of equations  (0) d    f (t ) 1  (1) d     f (t )   1      A· (4) = .  ..    ..  .     f(d−1) (t d ) 1 with A = (p(!i t) j q(!i t)uj )i; j=0; :::; d−1 , from which the functions f( j) (t d ), j = 0; : : : ; d−1 might be determined. For period length d = 1 the interpretations for the generalized Catalan numbers pn+p−1 [1=(pn + 1)]( pn+1 n ) and the numbers [1=(pn + p − 1)]( n+1 ) occur as enumeration functions as can easily be derived by (4). We shall now take a closer look at the period length d = 2. Let us denote s = 0 and  = 1 6 c. Then the boundary (n; un )n=0; 1; ::: is characterized by u2i = s + ci

and

u2i+1 = s +  + ci:

(5)

Further, denoting p(−t) by p(t) O and similarly q(−t) by q(t) O and setting g(t 2 ) = f(0) (t 2 ) 2 (1) 2 and h(t ) = f (t ) (as in Gessel (1986)) we obtain the two equations qs g(t 2 ) + pqs+ h(t 2 ) = 1; qOs g(t 2 ) + pqs+ h(t 2 ) = 1

436

U. Tamm / Journal of Statistical Planning and Inference 105 (2002) 433–448

which for g(t 2 ) and h(t 2 ) yield the solutions g(t 2 ) =

p−1 q−s− − pO −1 qO−s− qc=2−−s + qOc=2−−s ; = p−1 q− − pO −1 qO− qc=2− + qOc=2−

(6)

q−s − qO−s : (7) t(q−c=2 + qO−c=2 ) By Lagrange inversion (cf. e.g. (Gessel and Stanley, 1996, pp. 1032–1034)) for any  we have   ∞ (c=2 + 1)n +  n   − t : (8) q = n n=0 (c=2 + 1)n +  h(t 2 ) =

Actually, Gessel analyzed the case  = ; c = 2 + 1 for a positive integer , which arises in the enumeration of paths never touching or crossing the line y = s− 12 +(c=2)x. For the special case s = 1 he derived the following nice identity for the function h(t 2 ). Proposition 1 (Gessel [3]). Let c be an odd positive integer, s = 1 and  = (c − 1)=2. Then   ∞ (c + 2)n +  + 2 2n 1 q−1=2 − qO−1=2  2 t : h(t ) = = t 2n + 1 n=0 (c + 2)n +  + 2 So, the coeNcients in the expansion of h(t 2 ) have a similar form as the Catalan numbers. It is also possible to show that for these parameters   ∞ (c + 2)n + 1 2n t 2  1 2 t − [h(t 2 )]2 : g(t ) = 2 2n n=0 (c + 2)n + 1 This is a special case of a more general result which we are going to derive now. Since we are going to look at several random walks in parallel, we shall write the parameters determining the restrictions as superscripts. So, g(s; c; ) and h(s; c; ) are the generating functions for even and odd n, respectively, for the random walk of a particle starting at the origin and -rst touching the boundary (i; ui )i=0; 1; ::: determined by the parameters s; c; and  as in (5) in (n; un ). Proposition 2. Let s; c;  be the parameters de5ned above with 0 6  ¡ c=2.   ∞ (c + 2)n + s 2n  2s −s (s; c; ) 2 (s; c; c−) 2 −s t : (t ) + g (t ) = q + qO = (a) g 2n n=0 (c + 2)n + s (b) g(s; c; c−) (t 2 ) − g(s; c; ) (t 2 ) = t 2 h(s; c; ) (t 2 )h(c−2; c; ) (t 2 ): Proof. (a) In order to derive the -rst identity observe that with a = c=2 −  we have g(s; c; ) (t 2 ) + g(s; c; c−) (t 2 ) =

qa−s + qOa−s q−a−s + qO−a−s + a a q + qO q−a + qO−a

U. Tamm / Journal of Statistical Planning and Inference 105 (2002) 433–448

=

(qa−s + qOa−s )(q−a + qO−a ) + (q−a−s + qO−a−s )(qa + qOa ) (qa + qOa )(q−a + qO−a )

=

2q−s + 2qO−s + qOa−s q−a + q−a−s qOa + qa−s qO−a + qO−a−s qa = q−s + qO−s : 2 + qOa q−a + qa qO−a

Since by de-nition q(t) O = q(−t), with Lagrange inversion we have   ∞ (c=2 + 1)n + s n  s −s −s q + qO = t n n=0 (c=2 + 1)n + s   ∞ (c=2 + 1)n + s  s (−t)n + n n=0 (c=2 + 1)n + s ∞ 

2s = n=0 (c + 2)n + s



(c + 2)n + s 2n

 t 2n :

(b) Let again a = c=2 − . Then g(s; c; c−) (t 2 ) − t 2 h(s; c; ) (t 2 )h(c−2; c; ) (t 2 ) =

−s − qO−s q−2a − qO−2a q−a−s + qO−a−s 2 q − t q−a + qO−a t(q−a + qO−a ) t(q−a + qO−a )

=

q−a−s + qO−a−s (q−s − qO−s )(q−a − qO−a ) q−a qO−s + qO−a q−s − = −a −a q + qO (q−a + qO−a ) q−a + qO−a

=

qa−s + qOa−s = g(s; c; ) (t 2 ): qa + qOa

Similar identities can be derived for the case s +  = c. Proposition 3. Let c ¿ 0 be a positive integer, and s +  = c with s ¿ . Then 1 (a) h(s; c; c−s) (t 2 ) + h(c−s; c; s) (t 2 ) = 2 (p + p) O t   ∞ (c + 2)n − 1 2(n−1)  2 t : = 2n n=1 (c + 2)n − 1 (b) In the special case of c odd, s = (c + 1)=2 and  = (c − 1)=2 we have h((c+1)=2; c; (c−1)=2) (t 2 ) − h((c−1)=2; c; (c+1)=2) (t 2 ) = (g((c+1)=2; c; (c−1)=2) (t 2 ))2 where 1 g((c+1)=2; c; (c−1)=2) (t 2 ) = (qO1=2 − q1=2 ) t  ∞ (c + 2)n +  1 = 2n + 1 n=0 (c + 2)n + (c + 1)=2

c+1 2

 t 2n :

437

438

U. Tamm / Journal of Statistical Planning and Inference 105 (2002) 433–448

Proof. (a) By (7) h(s; c; c−s) (t 2 ) + h(c−s; c; s) (t 2 ) =

qs−c − qOs−c q−s − qO−s + t(qc=2−s + qOc=2−s ) t(qs−c=2 + qOs−c=2 )

=

q−s − qO−s qs−c − qOs−c + c−s pqs − pqs pqc−s − pq

=

2(p + p) O − qs qO−s (p + pqc q−c ) − qOs q−s (pO + pqc qO−c ) p2 qc + pO 2 qOc − qs qO−s (ppqc ) − qOs q−s (ppqc )

=

(p + p)(2 O − qs qO−s (p= p) O − qOs q−s (p=p)) O p + pO = −s 2 s t2 t (2 − q qO (p= p) O − qOs q−s (p=p)) O

O O + pqc q−c ) = p(p + p). since p2 qc = pO 2 qOc = t 2 by de-nition of t and since p(p (b) With s = (c + 1)=2 again by (7) as under (a) h(s; c; c−s) (t 2 ) − h(c−s; c; s) (t 2 ) =

q−s − qO−s qs−c − qOs−c c−s − c−s pqs − pqs pq − pq

=

pqc−s q−(c−s) + pqc−s qO−(c−s) − pqs q−s − pqs qO−s t 2 (2 − (pqs )=(pqs ) − (pqs )=(pqs ))

=

O − pq(c−1)=2 qO−(c+1)=2 (q − q) O pq(c−1)=2 q−(c+1)=2 (q − q) t 2 (2 − (tq1=2 )=(−t qO1=2 ) − (−t qO1=2 )=(tq1=2 ))

=

c=2 −c=2 O q − pqc=2 qO−c=2 ) q−1=2 qO−1=2 (q − q)(pq t 2 (2 + q1=2 = qO1=2 + qO1=2 =q1=2 )

=

(pO − p)2 O pO − p) q−1=2 qO−1=2 (q − q)( = t 2 q−1=2 qO−1=2 (2q1=2 qO1=2 + q + q) O t 2 (q1=2 + qO1=2 )2

= (g((c+1)=2; c; (c−1)=2) (t 2 ))2 since t = pqc=2 = − pqc=2 and p = 1 − q; pO = 1 − qO and by (6) g((c+1)=2; c; (c−1)=2) (t 2 ) = =

q−c=2 + qO−c=2 q1=2 + qO1=2 qO − q 1 p − pO = = (qO1=2 − q1=2 ): t(q1=2 + qO1=2 ) t(q1=2 + qO1=2 ) t

Further, several convolution identities for the generating functions can be derived. For instance

U. Tamm / Journal of Statistical Planning and Inference 105 (2002) 433–448

439

Proposition 4. (a) (g(s; c; ) (t 2 ) + g(s; c; c−) (t 2 ))h(s; c; ) (t 2 ) = h(2s; c; ) (t 2 ): (b) g(c−2; c; ) (t 2 )g(; c; c−) (t 2 ) = g(c−; c; ) (t 2 ): (c) For s1 + 1 + 2 = c we have g(s1 ; c; 1 ) (t 2 )h(s2 ; c; 2 ) (t 2 ) = h(s2 ; c; s1 +2 ) (t 2 ): Especially, for odd c g(1; c; (c−1)=2) (t 2 )h(1; c; (c−1)=2) (t 2 ) = h(1; c; (c+1)=2) (t 2 ): Proof. (a) is immediate from the fact that g(s; c; ) (t 2 )+g(s; c; c−) )(t 2 ) = q−s +qO−s (Proposition 2(a)) and (b) is immediate, since the nominator of g(c−2; c; ) (t 2 ) in (6) is at the same time the denominator of g(; c; c−) (t 2 ). The nominator of g(s1 ; c; 1 ) (t 2 ) in (c) by (6) is qc=2−1 −s1 + qOc=2−1 −s1 and this is the term in brackets in the denominator in (7) of h(s2 ; c; 2 ) (t 2 ) = (q−s2 − qO−s2 )=t(q2 −c=2 + qO−2 −c=2 ). Let us discuss the case c = 3 in greater detail and thereby illustrate the derived identities. The parameter choices (s = 1;  = 1), (s = 1;  = 2), and (s = 2;  = 1) will be of interest in the combinatorial applications we shall speak about later on. By application of the previous results, the generating functions for these parameters (after mapping t 2 → x) are as follows. Observe that they all can be expressed in terms of a(x):=g(1; 3; 1) (x) and b(x):=g(1; 3; 2) (x). Corollary 1. ∞ 

1 a(x) = g(1; 3; 1) (x) = 5n +1 n=0



5n + 1

 xn

2n

x − [h(1; 3; 1) (x)]2 = 1 + 2x + 23x2 + 377x3 + · · · ; 2 b(x) = g

(1; 3; 2)

∞ 

1 (x) = 5n +1 n=0



5n + 1 2n

 xn

x + [h(1; 3; 1) (x)]2 = 1 + 3x + 37x2 + 624x3 + · · · ; 2 g

(2; 3; 1)

∞ 

1 (x) = n=0 5n + 2



5n + 2 2n + 1

 xn = 1 + 5x + 66x2 + 1156x3 + · · · = a(x)b(x);

440

U. Tamm / Journal of Statistical Planning and Inference 105 (2002) 433–448

∞ 

1 h(1; 3; 1) (x) = 5n +3 n=0 (1; 3; 2)

h

∞ 

1 (x) = n=1 5n − 1



5n + 3

 xn = 1 + 7x + 99x2 + 1768x3 + · · · = a(x)2 b(x);

2n + 1 

5n − 1

 xn−1

2n

1 − [g(2; 3; 1) (x)]2 = 1 + 9x + 136x2 + · · · = a(x)3 b(x); 2 (2; 3; 1)

h

∞ 

1 (x) = n=1 5n − 1



5n − 1 2n

 xn−1

1 + [g(2; 3; 1) (x)]2 = 2 + 19x + 293x2 + 5332x3 + · · · ; 2 = h(1; 3; 2) (x) + [g(2; 3; 1) (x)]2 = a(x)3 b(x) + a(x)2 b(x)2 = (a(x) + b(x))a(x)2 b(x) = (g(1; 3; 1) (x) + g(1; 3; 2) (x))h(1; 3; 1) (x): It is also possible to express all six functions in terms of either a(x) or b(x), namely it can be shown that

a(x) [(a(x) − 1) + (a(x) − 1)2 + 4)]; 2

b(x) a(x) = [1 + 4b(x) + 2]: 2(b(x) + 1)

b(x) =

As pointed out before, as an example to illustrate his probabilistic approach Gessel (1986) analyzed half-integer slopes for odd c and d = 2 thereby counting paths starting at the origin and not touching the line y = r+(c=2)x before (n; un ). This line determines a boundary, which is given as in (5) by the parameters s = r + 12 ;  = (c − 1)=2 if r is a half-integer and s = r;  = (c + 1)=2 if r is an integer. The number of paths -rst touching the line y = r + (c=2)x in (2n; u2n ) then obviously is the nth coeNcient of g(s; c; ) (x). Observe that the original approach only works for s ¿ 0, since for s = 0 the system of equations g(t 2 ) + pq h(t 2 ) = 1; g(t 2 ) + pq h(t 2 ) = 1 does not yield a solution. Several authors studied the number of paths starting at the origin and thereafter touching the line cx = dy for the -rst time at (dn; cn) (the only intersections of the line with the integer lattice when c and d are coprime). In Mohanty (1979, pp. 12–14) a recursive approach due to Bizley is described. Namely, denoting by fn the number of such paths to (dn; cn) we have the recursion     n−1 n(c + d)  (n − j)(c + d) fj − n(c + d)fn = (n − j)d nd j=1

U. Tamm / Journal of Statistical Planning and Inference 105 (2002) 433–448

with

 (c + d)f1 =

c+d d

 3(c + d)f3 =



 ;

3(c + d)

2(c + d)f2 = 

3d

 −

2(c + d) 2d

2(c + d)

 −

2d 

 f1 −



c+d d

c+d

441

 f1 ;



d

f2 ; · · · :

As an example, for c = 3 and d = 2 this recursion yields the numbers f1 = 2; f2 = 19, f3 = 293; : : : . These are just the coeNcients in h(2; 3; 1) (x) studied in Corollary 1 and this holds in wider generality. Let us consider d = 2. Assume that the -rst step from the origin is to the right (by reversing the paths, i.e. mapping the path (0; 0); : : : ; (nd; nc) to (nd; nc); : : : ; (0; 0) the analysis for a -rst step upwards is analogous). Then, after this -rst step, the boundary is given by the parameters s = (c+1)=2 and  = (c−1)=2 where in contrast to the original model now s = u1 (and not s = u0 ). This has the eKect that the generating function for the paths to (n; un ) with even n now is h((c+1)=2; c; (c−1)=2) . Hence, by Proposition 3 we have the following theorem. Theorem 1. The number of paths from the origin 5rst touching the line cx = 2y in (2n; cn), n ¿ 1 and not crossing or touching this line before is the coe7cient of t 2(n−1) in   ∞ (c + 2)n − 1 2(n−1)  1 t 2n n=1 (c + 2)n − 1 1 + 2



∞ 

1 n=0 (c + 2)n + (c + 1)=2



(c + 2)n +

c+1 2

2



2n + 1

t

2n

:

3. Two-dimensional arrays generalizing the ballot numbers We have seen that we have to enumerate lattice paths not touching a given boundary. This immediately yields a fast algorithm to determine these numbers recursively. Since the lattice paths arriving in (n; k)—by de-nition of the single steps—must pass either (n; k − 1) or (n − 1; k), the number (n; k) of paths from the origin (0; 0) to (n; k) obeys the recursion (n; k) = (n; k − 1) + (n − 1; k) with initial values (0; 0) = 1;

(n; un ) = 0

for all n:

442

U. Tamm / Journal of Statistical Planning and Inference 105 (2002) 433–448

The initial values just translate the fact that the boundary (n; un ); n = 0; 1; 2; : : : cannot be touched. Let u = (u0 ; u1 ; u2 ; : : :) be the vector representing the boundary (m; um )m=0; 1; ::: which is not allowed to be crossed or touched by a path in a lattice and let  = (1 ; 2 ; 3 ; : : :) be the sequence of diKerences i = ui − ui−1 . Let us denote  = (1 ; 2 ; 3 ; : : :);

(9)

where i denotes the frequency of the number i in u and let v = (v0 ; v1 ; v2 ; : : :)

(10)

i with vi = v0 + j=1 j . By interchanging the roles of n and k (mapping (n; k) → (k; n)), the pairs (u; ) and (v; ) are somehow dual to each other. Namely, consider a path from (0; 0) to (vk ; k) not touching the boundary (0; u0 ); (1; u1 ); : : : . Then the reverse path (just obtained by going backwards from (vk ; k) to (0; 0)) corresponds to a path from the origin to (k; vk ) not touching the boundary (0; v0 ); (1; v0 + k ); : : : ; (k; v0 + k + k−1 + · · · + 1 ). Hence, we have the following proposition. Proposition 5. The number of paths from the origin (0; 0) to (vk ; k), where vk = v0 + 1 + 2 + · · · + k not touching or crossing the boundary (0; u0 ); (1; u1 ); : : : is the same as the number of paths from the origin to the point (k; vk ) which never touch or cross the boundary (0; v0 ); (1; v0 + k ); : : : ; (k; v0 + k + k−1 + · · · + 1 ). We shall compare the array  with a two-dimensional array # with entries #(n; k), n ¿ − 1, k ¿ 0 de-ned by #(n; k) = #(n; k − 1) + #(n − 1; k) with initial values #(n; 0) = d

for all n ¿ − 1;

#(−1; k) = − c

for all k ¿ 1:

For any d it can be easily veri-ed that       n+k n+k d(n + 1) − ck n + k + 1 : #(n; k) = d −c = n+k +1 k k k −1

U. Tamm / Journal of Statistical Planning and Inference 105 (2002) 433–448

443

For d = 1 this just coincides with the arrays studied by Sulanke (1989) de-ned by #(n; 0) = 1 for all n and #(ck − 1; k) = 0 for all k = 1; 2; : : : . Especially for c = 2; d = 1 the positive entries are just the ballot numbers. When d ¿ 2, the model studied in Sulanke (1989) is no longer valid, since the arrays contain rows with all entries diKerent from 0. Observe that in each case the entries #(ck − 1; dk) = 0, when d and c are coprime. However, the results obtained so far now allow us to derive similar identities for the case d = 2. Theorem 2. Let (1) (n; k) denote the number of paths from the origin to (n; k) not (1) touching or crossing the boundary (m; um )m determined as de5ned above by (1) = (1(1) ; 2(1) ; : : :) and let (2) (n; k) denote the number of such paths where the boundary (2) (m; um )m is determined by (2) = (1(2) ; 2(2) ; : : :). If (1) = (; c − ; ; c − ; : : :) and (2)  = (c − ; ; c − ; ; : : :) are periodic with period length 2, then for all k and k k n ¿ max{ j=1 j(1) ; j=1 j(2) } we have  (1) (n; k) + (2) (n; k) = 2

n+k k



 −c

n+k k −1

 :

Proof. In order to prove the theorem we shall compare the array  de-ned by (n; k) = n+k (1) (n; k) + (2) (n; k) with the array # where #(n; k) = 2( n+k k ) − c( k−1 ) and show that k (1) k (2) (n; k) = #(n; k) for all n ¿ max{ j=1 j ; j=1 j }. Without loss of generality let k (1) k (2) j=1 j ¿ j=1 j . Then we are done if we can show that (1 + · · · + k + 1; k) = #(1 + · · · + k + 1; k) for all k, since both arrays from then on follow the same recursion. Namely, (n; k) = (n; k − 1) + (n − 1; k), because () (n; k) = () (n; k − 1) + () (n − 1; k) for  = 1; 2 and #(n; k) = #(n; k − 1) + #(n − 1; k) was seen to hold even beyond the boundary. So let us proceed by induction in k. The induction beginning for k = 1 and k = 2 is easily veri-ed. Assume that for all k = 1; 2; : : : ; 2K − 2 it is (n; k) = #(n; k) whenever n is big enough as speci-ed in the theorem. Now observe that since the period length in (1) and (2) is 2, we have 2K  j=1

j(1) =

2K  j=1

j(2) = cK:

This means that for  = 1; 2 by Proposition 5 () (cK + 1; 2K) is the number of paths () () from the origin to (cK +1; 2K) never touching the boundary (0; 1); (1; 2K +1); (2; 2K + () () () () 2K−1 + 1); : : : ; (2K; 2K + 2K−1 + · · · + 1 + 1). These boundaries now are periodic with period length 2 as we studied before. The parameters as in (5) are s = 1, c and  for  = 1 (or c −  for  = 2, respectively). The generating functions for the numbers of such paths are g(s; c; ) (t 2 ) and g(s; c; c−) (t 2 ) as studied above and by Proposition 2 (cK + 1; 2K) = (1) (cK + 1; 2K) + (2) (cK + 1; 2K)

444

U. Tamm / Journal of Statistical Planning and Inference 105 (2002) 433–448

2 = (c + 2)K + 1  =2

(c + 2)K 2K



(c + 2)K + 1

 −c



2K   (c + 2)K 2K − 1

:

Now observe that also 2 (cK + 1; 2K − 1) = (cK + 1; 2K) = (c + 2)K + 1



(c + 2)K + 1



2K

because in both arrays (1) and (2) all paths from the origin to (cK + 1; 2K) must pass through (cK + 1; 2K − 1). It is also clear that   (c + 2)K + 1 2 : #(cK + 1; 2K − 1) = #(cK + 1; 2K) = (c + 2)K + 1 2K Thus we found that in position cK + 1 in each of the columns 2K − 1 and 2K the two arrays  and # coincide. Since  and # obey the same recursion under the boundary (1) (m; um )m , the theorem is proved. Berlekamp at the Waterloo Combinatorics Conference (Tutte (1968, pp. 341–342)) presented an algorithm for computing numbers of the form #(n; k), which seemingly arose in the study of burst-error correcting convolutional codes Berlekamp (1963). This algorithm was thoroughly analyzed by Carlitz et al. (1971). Their idea is to consider a two-dimensional array with a recursion like in Pascal’s triangle. This array can be obtained from # via (n; k) = #(n + k; k); the recursion is hence (n; k) = (n − 1; k) + (n − 1; k − 1): Actually, in Carlitz et al. (1971) was considered the part of the array  consisting of positive entries, which are described by the conditions (n; 0) = 1 for all n and (%(k) + 1; k + 1) = (%(k); k). (Indeed, the array d(k; j) in Carlitz et al. (1971) was presented in a slightly diKerent form. With n taking the role of j and by placing the elements of the kth chain in the kth column of our array , the two arrays d and  are equivalent.) With the above discussion, it can now be seen that %(k) = vk + k − 1, where vk is as in (10). Observe that we extend the array  by introducing the row (−1; k). The reason is that in this row the numbers &k from Carlitz et al. (1971) are contained. These numbers are de-ned recursively via   k vk + k − 1  &k = − &k−r (11) r r=1 with initial value &0 = 1. Reading out the numbers &k as entries (−1; k) is a second method to derive the de-ning recursion. In Carlitz et al. (1971) a diKerent approach

U. Tamm / Journal of Statistical Planning and Inference 105 (2002) 433–448

445

was chosen. Also, it was derived that   k n+1  &k−r : (n; k) = r r=0 Corollary 2. Let (1) and (2) be de5ned as in the previous theorem. Arrays () for  = 1; 2 are de5ned by () (n; k) = () (n + k; k) for all n; k with n ¿ vk + k. The corresponding parameters &(1) (k) and &(2) (k) as de5ned under (11) ful5ll for all k ¿ 1 &(1) (k) + &(2) (k) = (−1)k (c + 2): Proof. Extend the array beyond the boundary by the recursion (n; k) = (n − 1; k) + (n − 1; k − 1) if n + k ¡ un . As mentioned above, the numbers &(1) (k) = (1) (−1; k) and &(2) (k) = (2) (−1; k) can be found as entries of row n = − 1 in the arrays () . Example. For d = 2, c = 3 the arrays (1) and (2) are as follows: −1 0 1 2 3 4 5 6 7 8 9 .. .

0 1 1 1 1 1 1 1 1 1 1 1 .. .

1 −2 −1 0 1 2 3 4 5 6 7 8 .. .

2 0 −2 −3 −3 −2 0 3 7 12 18 25 .. .

−1 0 1 2 3 4 5 6 7 8 9 .. .

0 1 1 1 1 1 1 1 1 1 1 1 .. .

1 −3 −2 −1 0 1 2 3 4 5 6 7 .. .

2 5 2 0 −1 −1 0 2 5 9 14 20 .. .

3 4 ::: 7 −40 : : : 7 −33 : : : 5 −26 : : : 2 −21 : : : −1 −19 : : : −3 −20 : : : −3 −23 : : : 0 −26 : : : 7 −26 : : : 19 −19 : : : 37 0 ::: .. .. . . 3 −12 −7 −5 −5 −6 −7 −7 −5 0 9 23 .. .

4 45 33 26 21 16 10 3 −4 −9 −9 0 .. .

::: ::: ::: ::: ::: ::: ::: ::: ::: ::: ::: ::: :

446

U. Tamm / Journal of Statistical Planning and Inference 105 (2002) 433–448

The sum array  = (1) + (2) hence is

−1 0 1 2 3 4 5 6 7 8 9 .. .

0 2 2 2 2 2 2 2 2 2 2 2 .. .

1 −5 −3 −1 1 3 5 7 9 11 13 15 .. .

2 3 4 ::: −5 −5 −5 : : : 0 0 0 ::: −3 0 0 ::: −4 −3 0 ::: −3 −7 −3 : : : 0 −10 −10 : : : 5 −10 −20 : : : 12 −5 −30 : : : 21 7 −35 : : : 32 28 −28 : : : 45 60 0 ::: .. .. .. . . . :

Computer observations strongly suggest that the generalization of the ballot numbers holds for all positive integers d. More exactly, let () = (1() ; 2() ; 3() ; : : :),  = 1; : : : ; d be periodic sequences of period length d, such that the initial segment of length d in () is a cyclic shift of order  − 1 of the initial segment of (1) , i.e. (1) = (1 ; 2 ; : : : ; d−1 ; d ; 1 ; 2 ; : : : ; d−1 ; d ; 1 ; : : :); (2) = (2 ; 3 ; : : : ; d ; 1 ; 2 ; 3 ; : : : ; d ; 1 ; 2 ; : : :); : : : ; (d) = (d ; 1 ; : : : ; d−2 ; d−1 ; d ; 1 ; : : : ; d−2 ; d−1 ; d ; 1 ; : : :): Further, let the sequences () describe the boundaries u () ,  = 1; : : : ; d as in (9), i.e. the lattice points (n; un )n=0; 1; ::: are not allowed to be touched by paths enumerated in the arrays () (n; k),  = 1; : : : ; d. Conjecture. Whenever n ¿ 1() + · · · + k() for all  = 1; : : : ; d (1) (n; k) + (2) (n; k) + · · · + (d) (n; k) = #(n; k); where #(n; 0) = d;

#(−1; k) = 1 + · · · + d ;

#(n; k) = #(n − 1; k) + #(n; k − 1):

This conjecture would also imply the following generalization of Proposition 2(a). Let 0 and '1 ; : : : ; 'd be nonnegative integers with '1 + · · · + 'd = c. Further, let f( j; 0) denote the function f(0) as in (4) for the choice of parameters as in (3)

U. Tamm / Journal of Statistical Planning and Inference 105 (2002) 433–448

447

( j) ) = (0 ; '1 ; : : : ; 'j−1 ; 'j+1 ; : : : ; 'd ) for j = 1; : : : ; d. Then (0( j) ; 1( j) ; : : : ; d−1

f(1; 0) (t d ) + f(2; 0) (t d ) + · · · + f(d; 0) (t d ) = q(t)−0 + q(!t)−0 + · · · + q(!d−1 t)−0   ∞ (c + d)n + 0  d0 t dn : = (c + d)n +  dn 0 n=0 Besides the period lengths d = 1 and d = 2, we could prove the conjecture for the following array (: −1 0 1 2 3 4 5 .. .

0 3 3 3 3 3 3 3 .. .

1 −2 1 4 7 10 13 16 .. .

2 −2 −1 3 10 20 33 49 .. .

3 −2 −3 0 10 30 63 112 .. .

4 −2 −5 −5 5 35 98 210 .. .

5 −2 −7 −12 −7 28 126 336 .. .

6 −2 −9 −21 −28 0 126 462 .. .

7 8 ::: −2 −2 : : : −11 −13 : : : −32 −45 : : : −60 −105 : : : −60 −165 : : : 66 −99 : : : 528 429 : : : .. .. . .

with ((n; 0) = 3, ((−1; k) = − 2, and ((n; k) = ((n; k − 1) + ((n − 1; k). Proposition 6. The positive entries ((n; k) ¿ 0 are the sum ((n; k) = ((1) (n; k) + ((2) (n; k) + ((3) (n; k) where (() (n; k) enumerates the number of paths from the origin to (n; k) not touching () () or crossing the boundaries (m; um )m=0; 1; ::: with sequences um being periodic of period length 2 de5ned for  = 1; 2; 3 by (1) = 1 + 3i; u2i

(1) u2i+1 = 2 + 3i;

(2) u2i = 1 + 3i;

(2) u2i+1 = 3 + 3i;

(3) u2i = 2 + 3i;

(3) u2i+1 = 3 + 3i:

Proof. Observe that the boundaries via u arise for the choices (s = 1;  = 1) for  = 1, (s = 1;  = 2) for  = 2, and (s = 2;  = 1) for  = 3, respectively, which we studied intensively in Corollary 1. The proposition is easily veri-ed, when for all k some n is found where ((n; k) = ((1) (n; k)+((2) (n; k)+((3) (n; k). In order to do so, observe that application of Corollary 1 yields   5j + 2 1 (3) ((2j; 3j + 1) = ( (2j; 3j + 1) = 5j + 2 2j + 1

448

U. Tamm / Journal of Statistical Planning and Inference 105 (2002) 433–448

the jth coeNcient in g(2; 3; 1) (x) and 1 ((2j − 1; 3j − 1) = ( (2j − 1; 3j − 1) + ( (2j − 1; 3j − 1) = 5j − 1 (2)

(3)



5j − 1



2j

the sum of the jth coeNcients in h(1; 3; 2) and h(2; 3; 1) . Further, for all j it must hold that ((2j − 1; 3j) = 0, since for all  = 1; 2; 3 we have () ( (2j; 3j − 1) = (() (2j; 3j) (all paths to (2j; 3j) must pass through (2j; 3j − 1)). Unfortunately, this is the only array with d ¿ 2 for which we could prove the conjecture. Actually, the analysis here was possible since the dual sequences v() as in (10) are periodic with period length 2 and this case was considered before. The parameter d here is the period length of the corresponding sequences () , which for (d = 3; c = 2) are (1) = (1; 1; 0; 1; 1; 0; : : :), (2) = (1; 0; 1; 1; 0; 1; : : :), (3) = (0; 1; 1; 0; 1; 1; : : :). References Berlekamp, E.R., 1963. A class of convolutional codes. Inform. Control 6, 1–13. Carlitz, L., Roselle, D.P., Scoville, R.A., 1971. Some remarks on ballot — type sequences. J. Combin. Theory 11, 258–271. Gessel, I., 1986. A probabilistic method for lattice path enumeration. J. Statist. Plann. Inference 14, 49–58. Gessel, I., Stanley, R., 1996. Algebraic enumeration. In: Graham, R.L., GrQotschel, M., Lovasz, L. (Eds.), Handbook of Combinatorics, Vol. 2. Wiley, New York, pp. 1021–1069. Graham, R.L., Knuth, D.E., Patashnik, O., 1988. Concrete Mathematics. Addison-Wesley, Reading, MA. Hilton, P., Pedersen, J., 1991. Catalan numbers, their generalization, and their uses. Math. Intelligencer 13 (2), 64–75. Mohanty, S.G., 1979. Lattice Path Counting and Applications. Academic Press, New York. Narayana, T.V., 1979. Lattice Path Combinatorics. University of Toronto Press, Toronto, Ont. Sulanke, R.A., 1989. A recurrence restricted by a diagonal condition: generalized Catalan arrays. Fibonacci Quart. 27, 33–46. Tutte, W. (Ed.), 1968. Recent Progress in Combinatorics, Proceedings of the Third Waterloo Conference on Combinatorics. Academic Press, New York.