Asymptotic Distribution of Two-Protected Nodes in m

Asymptotic Distribution of
Two-Protected Nodes in m-ary
Search Trees
AXEL
HEIMBÜRGER
Master of Science Thesis
Stockholm, Sweden 2014
Asymptotic Distribution of Two-Protected
Nodes in m-ary Search Trees
AXEL
HEIMBÜRGER
Master’s Thesis in Mathematics (30 ECTS credits)
Master Programme in Mathematics (120 credits)
Royal Institute of Technology year 2014
Supervisor at Stockholm University was Cecilia Holmgren
Supervisor at KTH was Svante Linusson
Examiner was Svante Linusson
TRITA-MAT-E 2014:56
ISRN-KTH/MAT/E--14/56--SE
Royal Institute of Technology
School of Engineering Sciences
KTH SCI
SE-100 44 Stockholm, Sweden
URL: www.kth.se/sci
Abstract
In this report, the number of two-protected nodes in m-ary search trees
is studied i.e., nodes with distance at least two to any leaf in the tree.
This is of interest since the protected nodes describe local properties
close to the leaves of the m-ary search trees. This is done by using a
generalised Pólya urn model and relating this urn model to how the tree
evolves after each new key is inserted into the tree. It is proven that the
number of two-protected nodes in m-ary search trees is asymptotically
normally distributed when m = 4, 5, 6 which is the main result. This
is in agreement with previously known results for m = 2, 3, which were
obtained by using the same approach. The method and algorithms are
presented in such a way that it simplifies calculations for larger m. Based
on the results for m = 2, . . . , 6 conjectures are made providing a possible
way to extend these results for larger m ≤ 26.
Sammanfattning
Asymptotisk Sannolikhetsfördelning för Tvåskyddade Noder
i m-ära Sökträd
I detta examensarbete studeras antalet tvåskyddade noder i m-ära sökträd.
En nod kallas tvåskyddad ifall den är minst två kanter från ett löv i
trädet. Dessa noder är av intresse eftersom de beskriver lokala egenskaper nära löven i de m-ära sökträden. Detta studeras genom att
använda en generaliserad Pólya urna och genom att relatera denna urna
till hur ett m-ärt sökträd expanderar när nya nycklar placeras in i trädet.
Det bevisas att antalet tvåskyddade noder i ett m-ärt sökträd har en
asymptotiskt normalfördelad sannolikhetsfördelning för m = 4, 5, 6 när
antalet nycklar i trädet går mot oändligheten. Detta stämmer överens
med tidigare resultat för m = 2, 3, som har bevisats genom att använda
samma metod. Metoden och algoritmerna som används för att beräkna
dessa resultat presenteras på ett sådant sätt att de går att applicera på
större m utan modifiering. Givet resultaten för m = 2, . . . , 6 presenteras
en möjlig väg för att expandera dessa resultat för större m.
v
Acknowledgement
Firstly, I would like to thank Cecilia Holmgren at Department of Mathematics, Stockholm University for introducing me to the subject of mary search trees and being my supervisor throughout this thesis project.
Your input and help has been greatly appreciated. I would also like
to thank Svante Linusson at KTH Royal Institute of Technology for
helping me with formal requirements and administrative tasks along the
way.
Many thanks to all my fellow students with whom I have interacted with
during my five years at KTH, especially those of you that I can happily
call my friends. Thanks for the companionship, valuable discussions and
telling me when I was wrong or being insufferable. All of you made it
so much more interesting and worthwhile.
Lastly, thanks to all of my friends and family not studying at KTH for
reminding me that there is something else out there.
vii
Contents
Abstract
v
Sammanfattning
v
Acknowledgement
vii
Contents
ix
1 Introduction
1.1 Background . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
1.2 General Idea Behind the Method Used . . . . . . . . . . . . . . . . . . . .
1.3 Outline of the Report . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
1
1
1
2
2 The Generalised Pólya Urn Model
2.1 The General Model . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
2.2 Important Theorems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
3
3
5
3 m-ary Search Trees
3.1 Definition of The Binary Search
3.2 For Larger m . . . . . . . . . .
3.3 Definition of a Protected Node
3.4 Previous Results . . . . . . . .
Tree
. . .
. . .
. . .
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
4 Pólya Urns Applied to Two-Protected Nodes
4.1 Outline of Method Used . . . . . . . . . . . . . . . . . . . . . . .
4.2 Step 1: Dividing the Tree Into a Forest of Subtrees . . . . . . . .
4.3 Step 2: Transitions Between Subtrees . . . . . . . . . . . . . . .
4.4 Step 3: Calculating the Transition Matrix A . . . . . . . . . . . .
4.5 Step 4: Apply Theorems . . . . . . . . . . . . . . . . . . . . . . .
4.6 Step 5: Obtaining the Asymptotic Distribution of Two-Protected
.
.
.
.
7
. 7
. 10
. 12
. 13
. . . .
. . . .
. . . .
. . . .
. . . .
Nodes
15
15
16
17
19
19
20
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
5 Algorithms Used for Two-protected Nodes
23
5.1 Constructing the Label Vector K . . . . . . . . . . . . . . . . . . . . . . . 23
5.2 Constructing the Transition Matrix A . . . . . . . . . . . . . . . . . . . . 24
ix
5.3
Constructing the Matrix B . . . . . . . . . . . . . . . . . . . . . . . . . . 25
6 Main Results
27
7 Discussion and Future Work
29
A Python Code for Calculating the Label Vector K
and B for Arbitrary m
A.1 Code for Creating the Label Vector K . . . . . . .
A.2 Code for Creating the Transition Matrix A . . . .
A.3 Code for Creating the Matrix B . . . . . . . . . .
B Calculated Eigenvalues, Eigenvectors
B.1 For m = 4 . . . . . . . . . . . . . . .
B.2 For m = 5 . . . . . . . . . . . . . . .
B.3 For m = 6 . . . . . . . . . . . . . . .
B.4 For m = 7 . . . . . . . . . . . . . . .
and
. . .
. . .
. . .
. . .
and the Matrices A
31
. . . . . . . . . . . . . 31
. . . . . . . . . . . . . 32
. . . . . . . . . . . . . 33
Matrices
. . . . . .
. . . . . .
. . . . . .
. . . . . .
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
37
38
40
41
41
C Visualisation of all Different Types of Subtrees for m = 4
43
Bibliography
47
x
Chapter 1
Introduction
1.1
Background
Random trees are an important field within random graphs, partly due to the close
relation between random trees and search algorithms in computer science. For example,
the famous search algorithm Quicksort corresponds to the binary search tree. The mary search tree studied in this thesis, which is a generalisation of the binary search tree,
therefore has close connection to search algorithms. This thesis focuses on so called
protected nodes in m-ary search trees. A node is called k-protected if it is has at least
distance k to any leaf in the tree. These protected nodes are of interest given their
relation to local properties close to the leaves of the random trees. They are also related
to so called fringe trees, which are small subtrees in the fringe of random trees.
There exist previous studies on protected nodes for many different kinds of random
trees. The most common approach has been using generating functions, which in more
complicated cases has made it hard to get new results. Therefore, in a paper by Cecilia
Holmgren and Svante Janson, [12], a generalised Pólya urn model was used which yielded
asymptotic distributions on the number of protected nodes for the binary and ternary
search tree. More precisely, the number of protected nodes when the number of keys
in the tree goes to infinity was proven to be asymptotically normally distributed. This
thesis was therefore intended to continue this work by applying the same method to
larger m with a special focus on m = 4.
1.2
General Idea Behind the Method Used
The method used in this thesis is based on a generalised Pólya urn model. This is done
by relating how the new keys are inserted into the m-ary search tree to balls of different
colours being drawn from the urn and then replaced by balls of other colours according
1
to predefined probability distributions. By this relation the number of two-protected
nodes can be calculated by considering the number of balls of different colours in the
urn when the number of balls drawn (and added) approaches infinity.
1.3
Outline of the Report
The report starts with Chapter 2 and 3, which contain background theory that is needed
later when applying the theory to two-protected nodes in m-ary search trees. In Chapter
2, the generalised Pólya urn is introduced together with important theorems related
to the asymptotic convergence of the number of balls of different colours in the urn.
In Chapter 3, the binary search tree is first introduced and then generalised to m-ary
search trees. Protected nodes in m-ary search trees is also more rigorously defined. Some
previous work related to protected nodes and random trees is also briefly presented.
Chapter 4 contains most of the actual calculations when applied to the case of interest;
two-protected nodes in m-ary search trees. The algorithms needed for the matrix calculations are explained on a high level in Chapter 5, and in Chapter 6 the main results are
presented. Lastly, Chapter 7 contains a short discussion about the results and possible
ways forward.
2
Chapter 2
The Generalised Pólya Urn
Model
In this chapter the generalised Pólya urn is described. The generalised Pólya urn model is
in essence a urn containing balls of different colours being removed and added to the urn.
More precisely, one ball is removed from the urn and depending on the colour of the ball
removed, we add balls of different types according to some predefined distribution. Many
urn models can be seen as special cases of the generalised Pólya urn model described
below.
2.1
The General Model
In the generalised Pólya urn process (Xn )∞
n=0 we have balls of q different types (or
colours) and each Xn = (Xn,1 , . . . , Xn,q ) is a vector where Xn,i is the number of balls
of type i at time n. The process is started with an initial vector X0 . Each type i is
given an activity ai ≥ 0 and a random vector ξi = (ξi,1 , . . . , ξi,q ) which describes the
change of the composition of balls in the urn when a ball of type i is drawn. We will
assume ξi,i ≥ −1 and ξi,j ≥ 0, i 6= j. The process evolves as a Markov process where
at time n one ball is drawn from the urn. A ball of type i is drawn with probability
aX
Pq i n−1,i
. The drawn ball is returned to the urn together with ∆Xn,j balls of type
a X
j=1
j
n−1,j
j, where ∆Xn = (∆Xn,1 , . . . , ∆Xn,q ) has the same distribution as ξi if the drawn ball
was of type i. When ball i is drawn we allow ∆Xn,i = −1, which means that the ball
is not replaced in the urn. This is the same as saying that the drawn ball, of type i, is
removed from the urn and we add balls with distribution (ξi,j + δi,j )qj=1 , where δi,j is the
kronecker delta.
The transition matrix A, defined in Definition 2.1 below, and its eigenvalues and eigenvectors will be essential later when proving limit theorems.
3
Definition 2.1. We let the transition matrix A be a q × q matrix defined by A :=
(aj E(ξj,i ))qi,j=1 , where q is the number of different types in the generalised Pólya urn.
Definition 2.2. A type i is called dominating if every other type j can appear in the
urn at some later time when we start with one ball of type i in the urn. In other words,
type i is dominating if for every j there is a positive probability that Xn,j > 0 at some
later time n when X0,j = δi,j .
This is equivalent to saying that a type i is dominating if for all j there exists n ≥ 0
such that (An )j,i > 0.
Definition 2.3. The generalised Pólya urn process, or A, is called irreducible if every
type is dominating or equivalently that for all pairs i, j there exists n ≥ 0 such that
(An )i,j > 0.
Definition 2.4. We call the generalised Pólya urn essentially extinct if at some time
there are no balls of any dominating type left.
Throughout the report the assumptions (A1)−(A7) below will be assumed. It will later
be shown in Chapter 4 that these assumptions hold for the urn received when applied
to two-protected nodes.
(A1) ξi,j ≥ 0 for i 6= j and ξi,i ≥ −1, i.e., only the drawn ball may be removed at each
time-step.
2 ) < ∞ for all i, j ∈ {1, . . . , q}.
(A2) E(ξi,j
(A3) The largest eigenvalue λ1 of A is positive.
(A4) The largest eigenvalue λ1 is simple.
(A5) We start with at least one ball of a dominating type, i.e., there exists a dominating
type i with X0,i > 0.
(A6) λ1 is an eigenvalue of the submatrix of A given by the dominating types.
(A7) With probability 1, the urn never becomes essentially extinct.
Let u1 and v1 be the left and right eigenvectors of A corresponding to the largest eigenvalue λ1 , i.e., vectors satisfying
uT1 A = λ1 uT1 ,
(2.1)
Av1 = λ1 v1 .
(2.2)
Let a = (a1 , . . . , aq )T be the vector of the activities. Then the eigenvectors u1 =
(u1,1 , . . . , u1,q ) and v1 = (v1,1 , . . . , v1,q ) above will always be normalized according to
a · v1 = 1,
u1 · v1 = 1.
4
(2.3)
Using the same notation as in [15, 12] let us define the following matrices
Pλ1 := v1 uT1 ,
(2.4)
PI := Iq×q − Pλ1 ,
(2.5)
Bi := E(ξi ξiT ),
(2.6)
B :=
q
X
v1,i ai Bi ,
Zi=1∞
ΣI :=
(2.7)
T
PI esA BesA PIT e−λ1 s ds.
(2.8)
0
Given the assumption (A3), Pλ1 is the (one-dimensional) projection onto the eigenspace
of λ1 which commutes with A. See [15] for more details.
2.2
Important Theorems
Later when the urn model is applied in the study of protected nodes the theorems below
will be essential. These theorems will give us the asymptotic convergence wanted.
Lemma 2.1 ([15], Part of Lemma 5.4). Suppose there exists a m > 0 such that a · Eξi =
m for every i. Then λ1 = m and u1 = a.
This is basically a consequence of Perron-Frobenius Theorem (Theorem 2.5 below).
Theorem 2.2 ([15], Theorem 3.21). Assuming (A1)−(A7). Then
Xn a.s.
−→ λ1 v1 ,
n
as n → ∞.
Theorem 2.3 ([15], Theorem 3.22 and Lemma 5.4). Assume (A1)−(A7) and Re(λi ) <
λ1
2 , i 6= 1 holds. Suppose further that a · E(ξi ) = m > 0 for every i. Then
Xn − nµ d
√
−→ N (0, Σ),
n
as n → ∞,
where µ = λ1 v1 and Σ = mΣI with matrix ΣI as in (2.8).
A simplifying case is when A is diagonalisable. Then the expression for ΣI in (2.8) can
be simplified using the bases of eigenvectors.
Theorem 2.4 ([15], Theorem 3.22, Lemma 5.3 and Lemma 5.4). Assume (A1)−(A7)
and Re(λi ) < λ21 , i 6= 1 holds. Suppose further that a · E(ξi ) = m > 0 for every i. If A
is diagonalisable and {ui }qi=1 , {vi }qi=1 are dual bases of the left and right eigenvectors of
A. Then
Xn − nµ d
√
−→ N (0, Σ), as n → ∞,
n
5
where µ = λ1 v1 , Σ = mΣI and
ΣI =
q X
q
X
j=2 k=2
uTj Buk
vj vkT .
λ1 − λj − λk
(2.9)
In Chapter 4 assumptions (A1)-(A7) will be verified in the case of two-protected nodes.
The Perron-Frobenius theorem, stated below, will be useful in doing so.
Theorem 2.5 (Perron-Frobenius Theorem, [22], Theorem 1.5). Suppose M is an n × n
irreducible non-negative matrix. Then there exists an eigenvalue r such that:
(i) r ∈ R+ .
(ii) There exists strictly positive left and right eigenvectors associated with r.
(iii) r ≥ |λ| for any eigenvalue λ.
(iv) The eigenvectors associated with r are unique up to constant multiples.
(v) If M2 is a non-negative matrix such that M − M2 is non-negative. Then for any
eigenvalue, β of M2 it holds that |β] < r.
(vi) r is a simple root of the characteristic polynomial of M .
6
Chapter 3
m-ary Search Trees
In this chapter m-ary search trees are described. First the binary search tree, where
m = 2, will be introduced and then expanded to include m-ary search trees with m > 2.
Some previously obtained results for m-ary search trees using Pólya urns will be stated
and discussed. m-ary search trees are of interest given their relation to computer science,
where they are used to be able to sort and find keys efficiently.
3.1
Definition of The Binary Search Tree
Binary search trees are trees constructed in a specific manner. Multiple definitions exist;
see e.g.[9], [17] and [16] for more details than presented below. If you are unfamiliar
with the basic concepts of graph theory then more details can be found in e.g. [1] and
[8].
Definition 3.1. A graph G is called a binary tree if it is a connected acyclic graph such
that for all nodes (or vertices) v ∈ V (G), deg(v) ≤ 3 where deg(v) denotes the degree of
the node.
Definition 3.2. The graph G is called a rooted binary tree if it is a binary tree and one
node v ∈ V (G) with deg(v) ≤ 2 is chosen as the root of the tree.
We also need to define several notions for rooted binary trees. This is done below.
Definition 3.3. Let G be a rooted binary tree and denote the root by vr . Then
(i) By dist(u, v) we denote the (shortest) distance between nodes u, v ∈ V (G), where
we define dist(v, v) = 0.
(ii) A node is said to be at level k if dist(v, vr ) = k.
(iii) Let v ∈ V (G) be at level k. Nodes adjacent to v which are at level k + 1 are called
children of v.
7
(iv) Let v ∈ V (G) be at level k. The node adjacent to v which as are at level k − 1 is
called the parent of v. The root has no parent.
(v) The depth of G is the maximum level of any node in G, i.e., max dist(vr , v).
v∈V (G)
(vi) A subtree is a connected subgraph of G.
(vii) Let v ∈ V (G). Let Tv denote the subtree rooted at v consisting of v and all of its
descendants.
Normally we draw the rooted binary tree with the root on top, as in Figure 3.1, where
v1 is the root.
v1
v3
v2
v5
v4
v7
v3
v8
v6
v9
(a) A rooted binary tree.
v5
v6
v9
(b) The in v3 rooted
subtree, Tv3 .
Figure 3.1: An example of a rooted binary tree and one of its rooted subtrees.
The binary search tree is a random binary tree. It is the graph illustration describing a
procedure for sorting numbers given in a random order. In the binary search tree there
are two different kinds of nodes. External nodes that are empty and internal nodes
which each contain one of the numbers in {1, 2, . . . , n}. The numbers contained in the
nodes are called keys. We will only regard the internal nodes as actual part of the tree,
while external nodes are just places for possible additions of new keys. How to create
the binary search tree is described in Definition 3.4 below.
Definition 3.4 (Binary search tree, version 1). Let σ be a permutation of the integers
{1, 2, . . . , n}, i.e., σ ∈ Sn . To construct the tree start with an empty node and then
the keys are added iteratively in the order of σ(1), σ(2), . . . , σ(n). First we add σ(1) as
the root and attach two empty nodes to the root as its children. When the tree with
σ(1), . . . , σ(k) has been constructed the next node σ(k + 1) is added in the following
way:
(1) Start with comparing σ(k + 1) with the root. If σ(k + 1) is smaller, then descend
into the left subtree, otherwise into the right subtree.
8
(2) Then repeat the process comparing σ(k + 1) with the root of the chosen subtree
following the same rule as above to descend down the tree. Continue repeating this
until an external node (empty node) is reached.
(3) Add σ(k + 1) to this external node and attach two external nodes as children to this
node.
This is repeated until σ(n) has been inserted into the tree. The now constructed tree is
called a binary search tree where the external nodes are not an actual part of the tree.
It is clear that BST is a rooted binary tree. Alternatively one can describe the construction of the binary search tree using recursion. This is done in Definition 3.5 below.
Definition 3.5 (Binary search tree, version 2). Let σ be a permutation of the set
I = {1, 2, . . . , n}. For I 0 ⊆ I, let
I 0 = I1 (I 0 ) ∪ I2 (I 0 ) ∪ σ(min0 i),
i∈I
where
i ∈ I 0 : σ(i) < σ(min0 i) ,
i∈I
0
0
I2 (I ) := i ∈ I : σ(i) > σ(min0 i) .
I1 (I 0 ) :=
i∈I
Let T (σ, I) denote the binary search tree and is constructed by σ and I in the following
way.


