You are on page 1of 58

REACHABILITY IN LABELLED COMPLETE t-ARY

TREES

BY

ABAYO SYLVESTER ARTHUR

A THESIS SUBMITTED IN PARTIAL FULFILMENT OF THE REQUIREMENTS


FOR THE DEGREE OF

MASTER OF SCIENCE IN PURE MATHEMATICS

IN THE

SCHOOL OF MATHEMATICS, STATISTICS AND ACTUARIAL SCIENCE

MASENO UNIVERSITY

©2023
Declaration

This thesis is my own work and has not been presented for a degree award in
any other institution.

Signature Date

Abayo Sylvester Arthur


MSC/MAT/00134/018

This thesis has been submitted for examination with our approval as the univer-
sity supervisors

Signature Date

Dr. Isaac O. Okoth,


Department of Pure and Applied Mathematics,
Maseno University.

Signature Date

Dr. Donnie M. Kasyoki,


Department of Pure and Applied Mathematics,
Maseno University.

i
Acknowledgement

I want to express my sincere gratitude to Dr. Isaac Owino Okoth, for his guid-
ance, support and perseverance during this research process. I also want to ex-
press my gratitude to Dr. Donnie Munyao Kasyoki and Albert Nyariaro for their
guidance especially on latex writing. Lastly, I want to thank my family for their
moral support throughout this process.

Finally, I want to express my profound gratitude to Almighty God for keeping


me in good health throughout this entire process.

ii
Dedication

To my sons: Davis, Sylvester Jnr, Jabali. To my daughters: Melissa, Natalie,


Nadia.

iii
Abstract

Cayley trees, Plane trees, Binary trees, Noncrossing trees and recently t-ARY
trees among other mathematical trees that have been studied for some time.
Reachability of vertices as a statistic of enumeration has been studied in Cayley
trees, plane trees, noncrossing trees and recently in t-ary trees where all edges are
oriented from vertices of lower label towards vertices of higher label. However,
counting formulas for labelled complete t-ary trees in which a given number of
vertices, first children, non-first children, non-leaf sinks and leaf sinks are reach-
able from a given vertex had not been established. The objective of this work
was to find counting formulas for the number of vertices in labelled complete
t-ary trees that are reachable from the root with respect to number of vertices,
first children, non-first children, non-leaf sinks and leaf sinks. In this thesis, we
have obtained closed formulas as well as asymptotic formulas for the number
of labelled complete t-ary trees in which there are paths of a given length such
that the terminal vertex is a non-leaf sink, leaf sink, first child and non-first child.
We have also considered the case in which the path is a leftmost path. We have
used symbolic method, decomposition of the trees, Lagrange inversion formula,
Binomial Theorem and Hockey Stick Identity. These are the same tools applied
by Okoth and Nyariaro in their previous works. Results obtained in this research
will add value to the existing literature and may also be of importance to com-
puter scientists since most computer data are stored in terms of trees.

iv
Table of Contents

Declaration i

Acknowledgement ii

Dedication iii

Abstract iv

Table of Contents v

Index of Notations vii

List of Figures x

CHAPTER 1: INTRODUCTION 1
1.1 Basic concepts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
1.1.1 Graph theoretic concepts . . . . . . . . . . . . . . . . . . . . . 2
1.1.2 Generating functions and functional equation . . . . . . . . 5
1.2 Statement of the problem . . . . . . . . . . . . . . . . . . . . . . . . . 6
1.3 Objective of the study . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
1.4 Methodology . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
1.5 Significance of the study . . . . . . . . . . . . . . . . . . . . . . . . . 7

CHAPTER 2: LITERATURE REVIEW 8

CHAPTER 3: RESULTS 11
3.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
3.2 Enumeration by path lengths . . . . . . . . . . . . . . . . . . . . . . 12

v
3.3 Enumeration by sinks . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
3.4 Enumeration by leftmost paths . . . . . . . . . . . . . . . . . . . . . 24
3.5 Enumeration by first children . . . . . . . . . . . . . . . . . . . . . . 31
3.6 Enumeration by non-first children . . . . . . . . . . . . . . . . . . . 35

CHAPTER 4: CONCLUSION AND RECOMMENDATIONS 44


4.1 Conclusion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44
4.2 Recommendations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44
References . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46

vi
Index of Notations

G Graph . . . . . . . . . . . . . . . 2 S(n, t, v) The total number of trees


on tn + 1 vertices in which a
V (G) Set of vertices in a graph G 2 fixed root v is a non-leaf sink 18

E( G ) Set of edges in a graph G . . 2 S(t, n) The total number of trees


on tn + 1 vertices in which
degG (V ) Degree of vertex V in a
the root is a non-leaf sink . . 18
graph G . . . . . . . . . . . . 2
S(n, t, v) The total number of trees
[ x n ] g( x ) Coefficient of x n in a gen-
on tn + 1 vertices in which
erating function g( x ). . . . . 6
a child v > i of a root i is a
P(n, t, ℓ, i, v) Number of trees on non-leaf sink . . . . . . . . . 18
tn + 1 vertices such that a
S(n, t, ℓ, v) be the total number of
given vertex v is reachable
trees on tn + 1 vertices such
from the root i in ℓ steps . . . 12
that vertex v which is a non
P(n, t, ℓ, i, v) Number of trees on leaf sink is reachable from
tn + 1 vertices such that a the root in ℓ steps . . . . . . 19
vertex v is reachable from the
S(n, t, ℓ, v) The total number of trees
root in ℓ steps . . . . . . . . . 13
on tn + 1 vertices such that
P(n, t, ℓ, i ) The number of trees on there is a path of length ℓ
tn + 1 vertices in which there from the root to a non-leaf
is a path of length ℓ from ver- sink . . . . . . . . . . . . . . 19
tex i . . . . . . . . . . . . . . 14
LS(n, t, ℓ, i, v) be the number of trees
P(t, ℓ) The average number of ver- on tn + 1 vertices in which
tices which are reachable from a leaf sink v is reachable at
the root in ℓ steps given a length ℓ ≥ 0 from the root i . 20
large number of trees . . . . 15
LS(n, t, ℓ, v) The total number of
S(n, t, ℓ, i, v) The number of trees trees on tn + 1 vertices in which
on tn + 1 vertices such that vertex v is a leaf sink reach-
there is a path of length ℓ able from the root i in ℓ steps 21
starting at the root i and end-
ing at a non-leaf sink v . . . 16

vii
LS(n, t, ℓ, i ) The number of trees LL(n, t, ℓ, i, v) The number of trees
on tn + 1 such that there is on tn + 1 vertices in which
a leaf sink at length ℓ which the final vertex v is a leaf sink
is reachable from the root i . 22 is reachable from the root i
in ℓ steps . . . . . . . . . . . 28
LS(n, t, ℓ) The total number of leaf
sinks in trees on tn + 1 ver- LL(n, t, ℓ, i ) The total number of
tices . . . . . . . . . . . . . . 22 trees on tn + 1 vertices such
that there is a leaf sink at length
LS(t, ℓ) The average number of leaf ℓ which is reachable from the
sinks which are reachable from root i . . . . . . . . . . . . . . 29
the root in ℓ steps given a
large number of trees . . . . 23 LL(n, t, ℓ) In trees on tn + 1 ver-
tices such that a vertex v which
L(n, t, ℓ, i, v) The number of trees is a leftmost path terminat-
on tn + 1 vertices such that ing with a leaf sink . . . . . . 30
there is a leftmost path of length
ℓ starting at root i and end- F (n, t, ℓ, i, v) The number of trees
ing at a vertex v . . . . . . . 24 on tn + 1 vertices in which
there is a path of length ℓ
L(n, t, ℓ, i ) The total number of trees starting at the root i and ter-
on tn + 1 vertices in which minating at a first child v . . 31
there is a leftmost path of length
ℓ from the root i . . . . . . . 25 F (n, t, ℓ, i ) The total number of trees
on tn + 1 vertices in which
L(n, t, ℓ, v) The total number of trees there is a first child at length
in which there are leftmost ℓ from the root i . . . . . . . 32
paths of length ℓ terminat-
ing at vertex v . . . . . . . . 26 F (n, t, ℓ, v) trees of order tn + 1 in
which there are paths of length
L(t, n, ℓ) The total number of trees ℓ from the root that termi-
on tn + 1 vertices such that nate at a first child v . . . . . 33
there is a leftmost path of length
ℓ . . . . . . . . . . . . . . . . 26 F (n, t, ℓ, v) The total number of trees
on tn + 1 vertices such that
L(t, ℓ) The average number of ver- there is a path of length ℓ
tices on leftmost paths which from the root terminating at
are reachable from the root a first child . . . . . . . . . . 33
in ℓ steps in trees with a large
number of vertices . . . . . . 27

viii
F (ℓ, t) The average number of first NFL(n, t, ℓ, i ) The total number of
children which are reachable trees on tn + 1 vertices such
from the root in ℓ steps in that there is a non-first child,
trees with a large number of which is also a leaf, at length
vertices . . . . . . . . . . . . 34 ℓ from the root i . . . . . . . 41

NF (n, t, ℓ, i, v) The number of trees NFL(n, t, ℓ, v) trees on tn + 1 ver-


on tn + 1 vertices in which a tices in which there are paths
non-first child v is reachable of length ℓ from the root that
from the root i in ℓ steps . . . 35 terminate at a non-first child
v which is also a leaf . . . . . 41
NF (n, t, ℓ, i ) The total number of
trees on tn + 1 vertices in which NFL(ℓ, t, n) The total number of
there is a non-first child at trees on tn + 1 vertices such
length ℓ from the root i . . . 36 that there is a path of length
ℓ from the root terminating
NFn, t, ℓ, v trees on tn + 1 vertices at a non-first child which is
in which there are paths of also a leaf . . . . . . . . . . . 42
length ℓ from the root that
terminate at a non-first child NFL(t, ℓ) The average number of
v . . . . . . . . . . . . . . . . 37 non-first children, which are
also leaves, that are reach-
NF (ℓ, t, n) The total number of trees able from the root in ℓ steps
on tn + 1 vertices such that in trees with a large number
there is a path of length ℓ of vertices . . . . . . . . . . . 42
from the root terminating at
a non-first child . . . . . . . 37

NF (t, ℓ) The average number of


non-first children which are
reachable from the root in ℓ
steps in a random tree . . . . 38

NFL(n, t, ℓ, i, v) The number of trees


of order tn + 1 such that there
is a path of length ℓ start-
ing at root i and ending at
a non-first child v which is
also a leaf . . . . . . . . . . . 39

ix
List of Figures

1.1 A labelled tree on 7 vertices. . . . . . . . . . . . . . . . . . . . . . . . 2


1.2 (a) Labelled tree with local orientation, (b) Labelled tree with global
orientation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
1.3 Plane trees . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
1.4 Noncrossing tree . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
1.5 4-ary tree . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5

3.1 Unlabelled tree with path length ℓ starting at vertex i to vertex i + ℓ. 12


3.2 Unlabelled tree with path length ℓ with final vertex a non-leaf sink. 16
3.3 Unlabelled tree with path length ℓ with final vertex a leaf sink. . . . 20
3.4 Unlabelled tree with a leftmost path of length ℓ. . . . . . . . . . . . 25
3.5 Unlabelled tree with leftmost path of length ℓ with final vertex a leaf. 29
3.6 A tree with path length ℓ starting at vertex i to first child i + ℓ. . . . 31
3.7 A tree with path length ℓ starting at vertex i to non-first child of
label i + ℓ. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36
3.8 A tree with path length ℓ starting at vertex i to non-first child of
label i + ℓ. The non-first vertex is also a leaf. . . . . . . . . . . . . . . 40

