13
Journal of Statistical Planning and Inference 34 (1993) 225-237 North-Holland 225 The enumeration of integer sequences with a given number of colored records Heinrich Niederhausen Depurtment of Mrrthematics, Florida Atlantic University, Boccc Raton, FL 33431, USA Received 28 July 1990; revised manuscript received 19 June 1991 Abstract: An integer valued discrete time series W with domain { 1,. .,n) has a record at time i iff W(i)> W(j) for allj= 1,. .,i- 1. Depending on the kind of mapping represented by W (bijection, injection, surjection,. .) the number of time series with a given number of records can be expressed in terms of Stirling numbers and binomial coefficients. We introduce a coloring scheme for the state space, which replaces the role of Stirling numbers by general factorial numbers. The coloring highlights ‘head and tail records’, where the tail of a time series begins after the first occurrence of the maximum. The tail records are of some interest in testing ranks for randomness. Examples for critical regions and power functions are given. AMS Subject Classijicarion: 05A15, 62630 Key word,s: Non-central Stirling numbers; general factorial numbers: records. 1. Introduction The Stirling numbers s(n, k) and S(n, k) of the first and second kind relate to the (falling) factorial powers x(“) : = x(x - 1) . ... . (x-n + 1) in the same way as the gen- eral factorial numbers Falb(n, k) and f a3b(n, k) relate to the general factorial powers and (1) (2) for all real numbers a# b, and all non-negative integers n. Hence, S(n, k) = F’,‘(n, k), and s(n, k) = f ‘,‘(n, k). The motivation for defining generalized factorial powers in Correspondence to: H. Niederhausen, Department of Mathematics, Florida Atlantic University, Boca Ra- ton, FL 33431, USA. E-mail: niederha @ fauvax. bitnet 037%3758/93/$06.00 0 1993-Elsevier Science Publishers B.V. All rights reserved

The enumeration of integer sequences with a given number of colored records

Embed Size (px)

Citation preview

Journal of Statistical Planning and Inference 34 (1993) 225-237

North-Holland

225

The enumeration of integer sequences with a given number of colored records

Heinrich Niederhausen

Depurtment of Mrrthematics, Florida Atlantic University, Boccc Raton, FL 33431, USA

Received 28 July 1990; revised manuscript received 19 June 1991

Abstract: An integer valued discrete time series W with domain { 1,. .,n) has a record at time i iff W(i)> W(j)

for allj= 1,. .,i- 1. Depending on the kind of mapping represented by W (bijection, injection, surjection,. .) the

number of time series with a given number of records can be expressed in terms of Stirling numbers and

binomial coefficients. We introduce a coloring scheme for the state space, which replaces the role of Stirling

numbers by general factorial numbers. The coloring highlights ‘head and tail records’, where the tail of a time

series begins after the first occurrence of the maximum. The tail records are of some interest in testing ranks

for randomness. Examples for critical regions and power functions are given.

AMS Subject Classijicarion: 05A15, 62630

Key word,s: Non-central Stirling numbers; general factorial numbers: records.

1. Introduction

The Stirling numbers s(n, k) and S(n, k) of the first and second kind relate to the

(falling) factorial powers x(“) : = x(x - 1) . ... . (x-n + 1) in the same way as the gen-

eral factorial numbers Falb(n, k) and f a3b(n, k) relate to the general factorial powers

and

(1)

(2)

for all real numbers a# b, and all non-negative integers n. Hence, S(n, k) = F’,‘(n, k), and s(n, k) = f ‘,‘(n, k). The motivation for defining generalized factorial powers in

Correspondence to: H. Niederhausen, Department of Mathematics, Florida Atlantic University, Boca Ra-

ton, FL 33431, USA. E-mail: niederha @ fauvax. bitnet

037%3758/93/$06.00 0 1993-Elsevier Science Publishers B.V. All rights reserved

226 H. Niederhausen / Integer sequences with colored records

this way comes from the recurrence

(x + L7,ri - (x + 6)‘“’ = nx(” ‘) a, b 0, b

for all positive integers n. Together with the initial values (0):; =&n, this recur-

rence shows that {(x)ti] n>O} is a sequence of binomial type, which accounts for