σ(mini∈I i)








if I 6= ∅,


T (σ, I) =



T (σ, I2 (I))
T (σ, I1 (I))








External node
if I = ∅.
This definition can then recursively be used in the subtrees regarding I1 (I) and I2 (I) as
they are strict subsets of I.
The above definition is the standard Quicksort algorithm, and this connection is one of
the reasons binary search trees have been studied. See [19] for more details regarding this
connection. In Figure 3.2 below we see an example of a binary search tree constructed
from σ = (1, 5, 7, 4, 9, 8)(2, 3)(6).
9
5
9
3
2
7
4
6
1
8
Figure 3.2: An example of a binary search tree. In this case I = {1, 2, . . . , 9} and σ =
(157498)(23)(6) which makes the order of the keys inserted 5, 3, 2, 9, 7, 6, 4, 1, 8.
The dashed lines correspond to edges going to external nodes, correspond to possible gaps where the next key can be added.
The construction of the BST is completely determined by the random permutation σ.
We will always assume that all permutations of the integers {1, 2 . . . , n} are equally
likely. We will later in Chapter 4 see the consequences of this assumption.
3.2
For Larger m
Now that the binary search tree has been introduced it is easy to generalise the notion
of binary search trees to m-ary search trees. The difference between BST and m-ary
search trees is the fact that each node can contain up to m − 1 keys each and can have
up to m children, i.e., m = 2 corresponds to the binary case. Definition 3.1 and 3.2
can easily be generalised for m-ary search trees and Definition 3.3 is still true for rooted
m-ary trees.
Definition 3.6. A graph G is called a m-ary tree if it is a connected acyclic graph such
that for all nodes v ∈ V (G), deg(v) ≤ m + 1.
Definition 3.7. The graph G is called a rooted m-ary tree if it is a m-ary tree and one
node v ∈ V (G) with deg(v) ≤ m is chosen as the root of the tree.
Just like in the binary search tree there are two different kinds of nodes for a m-ary
search tree, external and internal nodes, external nodes are empty just like for binary
search trees but internal nodes can now contain up to m − 1 of the keys {1, 2, . . . , n}. We
will still only regard the internal nodes as actual part of the tree, while external nodes
10
are just places for possible additions of new keys. Since each node can contain up to
m−1 keys we get m different intervals by ordering the keys in a node in increasing order.
The construction of the m-ary search tree is therefore a generalisation of Definition 3.4
or 3.5 by descending into the correct subtree according to a comparison with the keys
in the root. The generalised definitions will be stated for both versions. Note that they
reduce to the Definition 3.4 or 3.5 when m = 2.
For Definition 3.4 the generalisation becomes as in Definition 3.8 below.
Definition 3.8 (m-ary search tree, version 1). Let σ be a permutation of the integers
{1, 2, . . . , n}, i.e., σ ∈ Sn . To construct the tree start with an empty node. Then the
keys are added iteratively in the order of σ(1), σ(2), . . . , σ(n). First we add σ(1) to the
root. When the tree with σ(1), . . . , σ(k) has been constructed the next node σ(k + 1) is
added in the following way (starting at the root):
(1) If the node has < m − 1 keys: add σ(k + 1) to this non-full node. If the node has
m − 1 keys after adding σ(k + 1) attach m external nodes as children to this node.
(2) If the node has m − 1 keys: σ(i1 ) < σ(i2 ) <, · · · < σ(im−1 ) from left to right; find
the smallest j such that σ(k + 1) < σ(ij ) and descend into the subtree corresponding
to this interval, i.e., the j:th subtree from the left. If no such j exists ⇔ σ(im−1 ) <
σ(k + 1), then descend into the right most subtree.
(3) Then repeat the process from (1) again comparing σ(k + 1) with the root of the
chosen subtree as the current node to investigate. (This process continues until a
node with less than m − 1 keys is found and σ(k + 1) can be added to the tree.)
This is repeated until σ(n) has been inserted into the tree. The now constructed tree is
called a m-ary search tree where the external nodes are not an actual part of the tree.
This gives us one definition of the m-ary search tree. Another equivalent way of defining
the m-ary search tree is based on generalising Definition 3.5. This is done in Definition
3.9 below.
Definition 3.9 (m-ary search trees, version 2). Let σ be a permutation of the set
I = {1, 2, . . . , n}. For I 0 ⊆ I, let
0
0
I 0 = I1 (I 0 ) ∪ · · · ∪ Im (I 0 ) ∪ σ(Imin
(1)), . . . , σ(Imin
(m − 1)) ,
where
I1 (I 0 ) := i ∈ I 0
I2 (I 0 ) := i ∈ I 0
..
.
Im−1 (I 0 ) := i ∈ I 0
Im (I 0 ) := i ∈ I 0
0
: σ(i) < σ(Imin
(1)) ,
0
0
: σ(Imin
(1)) < σ(i) < σ(Imin
(2)) ,
0
0
: σ(Imin
(m − 2)) < σ(i) < σ(Imin
(m − 1)) ,
0
: σ(i) > σ(Imin
(m − 1)) ,
11
0 (i) denotes the i:th smallest element of I 0 ⊆ I. Let T (σ, I) denote the m-ary
and Imin
search tree together with external nodes that is constructed by σ and I in the following
way:
T (σ, I) =



