x
CHAPTER 1

INTRODUCTION

Combinatorics, as a branch of discrete mathematics, deals with counting prob-


lems. Some of its branches include enumerative combinatorics, extremal combi-
natorics, probabilistic combinatorics, algebraic combinatorics, among others. Of
interest is enumerative combinatorics. It deals with obtaining counting formulas
for various structures given a set of parameters. In our case, we enumerate la-
belled complete t-ary trees whose edges are equipped with a certain orientation.
We enumerate them according to reachability of vertices, first children, non-first
children, sinks and leaf sinks as well as leftmost paths of a given length.

1.1 Basic concepts

The following concepts are important in our study. They can be obtained from
any Graph Theory texts, for example Diestel’s book [4] is an excellent text among
other books.

1.1.1 Graph theoretic concepts

Graph theory is concerned with various types of models of networks called graphs.
Here, graphs are represented by points connected by lines. Formally, a graph G

1
is a pair (V ( G ), E( G )) where V ( G ) for a set of vertices and E( G ) for set of
edges of the graph G. A graph with no multiple edges is said to be simple. The
cardinalities |V ( G )| and | E( G )| respectively define the order and size of a simple
graph G. The degree of a vertex v is the number of vertices sharing edges with v.
A subgraph H of G is defined by V ( H ) ⊆ V ( G ) and E( H ) ⊆ E( G ).

A labelled graph is obtained by assigning labels to the vertices of the graph. A


vertex v is reachable from a vertex i if there is a sequence of edges from vertex i
to vertex v, and a path is of length ℓ if there are ℓ edges on the path. A connected
graph is a graph in which every vertex is reachable from every other vertex. A tree
is a connected simple graph without cycles. In a tree, a vertex which has degree 1
is called a leaf degG (V ) . Figure 1.1 is an example of a labelled tree, where vertices
1, 2, 4, 6 and 7 are leaves. A subtree S of a tree T is a subgraph of T which is also a
tree.
4 1

3 5
7

6 2

Figure 1.1: A labelled tree on 7 vertices.

A tree in which a fixed vertex has been chosen is referred to as a rooted tree
whereas a tree in which a fixed edge has been identified is called an edge rooted
tree. A forest is a collection of graphs in which each component is a tree. A rooted
forest is a graph whose components are rooted trees.

Graphs whose edges are oriented are called directed graphs or simply digraphs. In
2010, Du and Yin [5] introduced an orientation to the edges of trees. In the orien-
tation, the edges are oriented from the vertices of lower label towards vertices of
higher label. They called this orientation as local orientation as opposed to global
orientation where edges are oriented towards the root and the trees are said to
be locally oriented or globally oriented respectively. In Figure 1.2, we have a locally

2
oriented tree and a globally oriented tree.
1 3 6

2 6 2 4 3

1 5

5 4

(a) (b)

Figure 1.2: (a) Labelled tree with local orientation, (b) Labelled tree with global
orientation

In a locally oriented tree, a vertex v is said to be reachable from a vertex i if there


is a sequence of oriented edges from vertex i to vertex v.

Plane trees (or ordered trees) have been enumerated by many authors. These are
rooted trees in which the children of all the vertices are ordered. Figure 1.3 shows
two different plane trees on 9 vertices.

̸=

Figure 1.3: Plane trees

Plane trees on n vertices are counted by the (n − 1)th Catalan number,


1 2n − 2
 
Cn−1 = .
n n−1
If the vertices are labelled by integers 1, 2, . . . , n then the total number of these
trees is given by n!Cn−1 . Here, n! accounts for the choices of the labels of the
vertices of the trees. In plane trees, the degree of the vertex is the number of
its children. A vertex of degree 0 is a leaf while all non-leaf vertices are called
internal vertices.

A noncrossing tree is a tree drawn in the plane with its vertices on the boundary
of a circle such that the edges are straight line segments that do not cross inside
the circle. Figure 1.4 is a noncrossing tree of order 12.

3
1
2
12

11 3

10 4

9 5

8
6
7

Figure 1.4: Noncrossing tree

The number of noncrossing trees on n vertices is given by Fuss-Catalan formula

3n − 3
 
1
.
2n − 1 n − 1

Noncrossing trees with local orientation were introduced and studied by Okoth
and Wagner in [10], where they were called lnc-trees. Reachability of vertices in
lnc-trees was considered by Okoth in [9].

Given a vertex u in a plane tree, a vertex at a lower level which is incident to


u, is said to be a child of u. The vertex at a higher level which is incident to u
is the parent of u. The vertices with the same parent are called siblings. Since
the siblings are linearly ordered, they are always drawn in a left-to-right pattern
where the leftmost sibling is referred to as first child. At a given level, the leftmost
child is the eldest child. A left-most path refers to a sequence of edges joining eldest
children at each level in a plane tree. A t-ary tree is a plane tree in which all the
internal vertices have at most t children. If all the internal vertices have exactly
t children then that plane tree called a complete t-ary tree. These are the main
structures of our investigation. The total number of t-ary trees on n vertices or
1 t ( n −1)
complete t-ary trees with n − 1 internal vertices is given by (t−1)(n−1)+1 ( n−1 )
.
Here, t is a positive integer.

In Figure 1.5, vertices 6 and 8 are leaves, 2 is a non-first child and the path 1348 is
a leftmost path since 3, 4 and 8 are eldest children in the 4-ary tree with vertex 1
considered as the eldest child at a level 0. Indegree of a vertex v refers to the num-

4
1

3 5 18 10

4 19 2 14 17 13 7 6

8 16 9 11 20 12 21 15

Figure 1.5: 4-ary tree

ber of edges that are directed into v in a directed graph. Outdegree of a vertex v is
the number of edges, incident to v, that are directed away from it. A sink is a ver-
tex with outdegree 0 whereas a leaf sink is a sink with indegree 1. A source is a ver-
tex with indegree 0. In Figure 1.5, vertices 5, 8, 9, 10, 11, 12, 14, 15, 16, 18, 19, 20, 21
are sinks, vertices 1, 2, 6, 7, 13, 17 are sources and vertices 5, 8, 9, 10, 11, 12, 14, 15, 16, 19, 20, 21
are leaf sinks. Vertex 18 is a non-leaf sink.

In this work, we have enumerated labelled complete t-ary trees with local orien-
tation according to path lengths, leftmost paths, first children, sinks, leaves and
non-first children.

1.1.2 Generating functions and functional equation

Generating functions include: Ordinary generating function which counts unla-


belled structures and exponential generating function counts labelled structures.
Let (k0 , k1 , k2 , . . .) be a sequence of integers, then the ordinary generating func-
tion of the sequence is

∑ ki xi ,
i ≥0
and its exponential generating function of the sequence is denoted by:
xi
∑ ki i!
.
i ≥0

A functional equation is an equation that defines a function in terms of itself. The


coefficient of x n in a generating function g( x ) is denoted by [ x n ] g( x ) Given a
generating function f ( x ) satisfying the functional equation, f ( x ) = xϕ( f ( x )),
we use the following formula in extracting the coefficient of x n .

5
Theorem 1.1.1 (Lagrange Inversion Formula, [15]). Let f ( x ) be a generating func-
tion satisfying the functional equation, f ( x ) = xϕ( f ( x )), then

n [ x n ] f ( x )k = k [ tn−k ] ϕ (t )n .

For more concepts on generating functions, check Wilf’s excellent book [16].

1.2 Statement of the problem

Reachability of vertices as a statistic of enumeration has been studied in Cay-


ley trees, plane trees, noncrossing trees and most recently t-ary trees. However,
counting formulas for the number of reachable vertices by path lengths, first chil-
dren, non-first children, sinks and leaf sinks in labelled complete t-ary trees, i.e.
plane trees in which each internal vertex has t children, had not been established.
In this study, we have enumerated locally oriented complete t-ary trees accord-
ing to number of reachable vertices, first children, non-first children, sinks, leaf
sinks and leftmost paths.

1.3 Objective of the study

The objective of this work was to establish counting formulas and asymptotic
formulas for the number of reachable vertices in labelled complete t-ary trees
by: path lengths, first children, non-first children, sinks, leaf sinks and leftmost
paths.

1.4 Methodology

To obtain our results, we have decomposed the trees and applied Lagrange in-
version formula to extract coefficients from the generating functions. Binomial
Theorem and Hockey Stick Identity were also key in our enumeration.

6
1.5 Significance of the study

Reachability of vertices in trees have been considered by various mathematicians


and computer scientists. The researchers have obtained closed formulas and in
some cases asymptotic formulas for the number of trees with a given number
of reachable vertices. In the last decade, enumeration of trees whose edges are
locally oriented have gained a lot of attention. However, reachability as a statis-
tic of enumeration has not been used to enumerate labelled complete t-ary trees
whose vertices are locally oriented. It was therefore important to find closed for-
mulas for these trees using reachability as a statistic of enumeration. The results
obtained here add richly to the already existing literature in this area of research.
Since most computer data is stored in terms of trees, the results of this study may
be important to researchers in computer science.

7
CHAPTER 2

LITERATURE REVIEW

Plane trees have been studied using a number of statistics such as number of ver-
tices [2], number of leaves [2], degree sequences [3] among many others. These
results have been extended to t-ary trees as in [3]. In 2010, Du and Yin [5] in-
troduced Cayley trees whose edges are oriented from vertices of lower label to-
wards vertices of higher label. They called this orientation as local orientation. The
study was initiated by an earlier work of Ethan Cotterill [1]. The study of graphs
whose edges are oriented was unified by Remmel and Williamson in their study
of digraphs [12].

In 2015, Okoth, in his PhD thesis [9], enumerated Cayley trees whose edges
are locally oriented. The statistics used by Okoth are number of vertices, path
lengths and exact number of reachable vertices. Besides reachability, Okoth ob-
tained a functional equation satisfied by the generating function of Cayley trees
with a given number of sources and sinks. On reachability, the proofs were based
on the decomposition of trees such that the vertices on a reachable path are roots
of forests. Okoth obtained, mostly closed formulas and in some instances he
obtained asymptotic formulae. The aforementioned author extended the work
to locally oriented noncrossing trees. These are trees whose vertices are on the
boundary of a circle such that the edges are line segments which do not cross
in side the circle. Moreover, the edges are locally oriented. The author obtained

8
the number of locally oriented non-crossing trees with a given number of vertices
which are reachable from the root. He used symbolic method in his enumeration.

In 2020, Nyariaro and Okoth [7] further extended the work to enumerate plane
trees, whose edges are locally oriented, according to path lengths, reachable
sinks, leaves, first children, leftmost paths, non-first children and non-leaves.
They also obtained formula for number of trees in which an exact number of
vertices are reachable from the root. The authors used generating functions for
these trees and then applied Lagrange Inversion Formula to extract the coeffi-
cients. Moreover, they also constructed bijections. An earlier work to take into
account the case in which a given number of vertices are reachable from the root
was considered by Seo and Shin [14]. Such trees are called maximal increasing
plane trees.

In 2021, Okoth and Nyariaro [11] studied reachability of vertices in t-ary trees
whose edges are again locally oriented. They used path lengths, reachable sinks,
leaves, leftmost paths, first children, non-first children and non-leaves as the
statistics of enumeration. The same method used for enumeration of plane trees
was employed here as well. Enumeration of t-ary trees according to a given
number of vertices which are reachable from the root was considered by Seo and
Shin [13] in 2013. Again they called these trees maximal increasing t-ary trees.