numerous identities involving general factorials. But in this paper we are mainly

concerned with a combinatorial interpretation off” b(n, k), and subsequent statisti-

cal applications.

The general factorials of the first kind seem to be less accessible than the second

kind, but they have an interesting connection with non-parametric testing for the

presence of trends in a time series. That is achieved by counting certain head and

tail records of the corresponding rank vector. The distribution of the resulting bi-

variate statistic under certain alternatives has been derived in Niederhausen (1990),

but will undergo a more thorough investigation in this paper.

Furthermore, we describe a new bijection from n-permutations with q-colored

head and r-colored tail records to positive integer n-sequences where each member

stays between certain bounds. This bijection is an extension of a construction given

by Stanley (1986) for Stirling numbers. It allows for efficient simulation of random

permutations with colored head and tail records.

2. Basic properties

The

derive

results

(i)

following properties of general factorial numbers are straightforward to

from (1). Proofs can be found in Niederhausen (1990). For other recent

on general factorials see Verde-Star (1988).

f(n, 0) = F” b(n, 0) = Bn,0 and c Fa, b(n, k)f(k, m) = a,,, k>O

(orthogonality);

(ii)

(iii)

(iv)

(v)

f(n, n) = (a - b))“;

ckfac, bc (n, k) = Pb(n, k);

f”‘b(n, k) = (-l)“fh”(n, k);

f”b(n,k) = i s(n-l,j-1) j=k

(vi) pb(n,k) = jck s(n,j) (;I ;> (-bn)‘-k(a- b)-j;

for all n > k > 1. ‘Closed form’ representations of Fa3b(n, k) and pb(n, k) do exist,

but are unpleasant for the latter:

F4b(n,k) = jio(-l)k-’ (““,:;;~;;P’“,

H. Niederhausen / Integer sequences with colored records 22-l

f’,b(n,n-k) = (n-k)(a-b)k-”

for all n 2 k2 0 (Niederhausen, 1992)). This is well known for Stirling numbers, and

can be found for central factorial numbers in Butzer et al. (1989, Proposition 6.2.6).

The general factorials are related to the non-central Stirling numbers as defined

by Koutras (1982). It is easy to see that (a- b)-“F“,‘(n, k) equals the non-central

Stirling number of the first kind with non-centrality parameter kb/(b- a), and

(a - b)kf” b(n, k) =s,(n, k) + (n - 1 - c)s,(n - 1, k), where s&r, k) is the non-central

Stirling number of the first kind with non-centrality parameter c = nb/(b - a) - 1.

3. Random walks

All our random walks have the same discrete time domain [n] := { 1,2, . . . , n}, but

different restrictions, and totally ordered state spaces which we identify with [d],

where n and d are positive integers. The random walk W is a mapping W: [n] + [d] that satisfies some conditions, and all such random walks are assumed to occur

equally likely. A (head) record is attained at time m, iff W(m)> W(i) for all i= 1 9 *a*, m - 1. By definition, we always count a record at time 1. Table 1 lists some

earlier results from Niederhausen (1984).

Suppose, the states are colored in two different sets L and D of colors, A := IL1 light and 6 := jD 1 dark colors (but only one color per state). The following results

can be easily shown using the interpretation of F6+‘,’ as presented in Niederhausen

(1990). See Table 2.

Random walks W: [n] + [n] of type (I) visit every state exactly once. In other

words, W is a permutation of [n]. We denote the set of all such bijections by Bi(n).

Generalizing the following results to paths of type (II), (III), and (IV) is not dif-

ficult, so we discuss only bijections in greater detail.

W could represent the ranks of a data vector, and a large number H of records

would indicate an increasing trend underlying the data. Unfortunately, the numbers

of records in W is very sensitive to outliers, because no record can follow the largest

observation. Therefore, we look separately at the part of the permutation following

Table I

States Restriction # of walks # of walks with h records

