diam about the number of vines on n nodes. tu delft
TRANSCRIPT
DIAM
About the number of vines on n nodes
About the number of vines on n nodes
TUDelft
TUDelft Outline of the talk
Introduction
The Prüfer code
Trees
Vines
Line Graph & Regular Vines
Some Results
Final Comments
TUDelft Enumeration Problems
How much free beer have you received since the age of
12?
Jedediah Buxton (1702-1772) British
5,116 pints (5 ounces a day in 56 years)
2,906 lt (142 ml a day in 56 years)
How many hairs are there in a cow’s tail?
Thomas Fuller (1710-1790) African shipped to US as
Slave
2,872
How many labeled trees are there on n nodes?
How many Vines are there on n nodes?
TUDelft Labeled Trees
A tree is a connected graph with no cycles
Cayley in 1889
# of isomers of hydrocarbons CnH2n+2
The number of labeled trees on n nodes is nn−2
Ernst Paul Heinz Prüfer (1896 - 1934)
Prüfer code (1918)
TUDelft The Prüfer code
Every sequence R = (a1, a2, ..., an−2) where
each ai is an integer not greater than n is a
Prüfer Code for some tree on n nodes.
Remove the endpoint with the smallest label and let a1 be the label of the unique node
which was adjacent to it. Delete endpoint & edge. Repeat this process to find a2, a3 and so
on until a tree on two nodes has been found.
R = (2, 2, 4, 5, 5)
The process may be reversed.
a1 = 2
a2 = 2
a3 = 4
a4 = 5
a5 = 5
TUDelft
R = (2, 2, 4, 5, 5) 7
2 2 4 5 5 7
1
2 2 4 5 5 7
1 3
2 2 4 5 5 7
1 3 2
2 2 4 5 5 7
1 3 2 4
2 2 4 5 5 7
1 3 2 4 6
2 2 4 5 5 7
1 3 2 4 6 5
The Extended Prüfer code
R = (a1, a2, ..., an−2)
Write the root in the right most position
of R.
Write another row of integers on the
bottom of R from left to right.
Each entry bi in this new row is the
smallest integer that has not been
already written in this new row (the row
of b’is) nor in the first row (the row of
a’is) in the position exactly above it or
every other position to the right
TUDelft Vines & Prüfer codes
TUDelft Vines & Prüfer codes
TUDelft Vines & Prüfer codes
TUDelft Trees and Vines
Number of Vines
With 7 nodes there are: 16,807 labeled trees
• 5.85 * # hairs in a cow’s tail
2,580,480 regular vines• 898.5 * # hairs in a cow’s tail• 153.5 * # labeled trees
130,691,232,000 vines• 45,505,303.6 * # hairs in a cow’s tail• 7,776,000 * # labeled trees• 50,646.1 * # regular vines
n
i
ii3
2
1.00E+00
1.00E+01
1.00E+02
1.00E+03
1.00E+04
1.00E+05
1.00E+06
1.00E+07
1.00E+08
1.00E+09
1.00E+10
1.00E+11
1.00E+12
0 1 2 3 4 5 6 7 8
# L Trees # R Vines # Vines
TUDelft Catalogue
n
i
ii3
2
TUDelft Regular Vines & the Line Graph
The line graph LG(G) of a graph G has as its nodes the edges of G, with
two nodes being adjacent if the corresponding edges are adjacent in G
1 2 3 4 5 6
2 2 4 5 5 7
1 3 2 4 6 5
TUDelft
A spanning subgraph T of a graph G is a subgraph with the same set of nodes as G. If T is a tree, it is called a spanning tree of G
1 2 3 4 5 6
2 2 4 5 5 7
1 3 2 4 6 5
Regular Vines & the Line Graph
TUDelft
1
2
3 4 6
5
1 2 3 4 5 6
2 2 4 5 5 7
1 3 2 4 6 5
1 2 3 4 5
3 3 4 4 6
1 2 3 5 4
1
2
3
4
5
Regular Vines & the Line Graph
TUDelft
1
2
3
4
2
3
4
1
1 2 3 4 5 6
2 2 4 5 5 7
1 3 2 4 6 5
1 2 3 4 5
3 3 4 4 6
1 2 3 5 4
1 2 3 4
1 3 3 5
2 1 4 3 1
24
3
Regular Vines & the Line Graph
TUDelft
2
3
4
1
1
2
3
4
2
3
4
1
Regular Vines & the Line Graph
TUDelft More Counts
1.00E+00
1.00E+03
1.00E+06
1.00E+09
1.00E+12
1.00E+15
1.00E+18
1.00E+21
1.00E+24
1.00E+27
1.00E+30
1.00E+33
0 1 2 3 4 5 6 7 8 9 10 11
non-isomorphic labelled trees regular vines vines
TUDelft Catalogue
TUDelft Catalogue
TUDelft Some results
If the first tree of a vine on n nodes has one node with maximal degree,
then the number of regular vines possible with this tree equals the
number of regular vines on (n-1) nodes.
Since every edge is adjacent in the tree is adjacent to each other then
the line graph of this tree is a complete graph on (n-1) that has (n-1) (n-1)-2
possible spanning trees with all regular vines on each tree being possible
TUDelft Some results
If the first tree of a vine on n nodes has (n-2) nodes with degree 2, then
the number of regular vines possible with this tree equals 1.
The line graph of this tree will also be a tree and hence it has only one
possible spanning tree.
TUDelft Final comments
Finding all possible spanning trees of a graph is not easy except if this graph is
the complete graph or a tree.
If vines on less than 6 nodes are required using only the Prüfer codes might be
better idea.
The number of non-regular vines is much larger than the number of regular
vines for n > 6 then using the line graph might become a better idea.
It is important to know not only how many spanning trees are there in the line
graph of a tree on n nodes but how many of each non-isomorphic tree on (n-1)
nodes to get the recursion.
There are a lot more regular vines on 6 or more nodes than hairs in a cow’s tail.
TUDelft
TUDelft
Construct all Prufer codes for the first tree in the vine.
The edges of each one of the nn−2 trees in the previous step become nodes
in the next tree. Hence, for each tree in the previous step:
Label the edges of each tree giving the label 1 to the edge appearing in the first
column in its extended Prufer code, 2 to the edge in the second column and so on
until all edges have been labeled
Construct all Prufer codes possible for this new tree and connect the new labeled
edges as nodes according to these new Prufer codes.
Repeat this process until two edges must be connected in the last tree. At
this point there is only one way to connect them and no Prufer code is
required.
Constructing all possible vines on n
nodes.
TUDelft
Construct all Prufer codes for the first tree in the vine.
The edges of each one of the nn−2 trees in the previous step become nodes in
the next tree. Hence, for each tree in the previous step:
Label the edges of each tree giving the label 1 to the edge appearing in the first
column in its extended Prufer code, 2 to the edge in the second column and so on
until all edges have been labeled
Construct the line graph of each one of the trees from step 2.
For each line graphs from step 3 find all possible spanning trees. Connect the
edges of each tree in step one according to all spanning trees from its line
graph.
Repeat this process until two edges must be connected in the last tree. At
this point there is only one way to connect them and no operation is required.
There are more regular vines on six nodes than hairs in a cow’s tail.
Constructing all possible vines on n
nodes.