On a Nonuniform Random Recursive Tree

On a Nonuniform Random Recursive Tree

Annals of Discrete Mathematics 33 (1987) 297 - 306 0 Elsevier Science Publishers B. V. (North-Holland) ON A NONUNIFORM RANDOM RECURSIVE TREE Jerzy SZ...

503KB Sizes 17 Downloads 269 Views

Annals of Discrete Mathematics 33 (1987) 297 - 306 0 Elsevier Science Publishers B. V. (North-Holland)

ON A NONUNIFORM RANDOM RECURSIVE TREE Jerzy SZYMAfiSKl Technical Universify of Poznari, Poznari, Poland

1. Introduction

A tree is a connected graph which has no cycles (see [I] or [5] for definitions not given here). A tree R with n vertices labelled 1, 2, ...,n is a recursive tree if for each k such that 2 < k
where D,,(R) denotes the degree of the it11 vertex in an recursive tree R . This model of a random recursive tree was first introduced in an unpublished paper of Dondajewski and Szyrnanski [3]. In this paper we shall consider two special cases of the random recursive tree. If pnd= I / n is independent of d then we obtain a unijorm random recursive tree. In this case P ( R ) = l / ( n - l)! for each tree H E W,,. I n the literature of random. recursive trees only the uniform case was investigated. 297

298

J. Szymahski

Let us observe that for pnd=d/(2n-2) relation (1) holds. In this case the probability that a new vertex is joined to vertex i is proportional to the degree of i. We shall call this case the model with the attraction of vertices proportional to their degrees. denote the recursive tree obtained from tree R by joining Let cr,(R) for R E W,, the (n + 1 b t vertex to the vertex i of R; moreover, let P(R) denote the recursive tree obtained from R by deleting the nth vertex and its incident edge. It is easy to see that in both models if R is an n-RRTthen P(R) is an (n- 1)-RRT and if i is chosen randomly then ai(R)is an (a+ I)-RRT. In the next section we deal with the number of vertices of a given degree in the general model. In the last section we consider the model with pnd=d/(2n-2) and compare the results with the results for the uniform case.

2. Vertex degrees in the general case Let ,' A denote the number of vertices of degree k in a recursive tree with n vertices. Moreover, let ZIlk=Xnl +X,, ..+xnk. Of course, A',,,and Z,,, are random variables. Let DLl denote the degree of the unique vertex jci such that vertices i and j are joined by an edge.

+.

Theorem 1. For n > 3 n-3 i=O

where

n n

Q,(k)=

i=n-k+l

qil for 1 < k < n - 1 ,

Q,(O)=1.

Proof. From the construction of recursive tree one can deduce that

On a nonuniform random recursive tree

299

Using this recurrence relation and the definition of the expectation we get For n>3

Relation ( 2 ) is the solution to the above recurrence relation with boundary condition E ( X 3 , , ) = 2 . 0 Let us now deal with the expected number of vertices of degree > 1. The following theorem gives us recurrence relations for this expectation.

Theorem 2. For n 2 2 and 2 d k
and

Proof. We only prove relation (3) because the proof of (4) is similar. From the definition of the expectation

..

For fixed tree R E G?,, there exist n trees of the form a,(R) E Bfl+(i= 1,2, ., n). Notice that P(a,(R))= P(R)pn,Dn, ( R ) , where Dfl,(R)denotes the degree of vertex i, so

There are three cases to consider:

- if Dni(R)=k then xn+l, k(a),(R))=Xnk(R)-l.

J. Szymahski

300

- if D,,(R)=k-l then x,+,,,(arl(R))=Xn,(R)+l, - if D,,,(R)#k and D,,,(R)#k- 1 then xn+1, k(OLdR))

= xnk(R).

Using these relations we find that

n- 1

r#k rfk-1

since

n- . 1 ..

C Xn,(R)pn,= 1. lf we substitute this in equation (5), we get (3).

I=

1

0

Let us notice that Theorems 1 and 2 allow us to find values of E(&.) and E(Z,,k) for arbitrary n and k. 3. Model with the attraction of vertices proportional to their degrees Let us now deal with the case pnd=d/(2n-2). It is possible to find the probability that we obtain a given tree R E 9,,. Theorem 3. I n the model with P,#d = d/(2n - 2) if n 2 2 then for any given tree R E W,

Proof. Immediate, by induction.

0

Figure 1 shows recursive trees with 4 vertices and their probabilities.

On a nonuniform random recursive tree

301

Figure 1. Recursive trees with 4 vertices and their probabilities in the model with Pnd dl(2n -2). =I

):