(I) [nl bijective n! Is@. 4

(II) lkl, k>n injective (9 n! (2) Is(n,h)l

(W ldl, t<d4n surjective S(n, d)d! Wn. d) IW, h)l (IV) [ml (no restrictions) Cd>,, (7) S(n,d)d! Cd (3W,dMd,h)l

228 H. Niederhausen / Integer sequences with colored records

Table 2

States and restrictions # of walks # of walks with h records

(IIIa) [d]x(DUL), l<d<n, F6+“+z,d)d! F6+‘,‘(n,d)Is(d,h)~

each state must be visited

at least once in a dark color

(IVa) [ml x(DUL) Cd (Z)F ‘+“+z,d)d! Cd (3 F ‘+‘+,d) is(d, h)l a state visited in a light color

must also be visited

at least once in a dark color

the maximum, which we called the tail of W. We consider the tail as a random walk

on its own, and denote the number of its (tail) records by T.

Let Bi(n, h, t) be the subset of Bi(n) of bijections with h head and t tail records.

In Proposition 1 we shall show that

IBi(n,h,t)l = Is(n-l,h+t-l)l ‘+:-l . ( >

Therefore, the original table of counting results can be continued as in Table 3.

The random variables H and T+ 1 have the same distribution, but they are not

independent, of course. Their correlation coefficient (see Section 6) must be nega-

tive, and vanishes as n tends to infinity, as we shall show.

4. Bijections

Denote by Bi(n, h) and Bi(n, h, t) the set of bijective mappings f: [n] + [n] with h

(head) records, and with h head and t tail records, respectively. Of course, the bi-

jections can be identified with permutations. We always write the cycles of a per-

mutation in their ‘standard’ form, i.e., starting with their largest element. In this

standard form it becomes obvious, that there are as many permutations with r

records as there are permutations with r cycles, namely Is@, r) 1, the signless Stirling

number of the first kind.

Denote by b(n, h, t) the number of permutations in S, with h records and t tail

Table 3

The summation index m in the outer sum is the time when the maximum d occurs for the first time in

the random walk

Restriction # of walks with h head and t tail records

(1) uu (III)

bijective

injective

surjective

tl+t-I Is@-Lh+t-I)1 ( r )

(;) Is@-l,h+t-1)1 (h+;-‘)

CL=, [Ck(dk’)S(m-l,k)Is(k,r-l)l C,(~)S(m-n,I)Is(l,t)ll

H. Niederhausen / Integer sequences with colored records 229

records, b(n, h, t) = IBi(n, h, t)l. The following two propositions about these numbers

could be given in reversed order, deriving Proposition 1 by comparing coefficients

of #r’ on both sides of the generating function in Proposition 2(c). However, we

prefer to give a combinatotial proof showing the interplay between cycles and

records.

Proposition 1.

for all 1 <h<n and O<t<n.

Proof. In /s(n - 1, h + t - 1)l ways we can select a permutation n ES, _, that has

h + t - 1 cycles. Choose t of those cycles (in (h+i-‘) ways) and combine them or-

dered increasingly by their first (= largest) element. This gives the tail of our new

permutation, containing t records. The leftover h - 1 cycles are also combined in in-

creasing order, and the number n is augmented at the end, before the tail becomes

attached. In this way, we get h head records. 0

Example. n = 9, h = 3, t = 2. If we select rc = { (3, l), (5,2,4), (7), (8,6)}, and choose

the cycles {(5,2,4),(8,6)}, we obtain the permutation

(3,1,7, 9, 5,2,4,8,6)EBi(9,3,2).

The above example helps us to find the combinatorial proof for the obvious

equation

b(n, h, t) = b(n, t + 1, h - 1). (3)

We only have to interchange the part before the maximum (= n) with the part

following the maximum: (3,1,7, 9, 5,2,4,8,6) H (5,2,4,8,6, 9, 3,1,7).

We show now how tail records give rise to a classical identity on Stirling numbers

of the first kind. For 1 <m<n denote by In(m + n, h) the set of injective mappings

f: [m] + [n] with h (head) records. Injections can be identified with m-permutations

of [n], and therefore lIn(m +n,h)I =(G)ls(m,h)l. Let m be the time when the

maximum (= n) of the permutation WE Bi(n, h, t) occurs. (W(l), . . . , W(m - 1)) has

h - 1 records, and does not contain the maximum. Hence, (W(l), . . . , W(m - 1)) E

In(m-1-tn-1,h-1).Atailwithttailrecordscanbeattachedin~s(n-m,t)~ ways.

Therefore,

s(m - 1, h - l)s(n - m, t) 1 = b(n, h, t)

= ls(n-l,h+t-1)l (h+t-l) t .

5. Colored records

With the help of Proposition 1, the expansion (v) can be formulated as

230 H. Niederhausen / Integer sequences with colored records

n-h

f”b(n,h) = c s(n-l,h+*-1) (h+*-l)

h_l (6(1 -n)-a)‘@-b)-h-’ t=o

