Научная статья на тему 'Difference equations and generating functions for some lattice path problems'

Difference equations and generating functions for some lattice path problems Текст научной статьи по специальности «Математика»

CC BY
90
21
i Надоели баннеры? Вы всегда можете отключить рекламу.
Ключевые слова
DIffERENCEEQUATION / GENERATING FUNCTION / LATTICEPATH / РАЗНОСТНЫЕ УРАВНЕНИЯ / ПРОИЗВОДЯЩИЕ ФУНКЦИИ / РЕШЕТОЧНЫЕ ПУТИ

Аннотация научной статьи по математике, автор научной работы — Chandragiri Sreelatha

An identity for generating functions is proved in thispaper. A novel method to compute the number of restrictedlatticepathsis developed onthebasisof this identity. The methodemploysa differenceequation with non-constant coefficients. Dyckpaths, Schr¨oderpaths, Motzkinspath and otherpaths arecomputed to illustrate this method.

i Надоели баннеры? Вы всегда можете отключить рекламу.
iНе можете найти то, что вам нужно? Попробуйте сервис подбора литературы.
i Надоели баннеры? Вы всегда можете отключить рекламу.

Разностные уравнения и производящие функции в некоторых задачах о решеточных путях

Вработе доказано тождество для производящих функций, на основе которогоразработан метод вычисления числа путей на целочисленной решеткес ограничениями. Данный метод использует разностные уравнения с переменными коэффициентами. В качестве примеров вычислены произвоящие функции для путей Дика, Моцкина и Шрёдера.

Текст научной работы на тему «Difference equations and generating functions for some lattice path problems»

УДК 517.55+517.962.26

Difference Equations and Generating Functions for some Lattice Path Problems

Sreelatha Chandragiri*

Institute of Mathematics and Computer Science Siberian Federal University Svobodny, 79, Krasnoyarsk 660041

Russia

Received 06.02.2019, received in revised form 06.04.2019, accepted 06.08.2019 An identity for generating functions is proved in this paper. A novel method to compute the number of restricted lattice paths is developed on the basis of this identity. The method employs a difference equation with non-constant coefficients. Dyck paths, Schroder paths, Motzkins path and other paths are computed to illustrate this method.

Keywords: difference equation, generating function, lattice path. DOI: 10.17516/1997-1397-2019-12-5-551-559.

For 2 = (zi, ...,zN) we introduce the ring of polynomials C[z], the field of rational functions

C(z) and C[[z]] - the ring of formal power series in zi, ...,zN, where zx = zX1.....zN. If f is a

function on Z^ it is identified as a function on ZN by setting it equal to zero on the complement

ZN\ZN.

A linear finite difference equation is an equation of the form

(x)f (x - y) = g(x), x e zn, (1)

yes

where S C ZN is finite, cy : ZN ^ C are a set of coefficient functions and g : ZN ^ C. A solution of (1) is a function f : ZN ^ C that satisfies the equation.

Let 1 > 0. A lattice path with length 1 is a finite sequence p(0),p(1),... ,p(L) of points in ZN, and its steps are the set of lattice vectors {0} U {p(k) — p(k — 1): k = 1,... ,£}. Specific classes of lattice paths arise by imposing some conditions on the paths: the steps are in a specified S C ZN, the points are in a specified P C ZN, the length L is fixed, and the points are distinct (non intersecting paths).

In the context of lattice path counting problems the function f : ZN ^ Z^ that counts the number f (x) of paths in a specified class for which p(0) = 0 and p(L) = x is computed (the condition p(0) = 0 does not result in a loss of generality).

In the context of restricted lattice class problems function f is computed for a class of paths whose points belong to a specified subset P C ZN. Clearly 0 e P otherwise there are no paths in P that start at 0. If the possible set of steps S C ZN then counting function f has support in P, f (0) = 1, and f satisfies the linear homogeneous difference equation

f (x) = Y. XP (x) f (x — y), (2)

yes

where xP is the characteristic function of P. We recall that xP (x) = 1 if x e P and xP (x) = 0

if x e P.

* srilathasami66@gmail.com © Siberian Federal University. All rights reserved

