20
Journal of Statistical Planning and Inference 14 (1986) 95-114 North-Holland 95 THE ENUMERATION OF RESTRICTED RANDOM WALKS BY SHEFFER POLYNOMIALS WITH APPLICATIONS TO STATISTICS Heinrich NIEDERHAUSEN Department of Mathematics, Florida Atlantic University, Boca Raton, FL 33431, USA Received 30 October 1984; revised manuscript received 10 December 1984 Abstract: Sheffer polynomials are solutions of certain systems of operator equations. Difference equations, which frequently occur in path enumeration, belong in that class. To find representa- tions of the solutions, the restriction on the paths has to be in the form of boundaries. Such pro- blems have applications in two-sample tests. We also consider paths with more than two step vec- tors. The gambler’s ruin problem illustrates the method. If paths with a given area underneath are counted, q-binomial coefficients come into play. Eulerian Sheffer sequence solve some of such problems. AMS Subject Classification: Primary: 05A15; Secondary: 39A10, 47B39. Key words and phrases: Lattice paths; Non-parametric statistics; Difference equations, Umbra1 calculus. Introduction In this paper I want to explain how Sheffer polynomials can be applied to certain path enumeration problems. Section 1 gives an overview, which is certainly not com- plete. The problems are more or less classical, and references can be found in the monographies of Mohanty (1979) and Narayana (1979). For brevity, applications to higher dimensions are omitted. Enumeration problems tend to have applications in probability and statistics. Sec- tion 2 gives an introduction to some applications. A broad class of statistical two- sample tests depends on the so-called ‘Gnedenko path’. Such tests often have one- sample analogies, which are no longer related to path counting, but are still applica- tions of Sheffer polynomials. For details see Niederhausen (1981). Due to the theme of the paper, Sheffer polynomials are seen in a narrow view towards applications in path counting. The reader with a general interest in Sheffer polynomials should see the references given in Section 3. In the following, Sheffer sequences are interpreted as solutions of recurrence relations. That explains their relationship to enumeration problems. Section 3.4 describes some systems of dif- 0378-3758/86/$3.50 0 1986, Elsevier Science Publishers B.V. (North-Holland)

The enumeration of restricted random walks by Sheffer polynomials with applications to statistics

Embed Size (px)

Citation preview

Page 1: The enumeration of restricted random walks by Sheffer polynomials with applications to statistics

Journal of Statistical Planning and Inference 14 (1986) 95-114

North-Holland

95

THE ENUMERATION OF RESTRICTED RANDOM WALKS BY SHEFFER POLYNOMIALS WITH APPLICATIONS

TO STATISTICS

Heinrich NIEDERHAUSEN

Department of Mathematics, Florida Atlantic University, Boca Raton, FL 33431, USA

Received 30 October 1984; revised manuscript received 10 December 1984

Abstract: Sheffer polynomials are solutions of certain systems of operator equations. Difference

equations, which frequently occur in path enumeration, belong in that class. To find representa-

tions of the solutions, the restriction on the paths has to be in the form of boundaries. Such pro-

blems have applications in two-sample tests. We also consider paths with more than two step vec-

tors. The gambler’s ruin problem illustrates the method. If paths with a given area underneath

are counted, q-binomial coefficients come into play. Eulerian Sheffer sequence solve some of

such problems.

AMS Subject Classification: Primary: 05A15; Secondary: 39A10, 47B39.

Key words and phrases: Lattice paths; Non-parametric statistics; Difference equations, Umbra1

calculus.

Introduction

In this paper I want to explain how Sheffer polynomials can be applied to certain

path enumeration problems. Section 1 gives an overview, which is certainly not com-

plete. The problems are more or less classical, and references can be found in the

monographies of Mohanty (1979) and Narayana (1979). For brevity, applications

to higher dimensions are omitted.

Enumeration problems tend to have applications in probability and statistics. Sec-

tion 2 gives an introduction to some applications. A broad class of statistical two-

sample tests depends on the so-called ‘Gnedenko path’. Such tests often have one-

sample analogies, which are no longer related to path counting, but are still applica-

tions of Sheffer polynomials. For details see Niederhausen (1981).

Due to the theme of the paper, Sheffer polynomials are seen in a narrow view

towards applications in path counting. The reader with a general interest in Sheffer

polynomials should see the references given in Section 3. In the following, Sheffer

sequences are interpreted as solutions of recurrence relations. That explains their

relationship to enumeration problems. Section 3.4 describes some systems of dif-

0378-3758/86/$3.50 0 1986, Elsevier Science Publishers B.V. (North-Holland)

Page 2: The enumeration of restricted random walks by Sheffer polynomials with applications to statistics

96 H. Niederhausen / Sheffer polynomials for path enumeration

ference equations which can be solved explicitly in terms of binomial coefficients and powers.

The difficulty in solving a recursion does not only depend on the number of terms in the difference equation, but also on the given initial values. Section 4 deals with a type of boundary conditions that allows explicit representation of the solution. In Section 5 we consider side conditions which lead to piecewise polynomial functions, which can be found by solving systems of linear equations,’ or evaluating deter- minants. If the side conditions are not of this type, solutions in terms of Sheffer se- quences may still exist. An example is the number of score sequences as discussed in Section 6. No representation of the solution is known until now.

1. Some problems in path enumeration

We want to show how Sheffer polynomials occur as solutions to enumeration pro- blems. Being widely applicable, this tool is yet not universal. Three areas of applica- tions are described in Section 1.2-1.4.