σ(Imin (1)) . . . σ(Imin (m − 1))
if |I| ≥ m − 1,


T (σ, I1 (I))
















...
T (σ, I2 (I))
T (σ, Im (I))
σ(Imin (1)) . . . σ(Imin (|I|))
if 1 ≤ |I| < m − 1,
External node
if I = ∅.
The definition can then recursively be applied in the subtrees using the definition of
I1 , . . . , I m .
In Figure 3.3 below we see an example of a m-ary search tree given when m = 4. Note
how the keys in each node decides where the children ends up.
2, 8, 14
4, 5, 7
1
3
6
9, 10, 13
11, 12
15, 18, 20
16, 17
19
Figure 3.3: An example of a 4-ary search tree. In this case I = {1, 2, . . . , 20} and σ =
(1, 2, 14, 6, 10)(3, 8, 13, 4, 5, 9, 11, 7, 15, 20, 17, 16, 18, 19)(12) which makes the order
of the keys inserted 2, 14, 8, 5, 9, 10, 15, 13, 11, 1, 7, 12, 4, 6, 20, 18, 16, 19, 3, 17. The
dashed lines represent external nodes. The next key can either be put in one of the
external nodes or in one of the nodes with less than m − 1 = 3 keys.
3.3
Definition of a Protected Node
The main focus of this thesis is to study two-protected nodes, which together with
several other notions is defined in Definition 3.10. Note as previously stated that only
the internal nodes are considered as an actual part of the tree.
Definition 3.10. Let T be a m-ary search tree.
12
(i) A node is called a leaf if it is an internal node with no internal children.
(ii) A node is called two-protected if it is an internal node with no children that are
leaves.
(iii) A node with 0 ≤ i ≤ m − 2 keys is said to have i + 1 gaps and a full node with
m − 1 keys has no gaps. (These gaps correspond to the intervals that new keys can
be added into with every interval being equally likely.)
In some texts two-protected nodes are simply called protected. If we look at Figure 3.2
the two nodes containing keys 5 and 9 are two-protected, but non of the others are. In
Figure 3.3 however, none of the nodes are two-protected.
The definition of two-protected nodes can be generalised to the notions of k-protected
nodes where a node is k-protected if no leaf is at distance less than k to the node. Using
this notations a leaf is equal to a node that is zero-protected but not one-protected. In
this thesis the focus will be solely on two-protected nodes.
3.4
Previous Results
There are many studies of protected nodes in various kinds of random trees. These
include uniformly random ordered trees [4], k-ary trees [21], digital search trees [10],
binary search trees [2, 13, 14, 20], ternary (3-ary) search trees [12]. Most of these results
were obtained using generating functions. Protected nodes are put in context of fringe
subtrees in [7, 13, 14]. In [12] urn models were introduced in the study of protected
nodes.
For m-ary search trees it is known that the number of nodes with i ≤ m − 1 keys is
asymptotically normally distributed when m ≤ 26 [15, 18], and since the random vector
of these numbers for different i has asymptotically a multivariate normal distribution, it
follows in particular that the total number of nodes in the tree has a normal distribution
asymptotically. (Note that for m = 2 the total number of nodes is n, and thus not
random.). For m ≥ 27 however, the number of nodes with i ≤ m − 1 keys is not
asymptotically normally distributed [3, 5]. Similarly the number of leaves and oneprotected nodes are shown to be asymptotically normally distributed for 2 ≤ m ≤ 26.
See [6] for the binary case and [12] for larger m.
In [12], Pólya urns are used to show that the number of two-protected nodes in ternary
search trees is asymptotically normally distributed. The work done in [12] is also the
inspiration for this thesis as previously stated in Section 1.1. It is conjectured that two
protected nodes will have similar behaviour as the different type of nodes in the sense
that the number of two-protected nodes in m-ary search trees with m ≤ 26 is conjectured
to be asymptotically normally distributed, while for m ≥ 27 this should not be the case.
In Chapter 6 it can be seen that the conjecture holds for m = 4, 5 and 6 which is the
main result of this thesis.
13
Chapter 4
Pólya Urns Applied to
Two-Protected Nodes
In this chapter Pólya urns are applied to the present task, which is to study the asymptotic distribution of two-protected nodes in m-ary search trees. The general outline how
to use Pólya urns in the study of m-ary search trees is first presented. Then we move
on to the present case of study which is the number of two-protected nodes in these
trees.
4.1
Outline of Method Used
The basic idea behind using Pólya urns for m-ary search trees can be summarised as
follows:
Step 1: Divide the tree into a forest of subtrees in a suitable way making sure the
needed information about the trees original structure is not lost. Let the possible
subtrees corresponding to balls in our urn model. It is helpful if the number of
different subtrees (or colours) is kept as small as possible to make computations
easier.
Step 2: Determine how each subtree changes when keys are added in the subtrees’ different gaps i.e., some new subtrees will occur while the old subtree is destroyed.
Normally transitions are not deterministic and new keys are equally likely to
end up in every gap. This also gives us the activity vector a = (a1 , . . . , aq ).
Step 3: Calculate the transition matrix A as defined in Definition 2.1.
Step 4: Determine if A fulfils the assumptions in the theorems in Section 2.2 by calculating eigenvalues and eigenvectors of A. If possible use these theorems to draw
the possible conclusions for the different subtrees by evaluating the necessary
15
matrices and matrix operations that are used in the theorems for general Pólya
urns.
Step 5: If Step 4 was successful, use the asymptotic convergence of the different types
of subtrees to determine the wanted result. In other words, relate the number
of subtrees and their result from Step 4 to the property being investigated.
The outline above will now be specified for the present case of two-protected nodes.
4.2
Step 1: Dividing the Tree Into a Forest of Subtrees
For two-protected nodes, it is needed to divide the original tree, T , into subtrees in such a
way that it is clear which nodes that are two-protected. In other words, we can’t remove
any edges with one endpoint being a leaf. However, all other edges can be removed since
we are interested in two-protected nodes and these edges do not affect whether a node is
two-protected or not. This corresponds to removing all edges except for those between
one-protected and leaves (and the external nodes). Observe the following:
(i) Assuming the number of keys n ≥ m, no roots of the subtrees will be leaves. If
there was a root of a subtree that was a leaf, it would be attached to its respective
parent in the original tree and therefore not be a root.
(ii) All children of the roots in the subtrees will be leaves. Otherwise they would not
be attached to the root.
(iii) By (i) and (ii), all subtrees will be of depth at most 1 (excluding external nodes).
(iv) To minimize the number of types, we regard the subtrees as unordered, i.e., subtrees
are only unique up to permutation of the children of the root. The different types of
subtrees can therefore be described by a label, (k0 , . . . , km−1 ), where ki denotes the
number of children with i keys. Clearly no subtree can have two different labels.
The case when k0 = m is not a valid label for a ball in the urn since the root is not
a leaf by (i) above. It will become clear that the labels of the different colours will
determine all calculations.
(v) Each root for the subtrees has m children including external children in the original
tree
but some edges may have been removed
when creating the forest. Therefore
Pm−1
Pm−1
k
≤
m
holds.
In
other
words,
m
−
i
i=0
i=0 ki equals the number of removed
children of the root in a subtree.
(vi) The number of different labels or different types of subtrees correspond
to the numP
ber of different ways of assigning (k0 , . . . , km−1 ) such that m−1
k
≤
m holds,
i
i=0
except for the invalid label (m, 0, . . . , 0). The number of ways of doing this corresponds to the number of ways of dividing m into m + 1 non negative integer parts
minus 1, i.e., the number of colours in the urn q = 2m
m − 1.
16
(vii) A two-protected node will always be a root in a subtree since it cannot be leaf in
a subtree. Furthermore, they have no leaves as children and therefore each twoprotected node will be a root in a subtree with label (k0 , 0, . . . , 0), 0 ≤ k0 ≤ m − 1.
In other words, the number of two-protected nodes correspond to the number of
subtrees with labels (k0 , 0, . . . , 0), 0 ≤ k0 ≤ m − 1.
We order the different types of subtrees by assigning a bijection between the colours
1, . . . , q and the different labels. The choice will not affect the results but will affect the
structure of the matrices A and B. To simplify from an algorithmic point of view the
different labels will be ordered by using the following rule. Let (k0 , . . . , km−1 ) be type i
0
0
and (k00 , . . . , km−1
) be type i0 . If (k0 , . . . , km−1 ) = (k00 , . . . , km−1
) then i = i0 . Otherwise,
0
0
0
find largest j such that kj 6= kj . If kj > kj ⇒ i < i and kj < kj0 ⇒ i > i0 . Note that
this is well-defined.
To keep track of the ordering, we introduce the label-vector K = (K1 , . . . , Kq )T where
Ki is the label of type i. For example in the binary case, K would be equal to