In 2023, Nyariaro and Okoth [8] enumerated locally oriented 2-plane trees by
reachability of its vertices. 2-plane trees are plane trees such that the vertices
receive labels 1 and 2 so long as the sum of labels of the endpoints of an edge
does not exceed 3. The statistics of enumeration used by the authors are leftmost
paths, leaf sinks, non-leaf sinks, first children and non-first children in 2-plane
trees with roots of labels 1 and 2. The enumeration of locally oriented 2-plane
trees by reachability was possible following a successful enumeration of 2-plane
trees by Lumumba, Okoth and Kasyoki [6] according to the number of vertices
of a given label that reside at a certain level in 2-plane trees.

In this work, we build on the previous work of Okoth, Okoth and Nyariaro

9
and Seo and Shin to enumerate labelled complete t-ary trees according to path
lengths, reachable sinks, leaves, first children, leftmost paths and non-first chil-
dren.

10
CHAPTER 3

RESULTS

3.1 Introduction

In this chapter, we present our results on reachability of vertices in labelled com-


plete t-ary trees. Our statistics of enumeration include path lengths, first chil-
dren, leftmost paths, non-first children, leaf sinks and non-leaf sinks.

In this work, we make use of the following theorem.

Theorem 3.1.1 (Binomial Theorem). For any integer n ≥ 0,


!
n
n
( x + y)n = ∑ x k yn−k .
k =0 k

The following identity which is proved in basic combinatorics textbooks is help-


ful in obtaining our results.

! !
m
k m+1
∑ n
=
n+1
(Hockey Stick Identity). (3.1)
k=n

For the rest of the chapter, we shall refer to complete labelled t-ary trees simply
as trees.

11
3.2 Enumeration by path lengths

In this section, using path length as the statistic of enumeration, we determine


the average number of vertices in trees on tn + 1 vertices which are reachable
from the root i such that there is a given number of edges on the path. We prove
our first result.

Proposition 3.2.1. Given that P(n, t, ℓ, i, v) is the number of trees on tn + 1 vertices


such that a given vertex v is reachable from the root i in ℓ steps, then the total number of
such trees is given by
!
ℓt − ℓ + t tn − ℓ v−i−1

P(n, t, ℓ, i, v) = tℓ (tn − ℓ)! . (3.2)
tn − ℓ n−ℓ−1 ℓ−1

Proof. Let T ( x ) be the generating function for these trees where x marks a ver-
tex. Symbolically, the generating function for these trees satisfies the equation:
T ( x ) = x + xT ( x )t . By the decomposition of the trees as in Figure 3.1, we have
i

ℓ steps

i+ℓ

t subtrees

Figure 3.1: Unlabelled tree with path length ℓ starting at vertex i to vertex i + ℓ.

that the generating function for these trees in which there is a path of length ℓ ≥ 0
is given by

( xT ( x )t−1 )ℓ x ( T ( x )t = x ℓ T ( x )ℓt−ℓ xT ( x )t = x ℓ+1 T ( x )ℓt−ℓ+t .

12
Applying Lagrange Inversion Formula (Theorem 1.1.1), it follows that

[ x tn+1 ] x ℓ+1 T ( x )ℓt−ℓ+t = [ x tn−ℓ ] T ( x )ℓt−ℓ+t


ℓt − ℓ + t tn−ℓt−t
= [s ](1 + st )tn−ℓ .
tn − ℓ
By Binomial Theorem (Theorem 3.1.1), we get
!
ℓt − ℓ + t tn−ℓt−t tn − ℓ ti
[ x tn+1 ] x ℓ+1 T ( x )ℓt−ℓ+t = [s ]∑ s
tn − ℓ i ≥0 i
!
ℓt − ℓ + t t(n−ℓ−1) tn − ℓ ti
= [s ]∑ s
tn − ℓ i ≥0 i
!
ℓt − ℓ + t tn − ℓ
= .
tn − ℓ n−ℓ−1

This formula gives the number of trees on tn + 1 vertices of length ℓ ! ≥ 0. If the


v−i−1
path starts at vertex i and ends at vertex v, then there are different
ℓ−1
labellings the vertices on the path. Since the ℓ + 1 vertices on the path have been
labelled, we only need to obtain the different labellings of the other vertices in
the tree. The vertices to be labelled are (tn + 1) − (ℓ + 1) = tn − ℓ. The labellings
can be done in (tn − ℓ)! different ways. Moreover, an edge on a path can be
any of the t edges which connect a vertex to its children. Therefore, there are t
positions for each edge on the path. In total there are tℓ choices for positions of
the edges in the path of length ℓ. So, we have
ℓt − ℓ + t tn − ℓ v−i−1
  

t (tn − ℓ)!
tn − ℓ n−ℓ−1 ℓ−1
trees on tn + 1 vertices such that vertex v is reachable from vertex i in ℓ steps.

Corollary 3.2.2. Given that P(n, t, ℓ, i, v) is the number of trees on tn + 1 vertices


such that vertex v is reachable from the root in ℓ steps, we find
(ℓt − ℓ + t) v − 1 tn − ℓ
  

P(n, t, ℓ, i, v) = t (tn − ℓ)! . (3.3)
tn − ℓ ℓ n−ℓ−1

Proof. To get the required formula, we sum over i in Equation (3.2), i.e,
 v−ℓ 
(ℓt − ℓ + t) tn − ℓ v−i−1
 

n − ℓ − 1 i∑

t (tn − ℓ)! , (3.4)
tn − ℓ =1
ℓ−1

13
is the desired result which we now simplify. Let k = v − i − 1. When i = 1, then
k = v − 2, and when i = v − ℓ, then k = ℓ − 1. So we rewrite the sum as,
v−ℓ  v −2 
v−i−1
 
k
∑ ℓ−1 = ∑ ℓ−1 .
i =1 k=ℓ−1

Applying Hockey Stick Identity (3.1), we get


v−ℓ 
v−i−1 v−1
  
∑ ℓ−1 = ℓ . (3.5)
i =1

Substituting Equation (3.5) in Equation (3.4), we obtain the required formula.

Corollary 3.2.3. Given that P(n, t, ℓ, i ) is the number of trees on tn + 1 vertices in


which there is a path of length ℓ from vertex i, we have
(ℓt − ℓ + t) tn − ℓ tn − i + 1
  

T (ℓ, n, i, t) = t (tn − ℓ)! . (3.6)
tn − ℓ n−ℓ−1 ℓ

Proof. We sum over v in Equation (3.2) to get:


 tn+1 
(ℓt − ℓ + t) tn − ℓ v−i−1
 

t (tn − ℓ)!
tn − ℓ ∑
n − ℓ − 1 v=ℓ+ ℓ−1
i
 tn−i 
(ℓt − ℓ + t) tn − ℓ
 
k

= t (tn − ℓ)!
tn − ℓ ∑ ℓ−1
n − ℓ − 1 k=ℓ− 1
(ℓt − ℓ + t) tn − ℓ tn − i + 1
  

= t (tn − ℓ)! .
tn − ℓ n−ℓ−1 ℓ
The last equality follows by Hockey Stick Identity.

Summing over all i in Equation (3.6), we get that there are


 tn−ℓ+1 
ℓ (ℓ t − ℓ + t ) tn − ℓ tn − i + 1
 
t
tn − ℓ
(tn − ℓ)!
n−ℓ−1 ∑ ℓ
i =1
 tn  
(ℓt − ℓ + t) tn − ℓ

k

= t (tn − ℓ)!
tn − ℓ ∑
n − ℓ − 1 k=ℓ ℓ
(ℓt − ℓ + t) tn − ℓ
  
ℓ tn + 1
= t (tn − ℓ)! (3.7)
tn − ℓ n−ℓ−1 ℓ+1
trees on tn + 1 vertices such that there is a path of length ℓ. Setting ℓ = 0, in Equa-
tion (3.7), we rediscover the formula for the number of trees on tn + 1 vertices,
i.e.,
 
tn + 1
(tn)! . (3.8)
n

14
Corollary 3.2.4. Given that P(t, ℓ) is the average number of vertices which are reach-
able from the root in ℓ steps given a large number of trees, then
tℓ − ℓ + t
T (ℓ, t) = .
t(ℓ + 1)!

Proof. We obtain the result by dividing Equation (3.7) by Equation (3.8) and tend-
ing n to infinity.

We have,
(ℓt−ℓ+t) tn−ℓ tn+1
tℓ (tn − ℓ)! tn−ℓ (n−ℓ−1)( ℓ+1 )
(tn)!(tnn+1)
(tℓ−ℓ+t) (tn−ℓ)! (tn+1)!
tℓ (tn − ℓ − 1)! tn−ℓ (n−ℓ−1)!(tn−n+1)! · (ℓ+1)!(tn−ℓ)!
=
(tn)! n!((tntn−+n1+)!1)!
tℓ (tℓ − ℓ + t)(tn − ℓ)!(tn − ℓ)!n!(tn − n + 1)!(tn + 1)!
=
(tn)!(tn + 1)!(ℓ + 1)!(tn − ℓ)!(tn − n + 1)!(n − ℓ − 1)!
tℓ (tℓ − ℓ + t) n!(tn − ℓ − 1)!
= ·
(ℓ + 1)! (tn)!(n − ℓ − 1)!

t (tℓ − ℓ + t) n(n − 1)(n − 2) · · · (n − ℓ)
= · .
(ℓ + 1)! tn(tn − 1)(tn − 2) · · · (tn − ℓ + 1)(tn − ℓ)
Let
n(n − 1)(n − 2) · · · (n − ℓ)
X= .
tn(tn − 1)(tn − 2) · · · (tn − ℓ + 1)(tn − ℓ)
Now,
n(n − 1)(n − 2) · · · (n − ℓ)
lim X = lim
n→∞ n→∞ tn ( tn − 1)( tn − 2) · · · ( tn − ℓ + 1)( tn − ℓ)

nℓ+1 + · · ·
= lim
n→∞ tℓ+1 nℓ+1 + · · ·
1 1+···
= ℓ+1 lim
t n→∞ 1 + · · ·
1
= ℓ+1 .
t
So the average number of vertices that are reachable at length ℓ from the root
given a large number of trees is
tℓ (tℓ − ℓ + t) tℓ (tℓ − ℓ + t) 1
· lim X = · ℓ+1
(ℓ + 1)! n→∞ (ℓ + 1)! t
tℓ − ℓ + t
= .
t(ℓ + 1)!

15
3.3 Enumeration by sinks

In this section, we determine the number of sinks in labelled trees on tn + 1


vertices which are reachable from a given vertex.

Proposition 3.3.1. Given that S(n, t, ℓ, i, v) is the number of trees on tn + 1 vertices


such that there is a path of length ℓ starting at the root i and ending at a non-leaf sink v,
then

ℓt − ℓ + t tn − ℓ v−i−1 v−ℓ−1
   

S(n, t, ℓ, i, v)) = t (tn − ℓ − t)! .
tn − ℓ n−ℓ−1 ℓ−1 t
(3.9)

Proof. Let T ( x ) be the generating function for trees where x marks a vertex. Then
T ( x ) = x + xT ( x )t . By the decomposition of the trees as in Figure 3.2 where
vertex i + ℓ is a non-leaf sink of degree t, we have that the generating function
i

ℓ steps

i+ℓ

t subtrees

Figure 3.2: Unlabelled tree with path length ℓ with final vertex a non-leaf sink.

16
for trees in which there is a path of length ℓ from vertex i is given by:

( xT ( x )t−1 )ℓ xT ( x )t = x ℓ T ( x )ℓt−ℓ xT ( x )t = x ℓ+1 T ( x )ℓt−ℓ+t .

Applying Lagrange Inversion Formula (Theorem 1.1.1), we have