=;gIb(n,h,t)(l+a$--5.

This proves parts (a) and (b) of the following proposition, which is similar to Theo-

rem 3(a) in Niederhausen (1990).

Proposition 2. (a) The generating function s(n, h; r) := Cyzi b(n, h, t) rf equals

s(n,h;r) = (-l)“Ph(a-b)hfa,b(n,h)

for any real numbers a and b which satisfy the equation T = 1 + bn/(a - b). Especially,

s(n, h; r) = (-l)n-hnhfn’s-‘,s~l(n, h).

(b) The generating function s(n; n, t) := Cz=, b(n, h, t)nh equals

s(n;n,t) = n(-l)“-‘+l(a-b)‘+lfOVb(n,t+l)

for any real numbers a and b which satisfy the equation n = 1 + bn/(a - 6). (c) The generating function s(n; n; 5) : = Ci =. s(n, h; r)nh equals

s(n;n;s) = ~(~+t)(~+r+1).....(1;1+r+n-2).

We may view s(n; n; 7) as the number of n-permutations where the head and tail

records are colored in q and r colors, respectively. We thank the referee for pointing

out that by insertion of a new minimal element (which becomes a head record only

if it is placed at the beginning, and a tail record only if it follows the maximum)

it is obvious that s(n + 1; 4; r) = s(n; q; r) (II + r + n - 1). Thus, Proposition 2(c) fol-

lows. Because of the right hand side in Proposition 2(c), s(n; n; z) equals the number

of integer sequences (a,, . . . , a,)suchthat l<ai<q+n-i+r-1 foralli=l,...,n-1,

and 1 <a, <n. The next proposition relates in more details the permutations with

colored records to linearly bounded integer sequences. It is a generalization of a bi-

jection which can be found in the third proof of Proposition 1.3.4 in Stanley’s book

on ‘Enumerative Combinatorics’ (1986). It is used in Section 7 for the simulation

of permutations with colored records.

Proposition 3. Let n and T be positive integers, and let A,~h,r be the set of all in- teger sequences (a,, . . . , a,,) such that:

l<ai<q+n--i+r-1 for all i=l,...,n-1 and l<a,<n, h of the ai’s are less or equal n, and t are larger or equal n+n -i.

The following mapping is a bijection between A,,h,t and Bi(n, h, t) with head records colored in n colors and tail records colored in s colors:

Begin the construction of the permutation with the (last) head record n. Color this record with color number a,, (note that a,<n by definition).

H. Niederhausen / Integer sequences with colored records 231

Assume that n, n - 1, . . . , n - i+ 1 have already been used for the construction. Depending on the size of a,_i, insert n - i as follows.

(a) If a,, pi <v, let n - i become a new record by placing it at the beginning of the sequence under construction. Color this record in color number a,_i.

(b) If q < a,, i < q + i, insert n - i such that it is to the right of a,, _; - q members of the sequence under construction. [That is possible, because this sequence has i elements. Note that n -i will not be placed at either end of the sequence.]

(c) If a,, _; 2 q + i, place n - i at the right end of the sequence under construction. [n - i will later become a tail record.] Color n - i in color number a, i - i - n + 1.

If (ZI, *.., rt,) is the result of the above construction, the maximum n stands at

place m, TI, =n, say. Thesequence(z, ,..., rt,,,,n,,n,_l ,..., z,,,) isan m-permuta- tion of [n] with n-colored head and s-colored tail records.

Example. Let q = 3, 7 = 4, n = 9, h = 3 and t = 2. We write kj if k is colored in color

number j, and construct the colored permutation (3,, 1,7,, 92, 54, 2,4,8,, 6) out of

the sequence (4,9,1,7,10,5,2,6,2). See Table 4. Reversing the tail finishes the pro-

cedure: (3,, 1,7,, 9,, 6, 83,4, 2,5,) becomes (3,, 1, 72, 9,, 5,,2,4,8s,6).

In a symmetric model, drawing a permutation at random has probability l/n!.

Just one urn filled with n balls numbered from 1 to n is needed to realize this

distribution. The identity (Proposition 2(c))

c b(n,h,t)r’nh = n(n+r+n-2)(“-]) f, h