In this paper function f is computed for selected classes of lattice paths. For these classes S C Z> so f is supported on RN ,and therefore f is uniquely represented by its generating function F(z) G C[[z]]. It is defined by

F(z) — £ f (x) zx. (3)

xezg

The proposed method employs a difference equation with non-constant coefficients for f (x) to compute its generating function F(z). This method is illustrated by counting Dyck paths, Schroder paths, Motzkin paths and more general paths. For these cases the terms in F(z) that correspond to the terms with non-constant coefficients in the difference equation for f(x) are the generating functions of a diagonal subsequence of f(x).

Let P ( z) — caza be a polynomial in z G CN and x, m, a G ZN. The inequality 0 <

a ^ m means that 0 ^ aj ^ mj for all j — 1,..., N. Let us introduce Fa(z) — Y1 f (x)zx and

x^a

&a(z) — — F(z) — Fa(z), where the inequality x ^ a means that for at least one j0 G {1,..., N} the inequality xj0 < aj0 holds.

Let Sj be a shift operator over jth variable: Sj f (x) — f (x1,..., xj—l,xj + 1, xj+i,..., xN ). Then Sa — 5a1 o • • • o San and P (S) — J2 caSa is a polynomial difference operator with

constant coefficients.

First a general identity for the generating functions is derived. Let us note that this theorem generalize the identity for generating functions given in [1].

Theorem 1. For any F (z) G C[[z]] the identity

P(z)F(z) — £ Oaza$m-a(z) — £ P(S-1 )f (x)zx (4)