[ x tn+1 ] x ℓ+1 T ( x )ℓt−ℓ+t = [ x tn−ℓ ] T ( x )ℓt−ℓ+t


ℓt − ℓ + t tn−ℓt−t
= [s ](1 + st )tn−ℓ .
tn − ℓ

By Binomial Theorem, we get


!
ℓt − ℓ + t tn−ℓt−t tn − ℓ
[ x tn+1 ] x ℓ+1 T ( x )ℓt−ℓ+t = [s ]∑ sti
tn − ℓ i ≥0 i
!
ℓt − ℓ + t t(n−ℓ−1) tn − ℓ ti
= [s ]∑ s
tn − ℓ i ≥0 i
!
ℓt − ℓ + t tn − ℓ
= .
tn − ℓ n−ℓ−1

This is the number of trees with path length ℓ starting at vertex i to a non-leaf
sink i + ℓ. Instead of the path terminating at vertex ! i + ℓ, let the path start at
v−i−1
i and end at non-leaf sink v. There are different labellings of the
ℓ−1
vertices on the path. Since the terminating vertex v is a sink of degree t, then the
!
v−ℓ−1
labels of the children of v must be less than v. Therefore, there are
t
choices for labels of the children of v. Note that the ℓ + 1 vertices on the path of
length ℓ and t children of v have been labelled. Overall, there are still a total of
(tn − ℓ − t) vertices to be labelled. There are (tn − ℓ − t)! choices for labelling
them. Moreover, an edge on a path, can be any of the t edges which connect a
vertex to its children. Therefore, there are t positions for each edge on the path.
In total there are tℓ choices for positions of the vertices in the path of length ℓ.
Putting everything together, we have

ℓt − ℓ + t tn − ℓ v−i−1 v−ℓ−1
   

t (tn − ℓ − t)!
tn − ℓ n−ℓ−1 ℓ−1 t

trees on tn + 1 vertices such that non-leaf sink v is reachable from vertex i in ℓ


steps.

17
Corollary 3.3.2. Let S(n, t, v) be the total number of trees on tn + 1 vertices in which
a fixed root v is a non-leaf sink, then

(tn − t)! v − 1
  
tn
S(n, t, v) = . (3.10)
n t n−1

Proof. The result follows by setting ℓ = 0 and i = v in Equation (3.9), i.e,

v−1 t −1
    
tn
(tn − t)!
t tn n − 1 −1

with (− 1
−1) = 1.

Corollary 3.3.3. Let S(t, n) be the total number of trees on tn + 1 vertices in which the
root is a non-leaf sink, then

(tn − t)! tn + 1
  
tn
S(t, n) = . (3.11)
n t+1 n−1

Proof. We sum over v in Equation (3.10), i.e the required formula is


 tn+1 
(tn − t)! v−1
 
tn
n − 1 v=∑
. (3.12)
n t +1
t

Let k = v − 1, so that
tn+1 tn
v−1
     
k tn + 1
∑ t
=∑
t
=
t + 1
. (3.13)
v = t +1 k=t

The last equality follows by Hockey Stick Identity. Substituting Equation (3.13)
in Equation (3.12), we obtain the required formula.

Corollary 3.3.4. Let S(n, t, v) be the total number of trees on tn + 1 vertices in which
a child v > i of a root i is a non-leaf sink, then

(2t2 − t)(tn − t − 1)! tn − 1 v − 2


  
S(n, t, v) = . (3.14)
tn − 1 n−2 t

Proof. We get the result by setting ℓ = 1 in Equation (3.9).

18
Summing over all v in Equation (3.14), we find that there are

(2t2 − t)(tn − t − 1)! tn − 1 tn+1 v − 2


   

tn − 1 n − 2 v=∑
t +2 t
(2t2 − t)(tn − t − 1)! tn − 1 tn−1 k
   

n − 2 k∑
=
tn − 1 =t
t
(2t2 − t)(tn − t − 1)! tn − 1
  
tn
=
tn − 1 n−2 t+1

children of the root which are also non-leaf sinks in trees on tn + 1 vertices.

Corollary 3.3.5. Let S(n, t, ℓ, v) be the total number of trees on tn + 1 vertices such
that vertex v which is a non leaf sink is reachable from the root in ℓ steps, then

v − ℓ − 1 ℓt − ℓ + t tn − ℓ v−1
    

S(n, t, ℓ, v) = t (tn − ℓ − t)! . (3.15)
t tn − ℓ n−ℓ−1 ℓ

Proof. To get the required formula, we sum over i in Equation (3.9), i.e.,
 v−ℓ 
v − ℓ − 1 ℓt − ℓ + t tn − ℓ v−i−1
   

n − ℓ − 1 i∑

t (tn − ℓ − t)! , (3.16)
t tn − ℓ =1
ℓ−1

is the desired result which we now simplify. Let k = v − i − 1. When i = 1, then


k = v − 2 and when i = v − ℓ then k = ℓ − 1. So, we have
v−ℓ  v −2 
v−i−1
 
k
∑ ℓ−1 = ∑ ℓ−1 .
i =1 k=ℓ−1

Applying Hockey Stick Identity, we get


v−l 
v−i−1 v−1
  
∑ ℓ−1
=

. (3.17)
i =1

Substituting Equation (3.17) in Equation (3.16), we get the equation in the state-
ment of the corollary.

Corollary 3.3.6. Let S(n, t, ℓ, v) be the total number of trees on tn + 1 vertices such
that there is a path of length ℓ from the root to a non-leaf sink, then
 tn+1 
ℓt − ℓ + t tn − ℓ v−ℓ−1 v−1
  

n − ℓ − 1 v=∑

S(n, t, ℓ, v) = t (tn − ℓ − t)! .
tn − ℓ t +1
t ℓ

Proof. To get the result, we sum over all v in Equation (3.15).

19
For the remainder of this section, our statistic of enumeration is leaf sink.

Proposition 3.3.7. Let LS(n, t, ℓ, i, v) be the number of trees on tn + 1 vertices in


which a leaf sink v is reachable at length ℓ ≥ 0 from the root i, then

ℓt − ℓ tn − ℓ v − i − 1
  

LS(n, t, ℓ, i, v) = t (tn − ℓ)! . (3.18)
tn − ℓ n − ℓ ℓ−1

ℓ steps

i+ℓ

Figure 3.3: Unlabelled tree with path length ℓ with final vertex a leaf sink.

Proof. Let T ( x ) be the generating function for a tree where x marks the number of
vertices. Then T ( x ) = x + xT ( x )t . These trees in which there is a path of length
ℓ from the root i to a leaf sink i + ℓ is decomposed as shown in Figure 3.3. By the
decomposition, we have that the generating function for the trees in which there
is a path of length ℓ from a root i to a leaf sink i + ℓ is given by;

( xT ( x )t−1 )ℓ x = x ℓ T ( x )ℓt−ℓ x = x ℓ+1 T ( x )ℓt−ℓ . (3.19)

Applying Lagrange Inversion Formula (Theorem 1.1.1), it follows that

ℓt − ℓ tn−ℓt
[ x tn+1 ] x ℓ+1 T ( x )ℓt−ℓ = [ x tn−ℓ ] T ( x )ℓt−ℓ = [s ](1 + st )tn−ℓ . (3.20)
tn − ℓ

20
By Binomial Theorem, we have
ℓt − ℓ tn−ℓt tn − ℓ ti
 
[x tn+1
]x ℓ+1
T (x) ℓt−ℓ
= [s ]∑ s
tn − ℓ i ≥0
i
ℓt − ℓ t(n−ℓ) tn − ℓ ti
 
= [s ]∑ s
tn − ℓ i ≥0
i
ℓt − ℓ tn − ℓ
 
= .
tn − ℓ n − ℓ

This formula gives the number of trees in which there is a path of length ℓ from
the root. Let the path start at i and end at v, then there are (v− i −1
ℓ−1 ) different
labellings of the vertices on the path. Since the ℓ + 1 vertices on the path have
been labelled, there are still a total of (tn − ℓ) vertices to be labelled. This can
be done in (tn − ℓ)! ways. An edge on a path can be any of the t edges which
connect a vertex to its children. Thus, there are t positions for each edge on the
path. In total, there are tℓ choices for positions of the vertices in the path of length
ℓ. Collecting everything together, we get the desired formula.

Corollary 3.3.8. Let LS(n, t, ℓ, v) be the total number of trees on tn + 1 vertices in


which vertex v is a leaf sink reachable from the root i in ℓ steps, then
ℓt − ℓ tn − ℓ v − 1
  

LS(n, t, ℓ, v) = t (tn − ℓ − 1)! . (3.21)
tn − ℓ n − ℓ ℓ

Proof. We obtain the required formula by summing over all i in Equation (3.18),
i.e.,

ℓt − ℓ tn − ℓ v−ℓ v − i − 1
   

tn − ℓ n − ℓ i∑

t (tn − ℓ)! . (3.22)
=1
ℓ − 1

Let k = v − i − 1. When i = 1, then k = v − 2 and when i = v − ℓ then k = ℓ − 1.


We have
v−ℓ  v −2
v−i−1
  
k
∑ ℓ−1
= ∑ ℓ−1
.
i =1 k=ℓ−1

By Hockey Stick Identity, we get


v−ℓ 
v−i−1 v−1
  
∑ ℓ−1 = ℓ . (3.23)
i =1

Substituting Equation (3.23) in Equation (3.22), we get Equation (3.18).

21
Corollary 3.3.9. Let LS(n, t, ℓ, i ) be the number of trees on tn + 1 such that there is a
leaf sink at length ℓ which is reachable from the root i, then
ℓt − ℓ tn − ℓ tn − i + 1
  

LS(n, t, ℓ, i ) = t (tn − ℓ − 1)! . (3.24)
tn − ℓ n − ℓ ℓ

Proof. We obtain the result by summing over all v in Equation 3.18, i.e.,

ℓt − ℓ tn − ℓ tn+1 v − i − 1
   

t (tn − ℓ − 1)! ∑
tn − ℓ n − ℓ v=ℓ+ ℓ−1
. (3.25)
i

Let k = v − i − 1. When v = tn + 1 then k = tn − i and when v = ℓ + i then


k = ℓ − 1. We have,
tn+1 tn−i
v−i−1
   
k
∑ ℓ−1
= ∑ ℓ−1
.
v=ℓ+i k=ℓ−1

By Hockey Stick Identity, we get


tn−i 
tn − i + 1
  
k
∑ ℓ−1
=

. (3.26)
k=ℓ−1

By Equations (3.25) and (3.26), we obtain the desired result.

Corollary 3.3.10. Let LS(n, t, ℓ) be the total number of leaf sinks in trees on tn + 1
vertices, then
ℓt − ℓ tn − ℓ tn + 1
  

LS(n, t, ℓ) = t (tn − ℓ − 1)! . (3.27)
tn − ℓ n − ℓ ℓ+1

Proof. We obtain the equation by summing over all v in Equation 3.21, i.e.,

ℓt − ℓ tn − ℓ tn+1 v − 1
   

t (tn − ℓ − 1)! ∑
tn − ℓ n − ℓ v=ℓ+ ℓ
. (3.28)
1

Let k = v − 1. When v = tn + 1, k = tn and when v = ℓ + 1, k = ℓ. So, we get


tn+1  tn  
v−1

k
∑ ℓ
=∑

.
v=ℓ+1 k=ℓ

Making use of Hockey Stick Identity, we get


tn    
k tn + 1
∑ ℓ = ℓ+1 . (3.29)
k=ℓ

By Equations (3.28) and (3.29), we obtain the required result. Alternatively, the
corollary can be proved by summing over all i in Equation (3.24).