1.1. Paths

In order to define a path in the lattice Z’, r-22, we start with a finite set ScZ’

of step vectors. Given that the path reached the point ZE Zr, it can only reach one of the points z+s, SE S, in the next step. For instance, if r= 2 and S= { (O,l),(l ,0),(1,2),(3,2)}, the number d(n, m) of paths which start at (0,O) and reach the point (n, m) can be recursively calculated from

d(n, m)=d(n, m-l)+d(n-1, m)+d(n- 1, m-2)+d(n-3, m-2),

where d(O,O) = 1 and d(n, m) = 0 if n < 0 or m < 0. For counting purposes we have to restrict S such that no point in the lattice can

be reached twice.

1.2. Paths restricted by boundaries

Let v and p be functions from 77-l to Z such that v(n)<,~(n) for all n E?Z-‘. A path in Z’ is bounded by v and p if it only can reach points (n, m) E Z’, nEiZ_‘, m E Z, for which

v(n)<ms&n).

The boundaries p and v are tight if

D(n, m)>O for all v(n)<ml&r).

We shall assume that our boundaries are always of this kind.

Page 3: The enumeration of restricted random walks by Sheffer polynomials with applications to statistics

H. Niederhausen / Sheffer polynomials for path enumeration 91

Remark. In higher dimensions (r~ 3) there are many other interesting boundary pro-

blems. For instance, the restriction

n, <n2< ... <n,_,<m

is not of the above type.

1.3. Paths through given dots

Let D be a subset of Zr. We are interested in the number D(z;l) of paths from

the origin to ZEZ~ which

(a) have step vectors S,

(b) stay in a given set R c 77' (of course, 0 E R and z E R), (c) reach at least I of the lattice points in D.

Recursions and closed forms for D(z; I) can be derived in terms of Sheffer sequences

(see Niederhausen (1982)).

1.4. Paths over a given area (partitions)

The graph of a path from (0,O) to (n, m) with steps { (O,l),( 1 ,0)} looks like a stair-

case over the horizontal axis through (0,O). Denote by Q(n, m) the number of all

such paths where the ‘staircase’ has area a. Thus, Q(n, m)=number of partitions

of a into n nonnegative parts, where each part does not exceed m. These numbers follow the recursion

