Vertical Paths in Simple Varieties of Trees › keithc › files › Vertical-Paths-in-Simple... ·...
Transcript of Vertical Paths in Simple Varieties of Trees › keithc › files › Vertical-Paths-in-Simple... ·...
![Page 1: Vertical Paths in Simple Varieties of Trees › keithc › files › Vertical-Paths-in-Simple... · Introduction Vertical Paths Asymptotics Future Directions Simple Varieties of Trees](https://reader033.fdocuments.us/reader033/viewer/2022060410/5f105af57e708231d448b35d/html5/thumbnails/1.jpg)
Introduction Vertical Paths Asymptotics Future Directions
Vertical Paths in Simple Varieties of Trees
Keith Copenhaver
University of Florida
![Page 2: Vertical Paths in Simple Varieties of Trees › keithc › files › Vertical-Paths-in-Simple... · Introduction Vertical Paths Asymptotics Future Directions Simple Varieties of Trees](https://reader033.fdocuments.us/reader033/viewer/2022060410/5f105af57e708231d448b35d/html5/thumbnails/2.jpg)
Introduction Vertical Paths Asymptotics Future Directions
Simple Varieties of Trees
A graph G = (V ,E ) consists of a set of vertices V and a set of edges E .
Definition
A rooted tree is a connected graph without cycles with one vertexdistinguished as the root. A class of trees is called simple variety if thegenerating function for the number of trees on n vertices satisfies anequation of the form
T (x) = xφ(T (x)).
![Page 3: Vertical Paths in Simple Varieties of Trees › keithc › files › Vertical-Paths-in-Simple... · Introduction Vertical Paths Asymptotics Future Directions Simple Varieties of Trees](https://reader033.fdocuments.us/reader033/viewer/2022060410/5f105af57e708231d448b35d/html5/thumbnails/3.jpg)
Introduction Vertical Paths Asymptotics Future Directions
Motivation
Things modelled by rooted trees:
Computer network access
Social networks
Distribution networks
Rooted trees are also used as data structures.
![Page 4: Vertical Paths in Simple Varieties of Trees › keithc › files › Vertical-Paths-in-Simple... · Introduction Vertical Paths Asymptotics Future Directions Simple Varieties of Trees](https://reader033.fdocuments.us/reader033/viewer/2022060410/5f105af57e708231d448b35d/html5/thumbnails/4.jpg)
Introduction Vertical Paths Asymptotics Future Directions
A Few Simple Varieties of Trees
T (x) = xφ(T (x)).
General trees: unlabeled, plane, any number of children.
T (x) = x1
1− T (x).
Motzkin trees: unlabeled, plane, 0, 1, or 2 children.T (x) = x(1 + T (x) + T (x)2)
Binary trees: unlabeled, plane, children are designated left or right,0, 1, or 2 children. T (x) = x(1 + 2T (x) + T (x)2).
Cayley trees: labeled, nonplane, any number of children.T (x) = xeT (x).
![Page 5: Vertical Paths in Simple Varieties of Trees › keithc › files › Vertical-Paths-in-Simple... · Introduction Vertical Paths Asymptotics Future Directions Simple Varieties of Trees](https://reader033.fdocuments.us/reader033/viewer/2022060410/5f105af57e708231d448b35d/html5/thumbnails/5.jpg)
Introduction Vertical Paths Asymptotics Future Directions
A Few Simple Varieties of Trees
T (x) = xφ(T (x)).
General trees: unlabeled, plane, any number of children.
T (x) = x1
1− T (x).
Motzkin trees: unlabeled, plane, 0, 1, or 2 children.T (x) = x(1 + T (x) + T (x)2)
Binary trees: unlabeled, plane, children are designated left or right,0, 1, or 2 children. T (x) = x(1 + 2T (x) + T (x)2).
Cayley trees: labeled, nonplane, any number of children.T (x) = xeT (x).
![Page 6: Vertical Paths in Simple Varieties of Trees › keithc › files › Vertical-Paths-in-Simple... · Introduction Vertical Paths Asymptotics Future Directions Simple Varieties of Trees](https://reader033.fdocuments.us/reader033/viewer/2022060410/5f105af57e708231d448b35d/html5/thumbnails/6.jpg)
Introduction Vertical Paths Asymptotics Future Directions
A Few Simple Varieties of Trees
T (x) = xφ(T (x)).
General trees: unlabeled, plane, any number of children.
T (x) = x1
1− T (x).
Motzkin trees: unlabeled, plane, 0, 1, or 2 children.T (x) = x(1 + T (x) + T (x)2)
Binary trees: unlabeled, plane, children are designated left or right,0, 1, or 2 children. T (x) = x(1 + 2T (x) + T (x)2).
Cayley trees: labeled, nonplane, any number of children.T (x) = xeT (x).
![Page 7: Vertical Paths in Simple Varieties of Trees › keithc › files › Vertical-Paths-in-Simple... · Introduction Vertical Paths Asymptotics Future Directions Simple Varieties of Trees](https://reader033.fdocuments.us/reader033/viewer/2022060410/5f105af57e708231d448b35d/html5/thumbnails/7.jpg)
Introduction Vertical Paths Asymptotics Future Directions
A Few Simple Varieties of Trees
T (x) = xφ(T (x)).
General trees: unlabeled, plane, any number of children.
T (x) = x1
1− T (x).
Motzkin trees: unlabeled, plane, 0, 1, or 2 children.T (x) = x(1 + T (x) + T (x)2)
Binary trees: unlabeled, plane, children are designated left or right,0, 1, or 2 children. T (x) = x(1 + 2T (x) + T (x)2).
Cayley trees: labeled, nonplane, any number of children.T (x) = xeT (x).
![Page 8: Vertical Paths in Simple Varieties of Trees › keithc › files › Vertical-Paths-in-Simple... · Introduction Vertical Paths Asymptotics Future Directions Simple Varieties of Trees](https://reader033.fdocuments.us/reader033/viewer/2022060410/5f105af57e708231d448b35d/html5/thumbnails/8.jpg)
Introduction Vertical Paths Asymptotics Future Directions
A Few Simple Varieties of Trees
T (x) = xφ(T (x)).
General trees: unlabeled, plane, any number of children.
T (x) = x1
1− T (x).
Motzkin trees: unlabeled, plane, 0, 1, or 2 children.T (x) = x(1 + T (x) + T (x)2)
Binary trees: unlabeled, plane, children are designated left or right,0, 1, or 2 children. T (x) = x(1 + 2T (x) + T (x)2).
Cayley trees: labeled, nonplane, any number of children.T (x) = xeT (x).
![Page 9: Vertical Paths in Simple Varieties of Trees › keithc › files › Vertical-Paths-in-Simple... · Introduction Vertical Paths Asymptotics Future Directions Simple Varieties of Trees](https://reader033.fdocuments.us/reader033/viewer/2022060410/5f105af57e708231d448b35d/html5/thumbnails/9.jpg)
Introduction Vertical Paths Asymptotics Future Directions
Some Traits of Trees/Vertices
The height of a tree is the distance from the root to the furthestvertex plus one.
The rank/protection number of a vertex is the shortest distancefrom that vertex to its closest descendant leaf.
A tree or vertex is balanced if its height is one greater than its rank.
![Page 10: Vertical Paths in Simple Varieties of Trees › keithc › files › Vertical-Paths-in-Simple... · Introduction Vertical Paths Asymptotics Future Directions Simple Varieties of Trees](https://reader033.fdocuments.us/reader033/viewer/2022060410/5f105af57e708231d448b35d/html5/thumbnails/10.jpg)
Introduction Vertical Paths Asymptotics Future Directions
Some Traits of Trees/Vertices
The height of a tree is the distance from the root to the furthestvertex plus one.
The rank/protection number of a vertex is the shortest distancefrom that vertex to its closest descendant leaf.
A tree or vertex is balanced if its height is one greater than its rank.
![Page 11: Vertical Paths in Simple Varieties of Trees › keithc › files › Vertical-Paths-in-Simple... · Introduction Vertical Paths Asymptotics Future Directions Simple Varieties of Trees](https://reader033.fdocuments.us/reader033/viewer/2022060410/5f105af57e708231d448b35d/html5/thumbnails/11.jpg)
Introduction Vertical Paths Asymptotics Future Directions
Some Traits of Trees/Vertices
The height of a tree is the distance from the root to the furthestvertex plus one.
The rank/protection number of a vertex is the shortest distancefrom that vertex to its closest descendant leaf.
A tree or vertex is balanced if its height is one greater than its rank.
![Page 12: Vertical Paths in Simple Varieties of Trees › keithc › files › Vertical-Paths-in-Simple... · Introduction Vertical Paths Asymptotics Future Directions Simple Varieties of Trees](https://reader033.fdocuments.us/reader033/viewer/2022060410/5f105af57e708231d448b35d/html5/thumbnails/12.jpg)
Introduction Vertical Paths Asymptotics Future Directions
Previous Results
Theorem (Flajolet and Odlyzko, 1981)
The expected height of any simple variety of tree is asymptotically k√πn
for some k > 0.
Theorem (Flajolet and Sedgewick, 2009)
The sum of the lengths of paths where the root is one endpoint is oforder n3/2.
![Page 13: Vertical Paths in Simple Varieties of Trees › keithc › files › Vertical-Paths-in-Simple... · Introduction Vertical Paths Asymptotics Future Directions Simple Varieties of Trees](https://reader033.fdocuments.us/reader033/viewer/2022060410/5f105af57e708231d448b35d/html5/thumbnails/13.jpg)
Introduction Vertical Paths Asymptotics Future Directions
Previous Results
Theorem (Flajolet and Odlyzko, 1981)
The expected height of any simple variety of tree is asymptotically k√πn
for some k > 0.
Theorem (Flajolet and Sedgewick, 2009)
The sum of the lengths of paths where the root is one endpoint is oforder n3/2.
![Page 14: Vertical Paths in Simple Varieties of Trees › keithc › files › Vertical-Paths-in-Simple... · Introduction Vertical Paths Asymptotics Future Directions Simple Varieties of Trees](https://reader033.fdocuments.us/reader033/viewer/2022060410/5f105af57e708231d448b35d/html5/thumbnails/14.jpg)
Introduction Vertical Paths Asymptotics Future Directions
Previous Results
Theorem (C, 2016)
The expected rank of the root of a uniformly chosen general treeapproaches
∞∑k=1
9
41−k + 4 + 4k≈ 1.62297.
The expected rank of a uniformly chosen vertex in a uniformly chosengeneral tree approaches
∞∑k=1
3
4k + 2≈ 0.727649.
![Page 15: Vertical Paths in Simple Varieties of Trees › keithc › files › Vertical-Paths-in-Simple... · Introduction Vertical Paths Asymptotics Future Directions Simple Varieties of Trees](https://reader033.fdocuments.us/reader033/viewer/2022060410/5f105af57e708231d448b35d/html5/thumbnails/15.jpg)
Introduction Vertical Paths Asymptotics Future Directions
Counting Leaves
Proposition
Let T (x) be the generating function for the number of trees on n verticesin some simple variety of trees, and let L(x) be the generating functionfor the number of trees with a marked leaf in the same family. Then
L(x) =x2T ′(x)
T (x).
It suffices to show that there is a bijection between trees with a markedvertex and pairs of trees and trees with a marked leaf with one vertexremoved. This would show that
xT ′(x) = V (x) =T (x)L(x)
x.
![Page 16: Vertical Paths in Simple Varieties of Trees › keithc › files › Vertical-Paths-in-Simple... · Introduction Vertical Paths Asymptotics Future Directions Simple Varieties of Trees](https://reader033.fdocuments.us/reader033/viewer/2022060410/5f105af57e708231d448b35d/html5/thumbnails/16.jpg)
Introduction Vertical Paths Asymptotics Future Directions
Counting Leaves
Proof.
×
![Page 17: Vertical Paths in Simple Varieties of Trees › keithc › files › Vertical-Paths-in-Simple... · Introduction Vertical Paths Asymptotics Future Directions Simple Varieties of Trees](https://reader033.fdocuments.us/reader033/viewer/2022060410/5f105af57e708231d448b35d/html5/thumbnails/17.jpg)
Introduction Vertical Paths Asymptotics Future Directions
Counting Paths
Paths from the root: V (x)− T (x)
Paths from the root to a leaf: L(x)− x
Any vertical path: L(x)x (V (x)− T (x))
Vertical paths that end in a leaf: L(x)x (L(x)− x)
Edges in paths from the root: L(x)x (V (x)− T (x))
![Page 18: Vertical Paths in Simple Varieties of Trees › keithc › files › Vertical-Paths-in-Simple... · Introduction Vertical Paths Asymptotics Future Directions Simple Varieties of Trees](https://reader033.fdocuments.us/reader033/viewer/2022060410/5f105af57e708231d448b35d/html5/thumbnails/18.jpg)
Introduction Vertical Paths Asymptotics Future Directions
Counting Paths
Paths from the root: V (x)− T (x)
Paths from the root to a leaf: L(x)− x
Any vertical path: L(x)x (V (x)− T (x))
Vertical paths that end in a leaf: L(x)x (L(x)− x)
Edges in paths from the root: L(x)x (V (x)− T (x))
![Page 19: Vertical Paths in Simple Varieties of Trees › keithc › files › Vertical-Paths-in-Simple... · Introduction Vertical Paths Asymptotics Future Directions Simple Varieties of Trees](https://reader033.fdocuments.us/reader033/viewer/2022060410/5f105af57e708231d448b35d/html5/thumbnails/19.jpg)
Introduction Vertical Paths Asymptotics Future Directions
Counting Paths
Paths from the root: V (x)− T (x)
Paths from the root to a leaf: L(x)− x
Any vertical path: L(x)x (V (x)− T (x))
Vertical paths that end in a leaf: L(x)x (L(x)− x)
Edges in paths from the root: L(x)x (V (x)− T (x))
![Page 20: Vertical Paths in Simple Varieties of Trees › keithc › files › Vertical-Paths-in-Simple... · Introduction Vertical Paths Asymptotics Future Directions Simple Varieties of Trees](https://reader033.fdocuments.us/reader033/viewer/2022060410/5f105af57e708231d448b35d/html5/thumbnails/20.jpg)
Introduction Vertical Paths Asymptotics Future Directions
Counting Paths
Paths from the root: V (x)− T (x)
Paths from the root to a leaf: L(x)− x
Any vertical path: L(x)x (V (x)− T (x))
Vertical paths that end in a leaf: L(x)x (L(x)− x)
Edges in paths from the root: L(x)x (V (x)− T (x))
![Page 21: Vertical Paths in Simple Varieties of Trees › keithc › files › Vertical-Paths-in-Simple... · Introduction Vertical Paths Asymptotics Future Directions Simple Varieties of Trees](https://reader033.fdocuments.us/reader033/viewer/2022060410/5f105af57e708231d448b35d/html5/thumbnails/21.jpg)
Introduction Vertical Paths Asymptotics Future Directions
Counting Paths
Paths from the root: V (x)− T (x)
Paths from the root to a leaf: L(x)− x
Any vertical path: L(x)x (V (x)− T (x))
Vertical paths that end in a leaf: L(x)x (L(x)− x)
Edges in paths from the root: L(x)x (V (x)− T (x))
![Page 22: Vertical Paths in Simple Varieties of Trees › keithc › files › Vertical-Paths-in-Simple... · Introduction Vertical Paths Asymptotics Future Directions Simple Varieties of Trees](https://reader033.fdocuments.us/reader033/viewer/2022060410/5f105af57e708231d448b35d/html5/thumbnails/22.jpg)
Introduction Vertical Paths Asymptotics Future Directions
Higher Moments
Consider the generating function
(L(x)
x
)k
(V (x)− T (x)).
![Page 23: Vertical Paths in Simple Varieties of Trees › keithc › files › Vertical-Paths-in-Simple... · Introduction Vertical Paths Asymptotics Future Directions Simple Varieties of Trees](https://reader033.fdocuments.us/reader033/viewer/2022060410/5f105af57e708231d448b35d/html5/thumbnails/23.jpg)
Introduction Vertical Paths Asymptotics Future Directions
Higher Moments
Consider the generating function
(L(x)
x
)k
(V (x)− T (x)).
1
![Page 24: Vertical Paths in Simple Varieties of Trees › keithc › files › Vertical-Paths-in-Simple... · Introduction Vertical Paths Asymptotics Future Directions Simple Varieties of Trees](https://reader033.fdocuments.us/reader033/viewer/2022060410/5f105af57e708231d448b35d/html5/thumbnails/24.jpg)
Introduction Vertical Paths Asymptotics Future Directions
Higher Moments
Consider the generating function
(L(x)
x
)k
(V (x)− T (x)).
1
![Page 25: Vertical Paths in Simple Varieties of Trees › keithc › files › Vertical-Paths-in-Simple... · Introduction Vertical Paths Asymptotics Future Directions Simple Varieties of Trees](https://reader033.fdocuments.us/reader033/viewer/2022060410/5f105af57e708231d448b35d/html5/thumbnails/25.jpg)
Introduction Vertical Paths Asymptotics Future Directions
Higher Moments
Consider the generating function
(L(x)
x
)k
(V (x)− T (x)).
1
![Page 26: Vertical Paths in Simple Varieties of Trees › keithc › files › Vertical-Paths-in-Simple... · Introduction Vertical Paths Asymptotics Future Directions Simple Varieties of Trees](https://reader033.fdocuments.us/reader033/viewer/2022060410/5f105af57e708231d448b35d/html5/thumbnails/26.jpg)
Introduction Vertical Paths Asymptotics Future Directions
Higher Moments
Consider the generating function
(L(x)
x
)k
(V (x)− T (x)).
1
3
0
![Page 27: Vertical Paths in Simple Varieties of Trees › keithc › files › Vertical-Paths-in-Simple... · Introduction Vertical Paths Asymptotics Future Directions Simple Varieties of Trees](https://reader033.fdocuments.us/reader033/viewer/2022060410/5f105af57e708231d448b35d/html5/thumbnails/27.jpg)
Introduction Vertical Paths Asymptotics Future Directions
Higher Moments
Consider the generating function
(L(x)
x
)k
(V (x)− T (x)).
1
3
0
1
![Page 28: Vertical Paths in Simple Varieties of Trees › keithc › files › Vertical-Paths-in-Simple... · Introduction Vertical Paths Asymptotics Future Directions Simple Varieties of Trees](https://reader033.fdocuments.us/reader033/viewer/2022060410/5f105af57e708231d448b35d/html5/thumbnails/28.jpg)
Introduction Vertical Paths Asymptotics Future Directions
Higher Moments
Proposition
The generating function
(L(x)
x
)k
(V (x)− T (x)) counts the number of
paths in all trees of some variety on n vertices, with each path weightedby the number of k element multi-sets of the edges.
Proposition
The generating function for the number of paths from the root in alltrees of some variety on n vertices, with each path weighted by the lengthof the path to the kth power is a polynomial of degree k of the form(
k!
(L(x)
x
)k
− k!(k − 1)
2
(L(x)
x
)k−1+ Qk
(L(x)
x
))(V (x)− T (x)),
where Qk(x) is a polynomial in L(x)x of degree k − 2 or less.
![Page 29: Vertical Paths in Simple Varieties of Trees › keithc › files › Vertical-Paths-in-Simple... · Introduction Vertical Paths Asymptotics Future Directions Simple Varieties of Trees](https://reader033.fdocuments.us/reader033/viewer/2022060410/5f105af57e708231d448b35d/html5/thumbnails/29.jpg)
Introduction Vertical Paths Asymptotics Future Directions
Higher Moments
Proof.
Let the length of a given path be `. Then in the generating function(L(x)
x
)k
(V (x)− T (x)) has weight(`+k−1
k
)= 1
k!
(`k − k(k−1)
2 `k−1 + ...), this gives the leading coefficient.
Proceeding by induction, we can remove the lower order terms bysubtracting lower order polynomials.
![Page 30: Vertical Paths in Simple Varieties of Trees › keithc › files › Vertical-Paths-in-Simple... · Introduction Vertical Paths Asymptotics Future Directions Simple Varieties of Trees](https://reader033.fdocuments.us/reader033/viewer/2022060410/5f105af57e708231d448b35d/html5/thumbnails/30.jpg)
Introduction Vertical Paths Asymptotics Future Directions
Higher Moments
Proof.
Let the length of a given path be `. Then in the generating function(L(x)
x
)k
(V (x)− T (x)) has weight(`+k−1
k
)= 1
k!
(`k − k(k−1)
2 `k−1 + ...), this gives the leading coefficient.
Proceeding by induction, we can remove the lower order terms bysubtracting lower order polynomials.
![Page 31: Vertical Paths in Simple Varieties of Trees › keithc › files › Vertical-Paths-in-Simple... · Introduction Vertical Paths Asymptotics Future Directions Simple Varieties of Trees](https://reader033.fdocuments.us/reader033/viewer/2022060410/5f105af57e708231d448b35d/html5/thumbnails/31.jpg)
Introduction Vertical Paths Asymptotics Future Directions
Asymptotics
In any simple variety of tree,
T (x) = a0 − a1
√1− x
ρ+ a2
(1− x
ρ
)+ O
((1− x
ρ
)3/2),
with a0, a1 > 0.
V (x) =a1
2√
1− xρ
− a2 + O
(√1− x
ρ
),
L(x)
x=
a1
2a0√
1− xρ
+
(a21 − 2a0a2
)2a20
+ O
(√1− x
ρ
).
![Page 32: Vertical Paths in Simple Varieties of Trees › keithc › files › Vertical-Paths-in-Simple... · Introduction Vertical Paths Asymptotics Future Directions Simple Varieties of Trees](https://reader033.fdocuments.us/reader033/viewer/2022060410/5f105af57e708231d448b35d/html5/thumbnails/32.jpg)
Introduction Vertical Paths Asymptotics Future Directions
Asymptotics
Let X (n) be the r.v. whose value is the length of a uniformly randomlyselected path from the root of a tree on n vertices to any vertex. Thenwe can compute
E[X (n)k ] = nk/2
((a1a0
)k
Γ
(k
2+ 1
)−
ak−11
((k + 1)a20 + 2a2(k + 1)a0 − a21k
)k(k − 1)Γ
(k−12
)4ak+1
0
√n
)+ O
(nk/2−1
),
as well as corresponding expectations for three other variations of verticalpaths.
![Page 33: Vertical Paths in Simple Varieties of Trees › keithc › files › Vertical-Paths-in-Simple... · Introduction Vertical Paths Asymptotics Future Directions Simple Varieties of Trees](https://reader033.fdocuments.us/reader033/viewer/2022060410/5f105af57e708231d448b35d/html5/thumbnails/33.jpg)
Introduction Vertical Paths Asymptotics Future Directions
Asymptotics
In the family of Cayley trees a0 = 1, a1 =√
2, a2 = 23 . The expected
length of a path from
the root to any vertex:
√πn
2− 4
3.
the root to any leaf:
√πn
2− 1
3.
any vertex to any of its descendants:
√2n
π+
8
3π− 1.
any vertex to any of its descendant leaves:
√2n
π+
2
3π.
These trends are universal, if done with general terms, fixing a type of
top point, leaves are a constant further away (a212a20
with roots,a21(π−2)2a20(π)
with vertices) plus an error term, fixing a type of bottom point, roots arefurther by a factor of π
2 plus an error term (which depends on the type oftree).
![Page 34: Vertical Paths in Simple Varieties of Trees › keithc › files › Vertical-Paths-in-Simple... · Introduction Vertical Paths Asymptotics Future Directions Simple Varieties of Trees](https://reader033.fdocuments.us/reader033/viewer/2022060410/5f105af57e708231d448b35d/html5/thumbnails/34.jpg)
Introduction Vertical Paths Asymptotics Future Directions
Asymptotics
In the family of Cayley trees a0 = 1, a1 =√
2, a2 = 23 . The expected
length of a path from
the root to any vertex:
√πn
2− 4
3.
the root to any leaf:
√πn
2− 1
3.
any vertex to any of its descendants:
√2n
π+
8
3π− 1.
any vertex to any of its descendant leaves:
√2n
π+
2
3π.
These trends are universal, if done with general terms, fixing a type of
top point, leaves are a constant further away (a212a20
with roots,a21(π−2)2a20(π)
with vertices) plus an error term, fixing a type of bottom point, roots arefurther by a factor of π
2 plus an error term (which depends on the type oftree).
![Page 35: Vertical Paths in Simple Varieties of Trees › keithc › files › Vertical-Paths-in-Simple... · Introduction Vertical Paths Asymptotics Future Directions Simple Varieties of Trees](https://reader033.fdocuments.us/reader033/viewer/2022060410/5f105af57e708231d448b35d/html5/thumbnails/35.jpg)
Introduction Vertical Paths Asymptotics Future Directions
Related Problems
Expected length of paths from the root to a leaf in various families
Bijective proofs of correspondence between all paths and verticalpaths