22
Setting ℓ = 0, in Equation (3.27), we see that the root cannot be a leaf sink in any
tree. Also, setting ℓ = 1 in the same equation, we find the number of leaf sinks
which are children of the root in trees on tn + 1 vertices.

Corollary 3.3.11. Let LS(t, ℓ) be the average number of leaf sinks which are reachable
from the root in ℓ steps given a large number of trees, then

ℓ(t − 1)2
LS(t, ℓ) = .
t(ℓ + 1)!

Proof. We obtain the formula by dividing Equation (3.27) by Equation (3.8) and
tending n to infinity.

We have,
−ℓ tn+1
tℓ (tn − ℓ − 1)!(ℓt − ℓ)(tn
n−ℓ )( ℓ+1 )
(tn)!(tnn+1)
(tn−ℓ)! (tn+1)!
tℓ (tn − ℓ − 1)!(tℓ − ℓ) (n−ℓ)!(tn−n)! · (ℓ+1)!(tn−ℓ)!
=
(tn)! n!((tntn−+n1+)!1)!
tℓ (tn − ℓ − 1)!(tℓ − ℓ)(tn − ℓ)!n!(tn − n + 1)!(tn + 1)!
=
(tn)!(tn + 1)!(tn − n)!(n − ℓ)!(ℓ + 1)!(tn − ℓ)!
tℓ (tℓ − ℓ) n!(tn − ℓ − 1)!(tn − n + 1)!
= ·
(ℓ + 1)! (tn)!(n − ℓ)!(tn − n)!
tℓ (tℓ − ℓ) n(n − 1)(n − 2) · · · (n − ℓ + 1)(tn − n + 1)
= · .
(ℓ + 1)! tn(tn − 1)(tn − 2) · · · (tn − ℓ + 1)(tn − ℓ)

Let
n(n − 1)(n − 2) · · · (n − (ℓ − 1))((t − 1)n + 1)
Y= .
tn(tn − 1)(tn − 2) · · · (tn − ℓ + 1)(tn − ℓ)
Now,

n(n − 1)(n − 2) · · · (n − (ℓ − 1))((t − 1)n + 1)


lim Y = lim
n→∞ n→∞ tn(tn − 1)(tn − 2) · · · (tn − ℓ + 1)(tn − ℓ)
(t − 1)nℓ+1 + · · ·
= lim ℓ+1 ℓ+1
n→∞ t n +···
t−1 1+···
= ℓ+1 lim
t n→∞ 1 + · · ·
t−1
= ℓ+1 .
t

23
So the average number of leaf sinks which are reachable at length ℓ from the root
given a large number of trees is given by
tℓ (tℓ − ℓ) tℓ (tℓ − ℓ) t − 1
· lim Y = ·
(ℓ + 1)! n→∞ (ℓ + 1)! tℓ+1
ℓ(t − 1)2
= .
t(ℓ + 1)!

3.4 Enumeration by leftmost paths

In this section, we enumerate trees according to the length of their leftmost paths.

Proposition 3.4.1. Let L(n, t, ℓ, i, v) be the number of trees on tn + 1 vertices such that
there is a leftmost path of length ℓ starting at root i and ending at a vertex v, then
! !
ℓt − ℓ + t tn − ℓ v−i−ℓ
L(n, t, ℓ, i, v) = (tn − ℓ)! . (3.30)
tn − ℓ n−ℓ−1 ℓ−1

Proof. Let T ( x ) be the generating function for trees where x marks a vertex.
Again T ( x ) = x + xT ( x )t . By the decomposition of the trees, as shown in Figure
3.4, the generating function is given by

( xT ( x )t−1 )ℓ xT ( x )t = x ℓ+1 T ( x )tℓ−ℓ+t . (3.31)

By Lagrange Inversion Formula [15], we have


tℓ + t − ℓ tn−tℓ−t
[ x tn+1 ] x ℓ+1 T ( x )tℓ+t−ℓ = [ x tn−ℓ ] T ( x )tℓ+t−ℓ = [s ](1 + st )tn−ℓ .
tn − ℓ
(3.32)
By Binomial Theorem, we get
!
ℓt − ℓ + t tn−ℓt−t tn − ℓ ti
[ x tn+1 ] x ℓ+1 T ( x )ℓt−ℓ+t = [s ]∑ s
tn − ℓ i ≥0 i
!
ℓt − ℓ + t t(n−ℓ−1) tn − ℓ ti
= [s ]∑ s
tn − ℓ i ≥0 i
!
ℓt − ℓ + t tn − ℓ
= . (3.33)
tn − ℓ n−ℓ−1

24
i

ℓ steps

i+ℓ

t subtrees

Figure 3.4: Unlabelled tree with a leftmost path of length ℓ.

Equation (3.33) gives the number of trees on tn + 1 vertices such that there is a
leftmost path of length ℓ from vertex!i to terminal vertex i + ℓ. Let the terminal
v−i−ℓ
vertex be v, then there are different labellings of the vertices on the
ℓ−1
path. The other vertices, the ones not on the path, are labelled in ((tn + 1) − (ℓ +
1))! = (tn − ℓ)! ways. We thus have that the trees under consideration are
! !
ℓt − ℓ + t tn − ℓ v−i−ℓ
(tn − ℓ)!
tn − ℓ n−ℓ−1 ℓ−1

in number.

Corollary 3.4.2. Let L(n, t, ℓ, i ) be the total number of trees on tn + 1 vertices in which
there is a leftmost path of length ℓ from the root i, then
!
ℓt − ℓ + t tn − ℓ tn − i + 1

L(n, t, ℓ, i ) = (tn − ℓ)! . (3.34)
tn − ℓ n−ℓ−1 ℓ

25
Proof. We obtain the desired formula by summing over v in Equation (3.30):
!
tn+1 
ℓt − ℓ + t tn − ℓ v−i−1

(tn − ℓ)!
tn − ℓ n − ℓ − 1 v=ℓ+i
∑ ℓ−1
!
tn−i 
ℓt − ℓ + t tn − ℓ

k
= (tn − ℓ)!
tn − ℓ ∑
n − ℓ − 1 k=ℓ−1 ℓ − 1
!
ℓt − ℓ + t tn − ℓ tn − i + 1

= (tn − ℓ)! .
tn − ℓ n−ℓ−1 ℓ

Corollary 3.4.3. There are


!
ℓt − ℓ + t tn − ℓ v−1

L(n, t, ℓ, v) = (tn − ℓ − 1)! (3.35)
tn − ℓ n−ℓ−1 ℓ

trees on tn + 1 vertices in which there are leftmost paths of length ℓ terminating at vertex
v by letting L(n, t, ℓ, v) be the total number of such trees on tn + 1 vertices.

Proof. We sum over all i in Equation (3.30) to obtain the desired result
!
v−ℓ 
(ℓt − ℓ + t) tn − ℓ v−i−1

(tn − ℓ)!
tn − ℓ ∑ ℓ−1
n − ℓ − 1 i =1
!
v −2 
(ℓt − ℓ + t) tn − ℓ

k
= (tn − ℓ)!
tn − ℓ ∑
n − ℓ − 1 k=ℓ−1 ℓ − 1
!
(ℓt − ℓ + t) tn − ℓ v−1

= (tn − ℓ)! .
tn − ℓ n−ℓ−1 ℓ

Corollary 3.4.4. Given that L(ℓ, t, n) is the total number of trees on tn + 1 vertices
such that there is a leftmost path of length ℓ, then
!
ℓt − ℓ + t tn − ℓ

tn + 1
L(t, n, ℓ) = (tn − ℓ)! . (3.36)
tn − ℓ n−ℓ−1 ℓ+1

Proof. We obtain the result by summing over all i in Equation (3.34) or over all v

26
in Equation (3.35):
!
tn−ℓ+1 
(ℓt − ℓ + t) tn − ℓ tn − i + 1

(tn − ℓ)!
tn − ℓ n−ℓ−1
∑ ℓ
i =1
!
tn
(ℓt − ℓ + t) tn − ℓ
 
k
= (tn − ℓ)!
tn − ℓ n−ℓ−1
∑ ℓ
k=ℓ
!
(ℓt − ℓ + t) tn − ℓ

tn + 1
= (tn − ℓ)! .
tn − ℓ n−ℓ−1 ℓ+1

Setting ℓ = 0 in Equation (3.36), we rediscover the formula for the number of


trees on tn + 1 vertices, stated earlier as Equation (3.8).

Corollary 3.4.5. Let L(t, ℓ) be the average number of vertices on leftmost paths which
are reachable from the root in ℓ steps in trees with a large number of vertices, then

tℓ − ℓ + t
L(t, ℓ) = .
tℓ+1 (ℓ + 1)!

Proof. We obtain the formula by dividing Equation (3.36) by Equation (3.8) and
tending n to infinity.

We have,

(tn − ℓ)! (tℓ−ℓ+ t) tn−ℓ tn+1


tn−ℓ (n−ℓ−1)( ℓ+1 )
(tn)!(tnn+1)
(tn−ℓ)!
(tn − ℓ − 1)! (tℓ−ℓ+ t)
tn−ℓ (n−ℓ−1)!(tn−n+1)! ·
(tn+1)!
(ℓ+1)!(tn−ℓ)!
=
(tn)! n!((tntn−+n1+)!1)!
(tn − ℓ)!(tℓ − ℓ + t)(tn − ℓ)!n!(tn − n + 1)!(tn + 1)!
=
(tn)!(tn + 1)!(tn − n + 1)!(n − ℓ − 1)!(ℓ + 1)!(tn − ℓ)!
tℓ − ℓ + t n!(tn − ℓ − 1)!
= ·
(ℓ + 1)! (tn)!(n − ℓ − 1)!
tℓ − ℓ + t n(n − 1)(n − 2) · · · (n − ℓ)
= · .
(ℓ + 1)! tn(tn − 1)(tn − 2) · · · (tn − ℓ)

Let
n(n − 1)(n − 2) · · · (n − ℓ)
Z= .
tn(tn − 1)(tn − 2) · · · (tn − ℓ)

27
Now,

n(n − 1)(n − 2) · · · (n − ℓ)
lim Z = lim
n→∞ n→∞ tn ( tn − 1)( tn − 2) · · · ( tn − ℓ)

nℓ+1 + · · ·
= lim
n→∞ tℓ+1 nℓ+1 + · · ·
1 1+···
= ℓ+1 lim
t n → ∞ 1+···
1
= ℓ+1 .
t

So the average number of vertices on the leftmost path which are reachable at
length ℓ from the root in a random tree is given by

tℓ − ℓ + t tℓ − ℓ + t 1
· lim Z = · ℓ+1
(ℓ + 1)! n→∞ (ℓ + 1)! t
tℓ − ℓ + t
= ℓ+1 .
t (ℓ + 1)!

For the rest of this section, we enumerate trees in which the leftmost path termi-
nates at a leaf sink.

Proposition 3.4.6. Given that LL(n, t, ℓ, i, v) is the number of trees on tn + 1 vertices


in which the final vertex v is a leaf sink is reachable from the root i in ℓ steps, then
! !
ℓt − ℓ tn − ℓ v−i−1
LL(n, t, ℓ, i, v) = (tn − ℓ)! (3.37)
tn − ℓ n − ℓ ℓ−1

Proof. Let T ( x ) be the generating function for a tree where x marks the num-
ber of vertices. Symbolically, the generating function for these trees satisfies the
equation T ( x ) = x + xT ( x )t . The decomposition of these trees is given by Figure
3.5.

By the decomposition, we have that the generating function for the trees in which
there is a path of length ℓ from a root i to a leaf sink i + ℓ is given by