Qz(n, ml= Q(n, n- l)+Do,-,(n- 1, m) L for v(n)<ml,u(n), o

else,

where v and ,n are given boundaries. Besides the usual initial values

DO(n, m)=O for n<O

we get the additional condition

Do@, ml = L 1 if v(n)<rnsp(n), 0 else

The generating function

d,,,(q) = C Q(n, m)qa 020

satisfies the recursion

d,,,-,(q)+qmdn-l,m(q) if v(n><msCc(n), else,

with initial values d,,, m(q) = 0 for n < 0, and

d,,,(l)=D(n, m)

where D(n, m) counts the same paths without area restriction.

Page 4: The enumeration of restricted random walks by Sheffer polynomials with applications to statistics

98 H. Niederhausen / Sheffer polynomials for path enumeration

Remark. A generalization of this type of restriction to dimensions larger than 2 can

be found in Niederhausen (1980).

2. Applications in probability and statistics

Applications of path counting methods in random walk problems are well known

and often straight forward. A less obvious application to the ‘Gambler’s Ruin Pro-

blem’ is given in Section 3.5. In the next three sections we show some applications

of the basic problems introduced in the three previous sections.

2. I. RPnyi-type statistics

Let X,, . . . , X,, Y,, . . . , Y, be m +n independent random variables originating

from two different kinds of experiments (treatment and control). We want to test

the null hypothesis of no treatment effect, i.e. that both samples follow the same

continuous distribution. The decision will be based on a ‘goodness of mixture’ of

the two samples.

Denote the increasingly ordered combined sample by Vi, . . . , V,+, . There is a

path with steps {(O,l),(l,O)) associated with Vi, . . . , V,,, as follows: The path goes

one unit upwards (resp. to the right) in the I-th step iff V, is a Y-observation (resp.

X-observation). This associated path (‘Gnedenko path’) starts at (0,O) and ends at

(n, m). If all the n + m variables are independently and identically distributed, then

all the (“,‘” ) paths from (0,O) to (n, m) are equally likely to occur as associated

paths. Under certain alternatives to Ho one can expect associated paths which are

not ‘close’ to the diagonal connecting (0,O) and (n, m). The ‘acceptance’ region R depends on the significance level and on the alternative. For Renyi-type tests, R can

be expressed in terms of boundary functions p and v (see Niederhausen (1981)).

Example. To calculate the Kolmogorov-Smirnov distribution

Pr[ -e/n I&(x) -Fr(x) 5 (7/n for all x E fR]

(F, and Fy are the empirical distribution functions of X and Y), one has to find

all paths from (0,O) to (n, m) with steps {(O,l),(l,O)}, which are bounded by

v(i) = ri(m/n) - 01+ - 1 and p(i) = Li(m/n) +Q] (x, =x if x>O, and 0 else).

2.2. Crossings and matchings

Another type of tests rejects the null-hypothesis if the associated path crosses a

boundary line too often (at least I times). Either the boundary can be chosen in ad-

vance and I becomes dependent on a (= error probability of the first kind), or I re-

mains fixed and the boundary depends on a. In either case, the resulting test

distribution was calculated by Takacs (1971) for linear boundaries. If this line con-

Page 5: The enumeration of restricted random walks by Sheffer polynomials with applications to statistics

H. Niederhausen / Sheffer polynomials for path enumeration 99

nects the origin with (n, m) (n and m are the sample sizes), the test is also called mat-

ching test. How to obtain Takacs’ distribution by Sheffer polynomials is described

in Niederhausen (1983) as a special case of the problems stated in 1.3.

2.3. Rank sums and tournaments

The Wilcoxon rank-sum test uses the sum of the ranks of the X-observations in

the combined sample as a criterion for the ‘goodness of mixture’ of the two samples.

‘This rank sum equals (“l’) plus the area under the associated path. Eulerian

Sheffer polynomials can be used to describe the distribution of rank sum tests,

especially if additional boundary conditions are in effect.

A further example of such a partition problem with additional restrictions is the

number of score squences in an n-tournament. Following Winston and Kleitman

(1983), a score sequence sl, . . . . s, is a (non decreasingly ordered) partition of (;) in-

to n nonnegative parts, where the parts are bounded by n - 1, and the i-th partial

sum may not be less than (i) for i = 2, . . . , n - 1. See Section 6 for more details.

3. Sheffer sequences

Since its first appearance in 1973, Rota’s ‘Finite Operator Calculus’ has ex-

perienced numerous generalizations. For a very recent approach which suits well our

needs of working with recursions see Barnabei, Brini and Nicoletti (1982). The

following exposition stays within the framework of the ‘Finite Operator Calculus’,

with the exception of Section 3.6 on Eulerian polynomials. Andrews (1971) brought

these polynomials into the context of the ‘Finite Operator Calculus’, but our nota-

tions follow more closely Niederhausen (1980), which covers also the multi-indexed

case.

3. I. Polynomial sequences

A sequence of polynomials po, p,, . . . is a polynomial sequence, iff deg(p,) = i for

all i=O, 1, . . . . We write (pn) for a polynomial sequence, and we make the conven-

tion that p;(x) = 0 for all x iff i<O.

Example. The system

d,(x)=codn(x-y,)+c,d,_.,(x-y,)+ ... ++d,_,,(x-yk)

is solved by polynomial sequences, if d,, = 0 for n < 0, do = nonzero constant, CO f 0,

and nil0 for i= 1, . . . . k; k fixed. Certain side conditions as d,(v,)=y, for a given

boundary v and initial values y,, yr, . . . make the solution unique.

Page 6: The enumeration of restricted random walks by Sheffer polynomials with applications to statistics

100 H. Niederhausen / Sheffer polynomials for path enumeration

3.2. Sequences of binomial type

A polynomial sequence (6,) is of binomial type, iff

b,,(x+y)= 5 bi(x)b,-i(y) i=O

(3.1)

for all n, x and y. It follows that bo= 1 and b,(O) =d,,..

Examples. b,(x) = x”/n ! and b,(x) = (‘-A’“).

3.3. Delta operators

The operator E” : p(x) +p(x + a) is called shift operator or translation operator.

An operator Q on the algebra of polynomials is translation invariant, iff

EaQ= QEa, i.e.

(Qp)(x + a) = Q(p(x + a)) for all polynomials p. (3.2)

A linear translation-invariant operator Q is a delta operator, iff for every noncons-

tant polynomial p

deg(Qp) = de&9 T 1,

and

Qc=O for every constant polynomial c.

A polynomial sequence (s,) is a Sheffer sequence for the delta operator Q, iff

Q.s,=s,_, for all nsr0.

Example. s,(x) = (“‘~+‘) is a Sheffer sequence for V =I-E-’ (Z=E’, a is a

constant), because

n+x+a- 1 =

n-l > =sn-I(X).

A Sheffer sequence (6,) for Q is a basic sequence for Q, iff b,,(O) =do, n. Every

basic sequence is of binomial type, and every sequence of binomial type is basic for

some operator Q.

If (s,) is a Sheffer sequence for Q, and if (b,) is basic for Q, then we call (b,) the basic sequence associated with (s,), and the following ‘Binomial Theorem’

holds, generalizing (3.1):

sn(X+Y)= i si(X)b,_i(y). i=O

(3.3)

Page 7: The enumeration of restricted random walks by Sheffer polynomials with applications to statistics

H. Niederhausen / Sheffer polynomials for path enumeration 101

3.4. Applications to difference equations

In the context of path enumeration we are interested in the solutions of certain

systems of difference equations. In this section we consider two types which can be

solved by sequences of binomial type. First, let

+ ... +o,d,_l(x-aa,) (3.4)

for nonzero weights al, . . . , a,, and increments a,, . . . , a,; r 2 1. Let do be a nonzero

constant, and define a linear operator Q by Qd, = d,-, . Furthermore, let A =o,E-@+ . . . +a r ,lPar and assume that at + e-v + a, # 0. A is a translation in-

variant operator. From Al =a, + ... + a,#0 follows that A is invertible (Rota et

al. (1973), p. 692). With the help of the operator A we can write (3.4) as

Vd,,=QAd,,, or

Q= VA-‘.

The following lemma shows that Q is a delta operator.

(3.5)

Lemma (Rota et al. (1973), Section 4). Q and R are delta operators iff there exists a translation-invariant and invertible operator such that Q= TR. The basic se- quences (q,,) and (r,,), of Q and R, respectively, are connected by the Transfer Formula

qn(x)=xT-“x-‘r,,(x) for nr 1.

Applying this lemma to (3.5) allows to calculate

d,(x)=?A” n

for nzl.

Examples. (a) A =I; thus, Q = V and d,(x) = (“-~‘X). (b) A = cuEma; thus, Q = cr- ’ VE” and

rl,(x)=“nX n-1+x-an

x-an n >

(( n-1+x-an =Cr n

n > (

n-1+x-an +a

n-l >I*

Remark. If (3.4) is generalized to

d,(x)=d,(x-a)+ald,_,(x-a,)+ a.. +a,d,_,(x-ar), (3.6)

Page 8: The enumeration of restricted random walks by Sheffer polynomials with applications to statistics

102 H. Niederhausen / Sheffer polynomials for path enumeration

a+O, we have to replace V =I-E-’ by R=Z-E-a which has the basic polynomials r,(~)=(~-~~~“).

The recursion

P,(x)=cwp,(x-a)+oip,-i(x-ai)+ .a. +o,P,-1(x-aa,)

has for O#o# 1 no solution by Sheffer sequences. Instead,

p,(x) = &V~ (x),

where (&) is a Sheffer sequence which solves the system

dn(x)=&(x-a)+a,a-o’l’nJn_l(x-a,)+ 0.. +cr,(Y-““aJn_I(x-ar).

But this recursion is of the form (3.6). Similar remarks apply to the second type of recursions

d,(x)=d,(x-l)+a,d,_I(x-aal)+ ... +cz,dn_l(x-ar) (3.7)

+P14-,(x-h)+ ... +&4&-Q,

where pi and bi (i= 1, . . . . s) are a second set of weights and increments (~22). Let

B=P,Epb’ -I .a. +&E-bs.

Again, define the linear operator Q by Qdn=dnpl. It follows from (3.7) that

V =AQ+BQC. (3.8)

According to the previous lemma we have to find an invertible and translation- invariant operator T such that Q= 7V (= VT, because every two translation- invariant operators commute; see Rota et al. (1973), Corollary 4). If T exists, we get from (3.8),

V =ATV +BTCVC. (3.9)

Any translation-invariant and invertible operator T which solves Z=AT+BTCVC-‘, or equivalently (AT)-C-(AT)l-C=A-CBVc~‘, solves also equation (3.9). But the well-known inversion formula for

z(u)‘-c-Z(U))c=u yields

1

l+(l-c)k (-A-CBVC-l)k.

Obviously, T is translation invariant, and from Tl = A- ’ 1 # 0 follows T is invertible.

The same inversion formula lets us find

T-“= c k20(n-kf- ‘)) n_(,n_l)kA”-kcBkVk(c-?

Page 9: The enumeration of restricted random walks by Sheffer polynomials with applications to statistics

H. Niederhausen / Sheffer polynomials for path enumeration 103

d, can now be derived from the Transfer Formula

Applications of this result to the enumeration of paths with three step directions are

given in Section 4.3.

Remark. The above derivation does not use the special form of A or B, but uses

only the translation invariance of both, and the invertibility of A. Also, V could be

replaced by any other delta operator, if (“‘t-‘) is replaced by the corresponding

basic sequence.

3.5. Example: Gambler’s ruin

Dieter (1980) described an electronic ‘roulette machine’ with 13 slots (0, 1, . . . , 12),

where the player can choose between four strategies: He can bet on one, three, four

or six of the numbers 1, . . . , 12 simultaneously. If his capital is n dollars, and the

bank holds a-n dollars, then the probability q(n) of his ultimate ruin follows the

recursion

q(n)=Aq(n-1+12/k)+ l-5 q(n-1) (n=l,...,a-1) ( >

(3.11)

if he is betting on k numbers (k = 1,3,4,6). The side conditions are q(0) = 1 and

q(n) = 0 for n 1 a. Similarly, the expected duration D(n) of the game follows the

recursion (c = 12/k)

D(n)=$D(n-l+c)+ D(n-l)+l (n=l,...,a-l), (3.12)

D(O)=0 and D(n)=0 for nza.

D(n 1 L) is the expected duration of the game under the condition that the gambler

looses the game. The expression DL(n) = q(n)D(n 1 L) follows the recursion

DL(n)=fiDL(n-l+c)+ I-$ DL(n-l)+q(n) (n=l,...,a-1) ( >

DL(0) = 0 and (3.13)

DL(n) = 0 for n 2 a.

Dieter mentions that the ‘standard approach is not the appropriate method to solve

the system’. Instead, he describes an algorithm for calculating q(n), D(n) and

D(n 1 L) simultaneously. Using Sheffer sequences, these systems are easily solved.

To see this, let S,, =q(a- 1 -n). Hence,

s,=~s,+,-,+ ysn+, for n=O,...,a-2,

Page 10: The enumeration of restricted random walks by Sheffer polynomials with applications to statistics

104 H. Niederhausen / Sheffer polynomials for path enumeration

or, substituting n- 1 for n, and defining

A=13 -k and B=-

13-k 13-k’

S,=AS,_,+BS,_, for n=l,...,a-1,

S,=O for n<O, and S,_,=l. (3.14)

The basic sequence (d,) for the delta operator Q defined by V =AQ+ BQC has the

property that d,,(l) satisfies the recursion (3.14) for n 2 1,

d,(l) =&Al) - d,(O) = (v&)(l)

=(AQd,+BQCd,)(l)=Ad,_,(l)+Bd,~,(l)

(‘generalized Fibonacci numbers’).

The Sheffer polynomials s,(x) = d,,(x)/d,_ 1( 1) also fulfill the norming condition

s,_,(l)= 1. Hence,

q(n)=S,_,_.=s,_,_,(l)=d,~,_,(l)/d,_,(l).

From (3.10) follows that

The inhomogeneous systems (3.12) and (3.13) are solved by using Sheffer sequences

with appropriate initial values at 0, giving

L

a-l a- I

Wn)=A 0) c 4(j)- c 4m /da- 11, j=l j=n+l I

and

3.6. Eulerian polynomials

For an Eulerian delta operator r, the shift invariance (3.2) is replaced by

rEa = qaE”r

where q is a given nonzero constant, which we assume to be different from 1. For

convenience, we let r act on the polynomials in the variable qX. Setting X= qX allows us to switch back to the standard form.

Example. The Eulerian operator V,=q ‘-*(I-E-‘) has the Eulerian basic se-

quence ([ “PA’“]), where

J1-qx)(l-q”f’)..*(l-qx+“-r)

(l-q)***(l-q”) .

Page 11: The enumeration of restricted random walks by Sheffer polynomials with applications to statistics

H. Niederhausen / Sheffer polynomials for path enumeration 105

To see this observe that

The Binomial Theorem for Eulerian Sheffer sequences (m) with associated

Eulerian basic sequence (b,) can be stated as

r,(x+yy)= c r,(y)q(“-‘)yb,_,(x) i>O

(3.15)

for all nr0.

Let u be a constant. Denote by (&) the Eulerian basic sequence for tE”, if (6,)

is the Eulerian basic sequence for r. Then

s,(x)=q nu+u(l)b;,(x-u-un)

is the Eulerian Sheffer polynomial for r with initial values s,,(un + i) = 60, n (com-

pare with (4.3)). For more details see Niederhausen (1980).

It follows from (3.15) that for this special type of Eulerian Sheffer sequences,

S,(ZUZ+U+X+y)= i ~~(~i+~+~)q~“~‘~~~“+ui~~,~;(~(~-i)+U+X). (3.16) i=O

4. Piecewise linear lower boundaries

Basic sequences (6,) solve certain systems of operator equations with initial

values 6,(O) = bo, n . In Section 3.5 we showed how to use them as building blocks

for solutions (s,) under more complicated side conditions. We now consider the in-

itial value problem s,,(x,J =yn, where the sequence x0, x1, . . . is piecewise in

arithmetic progression. Again, it will be possible to represent (s,) in terms of (b,),

if the number of different pieces is small.

4.1. Upgrading the binomial theorem

Let u be a constant. If (6,) is basic for Q, the basic sequence (6-,) for the delta

operator EpUQ can be written as

6;,(x)= &W*+W

(see the Lemma in Section 3.4). Furthermore, if (s,) is a Sheffer sequence for Q,

then 5,, (x) =s,(x+ un) is a Sheffer polynomial for E-‘Q. Applying the Binomial

Theorem for Sheffer sequences (3.3) to (6-,) and ($) yields

$,(u+y)= E &(u)6n-;(y) i=O

Page 12: The enumeration of restricted random walks by Sheffer polynomials with applications to statistics

106 H. Niederhausen / Sheffer polynomials for path enumeration

for any u and y. Choosing y =x - un - u and expressing (.?,,) and (b-,) in terms of

(s,) and (6,) gives us the ‘upgraded’ Binomial Theorem

S,(X)= i S;(Ui+U)~~~~UUbn~i(X-Ui-U) i=o

for every U, u and x. As this derivation shows, (4.2) is still the Binomial Theorem

for Sheffer sequences, using the property (4.1). (4.2) was shown by Niederhausen

(1978a, Satz 17.8) and (1980, (2.6)). The latter also contains upgraded Binomial

Theorems for multi-indexed and Eulerian Sheffer sequences.

4.2. Linear boundaries

In (4.2) we showed how to express (s,) in terms of (6,) and the given initial

values s,(un + u). The sequence un + u, n = 0, 1, . . . , is a boundary, if s,(un + u) =

6 O,n. For such boundaries it follows from (4.2) that

%I (xl = X-Uun-” 6,(x-u) for all n?O. x-v

(4.3)

Hence,

s, (un + u +x) = &(x) (see (4.1))

which is the reason for an abundance of identities involving that type of polynomial.

For instance, one obtains analogously to (3.16)

s,(un+u+x+y)= i sj(ui+u+y)s,_;(u(n-i)+o+x) i=o

from the Binomial Theorem (3.1).

4.3. Applications to path counting

First, consider paths with step vectors {(O.l),(l,O)}, which are only restricted by

a lower boundary v, so that

Wn,m)= o 1 D(n,m-l)+D(n-l,m) if m>v(n), if ml v(n).

For m > v(n), the numbers D(n, m) agree with the values d,(m) of the Sheffer se-

quence (d,) for V with initial values d,,(v,)=6,, ,,. If v(i) = iu - 1 for some nonnegative integer U, i.e., if dj (iu - 1) = do, i for all i20,

then we obtain from (4.3)

(4.4)

Page 13: The enumeration of restricted random walks by Sheffer polynomials with applications to statistics

H. Niederhausen / Sheffer polynomials for path enumeration 107

In this case, the numbers D(n, m) =cl,(rn) for mrnu are known as generalized

Catalan numbers.

If

v(i) = 00) for i=O, . . ..L.

uisv for i>L,

where a, u and v have to be chosen such that v is a nondecreasing integer-valued

function, we get from (4.2)

d,(m)= f dj(ui+o) i=O

(~~uu:Ic))( n-i-1+m-ui-v

n-i ).

Hence, for a piecewise-linear boundary v, d,(m) can be calculated as a multiple

sum. The multiplicity of the sum is one less the minimal number of line segments

necessary to graph v on the set { 1, . . . , n}.

In case of several step vectors we need more assumptions to find a Sheffer se-

quence (t,) which follows the same recursion as the counts D(n, m), and agrees

with D(n, m) for m > v(n).

Let S= ((0, I), (1, a,), . . . . (1, a,), (G &), . . . . (c, 6,)) be the set of step vectors with

a,20 (i= 1, . . . . r), 6,ZO (j= 1, . . . . s) and ~22. Without loss of generality we re-

quire that the region above v is accessible, i.e. if (n, m) is a lattice point such that

m > v(n), then there must exist a path from the origin to (n, m) which stays strictly

above v, i.e.

j>v(i) for all (i, j) on the path.

To ensure that D(n, m) is completely specified by the boundary values, we have to

make v steep enough so that we do not need the condition D(n, m) = 0 for m < v(n).

Let u be the largest slope of all the step vectors,

U=max bl bs

a ,,..., a,, - ,..., - . C c 1

It is easy to check that

v(i)-v(i-1)2u-l/c

is a sufficient condition to obtain

D(n, m) = t, (m) for all m > v(n),

if (t,) is the Sheffer sequence which satisfies the same recursion and the side condi-

tion t, (v(n)) = a,, n. For piecewise-linear boundaries, t,(m) can be expressed in

terms of the basic sequence (3.10) using (4.2).

For more details about paths with three step vectors, allowing also for downwards

steps, see Niederhausen (1979).

Page 14: The enumeration of restricted random walks by Sheffer polynomials with applications to statistics

108 H. Niederhausen / Sheffer polynomials for path enumeration

5. Upper barriers

Path-counting problems envolving upper barriers but no lower boundaries can be easily transformed into problems with lower boundaries but no upper barriers, and vice versa. Yet, from the Sheffer polynomial point of view, upper barriers are quite different, leading to the concept of piecewise Sheffer polynomial functions, Sheffer splines, first developed in Niederhausen (1978b). No closed forms, but determinants and recursions can be derived in general.

5.1. Sheffer splines

Let ,u : No-+ R be a nondecreasing function (the upper barrier), and f, : IR --t R (n20) a sequence of piecewise polynomial functions such that

(a) f,(x) is continuous for all xsp(n), (b) f,(x) = 0 for all x>v(n), (c) on each of the intervals (p(i - l), p(i)], i = 0, . . . , n, f,(x) can be extended to a

polynomial (fi( - 1) = - 03). The polynomials must satisfy, in addition, the following conditions: (1) If N(n) = min{j 1 p(j) =,u(n)} then f,(x) is a nonzero constant on

(/W(n) - l), &W))l. (2) There is a delta operator Q such that for all n?O and Oliccp(n),