caz ^m — a(zl O^a^m x^m

holds, where I = (1,..., 1).

Proof. Let F(z) = f (x)zx and P(z) = caZa- Let us consider the product

x^O O^a^m

P(z) • F(z)=( £ caza) (£ f(x)zx) = £ caza( £ f(x)zx + £ f(x)zx)

aa O^a^m x^O O^a^m x^m—a x^m — c

£ Ca £ f (x)zx+a + £ Caza £ f (x)zx —

O^a^m x^m—a O^a^m x^m — a

= £ CaY^ f (x - a)zx + £ Caz° ^ f (x)zx =

O^a^m x^m O^a^m x'm—a

= £( £ Caf (x - a)) zx + £ Caza £ f (x)zx.

x^m O^a^m O^a^m x'm-a

Since J2 caf (x - a) = P(S-1 )f (x) and §m-a(z) = J2 f (x)zx we obtain (4). □

O^a^m x'm-a

Identity (4) implies that for any initial data ^(x), x ^ m, x ^ 0 and any function g(x), x ^ m the equation P(S-1 )f (x) = g(x) has a unique solution f (x) that satisfies initial data: f (x) = p(x), x > 0, x ^ m (see [2,3,4]). If G(z) = g(x)zx then identity (4) gives

x^m

F(z) = £ cazaZm-a (z) + ^^ .

( ) O<a<m ( )

Let A = {ei,..., eN}, where vector ej = (0,..., 0,1, 0,..., 0) contains one on the jth place for j = 1,... ,N. Let f (x) be the number of paths from the origin to the point x G

Corollary. If f (x) is the number of lattice paths from the origin to x G ZN using steps from the set A then its generating function F(z) is

1

F (z)

1 — z1 — ... — zN

Proof. Let us note that function f (x) satisfies the basic recurrence relation f (x) = f (x — e1)+ + • • • + f (x — eN) which implies that the right side of identity (4) is equal to 0. Let us write identity (4) for the two dimensional case:

(1 — zi — z2)F(zi, z2) — (1 — z2)F(0, z2) — (1 — zi)F(zi, 0) + F(0,0) = 0.

Since f (xi,0) = f (0,x2) = 1 for all non-negative integers x1 and x2 we obtain

F (0,z2) = —, F (zi, 0) = ^-, F (0,0) = 1. 1 — z2 1 — zi

1

Then F(zi,z2) =

1 — zi — z2 For N = 3 we have

(1 — zi — z2 — z3)F(zi,z2, z3) — (1 — zi — z2)F(zi, z2,0) — (1 — zi — z3)F(zi, 0, zs) — — (1 — z2 — z3)F(0, z2, zs) + (1 — zi)F(zi, 0,0) + (1 — z2)F(0, z2,0)+

+ (1 — z3)F(0, 0, zs) — F(0, 0, 0) = 0.

Considering the three dimensional case, we obtain

F (zi,z2 ,zs)= 1

1 — zi — z2 — z3

Repeating this process, one can obtain the generating function for any N > 1. □

Let us demonstrate another way of using identity (4) for the two-dimensional case which is useful for some lattice path problems.

Let us introduce F (zi,z2) = f (xi,x2)z®1 z%2 and Fp,q (zi ,z2) =

k k

2 f (pk, qk)zf zq , where (p,q) G Z>. k=i ^

Let us assume that function f (x, y) = <^(x, y), (x, y) ^ (p, q), (x, y) > 0 satisfies the difference equation

P(d-i,S-i)f (x,y)= g(x, y),

where{

, . ( f (x, y), if x = pk, y = qk, k > 1 g(x, y) =

av \ 0, otherwise

Then Fp,q(zi,z2)= g(x,y)zfz2 and identity (4) becomes

(x,v)>(p,q)

P (zi,z2)F (zi,z2) — Caia zai za &p-ai,q-a2 (zi,z2)= Fp,q (zi,z2).

0^«2 ^q

If z1 = z1(t), z2 = z2(t) is a solution of system < 1 2 then function Fp q is

[P (zi,z2 ) = 0

Fp,q (zi(t),z2(t)) = - J2 C*1>*2 za1 (t)z2a2 №p-ai,q-a2 (zi (t),z2(t)).

^q

Let us consider examples of some well-known lattice paths: Dyck, Motzkin and Schroder paths (see [2,5,6, 7, 8,9,10]).A linear transformation is used to map the mentioned above lattice paths to the lattice path in Z>. It allows one to to use methods for finding generating functions [3] and [11]. However, to study lattice paths on or over a rational slope linear difference equations with non-constant coefficients are used to put restrictions on them.

Dyck paths start at the origin and stay on or above the main diagonal y = x (see [2, 6,12]). They use steps e\ = (1,0) and e2 = (0,1). Let f (x,y) be the number of paths going from (0, 0) to (x,y). The number of paths f (x,y) satisfies the difference equation

f (x, y) - f (x - 1,y) - f (x, y - ^ = ^Q(x - y - 1)f (x - 1, У), (5)

1, if x = 0

where SQ(x) = < ' .. is the Kronecker symbol. The initial data are

0, if x = 0

f (x, 0)=0, x = 1, 2,..., f (0,y) = l, y = 0,1, 2,.... (6)

Let F11 (t) be a diagonal power series of F(z1,z2)

Fn(t) = J2 f (k,k)tk. k=1

Proposition 1. Let F(z1,z2) be the generating function of the solution of equation (5). Then the series F(z1,z2) satisfies the following functional equation

(1 - z1 - z2)F(z1,z2) - (1 - z1 )F(z1, 0) - (1 - z2)F(0, z2) + F(0,0) = -z^ f (k, k)(z1z2)k.

If f (x,y) satisfies initial conditions (6) then we obtain a diagonal power series

iНе можете найти то, что вам нужно? Попробуйте сервис подбора литературы.

Fu(t) = £ f (k, k)tk = 1 - 2t - V1 - = t + 2t2 + 5t3 + 14t4 + 42t5 ■■■ . (7) k=1 2t

Proof. For N = 2 and P(z1,z2) = 1 - z1 - z2 we have c00 = 1, c10 = c01 = -1, c11 = 0, m = (1,1), $M(z1,z2) = F(z1, 0)+ F(0,z2) - F(0,0), $1fi(zuz2) = F(0,z2), $0,1^2) = = F(z1,0), $0,0(z1,z2) = 0. Then by theorem we obtain

(1 - z1 - z2)F(z1,z2) - c00$1,1(z1, z2) - c10z1 $0,1 (z1,z2) - c01z2$1,0(z1, z2) =

= £(1 - - — )f (x,y)zXzy.

V>1

Using difference equation (5), we have

(1 - z1 - z2)F(z1,z2) - (1 - z1 )F(z1, 0) - (1 - z2)F(0, z2) + F(0,0) = -z1 ^ f (k, k)(z1z2)k,

k>1

where F(0, z2) = £ f (0, y)z2y = —, F(zi, 0) = £ f (x, 0)zf = 1, F(0,0) = f (0, 0) = 1.

y^0 1 — z2 x^0

Let P(zi, z2) = 1 — zi — z2 =0. Then we obtain

— 1 + - = E f (k,k)(zi(1 — zi))fc. zi k = i

1 + — 4t 1

Let us introduce t = zi(1 — zi). Then zi =-^-. After expansion of — we obtain

£ f(k,k)tk = —1+ 1 — 41 — - = t + 2t2 + 5t3 + 14t4 +42t5 ... .

k=i

It proves the proposition. □

1 f 2k \

The coefficients of series (7) represent the Catalan numbers f (k,k) = ^—( k )' k ^ 1.

Schroder paths start at the origin and stay on or above the main diagonal y = x (see [2]) using steps (1,0), (0,1), (1,1). Let f (x, y) be the number of paths going from (0,0) to (x, y). The number of paths f (x, y) satisfies the difference equation

f (x, y) — f (x — 1, y) — f (x, y — 1) — f (x — 1,y — 1) = —50(x — y — 1)f (x — 1, y) (8)

with the initial data

f (x, 0) = 0, x =1, 2,..., f (0,y) = 1, y = 0,1, 2,.... (9)

Proposition 2. Let F(zi,z2) be the generating function of the solution of equation (8). Then the series F(zi,z2) satisfies the following functional equation

(1 — zi — z2 — ziz2)F(zi, z2) — (1 — zi)F(zi, 0) — (1 — z2)F(0, z2) + F(0, 0) = —z^ f (k, k)(ziz2)k.

k>i

If f (x,y) satisfies initial conditions (9) then we obtain a diagonal power series

Fii(t) = £ f (k, k)tk = 1 — 3t — V1 — et + t2 = 2t + 6t2 + 22t3 + 90t4 + ... . (10)

k=i

Proof. Using theorem and difference equation (8), we have

(1 — zi — z2 — ziz2)F(zi, z2) — (1 — zi)F(zi, 0) — (1 — z2)F(0, z2) + F(0, 0) = —z^ f (k, k)(ziz2)k,

k>i

where F (0, z2) = £ f (0, y)zy = —, F (zi, 0) = £ f (x, 0)zX = 1, F (0,0) = f (0, 0) = 1.

y^0 1 — z2 x^0

Let P(zi, z2) = 1 — zi — z2 — ziz2 = 0, we obtain

—1+JL=£ f (M/z-£+=z))k.

zi k= v 1 +zi J

, zi (1 — zi ) 1 — t — 6t + t2 A „ „ 1

Let us introduce t = -. Then zi = -. After expansion of — we

1 + zi 2 zi

obtain (10). □

Coefficients of series (10) coincide with the numbers of the Schroder paths ending on the main diagonal y = x.

Motzkin paths start at the origin and stay on or above the main diagonal y = x (see [8]) using steps (2,0), (0, 2), (1,1). Let f (x,y) be the number of paths going from (0,0) to (x, y). The number of paths f (x,y) satisfies the difference equation

f (x,y) - f (x - 2,y) - f (x,y - 2) - f (x - 1,y -1) = -(¿q(x -y -1) + 50(x -y - 2))f (x - 2,y) (11)

with the initial data

1 + (_1)y

f(x, 0) = 0, x =1, 2, 3,..., f (0, y) = ——2——, y = 0,1, 2,...,

f(x, 1) = 0, x = 2, 3,4,..., f (1,y)= (1 - (-14)(y +1), y =1, 2, 3,.... (12)

Proposition 3. Let F(z\,z2) be the generating function of the solution of equaion (11). Then the series F(zi,z2) satisfies the following functional equation

(1 -z2 -z22 -ziz2)F(zi,z2) - (1 -zi)F(zi, 0) - (1 -z2)F(0, z2)+ F(0,0) = -z? f (k,k)(ziz2)fc.

k^2

If f (x,y) satisfies initial conditions (12) then we obtain a diagonal power series

Fii(t) = £ f (k, k)tk = -1 - t + 1 - t -V,f 2t = 2t2 + 4t3 + 9t4 + 21t5 + ••• . (13)

k=2

Proof. Using theorem and difference equation (11), we have

(1 - z 2 - z2 - z iz2)F(z i, z2) - (1 - z 2 - z iz2)F(z i, 0) - (1 - z| - z ^)F(0, z2)+

+ F(0, 0)(1 - z iz2) - <$i ,q(zi, z2)(1 - z2) - <1 q,i(z i, z2)(1 - z 2) + f (1,1)ziz2 =

= -z 2 £ f (k,k)(ziz2)k, k^2

where F(zi, 0) = 1, F(0,z2) = , F(0,0) = 1, <$q, i(z i,z2) = z iz2, <$i,q(z i,z2) =

1 - z22

z iz2 r, f(1,1) = 1.

(1 - z2 )2i

Let P(zi, z2) = 1 - z 2 - z2 - z iz2 = 0. Then we obtain

1+1 ^ f(kk)( zi (74-3^2 - zi) )k z iz2 -1 + ¿2 =2^ f(k,k^ -2- .

z k=2 2

, , 2 1 -1W1 - 2t - 3t2 A „ „ 1 ,

Let us introduce t = z iz2. Then z 2 = ---. After expansion of we obtain

2 z 2

(13). □

Coefficients of series (13) coincides with the numbers of the Motzkin paths ending on the main diagonal y = x.

Let us consider some generalization of the problem of enumerating lattice paths with steps (1,0), (0,1), (r, r) which start at the origin and stay on or above the main diagonal y = x. Let f (x,y) be the number of paths going from (0,0) to (x, y). The number of paths f (x,y) satisfies the difference equation

f (x, y) - f (x - 1, y) - f (x, y - 1) - f (x - r,y - r) = -5q(x - y - 1)f (x - 1, y) (14)

with some initial data

f (x,y) = V(x,У), (x,y) > (0, (x,y) ^ (r,r). (15)

Proposition 4. Let F(z1,z2) be the generating function of the solution of equation (14). Then the series F(z1,z2) satisfies the following functional equation

(1-z1-z2-zTl zT2 )F (z1, z2 ) $r,r (z1,z2) + z1$r-1,r (z1,z2) + z2 $r,r-1(z1,z2) = -z1 ^ f (k, k)(z1z2)k

k^r

Proof. Using theorem and difference equation (14), we have

(1 - Z! - z2 - z1 z2 )F (zx,z2 ) - $r,r (zi,z2) + Z!$r-1,r (zi,z2) + z2$r,r-l(zi,z2) =

= -zi£ f (k,k)(ziz2)k

k^r

where

$r,r (zi, z2 ) = $r-1,r-1 (zi,z2) + $ Q,r-l(zi, z2 ) + ®r-1fi(zi,z2) - f (r - 1,r - 1)(ziz2)r-1, $r-1,r (zi, z2 ) = $r-1,r-i(zi,z2) + $ Q,r-i(zi ,z2),

$2,2-1 (z1,z2) = $r-1,r-1(z1, z2) + $r-1,0(z1, z2),

r —2

$r-1,r-1(z1,z2) = i,0(z1,z2),

i=Q

w w

$Q,r-i(zi,z2)= J2 f (x,r - 1)zXz2-1, &r-i,Q(zi,z2)= f (r - 1,y)zri-1z2 .

x=r-1 y=r-1

Let P(zi, z2) = 1 - z1 - z2 - z\zr2 = 0. Then we obtain

$r-1,r-i(zi, z2)+$ Q,r-i(zi,z2)+$ r-1,Q(zi,z2)- f (r - 1,r - 1)(ziz2)r-i - zi($r-1,r-i(zi, z2) +

+ &Q,r-i(zi,z2)) - z2($r-i,r-i(zi, z2) + &r-i,Q(zi,z2)) = ziJ2 f (k,k)(ziz2)k.

k^r

Since f (x,y) = 0 below the diagonal, we obtain

(1 - zi - z2)$r-1,r-i(zi,z2) + (1 - z2)&r-1,Q(zi, z2) = zi f (k, k)(ziz2)k ■

k^r-1

1 - tr + V1 - 4t - 2tr + t2r Let us inroduce t = z1z2 implies z1 =-^-. Then

— ((1 - zi - z2)$r-1,r-i(zi,z2) + (1 - z2)$r-ifl(zi,z2)) = V f(k,k)tk■ (16) z1

1 k^r-1

iНе можете найти то, что вам нужно? Попробуйте сервис подбора литературы.

For r = 2 we have the initial data f (x, 0) = 0, x = 1, 2,3,..., f (0,y) = 1, y = 0,1,2,..., f(x, 1)=0, x = 2, 3, 4,..., f(1,y) = y, y = 1, 2, 3,.... Using (16), we obtain

w

-1+- = Y, f (k,k)(ziz2)k. zi t=1

Let us introduce t = ziz2. Then zi obtain

1 - t2 - 4t - 2t2 + t4

2

. After expansion of

1

, we

1 - t2 - V 1 - 4t - 2t2 + t4 2t

t + 3t2 + 8t3 + 25t4 + 83t5 + ••• . (17)

It proves the proposition.

Coefficients of series (17) coincides with the numbers of other paths ending on the main

diagonal y = x.

References

[1] A.P.Lyapin, S.Chandragiri, Generating functions for vector partitions and a basic recurrence relation, Journal of Difference Equations and Applications, 25(2019), 1052-1061.

[2] M.Bousquet-Melou, M.Petkovsek, Linear recurrences with constant coefficients: the multivariate case, Discrete Mathematics. 225(2000), 51-75.

[3] E.K.Leinartas, A.P.Lyapin, On the rationality of multidimensional recursive series, J. Sib. Fed. Univ. Math. Phys, 4(2009), no. 2, 449-455.

[4] E.K.Leinartas, Multiple Laurent series and fundamental solutions of linear difference equations, Siberian Mathematical Journal, 48(2007), no. 2, 268-272.

[5] J.Labelle, Y.N.Yeh, Generalized Dyck paths, Discrete Math, 82(1990), 1-6.

[6] D.Merlini, R.Sprugnoli, M.C.Verri, The area determined by underdiagonal lattice paths, Trees in Algebra and Programming — CAAP, 1996, 59-71.

[7] I.M.Gessel, A factorization for formal Laurent series and lattice path enumeration, J. Com-bin. Theory. Ser. a, 28(1980), 321-337.

[8] A.Dvoretzky, Th.Motzkin, A problem of arrangements, Duke Math. J., 14(1947), 305-313.

[9] P.Duchon, On the enumeration and generation of generalized Dyck words, Discrete Math, 225(2000), 121-135.

[10] R.Stanley, Enumerative Combinatorics, Vol. 1, 1990.

[11] A.A.Kytmanov, A.P.Lyapin, T.M.Sadykov, Evaluating the rational generating function for the solution of the Cauchy problem for a two-dimensional difference equation with constant coefficients, Programming and computer software, 43(2017), no. 2, 105-111.

[12] D.Merlini, D.G.Rogers, R.Sprugnoli, M.C.Verri, Underdiagonal lattice paths with unrestricted steps, Discrete Applied Mathematics, 91(1999), 197-213.

Разностные уравнения и производящие функции в некоторых задачах о решеточных путях

Шрилатха Чандрагири

Институт математики и фундаментальной информатики Сибирский федеральный университет Свободный, 79, Красноярск, 660041

Россия

В работе доказано тождество для производящих функций, на основе которого разработан метод вычисления числа путей на целочисленной решетке с ограничениями. Данный метод использует разностные уравнения с переменными коэффициентами. В качестве примеров вычислены произ-воящие функции для путей Дика, Моцкина и Шрёдера.

Ключевые слова: разностные уравнения, производящие функции, решеточные пути.

i Надоели баннеры? Вы всегда можете отключить рекламу.