( xT ( x )t−1 )ℓ x = x ℓ T ( x )ℓt−ℓ x = x ℓ+1 T ( x )ℓt−ℓ . (3.38)

28
i

ℓ steps

i+ℓ t − 1 subtrees

Figure 3.5: Unlabelled tree with leftmost path of length ℓ with final vertex a leaf.

Applying Lagrange Inversion Formula (Theorem 1.1.1), it follows that


ℓt − ℓ tn−ℓt
[ x tn+1 ] x ℓ+1 T ( x )ℓt−ℓ = [ x tn−ℓ ] T ( x )ℓt−ℓ = [s ](1 + st )tn−ℓ . (3.39)
tn − ℓ
By Binomial Theorem, we have
ℓt − ℓ tn−ℓt tn − ℓ ti
 
[x tn+1
]x ℓ+1
T (x) ℓt−ℓ
= [s ]∑ s
tn − ℓ i ≥0
i
ℓt − ℓ t(n−ℓ) tn − ℓ ti
 
= [s ]∑ s
tn − ℓ i ≥0
i
ℓt − ℓ tn − ℓ
 
= .
tn − ℓ n − ℓ

This formula gives the number of trees in which there is a path of length ℓ from
the root. Let the path start at i and end at v, then there are (v− i −1
ℓ−1 ) different
labellings of the vertices on the path. Since the ℓ + 1 vertices on the path have
been labelled, there are still a total of (tn − ℓ) vertices to be labelled. This can
be done in (tn − ℓ)! ways. Collecting everything together, we get the desired
formula.

Corollary 3.4.7. Let LL(n, t, ℓ, i ) be the total number of trees on tn + 1 vertices such
that there is a leaf sink at length ℓ which is reachable from the root i, then
! !
ℓt − ℓ tn − ℓ tn − i + 1
LL(n, t, ℓ, i ) = (tn − ℓ)! (3.40)
tn − ℓ n − ℓ ℓ

29
Proof. We obtain the result by summing over v in Equation (3.37), i.e.,
!
ℓt − ℓ tn − ℓ tn+1 v − i − 1
 
(tn − ℓ)! ∑
tn − ℓ n − ℓ v=ℓ+ ℓ − 1
. (3.41)
i

Let k = v − i − 1. When v = tn + 1 then k = tn − i and when v = ℓ + i then


k = ℓ − 1. We have,
tn+1 tn−i
v−i−1
   
k
∑ ℓ−1
= ∑ ℓ−1
.
v=ℓ+i k=ℓ−1

By Hockey Stick Identity, we get


tn−i
tn − i + 1
   
k
∑ ℓ−1
=

. (3.42)
k=ℓ−1

By Equations (3.41) and (3.42), we obtain the desired result.

Corollary 3.4.8. The total number of leaves LL(n, t, ℓ) in trees on tn + 1 vertices such
that a vertex v which is a leftmost path terminating with a leaf sink is given by

ℓt − ℓ tn − ℓ tn
  
LL(n, t, ℓ) = (tn − ℓ)! . (3.43)
tn − ℓ n − ℓ ℓ

Proof. We obtain the equation by summing over i in Equation 3.40, i.e.,

ℓt − ℓ tn − ℓ tn−ℓ tn − i + 1
   

tn − ℓ n − ℓ i∑
(tn − ℓ)! . (3.44)
=0

Let k = tn − i + 1. When i = 0, k = tn + 1 and when i = tn − ℓ, k = ℓ + 1. So,


we get

tn−ℓ  tn+1
tn − i + 1
  
k
∑ ℓ
= ∑

.
i =0 k=ℓ+1

Making use of Hockey Stick Identity, we get


tn+1    
k tn + 2
∑ ℓ = ℓ+2 . (3.45)
k=ℓ+1

By Equations (3.44) and (3.45), we obtain the required result.

30
3.5 Enumeration by first children

In this section, our statistics of enumeration are first children.

Proposition 3.5.1. Let F (n, t, ℓ, i, v) be the number of trees on tn + 1 vertices in which


there is a path of length ℓ starting at the root i and terminating at a first child v is given
by
ℓt − ℓ + t tn − ℓ v−i−1
  
ℓ−1
F (n, t, ℓ, i, v) = t (tn − ℓ − 1)! . (3.46)
tn − ℓ n−ℓ−1 ℓ−1

Proof. Let T ( x ) be the generating function for trees. Then T ( x ) = x + xT ( x )t . By


the decomposition of trees as shown in Figure 3.6,
i

ℓ steps

i+ℓ

t subtrees

Figure 3.6: A tree with path length ℓ starting at vertex i to first child i + ℓ.

The generating function for trees terminating with a first child in which there is
a path of length ℓ ≥ 0 is given by:

( xT ( x )t−1 )ℓ−1 xT ( x )t−1 xT ( x )t = x ℓ+1 T ( x )ℓt−ℓ+t .

Applying Lagrange Inversion Formula [15], it follows that

[ x tn+1 ] x ℓ+1 T ( x )ℓt−ℓ+t = [ x tn−ℓ ] T ( x )ℓt−ℓ+t


ℓt − ℓ + t tn−ℓt−t
= [s ](1 + st )tn−ℓ .
tn − ℓ

31
By Binomial Theorem, we get
!
ℓt − ℓ + t tn−ℓt−t tn − ℓ ti
[ x tn+1 ] x ℓ+1 T ( x )ℓt−ℓ+t = [s ]∑ s
tn − ℓ i ≥0 i
!
ℓt − ℓ + t t(n−ℓ−1) tn − ℓ ti
= [s ]∑ s
tn − ℓ i ≥0 i
!
ℓt − ℓ + t tn − ℓ
= . (3.47)
tn − ℓ n−ℓ−1
Equation (3.47) gives the number of trees on tn + 1 vertices such that there is a
path of length ℓ from vertex!i to a first child i + ℓ. Let the terminal first child be
v−i−1
v, then there are different labellings of the vertices on the path. The
ℓ−1
other vertices which are not on that path can be labelled in (tn − ℓ)! ways. An
edge on a path can be any of the t edges which connect a vertex to its children.
Therefore, there are t positions for each edge on the path, except the final edge
whose endpoint is the first child. In total there are tℓ−1 choices for positions of
the edges on the path of length ℓ, (the final edge has one choice for position).
Thus there are
! !
ℓt − ℓ + t v−i−1 tn − ℓ
tℓ−1 (tn − ℓ)!
tn − ℓ ℓ−1 n−ℓ−1
trees of order tn + 1 such that there is a path of length ℓ starting at a vertex i to a
first child v.

Corollary 3.5.2. Let F (n, t, ℓ, i ) be the total number of trees on tn + 1 vertices in which
there is a first child at length ℓ from the root i, then
!
ℓt − ℓ + t tn − ℓ tn − i + 1

ℓ−1
F (n, t, ℓ, i ) = t (tn − ℓ − 1)! . (3.48)
tn − ℓ n−ℓ−1 ℓ

Proof. We obtain the desired formula by summing over all v in Equation (3.46):
!
tn+1 
ℓt − ℓ + t tn − ℓ v−i−1

ℓ−1
t (tn − ℓ − 1)!
tn − ℓ ∑
n − ℓ − 1 v=ℓ+i ℓ−1
!
tn−i 
ℓt − ℓ + t tn − ℓ

k
ℓ−1
= t (tn − ℓ − 1)!
tn − ℓ ∑
n − ℓ − 1 k=ℓ−1 ℓ − 1
!
ℓt − ℓ + t tn − ℓ tn − i + 1

ℓ−1
= t (tn − ℓ − 1)! .
tn − ℓ n−ℓ−1 ℓ

32
Corollary 3.5.3. There are F (n, t, ℓ, v)
!
ℓt − ℓ + t tn − ℓ v−1