where f,, i(x) is the polynomial extension of fn(x) from (,u(i- l), p(i)] to IR. Hence, (fn,O)nzO is a Sheffer sequence for Q, and so is (fn~i~+n,N~i~)nrO for every

ir0. If (f,) satisfies the above conditions, we call (f,) a sequence of Sheffer splines for Q. Using the continuity of fn(x) for xlp(n), one can calculate f,(x) by repeated applications of the Binomial Theorem for Sheffer sequences (3.3) as follows. Assuming that fN(j+ 1) (p(j)), . . . ,fi(p(j)) are already calculated for some j and irN(j+ l), we computeJ(p(j+ 1)) using these numbers in (3.3). To increase the ‘order’ from f,, to f,, 1 one uses (3.3) again, and an initial value f,, , (v(n + l)), ,~(j)<v(n+l)%p((j-tl), say, together with fNcj+i,(v(n+l)),...,fn(v(n+l)). The latter, of course, are calculated from the ‘orders n’ values fNcj+ 1j (p(j)), . . . , f,(p(j)). Fortunately, there is a representation theorem to simplify this cumber- some procedure.

Theorem. If (f,) is a sequence of Sheffer splines for Q with basic sequence (b,),

then

f,(x)= c fkWk))b,-Ax-p(k))

where the sum is taken over all k such that x<p(k).

