Counting Lattice Paths With Four Types of Steps
The main purpose of this paper is to derive generating functions for the numbers of lattice paths running from (0, 0) to any (n, k) in Z N consisting of four types of steps: horizontal H = (1, 0), vertical V = (0, 1), diagonal D = (1, 1), and sloping L = (1, 1). These paths generalize the well-known Delannoy paths which consist of steps H, V , and D. Several restrictions are considered. However, we mainly treat with those which will be needed to get the generating function for the numbers R(n, k) of these lattice paths whose points lie in the integer rectangle {(x , y) N2 : 0 x n, 0 y k}. Recurrence relation, generating functions and explicit formulas are given. We show that most of considered numbers define Riordan arrays. We follow the notation of Lehner [9] and Chen et al. [2]. A lattice path is a sequence of points in the integer lattice Z2. A pair of consecutive points is called a step of the path. Let = (1, 2) be a step. By writing, for instance, is a step H = (1, 0) we mean that 2 1 = H . Let us consider the family of lattice paths running from (0, 0) to (n, k) and consisting of horizontal steps H = (1, 0) and vertical steps V = (0, 1). It is well known that the number of them is
-
Fig. 1 A Delannoy path from
the origin to (4, 3)
Adding third kind of steps, diagonal ones D = (1, 1), we obtain Delannoy paths (see
Fig. 1) and corresponding Delannoy numbers D(n, k). That is, D(n, k) is the number
of lattice paths running from (0, 0) to (n, k) consisting of horizontal H , vertical V and
diagonal steps D = (1, 1). See Comtet [3, p. 81] and Stanley [16, p. 185]. We refer
the reader to Banderier and Schwer [1] and to the references given there. In this case
we have
D(n, k) =
i0
= [zk ] (1(1+z)zn)+n1 .
Continue in this fashion we add fourth kind of steps, so-called sloping steps L =
(1, 1), and we ask about the number of paths running from (0, 0) to (n, k) in this
generalized case. There are several variants which we may deal with. However, we
mainly treat with those which will be needed to get the generating functions for the
numbers R(n, k) of these lattice paths from the origin to (n, k) whose points lie entirely
in the integer rectangle of lattice points {(i, j ) : 0 i n, 0 j k} (see Fig. 2 for
n = 4, k = 3). In Sect. 6 we show that
R(n, k) = [zk ]
2n+2(1 + z)n1 6z 3z2
1 z +
1 6z 3z2
1 z
1 6z 3z2
However, simple exact formula for R(n, k) is still unknown. Here we give the array
(R(n, k)) for 0 n 6 and 0 k 8,
Before we present other results let us specify the notation. We write N for the set
{0, 1, . . .}. Let L denote the set of integer lattice points {(i, j ) ZN}. By the positive
lattice L+ and negative lattice L we mean the sets {(i, j ) N2} and {(i, j ) ZN :
i 0}, respectively. Note that we include positive points of the y-axis in both cases.
We also write L = {(i, j ) N2 : i j } and Ln = {(i, j ) N2 : 0 i n}.
Let I be a subset of L. From now on and throughout the paper, by the lattice
path of I we mean a sequence (1, 2, . . . , j ) of adjacent steps i of four types:
horizontal (1, 0), vertical (0, 1), diagonal (1, 1), and sloping (1, 1), and whose set
of points is a subset of I. Let (x , y) be a lattice point and a lattice path, we write
(x , y) if (x , y) is a point of .
1.1 List of Variants
Let X {S, P, N , U, R}. By X (n, k) we denote the number of paths running from
(0, 0) to (n, k) Z N with certain restrictions described in the following list. In
bold print X we denote corresponding family of paths and by calligraphic letter X we
denote certain generating function of X .
1. S(n, k)paths of L (see Fig. 3a),
2. P(n, k)paths of L+ (see Fig. 3b),
3. N (n, k)paths of L (see Fig. 4a),
4. U (n, k)paths of L (see Fig. 4b),
5. R(n, k)paths of Ln (see Fig. 2).
These paths are connected with weighted free (t, l)-Motzkin paths [2]. A weighted
free (t, l)-Motzkin path is a lattice path from (0, 0) to (n, 0) consisting of horizontal
steps (1, 0), down steps (1, 1), and up steps (1, 1), and for which each of
horizontal and down steps have been assigned a number from the sets {1, 2, . . . , t } and
{1, 2, . . . , l}, respectively. It turns out [5] that there is a bijection between S(0, n) and
the family of weighted free (3, 3)-Motzkin paths of length n.
1.2 List of Generating Functions
In the first part of the paper we show that
S(z) =
n0
S(0, n)zn =
16z 3z2
Fig. 3 Two lattice paths: a one from S(2, 3) and b another from P(2, 3)
S(z) =
P (z) =
U (z) =
n0
n0
n0
In the next part we generalize the results listed above. For instance, for the lattice L
we show that
n0 k0
n0 k0
n0 k0
S(n, k)zk t n = 1 P (Sz()z()1 + z)t ,
S(n, n + k)zk t n = 1 SP(z()z)t ,
= 1 SU(z()z)t .
For the lattices L+, L, and L we obtain
n0 k0
n0 k0
G(z) =
k0
P(n, k)zk t n
n0 k0
N (n, n + k)zk t n
G(k)zk = 1 t
In Sect. 7 we derive a generating function for the numbers G(n) which count
lattice paths from the origin to any point of the line x = 0, and whose length is n.
We get
In Sect. 8 we show that most of these numbers define certain Riordan arrays.
As for prerequisites, the reader is expected to be familiar with generating functions
manipulation and extraction of coefficients. The standard work on these techniques is
the book of Wilf [18]. These methods are called also as the method of coefficients, see
Merlini et al. [11] for the compactly review of generating functions tools, connections
between g.f., Riordan arrays and inversion formulas.
2 The Base Case
We denote by S(n, k) the family of lattice paths from (0, 0) to (n, k) of the lattice L,
and by S(n, k) the size of that family. An example of a path from S(2, 3) is given in
Fig. 3a. The last step of any path from S(n, k) is one of horizontal, vertical, diagonal, or
sloping. It implies that the numbers S(n, k) satisfy the following four-term recurrence
relation, S(k, k) = 1 for k 0, and
for k 0 and n k. Using standard methods (see e.g. Wilf [18]) we derive its
ordinary generating functions from the recurrence relation, i.e.,
k0 n0
n0
S(n k, k)x n yk
S(n k, k)x n =
S n (y) =
S(n k, k)yk =
k0
1 + 6y 3y2
1 + 6y 3y2)/(2(1 y)).
S(n, k) =
i=0 j=0
i j
j=0
n j
[x n ]( + x + x 2)k =
Relabelling n n + k we obtain the formula for S(n, k).
Remark Another approach to finding the coefficient of the series expansions of the
functions similar to (1 + u + u2)n follows to the so-called composita introduced
and developed by Kruchinin [8].
3 Counting Paths that Lie in Triangles
Let us observe that paths from S(n, k) contain lattice points of a discrete parallelogram
of sizes n k (see Fig. 3a). In this section we consider paths that lie in certain discrete
triangles of lattice points.
3.1 The Right Triangle
We denote by P(n, k) the family of lattice paths from (0, 0) to (n, k) whose points lie in
the positive lattice L+ (see Fig. 5b). We write P(n, k) = |P(n, k)| and P(k) = P(0, k).
P(n) = P(n 1) +
P(i ) P(n 1 i ) +
P(i ) P(n 2 i ).
n1
i=0
n2
i=0
Proof Observe t (...truncated)