F (n, t, ℓ, v) = tℓ−1 (tn − ℓ − 1)!( (3.49)
tn − ℓ n−ℓ−1 ℓ

trees of order tn + 1 in which there are paths of length ℓ from the root that terminate at
a first child v given that F (n, t, ℓ, v) represents the total number of these trees.

Proof. We sum over all i in Equation (3.46) to obtain the result:


!
v−ℓ 
ℓt − ℓ + t tn − ℓ v−i−1

ℓ−1
t (tn − ℓ − 1)!
tn − ℓ ∑ ℓ−1
n − ℓ − 1 i =1
!
v −2 
ℓt − ℓ + t tn − ℓ

k
ℓ−1
= t (tn − ℓ − 1)!
tn − ℓ ∑
n − ℓ − 1 k=ℓ−1 ℓ − 1
!
ℓt − ℓ + t tn − ℓ v−1

ℓ−1
= t (tn − ℓ − 1)! .
tn − ℓ n−ℓ−1 ℓ

Corollary 3.5.4. Let F (n, t, ℓ, v) be the total number of trees on tn + 1 vertices such
that there is a path of length ℓ from the root terminating at a first child, then
!
− −

ℓ−1 ℓ t ℓ + t tn ℓ tn + 1
F (n, t, ℓ, v) = t (tn − ℓ − 1)! . (3.50)
tn − ℓ n−ℓ−1 ℓ+1

Proof. We obtain the result by summing over all i in Equation (3.48) or over all v
in Equation (3.49):
!
tn−ℓ+1 
ℓt − ℓ + t tn − ℓ tn − i + 1

tℓ−1 (tn − ℓ − 1)!
tn − ℓ n−ℓ−1
∑ ℓ
i =1
!
tn  
ℓt − ℓ + t tn − ℓ k
= tℓ−1 (tn − ℓ − 1)!
tn − ℓ ∑
n − ℓ − 1 k=ℓ ℓ
!
ℓt − ℓ + t tn − ℓ

tn + 1
= tℓ−1 (tn − ℓ − 1)! .
tn − ℓ n−ℓ−1 ℓ+1

33
Corollary 3.5.5. Let F (ℓ, t) be the average number of first children which are reachable
from the root in ℓ steps in trees with a large number of vertices, then
tℓ − ℓ + t
F (ℓ, t) = .
t2 (ℓ + 1)!

Proof. We obtain the formula by dividing Equation (3.50) by Equation (3.8) and
tending n to infinity
t tn−ℓ tn+1
tℓ−1 (tn − ℓ − 1)! ℓttn−ℓ+
−ℓ (n−ℓ−1)( ℓ+1 )
(tn)!(tnn+1)
(tn−ℓ)! (tn+1)!
tℓ−1 (tn − ℓ − 1)! ℓttn−ℓ+ t
−ℓ (n−ℓ−1)!(tn−n+1)! · (ℓ+1)!(tn−ℓ)!
=
(tn)! n!((tntn−+n1+)!1)!
(tn − ℓ − 1)!(tℓ − ℓ + t)(tn − ℓ)!n!(tn − n + 1)!(tn + 1)!
=
(tn)!(tn + 1)!(tn − n + 1)!(n − ℓ − 1)!(ℓ + 1)!(tn − ℓ)!
ℓ−
t 1 (tℓ − ℓ + t) n!(tn − ℓ − 1)!
= ·
(ℓ + 1)! (tn)!(n − ℓ − 1)!
tℓ−1 (tℓ − ℓ + t) n(n − 1)(n − 2) · · · (n − ℓ)
= · .
(ℓ + 1)! tn(tn − 1)(tn − 2) · · · (tn − ℓ)
Let
n(n − 1)(n − 2) · · · (n − ℓ)
A= .
tn(tn − 1)(tn − 2) · · · (tn − ℓ)
Now,
n(n − 1)(n − 2) · · · (n − ℓ)
lim A = lim
n→∞ n→∞ tn(tn − 1)(tn − 2) · · · (tn − ℓ)
nℓ+1 + · · ·
= lim
n→∞ tℓ+1 nℓ+1 + · · ·
1 1+···
= ℓ+1 lim
t n→∞ 1 + · · ·
1
= ℓ+1 .
t
So the average number of first children which are reachable at length ℓ from the
root given large number of trees is given by

tℓ−1 (tℓ − ℓ + t) tℓ−1 (tℓ − ℓ + t) 1


· lim A = · ℓ+1
(ℓ + 1)! n → ∞ (ℓ + 1)! t
tℓ − ℓ + t
= 2 .
t (ℓ + 1)!

34
3.6 Enumeration by non-first children

In this section, we enumerate trees according to non-first children which reside


at a given level from a specified vertex.

Proposition 3.6.1. Let NF (n, t, ℓ, i, v) be the number of trees on tn + 1 vertices in


which a non-first child v is reachable from the root i in ℓ steps is given by:
! !
ℓ t − ℓ + 2t − 1 tn − ℓ − 1 v − i − 1
NF (n, t, ℓ, i, v) = tℓ−1 (t − 1)(tn − ℓ)! .
tn − ℓ − 1 n−ℓ−2 ℓ−1
(3.51)

Proof. We consider a tree of order tn + 1 with root i such that there is a path of
length ℓ from the root to a non-first child i + ℓ. The path decomposes the tree
into left and right subtrees until step ℓ. Since vertex i + ℓ is a non-first child,
there has to be an elder sibling of i + ℓ. The vertex v can have a subtree attached
to it or it can be empty. Let T ( x ) be the generating function for trees. Again
T ( x ) = x + xT ( x )t . Here, x marks a vertex. We have that the generating function
for trees in which there is a path of length ℓ ≥ 0 terminating at a non-first child
is given by:

( xT ( x )t−1 )ℓ−1 xT ( x )t−2 xT ( x )t xT ( x )t = x ℓ+2 T ( x )ℓt−ℓ+2t−1 .

This decomposition is given in Figure 3.7.

By Lagrange Inversion Formula [15], it follows that

[ x tn+1 ] x ℓ+2 T ( x )ℓt−ℓ+2t−1 = [ x tn−ℓ−1 ] T ( x )ℓt−ℓ+2t−1 .

Making use of Binomial Theorem, we have


!
ℓt − ℓ + 2t − 1 tn−ℓt−2t tn − ℓ − 1 ti
[ x tn−ℓ−1 ] T ( x )ℓt−ℓ+2t−1 = [s ]∑ s
tn − ℓ − 1 i ≥0 i
!
ℓt − ℓ + 2t − 1 t(n−ℓ−2) tn − ℓ − 1 ti
= [s ]∑ s
tn − ℓ − 1 i ≥0 i
!
ℓt − ℓ + 2t − 1 tn − ℓ − 1
= .
tn − ℓ − 1 n−ℓ−2

35
i

ℓ steps

i+ℓ

t subtrees t subtrees

Figure 3.7: A tree with path length ℓ starting at vertex i to non-first child of label
i + ℓ.
!
v−i−1
There are choices for these labels on the path from i to non-first child
ℓ−1
v. Note that when the ℓ + 1 vertices on the path of length ℓ have been labelled,
we still have tn − ℓ vertices to label. This can be done in (tn − ℓ)! ways. An
edge on a path can be any of the t edges which connect a vertex to its children.
Therefore, there are t positions for each edge on the path, except the final edge
whose endpoint is the non-first child. In total there are (t − 1)tℓ−1 choices for
positions of the edges in the path of length ℓ, (the final edge has (t − 1) choices
for position). Putting everything together, we obtain the desired formula.

Corollary 3.6.2. Let NF (n, t, ℓ, i ) be the total number of trees on tn + 1 vertices in


which there is a non-first child at length ℓ from the root i, then
!
ℓt − ℓ + 2t − 1 tn − ℓ − 1 tn − i + 1

NF (n, t, ℓ, i ) = (t − 1)tℓ−1 (tn − ℓ)! .
tn − ℓ − 1 n−ℓ−2 ℓ
(3.52)

36
Proof. We obtain the desired formula by summing over all v in Equation (3.51):
!
tn+1 
− − − − v−i−1

ℓ t ℓ + 2t 1 tn ℓ 1
ℓ−1
(t − 1)t (tn − ℓ)!
tn − ℓ − 1 ∑
n − ℓ − 2 v=ℓ+i ℓ−1
!
tn−i 
− − − −

ℓ t ℓ + 2t 1 tn ℓ 1 k
ℓ−1
= (t − 1)t (tn − ℓ)!
tn − ℓ − 1 ∑
n − ℓ − 2 k=ℓ−1 ℓ − 1
!
− − − − tn − i + 1

ℓ−1 ℓ t ℓ + 2t 1 tn ℓ 1
= (t − 1)t (tn − ℓ)! .
tn − ℓ − 1 n−ℓ−2 ℓ

Corollary 3.6.3. There are NF (n, t, ℓ, v)


!
ℓt − ℓ + 2t − 1 tn − ℓ − 1 v−1

ℓ−1
( t − 1) t (tn − ℓ)! (3.53)
tn − ℓ − 1 n−ℓ−2 ℓ

trees on tn + 1 vertices in which there are paths of length ℓ from the root that terminate
at a non-first child v.

Proof. We sum over all i in Equation (3.51) to obtain the result:


!
v−ℓ 
− − − − v−i−1

ℓ t ℓ + 2t 1 tn ℓ 1
ℓ−1
(t − 1)t (tn − ℓ)!
tn − ℓ − 1 ∑ ℓ−1
n − ℓ − 2 i =1
!
v −2 
− − − −

ℓ t ℓ + 2t 1 tn ℓ 1 k
ℓ−1
= (t − 1)t (tn − ℓ)!
tn − ℓ − 1 ∑
n − ℓ − 2 k=ℓ−1 ℓ − 1
!
− − − − v−1

ℓ−1 ℓ t ℓ + 2t 1 tn ℓ 1
= (t − 1)t (tn − ℓ)! .
tn − ℓ − 1 n−ℓ−2 ℓ

Corollary 3.6.4. Given that NF (ℓ, t, n) is total number of trees on tn + 1 vertices such
that there is a path of length ℓ from the root terminating at a non-first child, then
!
ℓt − ℓ + 2t − 1 − −

ℓ−1 tn ℓ 1 tn + 1
NF (ℓ, t, n) = (t − 1)t (tn − ℓ)! . (3.54)
tn − ℓ − 1 n−ℓ−2 ℓ+1

Proof. We obtain the result by summing over all i in Equation (3.52) or over all v

37
in Equation (3.53):
!
tn−ℓ+1 
ℓt − ℓ + 2t − 1 tn − ℓ − 1 tn − i + 1

(t − 1)tℓ−1 (tn − ℓ)!
tn − ℓ − 1 n−ℓ−2
∑ ℓ
i =1
!
tn
ℓt − ℓ + 2t − 1 tn − ℓ − 1
 
k
= (t − 1)tℓ−1 (tn − ℓ)!
tn − ℓ − 1 n−ℓ−2
∑ ℓ
k=ℓ
!
ℓt − ℓ + 2t − 1 tn − ℓ − 1

tn + 1
= (t − 1)tℓ−1 (tn − ℓ)! .
tn − ℓ − 1 n−ℓ−2 ℓ+1

Corollary 3.6.5. Let NF (t, ℓ) be the average number of non-first children which are
reachable from the root in ℓ steps in a random tree, then

(t − 1)(ℓt − ℓ + 2t − 1)
NF (t, ℓ) = .
(ℓ + 1)!t3

Proof. We obtain the formula by dividing Equation (3.54) by Equation (3.8) and
tending n to infinity.

We have,
−ℓ+2t−1 tn−ℓ−1 tn+1
(t − 1)tℓ−1 (tn − ℓ)! ℓttn −ℓ−1 ( n−ℓ−2 )( ℓ+1 )
(tn)!(tnn+1)
−ℓ+2t−1 (tn−ℓ−1)! (tn+1)!
(t − 1)tℓ−1 (tn − ℓ)! ℓttn −ℓ−1 (n−ℓ−2)!(tn−n+1)! · (ℓ+1)!(tn−ℓ)!
=
(tn)! n!((tntn−+n1+)!1)!
(t − 1)tℓ−1 (tn − ℓ − 2)!(ℓt − ℓ + 2t − 1)(tn − ℓ)!n!(tn − n + 1)!(tn + 1)!
=
(tn)!(tn + 1)!(tn − n + 1)!(n − ℓ − 2)!(ℓ + 1)!(tn − ℓ)!
ℓ−
(t − 1)t 1 (ℓt − ℓ + 2t − 1) n!(tn − ℓ − 2)!
= ·
(ℓ + 1)! (tn)!(n − ℓ − 2)!
(t − 1)tℓ−1 (ℓt − ℓ + 2t − 1) n(n − 1)(n − 2) · · · (n − ℓ − 1)
= · .
(ℓ + 1)! tn(tn − 1)(tn − 2) · · · (tn − ℓ − 1)

Let
n(n − 1)(n − 2) · · · (n − ℓ − 1)
B= .
tn(tn − 1)(tn − 2) · · · (tn − ℓ − 1)

38
Now,

n(n − 1)(n − 2) · · · (n − ℓ − 1)
lim B = lim
n→∞ n→∞ tn ( tn − 1)( tn − 2) · · · ( tn − ℓ − 1)

nℓ+2 + · · ·
= lim
n→∞ tℓ+2 nℓ+2 + · · ·
1 1+···
= ℓ+2 lim
t n → ∞ 1+···
1
= ℓ+2 .
t

So, the average number of non-first children which are reachable at length ℓ from
the root given a large number of trees is given by

(t − 1)tℓ−1 (ℓt − ℓ + 2t − 1) (t − 1)tℓ−1 (ℓt − ℓ + 2t − 1) 1


· lim B = · ℓ+2
(ℓ + 1)! n→∞ (ℓ + 1)! t
(t − 1)(ℓt − ℓ + 2t − 1)
= .
(ℓ + 1)!t3

For the rest of this section, we enumerate trees by the number of non-first chil-
dren which are reachable at a given length such that the non-first child is a leaf.

Proposition 3.6.6. Let NFL(n, t, ℓ, i, v) be the number of trees of order tn + 1 such


that there is a path of length ℓ starting at root i and ending at a non-first child v which
is also a leaf is given by
! !
ℓt − ℓ + t − 1 v−i−1 tn − ℓ − 1
NFL(n, t, ℓ, i, v) = (t − 1)tℓ−1 (tn − ℓ)! .
tn − ℓ − 1 ℓ−1 n−ℓ−1
(3.55)

Proof. Let T ( x ) be the generating function for trees. Then T ( x ) = x + xT ( x )t .


Here, x marks vertices. Lets consider a path of length ℓ from vertex i to a non-
first child i + ℓ. Moreover, let vertex i + ℓ be a leaf. By the decomposition of the
trees as in Figure 3.8, the generating function for these trees is given as

( xT ( x )t−1 )ℓ−1 xT ( x )t−2 xT ( x )t x = x ℓ+2 T ( x )ℓt+t−ℓ−1 .

39
i

ℓ steps

i+ℓ

t subtrees

Figure 3.8: A tree with path length ℓ starting at vertex i to non-first child of label
i + ℓ. The non-first vertex is also a leaf.

By Lagrange Inversion Formula [15], we have

[ x tn+1 ] x ℓ+2 T ( x )ℓt−ℓ+t−1 = [ x tn−ℓ−1 ] T ( x )ℓt−ℓ+t−1


ℓt − ℓ + t − 1 tn−ℓt−t
= [s ](1 + st )tn−ℓ−1 .
tn − ℓ − 1

Now, Binomial Theorem gives


!
ℓt − ℓ + t − 1 tn−ℓt−t tn − ℓ − 1 ti
[ x tn−ℓ−1 ] T ( x )ℓt−ℓ+t−1 = [s ]∑ s
tn − ℓ − 1 i ≥0 i
!
ℓt − ℓ + t − 1 t(n−ℓ−1) tn − ℓ − 1 ti
= [s ]∑ s
tn − ℓ − 1 i ≥0 i
!
ℓt − ℓ + t − 1 tn − ℓ − 1
= .
tn − ℓ − 1 n−ℓ−1
!
v−i−1
There are choices for labels on the path from i to non-first child v.
ℓ−1
Since there are ℓ + 1 vertices on the path of length ℓ which have been labelled,
then there are still tn − ℓ vertices to be labelled. This can be done in (tn − ℓ)!
ways. An edge on a path can be any of the t edges which connect a vertex to
its children. Therefore, there are t positions for each edge on the path, except

40
the final edge whose endpoint is the non-first child. In total there are (t − 1)tℓ−1
choices for positions of the edges in the path of length ℓ, (the final edge has (t − 1)
choices for position). We obtain the result by putting everything together.

Corollary 3.6.7. Let NFL(n, t, ℓ, i ) be the total number of trees on tn + 1 vertices such
that there is a non-first child, which is also a leaf, at length ℓ from the root i, then
!
− − − − tn − i + 1

ℓ−1 ℓ t ℓ + t 1 tn ℓ 1
NFL(n, t, ℓ, i ) = (t − 1)t (tn − ℓ)! .
tn − ℓ − 1 n−ℓ−1 ℓ
(3.56)

Proof. We obtain the desired formula by summing over all v in Equation (3.55):
!
tn+1 
− − − − v−i−1

ℓ t ℓ + t 1 tn ℓ 1
ℓ−1
(t − 1)t (tn − ℓ)!
tn − ℓ − 1 ∑
n − ℓ − 1 v=ℓ+i ℓ−1
!
tn−i 
− − − −

ℓ t ℓ + t 1 tn ℓ 1 k
ℓ−1
= (t − 1)t (tn − ℓ)!
tn − ℓ − 1 ∑
n − ℓ − 1 k=ℓ−1 ℓ − 1
!
− − − − tn − i + 1

ℓ−1 ℓ t ℓ + t 1 tn ℓ 1
= (t − 1)t (tn − ℓ)! .
tn − ℓ − 1 n−ℓ−1 ℓ

Corollary 3.6.8. There are NFL(n, t, ℓ, v)


!
ℓt − ℓ + t − 1 tn − ℓ − 1 v−1

(t − 1)tℓ−1 (tn − ℓ)! (3.57)
tn − ℓ − 1 n−ℓ−1 ℓ

trees on tn + 1 vertices in which there are paths of length ℓ from the root that terminate
at a non-first child v which is also a leaf.

Proof. We sum over all i in Equation (3.55) to obtain the result:


!
v−ℓ 
− − − − v−i−1

ℓ t ℓ + t 1 tn ℓ 1
ℓ−1
(t − 1)t (tn − ℓ)!
tn − ℓ − 1 ∑ ℓ−1
n − ℓ − 1 i =1
!
v −2 
− − − −

ℓ t ℓ + t 1 tn ℓ 1 k
ℓ−1
= (t − 1)t (tn − ℓ)!
tn − ℓ − 1 ∑
n − ℓ − 1 k=ℓ−1 ℓ − 1
!
− − − − v−1

ℓ−1 ℓ t ℓ + t 1 tn ℓ 1
= (t − 1)t (tn − ℓ)! .
tn − ℓ − 1 n−ℓ−1 ℓ

41
Corollary 3.6.9. Let NFL(ℓ, t, n) be the total number of trees on tn + 1 vertices such
that there is a path of length ℓ from the root terminating at a non-first child which is also
a leaf, then
!
ℓt − ℓ + t − 1 tn − ℓ − 1

tn + 1
NFN (ℓ, t, n, ) = (t − 1)tℓ−1 (tn − ℓ)! .
tn − ℓ − 1 n−ℓ−1 ℓ+1
(3.58)

Proof. We obtain the result by summing over all i in Equation (3.56) or over all v
in Equation (3.57):
!
tn−ℓ+1 
ℓt − ℓ + t − 1 tn − ℓ − 1 tn − i + 1

(t − 1)tℓ−1 (tn − ℓ)!
tn − ℓ − 1 n−ℓ−1
∑ ℓ
i =1
!
ℓt − ℓ + t − 1 tn − ℓ − 1 tn k
 
= (t − 1)tℓ−1 (tn − ℓ)!
tn − ℓ − 1 ∑
n − ℓ − 1 k=ℓ ℓ
!
ℓt − ℓ + t − 1 tn − ℓ − 1

tn + 1
= (t − 1)tℓ−1 (tn − ℓ)! .
tn − ℓ − 1 n−ℓ−1 ℓ+1

Corollary 3.6.10. Let NFL(t, ℓ) be the average number of non-first children, which are
also leaves, that are reachable from the root in ℓ steps in trees with a large number of
vertices, then

(t − 1)2 (ℓt − ℓ + t − 1)
NFL(t, ℓ) = .
(ℓ + 1)!t3

Proof. We obtain the formula by dividing Equation (3.58) by Equation (3.8) and
tending n to infinity.

42
We have,
t−1 tn−ℓ−1 tn+1
(t − 1)tℓ−1 (tn − ℓ)! ℓttn−ℓ+
−ℓ−1 ( n−ℓ−1 )( ℓ+1 )
(tn)!(tnn+1)
(tn−ℓ−2)! (tn+1)!
(t − 1)tℓ−1 (tn − ℓ)!(ℓt − ℓ + t − 1) (n−ℓ− 1)!(tn−n)!
· (ℓ+1)!(tn−ℓ)!
=
(tn)! n!((tntn−+n1+)!1)!
(t − 1)tℓ−1 (tn − ℓ − 2)!(ℓt − ℓ + t − 1)(tn − ℓ)!n!(tn − n + 1)!(tn + 1)!
=
(tn)!(tn + 1)!(tn − n)!(n − ℓ − 1)!(ℓ + 1)!(tn − ℓ)!
(t − 1)tℓ−1 (ℓt − ℓ + t − 1) n!(tn − ℓ − 2)!(tn − n + 1)
= ·
(ℓ + 1)! (tn)!(n − ℓ − 1)!
ℓ− 1
(t − 1)t (ℓt − ℓ + t − 1) n(n − 1)(n − 2) · · · (n − ℓ)(tn − n + 1)
= · .
(ℓ + 1)! tn(tn − 1)(tn − 2) · · · (tn − ℓ − 1)

Let
n(n − 1)(n − 2) · · · (n − ℓ)(tn − n + 1)
C= .
tn(tn − 1)(tn − 2) · · · (tn − ℓ − 1)
Then,

n(n − 1)(n − 2) · · · (n − ℓ)(tn − n + 1)


lim C = lim
n→∞ n→∞ tn(tn − 1)(tn − 2) · · · (tn − ℓ − 1)
(t − 1)nℓ+2 + · · ·
= lim
n→∞ tℓ+2 nℓ+2 + · · ·
t−1 1+···
= ℓ+2 lim
t n→∞ 1 + · · ·
t−1
= ℓ+2 .
t

So the average number of non-first children, which are leaves, that are reachable
at length ℓ from the root in a random tree is given by

(t − 1)tℓ−1 (ℓt − ℓ + t − 1) (t − 1)tℓ−1 (ℓt − ℓ + t − 1) t − 1


· lim C = · ℓ+2
(ℓ + 1)! n→∞ (ℓ + 1)! t
2
(t − 1) (ℓt − ℓ + t − 1)
= .
(ℓ + 1)!t3

43
CHAPTER 4

CONCLUSION AND
RECOMMENDATIONS

4.1 Conclusion

In this thesis, we have studied reachability of vertices in complete labelled t-


ary trees with respect to path lengths, leaf sinks, non-leaf sinks, first children,
non-first children and leftmost paths. We have obtained formulas which count
the number of vertices that are reachable from the root, with respect to path
lengths (Proposition 3.2.1), non-leaf sinks (Proposition 3.3.1), leaf sinks (Propo-
sition 3.3.7), leftmost paths (Proposition 3.4.1), first children (Proposition 3.5.1),
and non-first children (Proposition 3.6.1). Further, we obtain the average number
of reachable vertices in a random tree.

4.2 Recommendations

We have enumerated labelled complete t-ary trees and found the counting for-
mulas for the number of vertices that are reachable from the root with respect
to number of vertices, first children, non-first children, non-leaf sinks and leaf
sinks. For further studies, we recommend that a similar study be conducted to

44
obtain the number of reachable vertices in t-ary trees whose vertices are labelled
with integers 1, 2 . . . , k such that if the right most child label j and its parent
label i then i ≤ j. These trees were introduced and studied by Panhozler and
Prodinger. Further, a similar study should be conducted so as to obtain a closed
formula for the exact number of trees in which a given number of vertices are
reachable from a specified root.

45
References

[1] E. Cotterill, Geometry of curves with exceptional secant planes: linear series
along the general curve, Math. Z., 267(3-4): 489-582, 2011.

[2] N. Dershowitz and S. Zaks, Enumerations of ordered trees, Discret. Math.,


31(1): 9-28, 1980.

[3] I. M. Gessel and R. P. Stanley, Algebraic Enumeration: Handbook of Combina-


torics, 2: 1021-1061, 1995.

[4] R. Diestel, Graph Theory, vol. 173, Graduate Texts in Mathematics, 3rd ed.
Springer-Verlag, Berlin, 2005.

[5] R. R. X. Du and J. Yin, Counting labelled trees with given indegree sequence,
J. Comb. Theory, Ser. A, 117(3): 345-353, 2010.

[6] K. O. Lumumba, I. O. Okoth and D. M. Kasyoki, Refined enumeration of


2-plane trees, Preprint, 2022.

[7] A. O. Nyariaro and I. O. Okoth, Reachability in labelled plane trees, Comm.


Adv. Mat. Sc. 5(2): 75 – 88, 2021.

[8] A. O. Nyariaro and I. O. Okoth, Reachability in labelled 2-plane trees,


Preprint, 2023.

[9] I. O. Okoth, Combinatorics of oriented trees and tree-like structures, PhD


Thesis, Stellenbosch University, 2015.

[10] I. O. Okoth and S. Wagner, Locally Oriented Noncrossing Trees, Electron. J.


Combin., 22(3), 2015.

46
[11] I. O. Okoth and A. O. Nyariaro, Reachability results in labelled t-ary trees,
Open J. Math. Sc, 5(1): 360-370, 2021.

[12] J. B. Remmel and S. G. Williamson, Spanning trees and function classes,


Electron. J. Combin., 9(1): 229–233, 2002.

[13] S. Seo and H. Shin, A refined enumeration of p-ary labelled trees, Korean J.
Math., 21(4): 495-502, 2013.

[14] Seo, Seunghyun, and Heesung Shin. ”A refinement for ordered labeled
trees.” arXiv preprint arXiv:1207.3291 (2012).

[15] R. P. Stanley, Enumerative Combinatorics. Vol. 2, volume 62 of Cambridge Stud-


ies in Advanced Mathematics. Cambridge University Press, Cambridge, 1999.

[16] H. S. Wilf, Generatingfunctionology, A. K. Peters, Ltd., Natick, MA, USA,


2006.

47

You might also like