(5.1)

Proof. See Niederhausen (1980), Theorem 4.1.

Page 15: The enumeration of restricted random walks by Sheffer polynomials with applications to statistics

H. Niederhausen / Sheffer polynomials for path enumeration 109

Given the boundary values I, i = 0, 1, . . . , we define a vector f =

(fo(Q,fi (VI), . . . ) and a coefficient matrix B = (bi,j)i,j=o, I,,,, ,

bi,j= 0

i

bi_j(Vi-P(j)) if vi<P(j), else.

The above theorem shows us that (&(p(O)),fi (p(l)), . ..) is the solution vector x of

the system

f=Bx.

In many applications only the number f,@(n)) is of interest. Using Cramer’s rule,

f,(p(n)) can be easily expressed as a determinant (observe that bi,;=b,(vi-p(i))=

1, because Vi has to be less than p(i)).

Remark. If v, -p(k) = c(n -k) for some constant c, then (5.1) becomes a convolu-

tion identity when applied to x= v, . This shows again why the case of linear

bounds is so special.

5.2. Applications to path enumeration

The number D(n, m) of paths with steps S= ((0, l), (1, O)] between the lower

boundary v and the upper barrier p follows the recursion

D(n, ml= L D(n, m- l)+D(n- 1, m) if v(n)<mi&z), o