shows how to construct a non-symmetric distribution on permutations for positive

integers v and r such that

f h

P(W) = rl(q+r:1-2)(“+‘)

for all WE Bi(n, h, t). (4)

In order to draw from that distribution we first have to fill an urn with r’qh copies

Table 4

n-i a+i a+-rl a,,_,-q-i+1 Partial sequence

2 92 6 3 9~83 2 72,92.83

5 2 72,92.6,83

10 4 7~~92.6, 83, j4 7 4 72,92,6,83,4,54 1 31,72,92,6,83,4,54

9 6 31,72,92,6,83,4,2,54 4 1 31,1,72,92,6,83,4,2,54

232 H. Niederhausen / Integer sequences with colored records

of each WE Bi(n, h, t) (1 <h < n, O< t .$ n - h). Of course, this can be achieved by

coloring the head and tail records, but is may be difficult to generate such an urn.

Proposition 3 shows a model that is better suited for simulations.

6. The statistics or records

We consider now the number Hof head records as a random variable on the space

of colored permutations, with the probability law (4). Hence, for h = 1, . . . , n,

n-h t h-l

P,,(H=h) = c f=O (v+i:~_~)‘“-l’ mkt) = (rlNh If n+rFl.rFl(n,h)l

q(?/+t+n-2)(“-‘)

by Proposition 2(a). The notation P,, indicates that head records are colored in u

colors, tail records in r colors. In the uniform case, P,,,(H= h) = is(n, h)l/n!. Let T

be the number of tail records. From b(n, h, t) = s(n, t + 1, h - 1) (see (3)) follows that

H and T+ 1 have the same distribution, when q and r are interchanged. The first

and second factorial moment of H are easy to calculate from Proposition 2:

E,,[H-l] = c (h-l)rlh~‘s(n,h;r)/(r+~+n-2)‘“~1’ ha1

v = (?‘j+r+n-2)+‘) h>l

c s(n,h;r)$rl”p’

rl n+~irF2 +q+s+n-2p’)= c

= (v+r+n-2)(“-‘) dq i=q+r 1

In the same way, n+q+r-2 2

E,,tW-l)W-31 = c !Y. i,j=q+r;i+j lJ

Hence,

