Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                

Counting Pairs of Lattice Paths by Intersections

1996, Journal of Combinatorial Theory, Series A

Counting pairs of lattice paths by intersections Ira Gessel1 , Brandeis University, Waltham, MA 02254-9110, USA Wayne Goddard2 , University of Natal, Durban 4000, South Africa Walter Shur, New York Life Insurance Co., New York, NY 10010, USA Herbert S. Wilf3 , University of Pennsylvania, Philadelphia, PA 19104-6395, USA Lily Yen4 University of Waterloo, Waterloo, Ontario, Canada N2L 3G1 Abstract We count the pairs of walks between diagonally opposite corners of a given lattice rectangle by the number of points in which they intersect. We note that the number of such pairs with one intersection is twice the number with no intersection, and we give a bijective proof of that fact. Some probabilistic variants of the problem are also investigated. 1 Introduction Consider an r × (n − r) plane lattice rectangle, and walks that begin at the origin (south-west corner), proceed with unit steps in either of the directions east or north, and terminate at the north-east corner of the rectangle. For each integer k we ask for Nkn,r , the number of ordered pairs of these walks that intersect in exactly k points. The number of points in the intersection of two such walks is defined as the cardinality of the intersection of their two sets of vertices, excluding the initial and terminal vertices. The figure below shows a pair of such walks where r = 9, n = 17, and k = 5. FIGURE OMITTED It is well known that N0n,r ! 2 n−1 = n−1 r ! n−1 . r−1 Indeed, the numbers N0n,r/2 are known as the Narayana numbers [5] and count the number of staircase polygons, which are well studied. Narayana [6] showed that the value N0n,r/2 is also equal to the number of plane trees with n vertices and r leaves. A proof of this using lattice paths is given in [2]. At the other extreme, if k = n − 1 then  n,r the two walks coincide so that Nn−1 = nr . 1 Supported Supported 3 Supported 4 Supported 2 by by by by the National Science Foundation the Office of Naval Research the Office of Naval Research a Fellowship of the NSERC, Canada 1 In sections 2 and 3 below, we establish two explicit formulas for the numbers Nkn,r . These formulas are Nkn,r 2(k + 1) X k = n−k−1 i i ! ! n−k+i−1 r ! n−i−1 , n−r (0 ≤ k ≤ n − 2), (1a) and Nkn,r 2(k + 1) X (−1)i = r i k k−i n−i−2 n−i−1 i i r−1 r−i−1 , n−i−2 i (0 ≤ k ≤ n − 2). (1b) In section 2 we prove the validity of formula (1a), and in section 3 we prove the equality of formulas (1a) and (1b) in their common range of validity. These formulas reveal the interesting fact that N1n,r = 2N0n,r , i.e., that exactly twice as many pairs of walks have a single intersection as have no intersection. Such a relationship clearly merits a bijective proof, and we supply one in section 4 below. In sections 5 and 6 we discuss a number of related results. In the first of these sections we count the pairs of nonintersecting walks starting at the origin but ending at two different specified points. In the second we count the pairs of nonintersecting walks regardless of where the two walkers end up. Related results on so-called “vicious walkers” have been obtained by Fisher [3] and others; in particular the numbers of pairs of nonintersecting walks in the d-dimensional lattice have been studied by Guttmann and Prellberg [4]. Finally, in section 7 we discuss a variation in which we find the probability that two independent walkers on a given lattice rectangle do not meet, under a different hypothesis. In this variation we assume random motion of the walkers and put a barrier along the lines x = r and y = s. Here the walkers start at the points (0, 1) and (1, 0), walk east or north each step, going east with some probability p(i, j) dependent on the current point (i, j), except that when a walker reaches the barrier at x = r (resp. the barrier y = s) then all future steps are constrained to be north (resp. east) until the point (r, s) is reached. We find (see the case z = 1 of Theorem 5 below) that if the probability p(i, j) that a step from (i, j) will go north depends only on i + j, then: The probability that the two walkers do not meet until they reach the terminus (r, s) is the same as the probability that a single walker who starts at the point (0, 1) and takes r + s − 2 steps without a barrier, finishes at the point (r − 1, s). 2 Derivation of the formula (1a) One can use a generating function to approach the problem. The first step is to find the requisite generating function and the second step is to extract the coefficients from the generating function. 2 If we sort out the pairs of walks that have k intersections according to the point (q, m−q) of their last (i.e., most north-easterly) intersection, then we see the recurrence Nkn,r = X q,m m,q n−m,r−q Nk−1 N0 . (2) Introduce the generating function uk (x, y) = n,r Nkn,r xn y r . Then equation (2) says simply that uk = uk−1 u0 , for k ≥ 1. Thus uk (x, y) = u0 (x, y)k+1 for k = 0, 1, 2, . . . Now, u0 is well-known, having been calculated by Narayana [5] and others. But P one can also find u0 by observing that the coefficient of xn y r in the sum k uk (x, y) is the total number of pairs of walks, since every pair has some number of intersections. 2 The number of all pairs of walks is nr , so we have P 1 1 − u0 (x, y) = X u0 (x, y)k k≥0 = 1+ X uk (x, y) k = X n n,r = X n≥0 = p r !2 xn y r xn (y − 1)n Pn  y+1 y−1  1 , 1 − 2x(y + 1) + x2 (y − 1)2 where the Pn ’s are the Legendre polynomials, and their classical generating function has been used. Thus q (3) u0 (x, y) = 1 − 1 − 2x(y + 1) + x2 (y − 1)2 . It follows that the number of pairs of walks that have exactly k intersections is the coefficient of xn y r in  uk (x, y) = 1 − q 1 − 2x(y + 1) + x2 (y − 1)2 k+1 . (4) Now, we need to extract the coefficients of this generating function. For this we use the Lagrange Inversion Formula. This requires us to reformulate things slightly. Note that Nkn,r is the coefficient of y r z n−r in uk (z, y/z). From equation (3) it follows that if we write u0 (z, y/z) = y + z + 2f, then f satisfies the equation f = (y + f )(z + f ), and the number Nkn,r is the coefficient of y r z n−r in (y + z + 2f )k+1 . 3 To extract the coefficients of (y + z + 2f )k+1 we use the Lagrange Inversion Formula in the following form. (See e.g., [7] eq. (5.1.2).) If F satisfies F = xg(F ), then for any formal power series φ and any positive integer m, [xm ]φ(F ) = 1 m−1 ′ [t ]φ (t)g(t)m ; m (5) moreover, [x0 ]φ(F ) = φ(0). Now we introduce an auxiliary variable x and consider the equation F = x(y + F )(z + F ). We will use equation (5) to expand (y + z + 2F )k+1 . Setting x = 1 will then give us (y + z + 2f )k+1 . (Aside: the quadratic equation for F has two algebraic solutions, but only the one we want has a power series expansion.) Let φ(t) = (y + z + 2t)k+1 and g(t) = (y + t)(z + t). Then repeated use of the binomial theorem yields m φ′ (t)g(t)m = 2(k + 1)(y + z + 2t)k [(y + t)(z + ! t)] X k = 2(k + 1)[(y + t)(z + t)]m (y + t)i (z + t)k−i i i = 2(k + 1) X k i i = 2(k + 1) X k i i = 2(k + 1) X i,r,s ! (y + t)m+i (z + t)m+k−i !" ! X m+i k i r r ! ! m+i r r m+i−r y t ! #" ! X m+k−i s s s m+k−i−s z t # m + k − i r s 2m+k−r−s y z t . s The coefficient of tm−1 in this sum comes from the terms in which s = m + k − r + 1. Thus by equation (5), together with φ(0) = (y + z)k+1 , we have (y + z + 2F )k+1 = (y + z)k+1 ! ! ! ∞ X m+k−i xm X k m + i y r z m+k−r+1 . + 2(k + 1) m i r m + k − r + 1 m=1 i,r By setting x = 1 and making the change of index of summation to m = n − k − 1, we obtain k+1 (y + z + 2f ) = X r + X X n>k+1 r r k+1−r y z ! k+1 r 2(k + 1) X k y r z n−r n−k−1 i i Thus the result follows. 4 ! ! n−k+i−1 r ! n−i−1 . n−r 3 Equality of (1a) and (1b) This section is devoted to the proof of the equality of the two formulas (1a), (1b), in the range 0 ≤ k ≤ n − 2. Note that we adopt the usual convention that any term with the factorial of a negative integer in its denominator is considered to be zero. Theorem 1 For 0 ≤ k ≤ n − 2 we have k+1 X k i n−k−1 i ! ! n−k+i−1 r ! n−i−1 n−r k+1X = (−1)j r j k k−j  n−j−2 n−j−1 j r−1 r−j−1 j . n−j−2 j (6) Proof. We obtain the two sides of (6) by evaluating in two ways the double sum S= X (−1)j j,l (k + 1)! (n − k − 2)! (n − j − 1)! , r! (n − r)! j! l! (r − j − l − 1)! (k − 2j − l)! (n − k − r + j + l − 1)! where the sum is over all nonnegative integers j and l with j ≤ n − 1. We shall need two forms of Vandermonde’s theorem: ! X a i i and X i (−1) i ! b = m−i ! a i ! c−i = m−i a+b m ! (7) ! c−a . m (8) First we sum on l. We have n−1 X (k + 1)! (n − j − 1)! X k − 2j (−1)j S = r! (n − r)! j! (k − 2j)! l l j=0 ! ! ! (k + 1)! (n − j − 1)! n − 2j − 2 = (−1) r! (n − r)! j! (k − 2j)! r − j − 1 j≤k/2 X j n−k−2 r−j−l−1 by (7), and this is easily seen to be equal to the right side of (6). Next we set l = i − j in S and sum on j. This gives S = X i,j = X = X i i (−1)j (k + 1)! (n − k − 2)! (n − j − 1)! r! (n − r)! j! (i − j)! (r − i − 1)! (k − i − j)! (n − k − r + i − 1)! n−1 X (k + 1)! (n − k − 2)! (n − j − 1)! (−1)j r! (n − r)! (r − i − 1)! (n − k − r + i − 1)! j=0 j! (i − j)! (k − i − j)! i X k−i (k + 1)! (n − k − 2)! (n − i − 1)! (−1)j r! (n − r)! (r − i − 1)! (n − k − r + i − 1)! (k − i)! j=0 j ! 5 ! n−j−1 i−j = X i ! (k + 1)! (n − k − 2)! (n − i − 1)! n−k+i−1 r! (n − r)! (r − i − 1)! (n − k − r + i − 1)! (k − i)! i by (8), and this is easily seen to be equal to the left side of (6). It may be noted that the theorem can also be obtained from formula (1), p. 30 of [1] by taking the limit as c → ∞ then setting m = r − 1, a = −k, w = 1 − n, and b = n − k. Finally, we remark that Zeilberger’s algorithm (see [8]) is capable of verifying that the two sides of (6) satisfy the same recurrence relation. In fact, though, the recurrences and proof certificates that one obtains are very unpleasant and considerably longer than the human proof we have given above. 4 A bijection The formula (1b) shows that 2N0n,r = N1n,r ! 4 n−2 = r r−1 ! n−1 . r−1 Here we give a bijective proof of the assertion that 2N0n,r = N1n,r . For convenience, we define s = n − r so that we deal with an r × s rectangle. The distance at x between two lattice paths P1 and P2 is dx (P1 , P2 ) = min{ |y2 − y1 | : (x, y1 ) ∈ P1 , (x, y2 ) ∈ P2 }. Definition of the map. We define our map φ from pairs of paths with no intersection to pairs of pairs of paths with one intersection. Hence let (P, Q) be a pair of paths that do not intersect. We may assume that P is north of Q. There are two cases: 1. dx (P, Q) ≥ 2 for all 1 ≤ x ≤ r − 1. Then φ maps (P, Q) to (P ′ , Q) and (P, Q′ ) as follows. To obtain P ′ from P , first translate P down by 1 unit, then delete its first north edge, and then concatenate a north edge to the last vertex of the new path. The pair (P ′ , Q) intersects at (r, s − 1) and only there. To obtain Q′ from Q, first translate Q up by 1 unit, then delete its last north edge, then adjoin a north edge in-bound to its first vertex. The pair (P, Q′ ) intersects at (0, 1), and only there. 2. dx (P, Q) = 1 for some x, 1 ≤ x ≤ r − 1. Let x0 be the smallest such x, and let y0 = maxy {(x0 , y) ∈ Q}. First suppose (x0 , y0 ) 6= (1, 0). Then lower by 1 unit the portion of P from (0, 0) to (x0 , y0 + 1), 6 and move the first north edge of P to join (x0 , y0 ) and (x0 , y0 + 1), to obtain the new path P ′ . The pair (P ′ , Q) intersects at (x0 , y0 ) and only there. To get another pair of paths that intersect at (x0 , y0 ), interchange the upper path with the lower path between (x0 , y0 ) and (r, s), in (P ′ , Q). Finally, suppose (x0 , y0 ) = (1, 0). Then we first produce (P ′ , Q) exactly as in the previous paragraph so that (P ′ , Q) intersects at (1, 0) and only there. To produce a second pair that intersects at (r − 1, s) and only there, the double-east edge from (0, 0) to (1, 0) in (P ′ , Q) is, in this case, moved to the northeast corner as another double-east edge. Then the resulting pair is translated 1 unit westward so the paths begin at (0, 0), end at (r, s), and intersect at (r − 1, s) and only there. Invertibility of the map. We partition the collection of all pairs of paths that intersect exactly once into groups of two as follows. (i) If (P, Q) intersects at (1, 0) then pair (P, Q) with (P ′ , Q′ ), where (P ′ , Q′ ) intersects at (r − 1, s) and the removal of the double-east edges from both pairs (P, Q), (P ′ , Q′ ) results in the same pair of nonintersecting paths on an (r − 1) × s rectangle. (ii) If (P, Q) intersects at (0, 1) then pair (P, Q) with (P ′ , Q′ ), where (P ′ , Q′ ) intersects at (r, s − 1) and the removal of the double-north edges from both pairs (P, Q), (P ′ , Q′ ) results in the same pair of nonintersecting paths on an r × (s − 1) rectangle. (iii) Suppose (P, Q) intersects at a point (x, y) with 0 < x < r and 0 < y < s. If P is north of Q from (0, 0) to the intersection then pair (P, Q) with (P ′ , Q′ ) where the two paths have been interchanged from the intersection point to (r, s), so P ′ is always north of Q′ . Now we can define the inverse mapping ψ = φ−1 . Given two pairs of paths (P, Q), (P ′ , Q′ ) from group (i) above, ψ looks only at (P, Q). It removes the intersection by lifting one of the double edges up by 1 unit in (P, Q), and it moves the second edge of P , which is an east edge, to join (0, 0) and (0, 1). For (P, Q), (P ′ , Q′ ) from group (ii) above, ψ looks at the pair (P ′ , Q′ ) which intersects at (r, s − 1). It lifts the upper path, except for its final north edge, by 1 unit, then moves that north edge to join (0, 0) and (0, 1). Finally, for (P, Q), (P ′ , Q′ ) from group (iii) above, ψ looks at (P, Q) such that P is always north of Q, and suppose they meet at (x0 , y0 ). Then it lifts the portion of P that precedes the intersection up by 1 unit, deletes the north edge of P from (x0 , y0 ) to (x0 , y0 + 1), and adds a north edge to join (0, 0) and (0, 1). 7 5 Termination at different endpoints In this section we extend the formula for Nkn,r by considering pairs of walks where the two walkers start at the same point but end at different points. Say the walkers both start at (0, 0), and the first walker terminates at (r, n − r) and the second at n,k denote the number of (unordered) pairs of these (t, n − t). Then, for r < t, let Mr,t walks that intersect in exactly k points, not counting the starting point; for r = t, let n,k = N n,r . Mr,r k−1 n,k are given by Theorem 2 For r ≤ t, the numbers Mr,t 2 XX u ! j (t − j − r + 1 + 2u) k n − 1 − j − 2u 2u + 1 (−1) j k − 1 − 2u j ! n − 1 − j − 2u t−j t−r X k + n−k j j ! n−k r−j ! ! n − 1 − j − 2u r − 1 − 2u ! n−k . (9) t−j The second expression counts the number of pairs that intersect in each of the first k steps; the first expression counts the remaining pairs. For k = 0 we recover the familiar: ! ! t−r n n n,0 Mr,t = . n r t Proof outline. The proof consists of four steps. We will explain the four steps n,k but most of the details are omitted. Let f (n, k, r, t) be the claimed formula for Mr,t . 1. Show that the claimed formula is correct for r = t. That is, show that the n,r formula for f (n, k, r, r) simplifies to Nk−1 . This takes several lines of manipulations which we omit, and includes a proof of the fact that i−1 X j (−1) j=0 ( 2i−2 j − 2i−2 n−(2i−1) n−(2i−1)  j−1 ) r−j r−(2i−j−1)  (n − (2i − 1) 2i−2 i−1 i−1 = (−1) n−i−1 n−i r−1 r−i  . r n−i−1 i−1 2. Notice a recurrence relation for r < t. By considering the last steps of both walks, we obtain: n−1,k n−1,k n−1,k n−1,k n,k + Mr−1,t + Mr,t−1 + Mr−1,t−1 , = Mr,t Mr,t t>r+1 n−1,k n,k n−1,k n−1,k n−1,r + Mr−1,r . Mr,r+1 = Mr,r+1 + Mr−1,r+1 + Nk−1 (10) (11) 3. Show that the claimed formula satisfies the recurrence for r < t. Since f (n, k, r, r) = we need only show that f (n, k, r, t) satisfies the recurrence given in equation (10) for t ≥ r + 1 in order to prove that it satisfies both (10) and (11). Note that k is constant. We use the combinatorial identity n,r Nk−1 ,   a−b m m m a b =   a−b m−1 m m−1 a b +   a−1−b m−1 m m−1 a−1 b 8 +  m a−b+1 m−1 m−1 a b−1 +  m a−b m−1 m−1 a−1 b−1 . ! The first expression of f (n, k, r, t) is a linear combination, with coefficients independent of n, t and r, of the left side of the above identity with a = t − j, b = r − 1 − 2u and m = n − 1 − j − 2u and hence obeys the recurrence (10). The second expression is a similar linear combination with a = t − j, b = r − j and m = n − k and hence also obeys that recurrence. 4. Show that the claimed formula satisfies the boundary conditions. The values of M are uniquely determined by the recurrences and the boundary values for r < t. The boundary values are k+1,k Mr,t = ! k δr,t−1 , r 0 ≤ r < t ≤ k + 1. The second expression of f (k + 1, k, r, t) is equal to kr δr,t−1 since the only nonzero value occurs when j = r and t = r + 1. It then takes several lines of calculations and a variant of Vandermonde’s formula to show that the first summand of f (k + 1, k, r, t) is 0 when r < t.  6 Further remarks In this section we discuss the case where the endpoints of the walks are not prescribed. Theorem 3 Let fk (n) denote the number of ordered pairs of walks that begin at the origin, which end at the same point, which take n steps each of which is north or east, and which intersect each other internally in exactly k points. Then fk (n) = 2k+1 (k + 1) (2n − k − 2)! . n!(n − k − 1)! Proof. From equation (4) above, we have that X n fk (n)xn = uk (x, 1) = (1 − √ 1 − 4x)k+1 = (2x)k+1 X (k + 1)(2m + k)! m≥0 m!(m + k + 1)! xm . (The expansion is equation (2.5.16) in [7].) Since there are 2n n pairs of walks that start at the origin and end at the same point, we can interpret this probabilistically as: If two independent walkers start at the origin, and each takes n steps, each step being north or east with equal probability, and if they finish at the same point, then the probability that the interior of their paths intersect in exactly k points is  p(n, k) = 2k+1 (k + 1)(2n − k − 2)!n! (n − k − 1)!(2n)! (n ≥ 1; 0 ≤ k ≤ n − 1). It is interesting to note that p(n, 1) = 2p(n, 0) if n > 1. The following theorem is probably known, though we find no reference. 9 Theorem 4 Let gk (n) denote the number of ordered pairs of walks that begin at the origin and proceed with north or east steps, which each have n steps, and which intersect each other in exactly k points excluding the origin. Then ! 2n − k . n k gk (n) = 2 Proof. Let fk (n) be defined as in Theorem 3, and let Fk (x) and Gk (x) be the generating functions for fk (n) and gk (n). Then gk (n) = X j If we sum over k we find that 4n = solves to g0 (n) = √ Fk (x) = (1 − 1 − hence gk (n) = 2k 2n n , and so G0 (x) 4x)k+1 , we have fk−1 (j) g0 (n − j). P j 2j  j g0 (n − − 12 = (1 − 4x) (12) j). This sequence of equations . Now from equation (12), since ! √ X 2j − k (1 − 1 − 4x)k k √ =2 Gk (x) = xj , j 1 − 4x j 2n−k . n (The last expansion is equation (2.5.15) in [7].) n Hence the probability that two such walks do not intersect at all is 2n n /4 . For another proof of the theorem one can look at the difference of the two walks. If (x′ , y ′ ) and (x′′ , y ′′ ) are the coordinates of the walkers on the two walks, put (x, y) := (x′ − x′′ , y ′ − y ′′ ). Then (x, y) walks to (x, y) with probability 1/2, to (x + 1, y − 1) with probability 1/4, and to (x − 1, y + 1) with probability 1/4. Thus the difference walk takes place entirely on the line x + y = 0. The statistics of intersections of the original pair of walks are identical with those of returns to 0 of a single one-dimensional walk of twice as many steps, and are given in any book on random walks. Stirling’s formula and some manipulation yields:  Corollary 1 [3] The average number of times that two independent random walks of n steps, beginning at the origin, cross each other is (2n + 1)! −1=2 4n n!2 r 7 n − 1 + o(1). π Nonintersecting walks with a barrier In this section we consider a variation on the original problem. Let r, s ≥ z > 0. We consider two walkers, U and L, that start at the respective lattice points (0, z) and (z, 0) inside the rectangle with the barriers x = r and y = s. They independently move either north or east until they reach either the barrier x = r or the barrier y = s, 10 where they are constrained to move along the barrier to the terminus (r, s). At each lattice point of A = { (i, j) : i < r, j < s } the probability of moving east is p(i, j) and the probability of moving north is 1 − p(i, j). We will find the probability B(r, s, z) that the first time the walkers meet is at the terminus. We say such a pair of walks is “valid.” Let us stop the walks after r + s − z − 1 steps. Then a walker ends at either the point (r − 1, s) or the point (r, s − 1). The condition that a pair of walks is valid is thus equivalent to all three of the following holding: (1) the walkers never meet in A, (2) U ends at (r − 1, s), and (3) L ends at (r, s − 1). Now, we claim that the probability that (2) and (3) are true but (1) is false is equal to the probability that U ends at (r, s−1) and L ends at (r −1, s). For, if we have a pair P of walks which satisfy (2) and (3) but intersect, we can create a new pair of walks P ′ (as in common in walk problems) by interchanging the segments from the beginning to the first intersection (“initial segments”) of the two walks in P . The resultant P ′ is a pair of walks in which U ends at (r, s − 1) and L ends at (r − 1, s), where P ′ has the same probability of occurrence as does P . Similarly, a pair P ′ of walks in which U ends at (r, s − 1) and L ends at (r − 1, s) must intersect somewhere; if we interchange their initial segments we obtain a pair P of walks which satisfy (2) and (3) but not (1). Hence if u denotes the probability that U ends at (r − 1, s), and l denotes the probability that L ends at (r, s − 1), then the probability that a pair of walks is valid is B = ul − (1 − u)(1 − l) = u + l − 1. Now, to simplify the above expression we proceed as follows. We remove the barriers and extend p(i, j) to the points where i ≥ r or j ≥ s arbitrarily. Then the probability u is the probability that a single walker starting at (0, z) and moving either to the east, with probability p(i, j), or north, with probability 1− p(i, j), is, after r + s − z − 1 steps, at one of the vertices in the set of lattice points on the line x + y = r + s − 1 that lie on or above the line y = s. Similarly, l is the probability that a single walker starting at (z, 0) is, after r + s − z − 1 steps, in the set of lattice points on the line x + y = r + s − 1 that lie on or to the right of the line x = r. If the transitional probabilities p(i, j) in A are a function of i + j only, say p(i, j) = pi+j , then we can extend p(i, j) so that this remains true. In this case, l is also the probability that a single walker starting at (0, z) is, after r + s − z − 1 steps, in the set of lattice points on the line x + y = r + s − 1 that lie on or below the point (r − z, s + z − 1). The expression u + l − 1 thus simplifies to yield the following: Theorem 5 If the transitional probability at (i, j) is a function of i + j only, then B(r, s, z) is equal to the probability that a single unconstrained walker starting at (0, z) and walking for r + s − z − 1 steps without barriers ends up at one of the z points { (r − t, s + t − 1) : 1 ≤ t ≤ z }. 11 Corollary 2 If all the transitional probabilities pij of moving east have the same value p, then ! z X r + s − z − 1 r−t B(r, s, z) = p (1 − p)s+t−z−1 . r − t t=1 In particular, if two walkers start at the origin (0, 0) and move as above, then the  r s probability that they do not meet again until the point (r, s) is simply 2 r+s−2 r−1 p (1−p) . References [1] W. N. Bailey, Generalized Hypergeometric Series. New York: Hafner, 1972 (originally published in 1935 by Cambridge University Press). [2] N. Dershowitz and S. Zaks, Enumeration of ordered trees, Discrete Math. 31 (1980) 9–28. [3] M.E. Fisher, Walks, walls, wetting, and melting, J. Statist. Phys. 34 (1984), 665– 729. [4] A. J. Guttmann and T. Prellberg, Staircase polygons, elliptic integrals, Heun functions, and lattice Green functions, Phys. Rev. E 47 (1993) R2233–R2236. [5] T. V. Narayana, Sur les trellis formés par les partitions d’un entier et leurs applications à la théories des probabilités, C. R. Acad. Sci. Paris 240 (1955) 1188–1189. [6] T. V. Narayana, A partial order and its application to probability, Sankhya 21 (1959) 91–98. [7] H. S. Wilf, generatingfunctionology (2nd ed.), Academic Press, New York, 1993. [8] D. Zeilberger, The method of creative telescoping, J. Symbolic Comput. 11 (1991) 195–201. 12