else.

D(n, m) coincides for v(n)<mlp(n) with the Sheffer spline f,(m) for V, having

initial values f, (v(n)) = do, n. The resulting determinant for f,@(n)) was first de-

rived by Kreweras (1965).

In the case of more step vectors one has carefully to check whether the given

recursion can really be solved by piecewise-polynomial functions. For three step vec-

tors this is done in Niederhausen (1979), Chapter 5.1. The results of Fray and

Roselle (1973) can be derived by this method.

6. Counting with Eulerian Sheffer sequences

The recursion for the numbers D,(n, m) (see Section 1.4) is so difficult to solve

that one usually is satisfied with statements about their generating function

d,, m(q). But explicit results for d,, m(q) are rare. All we can do for the score se-

quence, for example, is to show the existence of Eulerian Sheffer polynomials where

the coefficient of the lowest term in the n-th order polynomial is the number of score

sequences in an n-tournament.

Page 16: The enumeration of restricted random walks by Sheffer polynomials with applications to statistics

110 H. Niederhausen / Sheffer polynomials for path enumeration

6. I. The Eulerian backwards difference operator

In Section 3.6 we introduced V4 = q ‘-x(Z- E-l) (V4 is denoted by d, in Andrews (1971)). An Eulerian Sheffer sequence (s,) for V, satisfies the recursion