Let u, =Pi(

=

JJ -. It is possible to show that if n+ ca then 2i

i=l2i-1

un=JG (1 + i n -

+~ ( n - ~ ) }

+&-

and un-1=(~~~)-1~2{1-$~-1+~~-2+~(~-3)}.

Using the numbers u , ~we first find E(X,,).

Theorem 4. If pnd= d/(2n- 2) then E ( X , , ) = ;(n

+ 1)

4

-1

.

Furthermore, ifn+co then

Proof. If pnd= 4 ( 2 n - 2) then

Using formula (2) we get

E ( X , , , ) = U , = ’ ~{

n-2 j= 1

~,-+2}.

(6)

302

J. Szymahski

It is possible to show that for n2 1

c n

8-

1

+

u * = { (n 1)u,,- 1}

and therefore (6) holds.

.

0

Now we will deal with degrees greater than 1 .

Theorem 5. Ifpnd= d/(2n- 2) and d= o (n) for n-, m then

where c -

+

4

+

d-d ( d 1)( d 2)

and

Sd=Cl+C,+

+3) ...+C --(d d+(1)d (d +2)

*

Proof. Let us define ~ ( nd, ) by

Using (4), one can show that ~ ( nd ,) satisfies the recurrence relation

, Let with the boundary condition ~ ( nl)=yui.!,. M,,=max{&(n,11)) d

and

m,=min{e(n, d ) } . d

It is easy to show that M,, is a decreasing sequence, hence M , < M 2 = 4 / 3 , and m,>O and m,,-tO. This completes the proof of (8). Relation (7)is a consequence of the relation E(X,> =E(Z,3- E(Z,, d - 1).

On a nonuniform random recursive tree

303

It is possible to get a stronger bound for an error term, namdy for n+co

and for d = o (n”’)

Let us mention that in the uniform case if n-oo and d = o ( n ) then E(Xnd)-n/2d and E(Z,,d)-n(l-2-d+’) (see [2],[4],[6] and [71). Let P( Un= k) be the probability that a randomly chosen vertex from an n-RRT 1 has a degreek. Of course, P(U,= k ) =-E(X,,$, hence there exists a limiting random n variable U such that P(U=k)= lim P(U,=k)=c,. This random variable is defined correctly because

n+ 00

m

c,= 1. k=l

It is easy to show the following result.

Theorem 6. If U is a random variable such that P(U= k ) = c k for k = 1,2, ..., then E ( U ) = 2 and Var(U)=oo. It is curious that in the uniform case all moments of U exist. I n fact, P ( U = k ) =2-&, and En(U)=2n!, where E,,(U) denotes the kth factorial moment of the random variable U.Hence E( V )=Var( U)= 2. Let us now consider the degree of a fixed vertex.

Theorem 7. If p n d = d42n - 2) then for 2
and

Proof. The way of adding a new vertex to a recursive tree implies that P(Dn + 1, i = k ) = q n k P(Dni = k )

+P n , k - 1 P(Dni =k - 1)

*

Using this relation and the definition of expectation, after elementary calcula-

J. Szyrnahkt

304

tions one can get

If we solve this equation with the boundary condition E ( D J = l , we get (9). Smilarly, we can show that

Using standard methods to solve this equation with the boundary condition E ( D ~ ) = Iwe get (10). Let us mention that Theorem 7 does not take into account the degree of the root of a tree, but it is easy to see that the distributions of the degrees of vertices 1 and 2 are identical, hence E(D,k. = E(D,k,2). Theorem 7 allows us to find the asymptotic behaviour of E(Dnr)and Var(Dni).

Corollary 7.1. Ifn-+cc then E(Dni)

and

{

aid (n/i)f

rin

for fixed i , for i+m

Var(Dni)- n/i (I/c-I/Jc

for fixed i , for i + w , i = o ( n ) , for i=cn, o < c < l ,

where

Let us now compare this result with the uniform case, where for fixed i, E(D,,i)-Var (Dnl)-ln(n), and for i-tco, i=o(n) E(D,,,)-Var(D,,)-ln(n/i). In the model P n d = d/(2n- 2) we have that E(D,,)
On a nonuniform random recursive tree

305

- 2 ( n / 7 ~ ) ' / ~This . implies that the maximal degree A, in an n-RRT satisfies

where c=1.2838 ... . In the uniform case the maximal degree is less and E(&) N C ' In(n), where 1
+-

and ( n - I) ( n - i ) ( 2 i - 3) Var (G,J = 4 i ( i - 1)2 ~

Proof. The way of adding a new vertex to a recursive tree implies that

Since G,,,(R) + 1

Gn+1 , i(aj(R))=

for j from ith subtree, otherwise.

Therefore

where Z' denotes the sum over all vertices j that belong to the ith subtree. lt is easy to see that

so

J. Szymatiskl

306

Solving this recurrence equation with the boundary condition E(G,,)=1 we get (11). Similarly we can find a recurrence relation for the kth factorial moment, namely

n+k-I -n -1

Ek(Gnf)-

k ( 2 k -3 ) 2n-2 Ek-

l(Gni)

which we can solve for each k with the boundary condition Ek(GI+K-2, ,)=O

where ( X ) k = X ( X + I) ...(x + k - 1). If we put k = 2 , after some calculations we get the required formula for Var (GJ. In the uniform case the value of E(GnI)=nli as well as that of Var (GJ, is approximately twice the respective values of the nonuniform case.

References [l]C. Berge, Graphs and Hypergraphs, (North-Holland, 1973). [2] M. Dondajewski and 3. Szymahski, On the distribution of vertex-degrees in a strata of a random recursive tree, Bull. Acad. Polon. Sci., Ser. Sci. Math. Vol. XXX, No. 5-6 (1982)

205-209.

[3] M.Dondajewski and J. Szymafiski, On a generalized'random recursive tree, (unpublished). [4] J. L. Gastwirth, A probability model of a pyramid scheme, Amer. Statist. 31 (1977)79-82.

[5] F. Harary and E. M. Palmer, Graphical Enumeration, (Academic Press, New York, 1973). [6]A. Meir and J. W. Moon, Path edge-covering constants for certain families of trees, Util. Marh. 14 (1978) 313-333. [71 H. S. Na and A. Rapoport, Distribution of nodes of a tree by degree, Math. Biosci. 6 (1970)313-329.