(0, 2)
 (1, 1) 


.
(0,
1)
K=


 (1, 0) 
(0, 0)
In general, K1 = (0, . . . , 0, m), K2 = (0, . . . , 0, 1, m − 1) etc. In Appendix C all the
different labels and the corresponding subtrees are visualised for m = 4.
4.3
Step 2: Transitions Between Subtrees
To determine how the different types of subtrees change in the urn model it is enough
to study the labels of the different types of subtrees. It has been assumed that each gap
is equally likely to receive the next key.
P This gives that the activity of a type, aj , is
equal to the number of gaps, i.e., aj = m−1
i=0 (i + 1)ki . The probability of the key being
added in a specific gap given the chosen subtree is therefore a1j . When a key is added to
a node with i ≤ m − 2 keys adjacent to the root in the subtree, the new key is simply
added to the node which now has i + 1 keys. The other possibility is adding the key
to an external node at distance 2 from the root in the subtree. Then the external node
becomes an internal leaf. This also has the effect that the edge between the root and the
parent of the previously external node is removed since the parent isn’t a leaf anymore.
Therefore when a key is added in this manner the subtree is split into two parts and two
coloured balls are added back into the urn. One part is the original subtree except with
one less child with m − 1 keys. The other being a subtree with one root together with
m children, one being an internal node with one key and the rest being external nodes.
17
This is summarised in Eq. 4.1 below where aj denotes the activity of the subtree.
p=
(k0 , . . . , km−1 )
(i+1)ki
aj
7−→
p=
(k0 , . . . , ki−1 , ki − 1, ki+1 + 1, ki+2 , . . . , km−1 )
if i ≤ m − 2,
m·km−1
aj
(k0 , . . . , km−2 , km−1 − 1) & (m − 1, 1, 0 . . . , 0) if i = m − 1.
(4.1)
This shows the probability of different transitions depend on which kind of node that
receives the new key. Note that the probabilities sum up to 1 (recalling how the activity is
defined), as they have to since only one transition can happen for each new key addition.
To get ξi,j is not hard since we have all transitions between the different labels. Hence,
ξi,j is the probability of Ki → Kj which is exactly what Eq. 4.1 helps calculate while
taking into consideration that Ki is removed from the urn.
(k0 , . . . , km−1 )
7−→
To get ξj is now a simple task. By applying Eq. 4.1 to Kj for all 0, . . . , m − 1 and
combining the different contributions we get a probability of Kj transitioning into Ki .
This is the element ξj,i in the vector ξj . Specifically, ξj,j is −1+ probability of a transition
into itself. Except for the binary case no way of putting in a new key into a gap can
produce the same subtree again; hence, the probability of a transition into itself is 0 for
all m 6= 2. Given the structure of the transitions described in Eq. 4.1 the number of
non-zero elements in ξj will be ≤ m + 2 and therefore ξj will be sparse for m ≥ 3.
In Figure 4.1 below an example of a transition is shown where m = 4 and K24 =
(1, 0, 1, 1). Note how the label changes in accordance with Eq. 4.1 and how that determines ξ24 .
1
8
K24 = (1, 0, 1, 1)
3
8
K22 = (0, 1, 1, 1)
1
2
K14 = (1, 0, 0, 2)
+
K54 = (1, 0, 1, 0)
K62 = (3, 1, 0, 0)
Figure 4.1: The possible transitions for subtree with label (1, 0, 1, 1) in a 4-ary search tree.
This gives that ξ24,24 = −1, ξ24,22 = 1/8, ξ24,14 = 3/8, ξ24,54 = ξ24,62 = 1/2 and
ξ24,i = 0, i 6= 14, 22, 24, 54, 62.
18
4.4
Step 3: Calculating the Transition Matrix A
Now that the activity vector, a, and ξi has been calculated it is a simple task to get A
by calculating A as in Definition 2.1. In Algorithm 5.2 it is presented how to implement
a program to calculate A for any m given K.
4.5
Step 4: Apply Theorems
In this Pólya urn model for two-protected nodes many of the criteria in the theorems in
Section 2.2 are always satisfied regardless of the value of m.
(A1) ξi,j ≥ 0 for i 6= j and ξi,i ≥ −1, i.e., only the drawn ball may be removed at each
time-step.
2 ) < ∞ for all i, j ∈ {1, . . . , q}.
(A2) E(ξi,j
(A1) and (A2) are clearly satisfied by construction in Step 2 above. As explained
earlier in Step 2 for ξi,j , it holds that if i = j then −1 ≤ ξj,j ≤ 0 and if i 6= j then
0 ≤ ξi,j ≤ 1. More specifically, ξj,j = −1 except in the binary case.
(A3) The largest eigenvalue λ1 of A is positive.
(A4) The largest eigenvalue λ1 is simple.
(A6) λ1 is an eigenvalue of the submatrix of A given by the dominating types.
(A3), (A4) and (A6) will hold as consequences of The Perron-Frobenius Theorem
(Theorem 2.5). To be able to apply the theorem to A it is needed to transform
it into a non-negative irreducible matrix. A type is dominating if and only if its
activity is non-zero, i.e., all except the type of subtree with label (0, . . . , 0) are
dominating. This type does however correspond to a zero-column in A. By this
the row and column corresponding to the type of subtree with label (0, . . . , 0) can
be removed from A making it an irreducible matrix. Since it was a zero-column
being removed it will reduce the multiplicity of the eigenvalue 0 by one. This
will always be row and column q by the way we ordered the types. By (A1) we
have that A + m2 Iq×q will be a non-negative matrix. Now by applying PerronFrobenius Theorem to this new matrix we get that the largest eigenvalue of the
original matrix A is simple and real. It also holds that the largest eigenvalue is the
only eigenvalue which it exists left and right eigenvectors which are non-negative.
We make the following observation:
(aT A)k =
q
X
i=1
ai Ai,k =
q
X
i=1
ai ak E(ξk,i ) = ak a · E(ξk ) = ak .
| {z }
(4.2)
=1
This shows that a is a left eigenvector of A with eigenvalue 1. Since a is strictly
positive except for aq we have by the above reasoning, using Perron-Frobenius
19
Theorem, that the largest eigenvalue of A is 1 for all m. By normalisation in Eq.
2.3 we get that a = u1 . This shows that (A3), (A4) and (A6) hold with λ1 = 1.
(A5) We start with at least one ball of a dominating type, i.e., there exists a dominating
type i with X0,i > 0.
This is clearly true since the only non-dominating type is (0, . . . , 0) and this type
can not exist without at least m other balls which are attached to (0, . . . , 0) as
children in the original tree.
(A7) With probability 1, the urn never becomes essentially extinct.
Being essentially extinct is by Definition 2.4 the same as having no balls left of
dominating types in the urn. In this Pólya urn however, all types of subtrees with
positive activity are dominating. The total activity is the same as the number of
gaps which increases by one for each key added. This is why a·E(ξi ) = 1 and shows
that the urn will never run out of dominating types implying that (A7) holds.
This shows that (A1)−(A7) will always be satisfied for the Pólya urn constructed for
two-protected nodes.
a.s.
Since all assumptions of Theorem 2.2 now hold it shows that Xnn −→ λ1 v1 as n → ∞.
To be able to get convergence in mean as well, convergence in probability together
with uniformly integrability of the sequence are sufficient conditions. Convergence in
probability is implied by convergence almost surely and uniformly integrability holds
since there can’t be more balls than keys, i.e., Xnn ≤ 1. This gives us that
E(Xn )
→ λ 1 v1 = v1 ,
n
as n → ∞,
(4.3)
which is true no matter what the other eigenvalues of A are.
m−1
Y
(x + j) − m! = 0.
(4.4)
j=1
4.6
Step 5: Obtaining the Asymptotic Distribution of TwoProtected Nodes
Recalling that two-protected nodes are roots in a subtree with label (k0 , 0, . . . , 0), 0 ≤
k0 ≤ m − 1 and the fact that (k0 , 0, . . . , 0) willP
correspond to colour q − k0 we get that
the total number of two-protected nodes Pn = m−1
k0 =0 Xn,q−k0 . Therefore, by Eq. 4.3 we
get that
P
m−1
m−1
X E(Xn,q−k )
X
E( m−1
E(Pn )
k0 =0 Xn,q−k0 )
0
=
=
→
v1,q−k0 .
(4.5)
n
n
n
k0 =0
20
k0 =0
Further, if Theorem 2.3 or 2.4 was applicable we will now be able to use the following
familiar lemma.
Lemma 4.1 ([11], Simplified version of Theorem 3.1 (Chapter 5)). Let Y = (Y1 , . . . , Yq )T ∼
N (µ, Σ), i.e., Y is a multivariable normally distributed random variable. Also, let
c = (c1 , . . . , cq ) and Z = c · Y . Then Z ∼ N (c · µ, cΣcT ).
By apply Lemma 4.1 with c = (0, . . . , 0, 1, . . . , 1) it yields the following new Lemma
| {z }
m times
which will be of use when calculating the main results.
Lemma 4.2. Let Xn be the random vector describing the number of subtrees of each
type when dividing a m-ary search tree as described in this chapter. Let further Pn be
the number of two-protected nodes in the same m-ary search tree. Then if
Xn − nµ d
√
−→ N (0, Σ),
n
then
as n → ∞,
Pn − nc · µ d
√
−→ N (0, cΣcT ),
n
as n → ∞,
where c = (0, . . . , 0, 1, . . . , 1).
| {z }
m times
This lemma completes the general calculations. The only thing left now is to perform
the specific calculations for specified m. The results of these calculations are presented
in Chapter 6.
21
Chapter 5
Algorithms Used for
Two-protected Nodes
In this chapter the different algorithms used to construct the label vector K and matrices
A, and B are presented. The main idea is described and pseudocodes are presented.
Implementations in Python, of these algorithms, can be found in Appendix A.
5.1
Constructing the Label Vector K
Recall how the label vector, K, was introduced in Section 4.2. Creating the label vector
is a simple task for a given m. It is naively constructed by using m nested ”for-loops”
iterating over all possible labels while making sure to do this is in the correct order.
By using recursion, the algorithm can constructed such that the same exact algorithm
works for any m without having to change the number ”for-loops”. This recursive way
of creating the label vector is what is shown in Algorithm 5.1 below. As explained in
Section 4.2 the subtree with label (m, 0, . . . , 0) is not part of the urn since it will not be
in the urn after m keys have been inserted into the tree. It is therefore removed from
the label vector K. The pseudocode for this algorithm is shown in Algorithm 5.1 below.
For an implementation of this algorithm, see Appendix A.
23
Algorithm 5.1 Create Label Vector K
procedure CreateLabelVector(m)
K ← CreateRecursive(m, m, Empty Vector, Empty Vector)
3:
remove (m, 0, . . . , 0) from K
4:
return K
5: end procedure
1:
2:
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
subprocedure CreateRecursive(m, m0 , K, Kj )
for i = m0 , . . . , 1 do
Add i to Kj as the first element
if Length of Kj < m then
K ← CreateRecursive(m, m − i, K, Kj )
else
Add Kj to K
end if
Remove first element from Kj
return K
end for
end subprocedure
5.2
Constructing the Transition Matrix A
We want to calculate the transition matrix A (see Definition 2.1). First the label vector
is created by using Algorithm 5.1 in the previous section. Then by going through all
the different labels we get the transitions using Eq. 4.1, which in turn gives us the
elements in A. This is presented as a pseudocode in Algorithm 5.2 below. For a real
implementation in Python, see Appendix A.
When looking at the pseudocode in Algorithm 5.2 the following comments are helpful.
(i) Remember that when we look at element the Ai,j we are interested in the transition
from Kj to Ki (and not the other way around).
(ii) By K`split we mean the subtree with label (m − 1, 1, 0 . . . , 0) which is always created
when we add keys for i = m − 1 in Eq. 4.1.
(iii) The variable p∗ in the pseudocode below is not the probability of the transition,
but rather the activity times the probability of the transition given the subtree
which the new key is being inserted into. Mathematically this can be expressed as
p∗ = p · aj = ki (i+1)
aj aj = ki (i + 1).
24
Algorithm 5.2 Create Matrix A
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:
procedure CreateA(m)
K ← CreateLabelVector(m)
q ← 2m
m −1
A ← 0q×q
`split ← `split such that K`split = (m − 1, 1, 0, . . . , 0)
for Kj inPK = (K1 , . . . , Kq )T do
aj ← m−1
i=0 Kj,i · (i + 1)
A(j, j) ← −aj
for i = 0, . . . , m − 1 do
(k0 , . . . , km−1 ) ← copy of Kj
if ki 6= 0 then
p∗ ← ki · (i + 1)
if i < m − 1 then
ki ← ki − 1
ki+1 ← ki+1 + 1
` ← ` such that K` = (k0 , . . . , km−1 )
A(`, j) ← A(`, j) + p∗
else
ki ← ki − 1
` ← ` such that K` = (k0 , . . . , km−1 )
A(`, j) ← A(`, j) + p∗
A(`split , j) ← A(`split , j) + p∗
end if
end if
end for
end for
return A
end procedure
5.3
. ⇒ `split ← q − 2m + 1
. Kj = (Kj,0 , . . . , Kj,m−1 )
Constructing the Matrix B
To calculate B as in Eq. 2.7 we use similar calculations
as we did for the transition matrix
P
A. Recall Eq. 2.6 and 2.7 which says that B = qj=1 v1,j aj Bj and Bj = E(ξj ξjT ). For Bj
all the possible transitions have to be handled separately. If we let δX = (δX1 , . . . , δXq )T
express the change when the key is added to a specific node we get that
X
Bj = E(ξj ξjT ) =
p δXδX T ,
(5.1)
transitions
from Kj
where p is the probability of the new key being added to the specific node type and δX
is the change that happens when the new key is added the specific node type as shown
25
in Eq. 4.1. The summation is over all the possible nodes to add the new key to; which
is equal to applying Eq. 4.1 for all i. If the change is deterministic p = 1 and δX = ξj .
The Algorithm is shown as the pseudocode in Algorithm 5.3 below. An implementation
of this pseudocode in Python can be found in Appendix A.
Algorithm 5.3 Create Matrix B
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:
29:
30:
31:
32:
procedure CreateB(m, v1 )
K ← CreateLabelVector(m)
q ← 2m
m −1
B ← 0q×q
`split ← `split such that K`split = (m − 1, 1, 0, . . . , 0)
for Kj in K = (K1 , . . . , Kq )T do
Bj ← P
0q×q
aj ← m−1
i=0 Kj,i · (i + 1)
for i = 0, . . . , m − 1 do
(k0 , . . . , km−1 ) ← copy of Kj
δX ← (0, . . . , 0)
if ki 6= 0 then
δXj ← −1
p ← ki ·(i+1)
aj
if i < m − 1 then
ki ← ki − 1
ki+1 ← ki+1 + 1
` ← ` such that K` = (k0 , . . . , km−1 )
δX` ← δX` + 1
else
ki ← ki − 1
` ← ` such that K` = (k0 , . . . , km−1 )
δX` ← δX` + 1
δX`split ← δX`split + 1
end if
Bj ← Bj + pδXδX T
end if
end for
B ← B + aj v1,j Bj
end for
return B
end procedure
26
. ⇒ `split ← q − 2m + 1
. Kj = (Kj,0 , . . . , Kj,m−1 )
. δX = (δX1 , . . . , δXq )
Chapter 6
Main Results
In this chapter, the main results are presented. These results have been obtained using
the method presented in Chapter 4 and algorithms shown in Chapter 5.
Let Pn,m denote the number of protected nodes in a m-ary search tree after inserting n
keys. By the arguments presented in Section 4.5, we can by applying Eq. 4.3, and using
the eigenvector v1 (corresponding to the largest eigenvalue λ1 ) found in Appendix B for
m = 4, 5, 6, 7, obtain the following results.
E(Pn,4 )
n
E(Pn,5 )
n
E(Pn,6 )
n
E(Pn,7 )
n
→
→
→
→
54731
,
2212210
3491
,
374374
26230601
,
6161839992
30706935422593
,
13553801518989160
as n → ∞,
as n → ∞,
(6.1)
as n → ∞,
as n → ∞.
In Section 4.5 it was proved that the only assumption that could possibly be false in
Theorem 2.3, for any m, is the fact that Re(λi ) < λ21 , i 6= 1 might not hold. But by
Appendix B this does hold for m = 4, 5, 6, and Theorem 2.4 can be applied for these m.
This gives us that Lemma 4.2 can be applied resulting in Theorem 6.1 below, which is
the main result of this thesis.
27
Theorem 6.1. Let Pn,m be the number of two-protected nodes in a m-ary search
tree with n keys, where m = 4, 5 or 6. Then
Pn,m − nµm d
√
−→ N (0, σPm ) ,
n
as n → ∞,
where
µ4 =
54731
,
2212210
µ5 =
3491
,
374374
µ6 =
26230601
.
6161839992
If m = 4 then
σPm =
15052941593405167940632303503251
.
1198528814281445820304601786316000
Note that σP4 was calculated using the fact that
σP4 = (1, 1, 1, 1)ΣP4 (1, 1, 1, 1)T ,
(6.2)
where ΣP4 = (σi,j )69
i,j=66 . This matrix can be found in Appendix B. The actual calculations of Σ could be simplified since A is diagonalisable and has a dual basis of left and
right eigenvectors when m = 4. This made it possible to use Eq. 2.9 instead of Eq. 2.8
to calculate Σ. This had no effect on the result but simplified the calculations. It turns
out that A is diagonalisable for m = 6 as well but this is not true for m = 5.
28
Chapter 7
Discussion and Future Work
Overall the thesis has been a success. For m = 4 complete results has been obtained
which was the main goal. For m = 5 and 6 asymptotic normality in distribution has
been shown; Σ has however not been calculated due to the large dimension q. These
results obtained for the two-protected nodes in m-ary search trees when m = 4, 5 and 6
are in agreement with previous work for m = 2 and 3. This is what we expected from the
beginning. The method previously developed in [12] has been made more concrete. The
algorithms and implementations work for larger m which should also simplify further
investigation. Running the same calculations on more powerful computers should yield
similar results for larger m, provided it holds for these m. As shown in Chapter 4, in
order to obtain asymptotic normality in distribution for m > 6 all that is needed is to
calculate the eigenvalues of the transition matrix A for the specified m. Therefore, there
is reason to believe that new results can be found using the method in this thesis. Also,
numerical calculations seem to support that similar results should hold for larger m as
well (assuming m ≤ 26).
Given the results for m = 2, . . . , 6 and [12, Lemma 5.1] it makes sense to make Conjecture
7.1 and 7.2 below.
Conjecture 7.1. When using the Pólya urn for two-protected nodes for a m-ary search
tree as used Q
in this thesis, the different eigenvalues of the transition matrix, A, will be
2
the roots of m−1
j=1 (x + j) − m! = 0 together with the integers 0 and −2, −3, . . . , −m
(with different algebraic multiplicities) provided m ≤ 26.
If Conjecture 7.1 turns out to be true it would prove that the number of two-protected
nodes in m-ary search trees is asymptotically normally distributed for m ≤ 26. The
conjecture might even make
Qsense for m ≥ 27. This makes no difference1 however since
there exists a root, λi , of m−1
j=1 (x + j) − m! = 0 such that Re(λi ) ≥ 2 λ1 ; hence the
number of two-protected nodes would still not obtain an asymptotic normal distribution.
This in analogy to the number of nodes in m-ary search trees which is asymptotically
normally distributed if and only if for 3 ≤ m ≤ 26 as described in Section 3.4.
29
Conjecture 7.2. Let A be the transition matrix corresponding to the Pólya urn for
two-protected nodes used throughout this thesis for a m-ary search tree where m ≤ 26.
Then if m is even the transition matrix, A, is diagonalisable, and there exists dual bases
of the left and right eigenvectors of A. Otherwise (when m is odd) the transition matrix,
A, is not diagonalisable and has rank q − 1.
If the characteristic polynomial of the transition matrix is known, the algebraic multiplicities of the possible eigenvalues in Conjecture 7.1 can easily be calculated; thereby
verifying or contradicting the conjecture. This by factoring out these roots of the characteristic polynomial. Another possibility would be to check the geometric multiplicities
of the different possible eigenvalues in Conjecture 7.1. If Conjecture 7.2 is true as well,
then this would yield all eigenvalues of the transition matrix A for even m. It would
however not help for odd m. Conjecture 7.2 would also imply that Theorem 2.4 could be
used for even m simplifying the calculations of Σ, and thus making the computations less
demanding. These two suggestions describe two possible ways to extend the calculations
to larger m. This extension is however not part of the scope for this thesis, but rather
a possible way forward.
30
Appendix A
Python Code for Calculating the
Label Vector K and the Matrices
A and B for Arbitrary m
A.1
Code for Creating the Label Vector K
Below is the source code in Python to create the label vector K. The label vector is
constructed as a list of lists and then returned. This is done by recursion to make it
work for any m. The solution can be seen as a recursive method for doing m nested
”for-loops”.
Python Code A.1: Creating the Label Vector K (LabelVectorRecursion.py)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
def L abelCreateRecursion (m , mleft , Label_Vector , current_label ,
recursion_level ) :
for i in range ( mleft , -1 , -1) :
current_label . insert (0 , i )
if recursion_level != m :
Label_Vector = LabelCreateRecursion (m , mleft -i , Label_Vector ,
current_label , recursion_level + 1)
current_label . pop (0)
else :
Label_Vector . append ( current_label [:])
current_label . pop (0)
return Label_Vector
def create ( m ) : # Main
LabelVector = LabelCreateRecursion (m ,m , list () , list () ,1)
BannedType = [0]* m
BannedType [0] = m
LabelVector . remove ( BannedType )
return LabelVector
31
A.2
Code for Creating the Transition Matrix A
Creating A is a straightforward implementation task from Algorithm 5.2. The code
is presented below in Python Code A.2. If wanted the implementation can easily be
modified in such a way that it produces the transition matrix as a sparse matrix, e.g.
on the format (row, column, value). Note that it uses Python Code A.1 by importing
it.
Python Code A.2: Creating the Transition Matrix A (CreateA.py)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
import LabelVectorRecursion
m = 4 # Pick m as wanted
LabelVector = LabelVectorRecursion . create ( m )
q = len ( LabelVector )
SplitType = [0]* m # Label (m -1 ,1 ,0 ,... ,0) is created each time a subtree
splits
SplitType [0] = m -1
SplitType [1] = 1
ATranspose = []
for inputLabel in LabelVector :
for i in range (0 , len ( inputLabel ) ) :
inputLabel [ i ] = int ( inputLabel [ i ])
AT_i = [0]* q
a = 0
for i in range (0 , m ) :
a = a + int ( inputLabel [ i ]) *( i +1)
AT_i [ LabelVector . index ( inputLabel ) ] = -a
for i in range (0 , m ) :
outputLabel = list ( inputLabel )
print inputLabel
print outputLabel
if outputLabel [ i ] != 0:
ap = outputLabel [ i ]*( i +1) # = ( x [ i ]*( i +1) / a ) * a = a * p .
if i < m -1:
outputLabel [ i ] = outputLabel [ i ] - 1
outputLabel [ i +1] = outputLabel [ i +1] + 1
AT_i [ LabelVector . index ( outputLabel ) ] = AT_i [ LabelVector .
index ( outputLabel ) ] + ap
else : # i = m -1
outputLabel [ i ] = outputLabel [ i ] -1
newType = 9*(10** m )
for mtemp in range (0 , m ) :
newType = newType + outputLabel [ mtemp ]*(10**( m - mtemp
-1) )
AT_i [ LabelVector . index ( outputLabel ) ] = AT_i [ LabelVector .
index ( outputLabel ) ] + ap
AT_i [ LabelVector . index ( SplitType ) ] = AT_i [ LabelVector .
index ( SplitType ) ] + ap
ATranspose . append ( AT_i )
A = [ list ( i ) for i in zip (* ATranspose ) ] # Transpose ATranspose into A
file = open ( " A . csv " , " w " ) # Save A to file in CSV format
32
38
39
40
41
for i in range (0 , q ) :
A_i = ’ , ’. join ( map ( str , A [ i ]) )
file . write ( A_i + ’\ n ’)
file . close ()
A.3
Code for Creating the Matrix B
Creating the matrix B is a similar in structure to the creation of A. To be able to
calculate the matrix B Python Code A.1 is needed together with the left and right
eigenvectors associated with λ1 , a and v1 , normalized according to Eq. 2.3 for the specific
m. Three matrix and vector operations implemented into Python are also needed given
the chosen way of implementation. The implementations of these operations are here
done in the most naive way possible. The code for these operations is shown in Python
Code A.4 further down.
Python Code A.3: Creating the Matrix B (CreateB.py)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
from fractions import Fraction
import LabelVectorRecursion
import MatrixOperations
m = 4
LabelVector = LabelVectorRecursion . create ( m )
q = len ( LabelVector )
# Pick correct activityVector and v1
if m == 2:
activityVector = [4 , 3 , 2 , 1 , 0]
v1 = [ Fraction (1 ,30) , Fraction (1 ,6) , Fraction (1 ,10) , Fraction (1 ,6) ,
Fraction (1 ,5) ]
if m == 3:
activityVector = [9 , 8 , 7 , 6 , 7 , 6 , 5 , 5 , 4 , 3 , 6 , 5 , 4 , 4 , 3 , 2 , 2 ,
1 , 0]
v1 = [ Fraction (1 ,2100) , Fraction (1 ,420) , Fraction (3 ,700) , Fraction
(1 ,300) , Fraction (3 ,700) , Fraction (3 ,175) , Fraction (1 ,105) ,
Fraction (1 ,50) , Fraction (1 ,70) , Fraction (1 ,75) , Fraction (1 ,350) ,
Fraction (1 ,50) , Fraction (1 ,140) , Fraction (3 ,50) , Fraction
(4 ,175) , Fraction (1 ,60) , Fraction (1 ,50) , Fraction (3 ,140) ,
Fraction (1 ,25) ]
if m == 4:
activityVector = [16 , 15 , 14 , 13 , 12 , 14 , 13 , 12 , 11 , 12 , 11 , 10 ,
10 , 9 , 8 , 13 , 12 ,11 , 10 , 11 , 10 , 9 , 9 , 8 , 7 , 10 , 9 , 8 , 8 , 7 , 6 ,
7 , 6 , 5 , 4 , 12 , 11 , 10 , 9 , 10 , 9 , 8 , 8 , 7 , 6 , 9 , 8 , 7 , 7 , 6 , 5 ,
6 , 5 , 4 , 3 , 8 , 7 , 6 , 6 , 5 , 4 , 5 , 4 , 3 , 2 , 3 , 2 , 1 , 0]
v1 = [ Fraction (3 ,402220) , Fraction (1 ,23660) , Fraction (4 ,65065) ,
Fraction (6 ,65065) , Fraction (3 ,30940) , Fraction (6 ,65065) ,
Fraction (18 ,65065) , Fraction (4 ,9295) , Fraction (9 ,23660) , Fraction
(2 ,9295) , Fraction (1 ,1430) , Fraction (3 ,5915) , Fraction (3 ,5005) ,
Fraction (9 ,13013) , Fraction (3 ,4420) , Fraction (6 ,65065) , Fraction
(4 ,9295) , Fraction (1 ,1430) , Fraction (3 ,5915) , Fraction (1 ,1430) ,
Fraction (12 ,5005) , Fraction (18 ,13013) , Fraction (1 ,455) , Fraction
33
(18 ,9295) , Fraction (3 ,1820) , Fraction (2 ,5005) , Fraction (1 ,455) ,
Fraction (9 ,9295) , Fraction (2 ,455) , Fraction (2 ,715) , Fraction
(12 ,5915) , Fraction (3 ,910) , Fraction (3 ,1430) , Fraction (3 ,1183) ,
Fraction (3 ,884) , Fraction (1 ,27885) , Fraction (1 ,4290) , Fraction
(2 ,5005) , Fraction (3 ,13013) , Fraction (3 ,5005) , Fraction (1 ,455) ,
Fraction (9 ,9295) , Fraction (1 ,455) , Fraction (1 ,715) , Fraction
(6 ,5915) , Fraction (1 ,1365) , Fraction (2 ,455) , Fraction (1 ,715) ,
Fraction (9 ,910) , Fraction (3 ,715) , Fraction (3 ,1183) , Fraction
(4 ,455) , Fraction (3 ,910) , Fraction (6 ,1859) , Fraction (1 ,260) ,
Fraction (1 ,2730) , Fraction (3 ,910) , Fraction (1 ,1430) , Fraction
(6 ,455) , Fraction (3 ,910) , Fraction (3 ,1859) , Fraction (2 ,65) ,
Fraction (1 ,182) , Fraction (3 ,715) , Fraction (2 ,455) , Fraction
(3 ,910) , Fraction (2 ,715) , Fraction (6 ,1183) , Fraction (3 ,221) ]
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
B =[[0]* q for x in range ( q ) ]
SplitType = [0]* m # Label (m -1 ,1 ,0 ,... ,0) is created each time a subtree
splits
SplitType [0] = m -1
SplitType [1] = 1
# Loop over all labels to get all possible transitions .
for inputLabel_index , inputLabel in enumerate ( LabelVector ) :
for i in range (0 , len ( inputLabel ) ) :
inputLabel [ i ] = int ( inputLabel [ i ])
a = 0
for i in range (0 , m ) :
a = a + int ( inputLabel [ i ]) *( i +1)
T r a n s i t i o n _ p o s s i b i l i t e s _ v e c t o r = []
T r a n s i t i o n _ p r o b a b i l i t y _ v e c t o r = []
if a != 0:
a = Fraction (a ,1)
for i in range (0 , m ) :
transition_vector = [0]* q
outputLabel = list ( inputLabel )
if outputLabel [ i ] != 0:
p = Fraction ( outputLabel [ i ]*( i +1) ,a ) # outputLabel [ i ]*( i
+1) / a
T r a n s i t i o n _ p r o b a b i l i t y _ v e c t o r . append ( p )
if i < m -1:
outputLabel [ i ] = outputLabel [ i ] - 1
outputLabel [ i +1] = outputLabel [ i +1] + 1
transition_vector [ LabelVector . index ( outputLabel ) ] =
transition_vector [ LabelVector . index ( outputLabel )
] + 1
else : # i = m -1
outputLabel [ i ] = outputLabel [ i ] -1
transition_vector [ LabelVector . index ( outputLabel ) ] =
transition_vector [ LabelVector . index ( outputLabel )
] + 1
transition_vector [ LabelVector . index ( SplitType ) ] =
transition_vector [ LabelVector . index ( SplitType ) ]
+ 1
34
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
if transition_vector != q *[0]: # <= > If any transition was
observed for this i
transition_vector [ inputLabel_index ] = transition_vector [
inputLabel_index ] - 1 # the type we are considering
is always removed
T r a n s i t i o n _ p o s s i b i l i t e s _ v e c t o r . append ( transition_vector )
# Create B_i for this specific label and add to to B
for transitionVector_index , transitionVector in enumerate (
Transition_possibilites_vector ):
B_i = MatrixOperations . outerProduct ( transitionVector ,
transitionVector )
alpha = activityVector [ inputLabel_index ]* v1 [ inputLabel_index ]*
T r a n s i t i o n _ p r o b a b i l i t y _ v e c t o r [ tr an sit io nV ect or _i nde x ]
B_i = MatrixOperations . multiplyScalar ( B_i , alpha )
B = MatrixOperations . add (B , B_i )
file = open ( " B . csv " , " w " ) # Write B to file in CSV format .
for i in range (0 , q ) :
B_row = ’ , ’. join ( map ( str , B [ i ]) )
file . write ( B_row + ’\ n ’)
file . close ()
Python Code A.4: Matrix Operations (MatrixOperations.py)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
# Sum two matrices . Requires matrices of the same size .
def add ( Matrix1 , Matrix2 ) :
for row_index , row in enumerate ( Matrix1 ) :
for column_index in range (0 , len ( row ) ) :
Matrix1 [ row_index ][ column_index ] = Matrix1 [ row_index ][
column_index ] + Matrix2 [ row_index ][ column_index ]
return Matrix1
# Multiply Matrix with Scalar .
def multiplyScalar ( Matrix , Scalar ) :
for row_index , row in enumerate ( Matrix ) :
for column_index in range (0 , len ( row ) ) :
Matrix [ row_index ][ column_index ] = Scalar * Matrix [ row_index ][
column_index ]
return Matrix
# multiplies column vector with row vector , Outer product .
def outerProduct ( vector1 , vector2 ) :
m = len ( vector1 )
n = len ( vector2 )
Matrix = [[ None ]* n for x in range ( m ) ]
for row in range (0 , m ) :
for column in range (0 , n ) :
Matrix [ row ][ column ] = vector1 [ row ]* vector2 [ column ]
return Matrix
35
Appendix B
Calculated Eigenvalues,
Eigenvectors and Matrices
In this appendix, parts of the calculated matrices, vectors and eigenvalues are shown.
Due to the rapid growth of the dimension, q, it is not viable to show all of the full
matrices. Therefore the focus is on the parts required when calculating properties for
the two-protected nodes.
37
For m = 4
1
−16
1
−15
2
−14
3
−13
5
−12
7
−9
8
−8
7
−7
7
−6
1
0
0
v1,1
, . . . v1,69
,
13273260
7
−10
5
−5
√
± i 23)
1 each
1
2 (−7
4
−4
2
−3
1
−2
1
0
1
1
ΣP4 = (σi,j )69
i,j=66 =
1
3156244





·






− 355064377781
6375540600
2866697474324501
333121996350
− 21567163224471019
55227992936688
− 1860043517082072045898231
4302088532983189669500
614628061
59675
− 355064377781
6375540600
107751571761707
2368847736255
30092937685607606708029
118731475641471542850
− 3399024877833549954319501727
861278124303234571833900
38073992196770494103
2617576748561775
− 21567163224471019
55227992936688
107751571761707
2368847736255




1860043517082072045898231

− 4302088532983189669500

.

3399024877833549954319501727 
− 861278124303234571833900 


395122424034307116018071891
25922473460408708419665
30092937685607606708029
118731475641471542850
0
0
v1,1
, . . . v1,20
= (99, 561, 816, 1224, 1287, 1224, 3672, 5712, 5049, 2856, 9282, 6732, 7956, 9180, 9009, 1224, 5712, 9282, 6732, 9282),
0
0
v1,21
, . . . v1,37
= (31824, 18360, 29172, 25704, 21879, 5304, 29172, 12852, 58344, 37128, 26928, 43758, 27846, 33660, 45045, 476, 3094),
0
0
v1,38 , . . . v1,53 = (5304, 3060, 7956, 29172, 12852, 29172, 18564, 13464, 9724, 58344, 18564, 131274, 55692, 33660, 116688, 43758),
0
0
v1,54
, . . . v1,69
= (42840, 51051, 4862, 43758, 9282, 175032, 43758, 21420, 408408, 72930, 55692, 58344, 43758, 37128, 67320, 180180).
v1 =
5
−11
For Σ, the submatrix related to the number of protected nodes ΣP4 is shown below.
where
The normalized eigenvector v1 corresponding to λ1 equals
Algebraic Multiplicity
Eigenvalue
Table B.1: This table shows the algebraic multiplicity of the different eigenvalues for A. Here i denotes the imaginary unit.
Below in Table B.1 the eigenvalues including algebraic multiplicities are shown for A.
B.1
(B.3)
(B.2)
(B.1)


































A=

































3
0
0
0
0
0
0
0
0
0
0
0 0 0 0
0
0
0
0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 −15 2
0
0
6
0
0
0
0
0
0
0 0 0 0
0
0
0
0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0
0 −14 1
0
0
3
0
0
0
0
0
0 0 0 0
0
0
0
0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0
0
0 −13 0
0
0
3
0
0
0
0
0 0 0 0
0
0
0
0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0
0 0 0 0 0 0 0 0 0 0 0 0 0 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0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 −4 0 0 3 0 0 0
0
0
0
0
0
0
0
0
0
0
0
0
0 0 0 0
0
0
0
0
0 0 0 0 0 0 0 0 0 4 0 0 0 0 0 0
0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 −3 0 0 2 0 0
0
0
0
0
0
0
0
0
0
0
0
0
0 0 0 0
0
0
0
0
0 0 0 0 0 0 0 0 0 0 4 0 0 0 0 0
0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 −2 0 0 1 0
0
0
0
0
0
0
0
0
0
0
0
0
0 0 0 0
0
0
0
0
0 0 0 0 0 0 0 0 0 0 0 4 0 0 0 0
0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 −3 0 0 0
0
0
0
0
0
0
0
0
0
0
0
0
0 0 0 0
0
0
0
0
0 0 0 0 0 0 0 0 0 0 0 0 4 0 0 0
0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 −2 0 0
0
0
0
0
0
0
0
0
0
0
0
0
0 0 0 0
0
0
0
0
0 0 0 0 0 0 0 0 0 0 0 0 0 4 0 0
0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 −10
0
0
0
0
0
0
0
0
0
0
0
0
0 0 0 0
0
0
0
0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 4 0
0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
−16


































.


































For m = 5
19
Algebraic Multiplicity
16
−9
2
−23
14
−8
3
−22
11
−7
5
−21
10
−6
7
−20
6
−5
9
−19
E(P
± i 39)
√
1 each
1
2 (−5
11
−18
)
4
−4
14
−17
2
−3
16
−16
1
−2
18
−15
1
0
19
−14
n,5
The elements in the normalized eigenvector v1 corresponding to λ1 which determines
as n → ∞ equals
n
1
30
5
10
6
(v1,q−4 , v1,q−3 . . . , v1,q ) =
,
,
,
,
.
1617 77077 7854 5929 1001
18
−10
−11
Eigenvalue
−24
1
−25
1
Algebraic Multiplicity
Eigenvalue
20
−12
(B.4)
1
1
20
−13
Table B.2: This table shows the algebraic multiplicity of the different eigenvalues for A. Here i denotes the imaginary unit.
Below in Table B.2 the eigenvalues including algebraic multiplicities are shown for A.
B.2
For m = 6
48
−9
42
−10
28
Algebraic Multiplicity
Eigenvalue
Algebraic Multiplicity
18
−8
51
−21
2
−34
13
−7
55
−20
3
−33
10
−6
55
−19
5
−32
6
−5
58
−18
7
−31
4
−4
55
−17
11
−30
2
−3
55
−16
13
−29
1
−2
51
−15
18
−28
E(P
1
0
48
−14
22
−27
)
1
1
42
−13
28
−26
39
−12
32
−25
32
−11
39
−24
For m = 7
E(P
)
n,7
as n → ∞ equals
The elements in the normalized eigenvector v1 corresponding to λ1 which determines
n
7
7
35
35
35
2
5
,
,
,
,
,
,
.
(v1,q−6 , v1,q−4 . . . , v1,q ) =
191334 864348 733447 1603816 470307 105479 1115
B.4
n,6
The elements in the normalized eigenvector v1 corresponding to λ1 which determines
as n → ∞ equals
n
5
5
10
2
5
10
(v1,q−5 , v1,q−4 . . . , v1,q ) =
,
,
,
,
,
.
40194 89726 127281 10179 7192 3219
22
−22
−23
Eigenvalue
−35
1
−36
1
Algebraic Multiplicity
Eigenvalue
(B.6)
(B.5)
Table B.3: This table shows the algebraic multiplicity of the different eigenvalues for A, except for the roots to
Qm−1
1
= 0. These roots have a real part smaller than 1/2 when m = 6 [12]. Here i denotes the
j=1 (x + j) − m!
x−1
imaginary unit.
Below in Table B.3 the eigenvalues including algebraic multiplicities are shown for A.
B.3
Appendix C
Visualisation of all Different
Types of Subtrees for m = 4
K1 = (0, 0, 0, 4)
K2 = (0, 0, 1, 3)
K3 = (0, 1, 0, 3)
K4 = (1, 0, 0, 3)
K5 = (0, 0, 0, 3)
K6 = (0, 0, 2, 2)
K7 = (0, 1, 1, 2)
K8 = (1, 0, 1, 2)
K9 = (0, 0, 1, 2)
K10 = (0, 2, 0, 2)
K11 = (1, 1, 0, 2)
K12 = (0, 1, 0, 2)
K13 = (2, 0, 0, 2)
K14 = (1, 0, 0, 2)
K15 = (0, 0, 0, 2)
K16 = (0, 0, 3, 1)
43
K17 = (0, 1, 2, 1)
K18 = (1, 0, 2, 1)
K19 = (0, 0, 2, 1)
K20 = (0, 2, 1, 1)
K21 = (1, 1, 1, 1)
K22 = (0, 1, 1, 1)
K23 = (2, 0, 1, 1)
K24 = (1, 0, 1, 1)
K25 = (0, 0, 1, 1)
K26 = (0, 3, 0, 1)
K27 = (1, 2, 0, 1)
K28 = (0, 2, 0, 1)
K29 = (2, 1, 0, 1)
K30 = (1, 1, 0, 1)
K31 = (0, 1, 0, 1)
K32 = (3, 0, 0, 1)
K33 = (2, 0, 0, 1)
K34 = (1, 0, 0, 1)
K35 = (0, 0, 0, 1)
K36 = (0, 0, 4, 0)
K37 = (0, 1, 3, 0)
K38 = (1, 0, 3, 0)
K39 = (0, 0, 3, 0)
K40 = (0, 2, 2, 0)
K41 = (1, 1, 2, 0)
K42 = (0, 1, 2, 0)
K43 = (2, 0, 2, 0)
K44 = (1, 0, 2, 0)
44
K45 = (0, 0, 2, 0)
K46 = (0, 3, 1, 0)
K47 = (1, 2, 1, 0)
K48 = (0, 2, 1, 0)
K49 = (2, 1, 1, 0)
K50 = (1, 1, 1, 0)
K51 = (0, 1, 1, 0)
K52 = (3, 0, 1, 0)
K53 = (2, 0, 1, 0)
K54 = (1, 0, 1, 0)
K55 = (0, 0, 1, 0)
K56 = (0, 4, 0, 0)
K57 = (1, 3, 0, 0)
K58 = (0, 3, 0, 0)
K59 = (2, 2, 0, 0)
K60 = (1, 2, 0, 0)
K61 = (0, 2, 0, 0)
K62 = (3, 1, 0, 0)
K63 = (2, 1, 0, 0)
K64 = (1, 1, 0, 0)
K65 = (0, 1, 0, 0)
K66 = (3, 0, 0, 0)
K67 = (2, 0, 0, 0)
K68 = (1, 0, 0, 0)
K69 = (0, 0, 0, 0)
45
Bibliography
[1] Biggs N.L., Discrete Mathematics. Oxford University Press, Second Edition, 2003.
[2] Bona M., k-protected vertices in binary search trees. Adv. Appl. Math., to appear,
arXiv:1304.6105.
[3] Chauvin B. and Pouyanne N., m-ary search trees when m ≥ 27: a strong asymptotics for the space requirements. Random Structures Algorithms 24, (2004), pages
133–154.
[4] Cheon G.-S. and Shapiro L.W., Protected points in ordered trees. Applied Mathematics Letters 21, no 5 (2008), pages 516–520.
[5] Chern H.-H. and Hwang H.-K., Phase changes in random m-ary search trees and
generalized quicksort. Random Structures Algorithms 19, no 3-4 (2001), pages
316–358.
[6] Devroye L., Limit laws for local counters in random binary search trees. Random
Structures Algorithms 2, no 3 (1991), pages 303–315.
[7] Devroye L. and Janson S., Protected nodes and fringe subtrees in some random
trees. Electronic Communications in Probability 19, no 6 (2014), pages 1-10.
[8] Diestel R., Graph Theory. Springer, Fourth Edition, 2010.
[9] Drmota M., Random Trees - An Interplay between Combinatorics and Probability.
Springer, Vienna, 2009.
[10] Du R. and Prodinger H., Notes on protected nodes in digital search trees. Applied
Mathematics Letters 25, no 6 (2012), pages 1025–1028.
[11] Gut A., An Intermediate Course in Probability. Springer, Second Edition, 2009.
[12] Holmgren C. and Janson S., Asymptotic distribution of two-protected nodes in
ternary search trees. (2014), arXiv:1403.5573.
[13] Holmgren C. and Janson S., Using Stein’s method to show Poisson and normal limit
laws for fringe subtrees. Discrete Mathematics and Theoretical Computer Science,
to appear, (2014).
47
[14] Holmgren C. and Janson S., Limit laws for functions of fringe trees for binary search
trees and recursive trees. (2014), arXiv:1406.6883.
[15] Janson S., Functional limit theorems for multitype branching processes and generalized Pólya urns. Stochastic Processes and their Applications 110, no 2 (2004),
pages 177-245.
[16] Knuth D., The Art of Computer Programming, Volume 3: Sorting and Searching.
Addison-Wesley Professional, Second Edition, 1998.
[17] Mahmoud H.M., Evolution of Random Search Trees. John Wiley & Sons, New York,
1992.
[18] Mahmoud H.M., Pólya Urn Models. CRC Press, Boca Raton, 2009.
[19] Mahmoud H.M., Sorting: A Distribution Theory. Wiley, New York, 2000.
[20] Mahmoud H.M., Ward M.D., Asymptotic distribution of two-protected nodes in
random binary search trees. Applied Mathematics Letters 25, no 12 (2012), pages
2218-2222.
[21] Mansour T., Protected points in k-ary trees. Applied Mathematics Letters 24,
(2011), pages 478-480.
[22] Senata E., Non-negative Matrices and Markov Chains. Springer, New York, Second
Edition, 1981.
48
TRITA-MAT-E 2014:56
ISRN-KTH/MAT/E—14/56-SE
www.kth.se