or

vqs,(x)=ql-x(s,(x)-s,(x- l))=s,-I(X),

s,(x)=s,(x-l)+q~-ls,_l(x).

The generating function d,, m(q) = Ca20 D,(n, m)qa was defined and follows the recursion

d,,,(q)=d,,,-l(q)+q”d,-,,,(q) if v(n)<m

and if no upper barrier ,U is present. Thus, if we define

d,(m)=&,-i(q),

(6-l)

in Section 1.4,

the numbers d,(m) can be extended to an Eulerian Sheffer polynomial d,, (x) for V,, given that do, ,,, (q) is a nonzero constant (depending only on q).

Example. If v(i) = - 1, then d, (0) = do, n. Hence, (d,,) is basic for Vs, and therefore

d,,,(q)=d,(m+l)= n+nm [ 1

(see Section 1.4). Now consider the case v(i) = i - u. No closed expression is known for d,, (m),

even if o = 0. For the remainder of this section let u = 2. A path from (0,O) to (n, m) can be described by its sequence of ‘step heights’ si, . . . , s, of the corresponding graph (staircase), i.e.,

Si>v(i)=i-2, (6.2)

i i c .-0 ‘J > 2 for all i=O,...,n, (6.3)

j=l

j=l

where a is the area under the path. If we think of the numbers s,, . . . , s, as a score sequence in an n-tournament (see

Section 2.3), we obtain

Q&r, n- I)IW),

Page 17: The enumeration of restricted random walks by Sheffer polynomials with applications to statistics

H. Niederhausen / Sheffer polynomials for path enumeration 111

where S(n) is the number of such score sequences, and

g= n 0 2 (6.4)

The corresponding Eulerian Sheffer sequence (d,) has the lower boundary i- 1. From (3.16) follows

d,(n- 1 +x+y)= i d,(i- 1 +y)q(“-‘)(Y+i)d,_i(n-i- 1 +x). i=o

For m = n - 1 we get for the generating function of Do (n, n - l),

d,,.-,(4)=d,(n)=d,(n_l)+q”-‘d,_,(n) (see (6.1))

n-1

=q”-’ j~od,(i)q’“~‘-‘“‘+“d,~,_j(n-l-i).

Equivalently,

n-l q-V,,._r(q)=q”-’ c q-i+ldj,;~1(q)q~~d,_l_;,.~2-;(q),

i=o

using the abbreviation (6.4). In the same way, equation (7.2) of Winston and Kleit-

man (1983) can be shown to follow from (3.16). ’

6.2. Score sequences

Let $(n, m) be the number of paths from (0, 0) to (n, m) with step vectors