Var,,[H] = E,,[(H-l)(H-2)] -E,,[H-l]E,,[H-21

=“Y,? ($).

We denote by R the random variable which adds the number of head records and

tail records together, R = H+ T. Under the non-symmetric distribution (4) we obtain

P,,(R=r)= c rlh~1~‘-hb(n,h,r-h)/(rl+r+n-2)(“-’) h=l

=(rl+~)‘-‘Is(n-l,r-1)1/(11+s+n-2)(”-’),

E,,[R-11 = (~+d”:;$;;~ f,

H. Niederhausen / Integer sequences with colored records 233

E,,W- 1)W -91

=~~,(r-I)(r-2)s(n-I,r-I)l(rl+r)‘-’/(~+r+n-2)’”~”

= (Y/ + T)2 niY2 A.. i,j=v+r;i+jV

Therefore we find the variance of R as

Var,,[R] =E,,[(R-l)(R-2)]-E,,[R-l]E[R-21

zz n;;$;;2 (!+F$).

We can calculate the correlation erlr between H and T from

Varrlr [R] = Var,, [H + T]

= Var,,, [HI + VarqT [T] + 2~,,, I/Var,, [H] Var,,[T].

If q = r then Var,,[H] = Var,, [T], and Q,,,, = +(Var,,, [R]/Var,,[H]) - 1. Our for-

mulas for Var,,,[R] and Var,,,[H] show that

n+l7+r-2

Hence,

Var,,[H] + Var,,[T] - Var,,[R] = 2~5 c i~2 . i=q+r

e := e,, = - L2

i iP2 j/i2 (f-iP2).

Approximating cr,, im2 by n2/6, we get for large n

e =-(n2-6)/k;, f-x2) = -(x2-6)/(6(C+lnn)-n2),

where CzO.577 is Euler’s constant.

7. Arches

In the previous section we considered the sample space of permutations with a

non-symmetric distribution obtained from coloring the records. Suppose, these per-

mutations are observed as rank vectors W= (W,, . . . , W,). What kind of alternatives

are specified by the presence of colors (v > 1, r> l)? To explore this question, we

slightly change our interpretation of tail records. We now denote by B the number

of (backwards) records in the tail, observed from right to left (not counting n, the

maximum of W). Thus B tells us how the rank vector ascends when seen from the

end. B and T have the same distribution. Overall, large values for Hand B should

give the jagged shape of a mountain peak to the random walk W.

If q= 1 = r, the ‘average rank vector’ is constant, E[w] =n/2. Coloring the

234 H. Niederhausen / Integer sequences with colored records

5

i

L

Fig. 1. Average of 10000 rank vectors under different color alternatives.

records make rank vectors with many records more likely to occur. The alternatives

q > 1, T > 1, favor ‘arches’ as averages. For selected alternatives Figure 1 shows some

average rank vectors, obtained by simulating 10000 colored permutations using

Proposition 3.

Table 5

Critical points h(a), b(u) and significance probabilities (Y

h(a) b(a) @(*I b(a) b(a) b(a)

5 6 5 6 6 I 6 7 6 7

n=lO n=20 n=30 n=40 n=50

5 0.115 0.097

6 0.041 0.023

7 0.122 0.056 0.120 0.079

8 0.101 0.035 0.079 0.037 0.124 0.065 0.166 0.094

9 0.096 0.029 0.065 0.023 0.102 0.042 0.136 0.063

10 0.062 0.020 0.095 0.035 0.125 0.052

h(a) b(a) b(a) b(a) b(a) b(c-r)

7 8 7 8 7 8 7 8 7 8

n=60 n=70 n=80 n=90 n=lOO

8 0.122 0.083 0.148 0.103

9 0.083 0.044 0.103 0.057 0.122 0.070 0.141 0.083 0.159 0.095

10 0.068 0.029 0.085 0.038 0.100 0.047 0.116 0.057 0.130 0.066

11 0.063 0.024 0.078 0.031 0.092 0.039 0.106 0.046 0.119 0.054

12 0.076 0.029 0.090 0.036 0.103 0.043 0.115 0.050

13 0.089 0.035 0.102 0.042 0.114 0.049

H. Niederhausen / Integer sequences with colored records 235

n=lO n=50 Fig. 2. Power under color alternatives.

Critical regions and power under color alternatives are easily calculated for the

test which rejects for large values of H or B. By Proposition 1

a = P(H>h, or Bab,)

= I-h<,c,<, Is@-l,h+b-1)l Cir L2

(h+;-lp!.

Table 5 shows some of those regions for significance probabilities (Y around 5% and

10%. Note that P(H>h, or B>b,)=P(H>b,+l or Bah,-1). For color alter-

natives (q, r) the power of this test can be calculated from (4):

= l-h<hzb<b qh-+(n-l,h+b-l)l h+;-l 12, a ( >

/(q+~+n-22)(“-~).

In Figure 2 we show some power functions for n = 10, (Y = 0.097, h = 5, b = 6, and

for n =50, a=0.094, h= 8, b=7. (The surfaces are drawn inside an open box of

height 1.)

Table 6

n IO 20 30 40 50 60 70 80 90 100 r(ff) 6 8 9 10 10 11 11 12 12 12

(Y 0.102 0.088 0.095 0.078 0.121 0.082 0.109 0.068 0.085 0.102

236 H. Niederhausen / Integer sequences with colored records

Table 7

Power comparison for the three tests (i), (ii), and (iii)

Slope Model

Xi=Uj+i.slope

Test

(i) (ii) (iii)

0.0001 10.3 11.1 10.8

0.0005 10.8 11.5 11.8

0.001 11.4 11.9 12.6

0.005 17.3 17.7 21.8

0.01 25.8 26.1 36.6

0.02 45.8 45.9 69.3

X,=1-U,2+i.slope X,=1-U,3+i.slope

Test

(i) (ii)

11.5 12.2

15.2 15.6

18.8 19.0

44.5 44.6

64.6 64.6

85.8 85.8

(iii)

11.3

12.3

14.1

26.8

43.6

73.6

Test

(i) (ii) (iii)

19.0 19.3 12.3

33.0 33.1 15.6

43.8 43.9 18.6

78.5 78.5 39.2

91.2 91.2 58.0

91.8 97.8 83.2

In the case of symmetric alternatives (q = t), the sum R = H+ B leads to a more

powerful test. Rejecting He: q = r= 1 for Rat-(a), Table 6 shows the critical values

closest to the 10% level.

8. Increasing trends

How useful are the statistics H, T, and R for detecting an increasing trend in the

rank vector W? The following simulation results’ are only exploratory, and should

be seen as an invitation for further study.

Let U,, . . . . U,, be independent random variables with a common distribution

which is uniform between 0 and 1. We looked at ranks w originating from the

three models

(a) Xi = 17, + is slope,

(b) Xi = 1 - U,? + i. slope,

(c) X,=1-Uf+i.slope

for different values of slope. U;, . . . . W, are the ranks of Xi, . . . . X,,.

R = H+ T did not perform well in any of these models. Instead, we chose a simple

rectangular acceptance region for the bivariate statistics (H, T). For comparison we

also performed a standard rank correlation test, rejecting ‘H,: slope = 0’ whenever

D:= C:=, iH$ was large. For n =21 and a significance probability a between 10%

and 11070, we found the following critical values: Reject H, if

(i) H>6 (a = 10.2%),

’ The help of my son Piet in writing the PASCAL programs is proudly acknowledged.

H. Niederhausen / Integer sequences with colored records 231

Table 8

The simulation shows that test (i) is not appropriate for alternatives ‘r> q’

07. r) Test

(9 (ii) (iii)

simulated exact simulated simulated

(1,1) 0.101 0.109 0.108 0.109

(1,2) 0.053 0.165 0.165 0.104

(291) 0.450 0.457 0.453 0.225

(133) 0.033 0.355 0.354 0.124

(391) 0.733 0.734 0.734 0.336

(233) 0.238 0.433 0.432 0.175

(3,2) 0.608 0.634 0.634 0.256

(393) 0.602 0.614 0.612 0.234

(ii)

(iii)

Ha6 or T>7 (a=10.9%),

D > 2758 (a= 10.9%).

The data vectors were drawn 30000 times. Table 7 shows the percentage of rejec-

tions for different values of slope.

Under the non-uniform alternatives (b) and (c), the two tests based on records are

more powerful than the rank correlation test, but are themselves not significantly

different. Now we use the same three statistics to test against alternative rank vector

distributions as given in (4). They are determined by the number of colors, q and

r. Thus, ‘Ho: q = 1 = r’ is tested against q > 1 or r> 1. Again, rank vectors were

drawn 30000 times, using the bijection described in Proposition 3. The power of

the different tests is given in Table 8.

References

Butzer, P.L., M. Schmidt, E.L. Stark and L. Vogt (1989). Central factorial numbers; their main proper-

ties and some applications. Numer. Funct. Anal. and Optimiz. 10, 419-488.

Koutras, M. (1982). Non-central Stirling numbers and some applications. Discrete Math. 42, 73-89. Niederhausen, H. (1984). The combinatorics of records. Congr. Numerantium 45, 5-12. Niederhausen, H. (1990). Colorful partitions, permutations, and trigonometric functions. Congr.

Numerantium 17, 187-194. Niederhausen, H. (1992). Fast Lagrange inversion, with an application to factorial numbers. Discrete

Math. 104, 99-110. Stanley, R.P. (1986). Enumerative Combinatorics Vol. 1, Wadsworth & Brooks/Cole, Monterey.

Verde-Star, L. (1988). Interpolation and combinatorial functions. Stud. Appl. Math. 79, 65-92