((0, I), (1, O)> an d an area a underneath, which satisfy the condition (6.3) for the

partial sums, but where the boundary condition (6.2) is dropped. Of course,

S, (n, n - 1) = S(n),

and Da(n, m)~ S,(n, m), where again 11=(i). We shall use this notation

throughout this section.

The numbers Sa(n, m) satisfy the recursion

Sahm>= o l S,(n, m- l)+S,_,(n- 1, m) for ark,

else,

but their generating function cannot be extended to an Eulerian Sheffer sequence.

As in the case of many other path counting problems, we have to extend the recur-

sion (6.5) to new numbers s,(n, m) which agree with the nontrivial part of S, (n, m)

s,(n, m)=S,(n, m) for a212, (6.6)

and which follow the recursion

s,(n, m)=s,(n, m- l)+s,_,(n-1, m) (6.7)

for all n, m and a. Of course, we assume that s, (n, m) = 0 for a< 0 or n ~0.

Page 18: The enumeration of restricted random walks by Sheffer polynomials with applications to statistics

112 H. Niederhausen / Sheffer polynomials for path enumeration

Table 1

& (n, m)

n=2 n=3 n=4

m m m

a 0 1 2 3 a 012345 a 0 1 2 3 4 5 6

0 0 0 0 0 0 0 0 0 0 0 0 300000 00 1 0 1 1 1 1 000000 400000 00

2 0 1 2 2 2 0 0 0 0 0 0 5 0 0 000 00 3 0 0 1 2 3012222 600244 44 4 0 0 1 2 4002333 I 00146 66 5 0 0 0 1 5 0 0 1 3 4 4 800147 99 6 0 0 0 1 6 0 0 1 3 5 6 900037 10 12

A boundary value for each a and n makes the extension unique, and in view of (6.6) we let s, (n, 0) = 0 = S, (n, 0) for all artz, with the exemption ~~(0, 0) = 1. To calculate S, (n, m) recursively from (6.5) for a = n we need that S,, _m (n - 1, m) = 0 for n 22. Thus, we want

s,_,(n- 1, m)=O for all m>n-n_l=n- 121. (6.8)

If (6.8) holds, we get from (6.7) that

~,_,(n-- 1, m)=O=S,_,(n-1, m) for all a?~ and a-m<n_l.

Together with s,(n, 0) = $(n, 0) for all azg this shows by induction that (6.5) is true. Therefore, our boundary values are

.so(O, 0)= 1, s,(n, 0)=0 if ale,

and

s,(n, &-a)=0 if nz 1 and Osa<g.

Table 2

s,(n, m); initial values are printed boldface

n=2 n=3 n=4

m m m

a 0 1 2 3 a 01 2 3 4 5 a 0 1234 56

0 0 0 0 0 0 00 0 0 0 0 3 0 0000 00

1 0 1 1 1 1 00 0 0 0 0 4 -1 00 0 0 0 0

2 0 1 2 2 2 -1 0 0 0 0 0 5 -2 -2 0 0 0 0 0

3 0 0 1 2 3 012 2 2 2 6 0 0244 44

4 0 0 1 2 4 00 2 3 3 3 7 0 0146 66

5 0 0 0 1 5 00 13 4 4 8 0 0147 99

6 0 0 0 1 6 00 I3 5 6 9 0 0037 10 12

Page 19: The enumeration of restricted random walks by Sheffer polynomials with applications to statistics

H. Niederhausen / Sheffer polynomials for path enumeration 113

In Tables 1 and 2 we show the difference between S, (n, m) and s, (n, m). By induc- tion one can show that s,(n, m)=O=S,(n, m) for all n12, a<n and mzn-2. Hence

As in 6.1, we define the Eulerian Sheffer sequence (s,) by s, (m + 1) =s,, m (q). The lowest power of q in s,(n) is q”, and the coefficient of this power equals S,(n, n - 1) = S(n). Using the Binomial Theorem (3.15), s, (n) can be expanded in terms of Gaussian binomial coefficients. For example,

s&q)=sJ4)=;$0s;(1) “,Ii q4-’ L I

= [ yq4+ [ ;]q3-q2[ f]q-q4-2qY

References

Andrews, G.E. (1971). On the foundation of combinatorial theory: V. Eulerian differential operators.

Stud. Appl. Math. 50, 345-375.

Barnabei, M., A. Brini and G. Nicoletti (1982). Recursive matrices and umbra1 calculus. J. Algebra 75, 546513.

Dieter, U. (1980). The classical ruin problem and electronic roulette machines. Research paper, Tech.

University of Graz, Austria.

Fray, R.D. and D.P. Roselle (1971). Weighted lattice paths. Pacific J. Math. 37, 85-96. Fray, R.D. and D.P. Roselle (1973). On weighted lattice paths. J. Combinat. Theory Ser. A 14, 21-29. Kreweras, G. (1965). Sur une classe de problemes denombrement lies au treillis des partitions des entiers.

Cahiers du BURO 6, 5-105. Mohanty, S.G. (1979). Lattice Path Counting and Applications. Academic Press, New York.

Narayana, T.V. (1979). Lattice Path Combinatorics with Statistical Applications. University of Toronto

Press, Toronto.

Niederhausen, H. (1978a). Ein allgemeines Ballot-Problem und seine Anwendung auf den

Kolmogorov-Smirnov Zweistichprobentest. Thesis, Technical University of Graz, Austria.

Niederhausen, H. (197813). Methoden zur Berechnung exakter Verteilungen vom Kolmogorov-Smirnov-

Typ. Research Centre Report No. 99, Technical University of Graz, Austria.

Niederhausen, H. (1979). Lattice paths with three step directions. Congress. Numer. 24, 753-774. Niederhausen, H. (1980). Linear recurrences under side conditions. European J. Combin. 1, 353-368. Niederhausen, H. (1981). Sheffer polynomials for computing exact Kolmogorov-Smirnov and Renyi

type distributions. Ann. Statist. 9, 923-944. Niederhausen, H. (1982). How many paths cross at least I given lattice points? Congress. Numer. 63,

161-173. Niederhausen, H. (1983). Sheffer polynomials for computing Takacs’s goodness-of-fit distributions.

Ann. Statist. 11, 600-606. Rota, G.-C., D. Kahaner and A. Odlyzko (1973). On the foundation of a combinatorial theory: VII.

Finite operator calculus. J. Math. Anal. Appl. 42, 684-760.

Page 20: The enumeration of restricted random walks by Sheffer polynomials with applications to statistics

114 H. Niederhausen / Sheffer polynomials for path enumeration

TakBcs, L. (1971). On the comparison of two empirical distribution functions. Ann. Math. Statist. 42, 1157-1166.

Winston, K.J. and D.J. Kleitman (1983). On the asymptotic number of tournament score sequences. J.

Combin. Theory, Ser. A 35, 208-230.