Tree
Tree
Juhi Kesarwani & Ashish Kumar Kesarwany (VITB) Trees and Fundamental circuits April 12, 2024 1/1
Table of Contents
Juhi Kesarwani & Ashish Kumar Kesarwany (VITB) Trees and Fundamental circuits April 12, 2024 2/1
Definition (Trees)
A tree is a connected graph without any circuits. The following graph, for instance,
is a tree.
u x
Figure 1: Tree.
Juhi Kesarwani & Ashish Kumar Kesarwany (VITB) Trees and Fundamental circuits April 12, 2024 3/1
Definition (Trees)
A tree is a connected graph without any circuits. The following graph, for instance,
is a tree.
u x
Figure 1: Tree.
Note
A tree is simple graph, that is, having neither a self-loop nor parallel edges.
Juhi Kesarwani & Ashish Kumar Kesarwany (VITB) Trees and Fundamental circuits April 12, 2024 3/1
Example
Trees with one, two, three, and four vertices are shown below:
Juhi Kesarwani & Ashish Kumar Kesarwany (VITB) Trees and Fundamental circuits April 12, 2024 4/1
Example
A river with its tributaries and subtributaries can be represented by a tree.
The sorting of mail according to zip code is done according to a tree (called
decision tree or sorting tree).
Figure ?? represents the flow of mail. All the mail arrives at some local office,
vertex N. The most significant digit in the zip code is read at N, and the
mail is divided into 10 piles N1 , N2 ,. . . ,N9 , and N0 , depending on the most
significant digit. Each pile is further divided into 10 piles according to the
second most significant digit, and so on, till the mail is subdivided into 105
possible piles, each representing a unique five-digit zip code.
Juhi Kesarwani & Ashish Kumar Kesarwany (VITB) Trees and Fundamental circuits April 12, 2024 5/1
Figure 3: Decision tree.
Juhi Kesarwani & Ashish Kumar Kesarwany (VITB) Trees and Fundamental circuits April 12, 2024 6/1
Some Properties of trees
☞ There is one and only one path between every pair of vertices in a tree, T .
Juhi Kesarwani & Ashish Kumar Kesarwany (VITB) Trees and Fundamental circuits April 12, 2024 7/1
Some Properties of trees
☞ There is one and only one path between every pair of vertices in a tree, T .
☞ If in a graph G there is one and only one path between every pair of vertices,
G is a tree.
Juhi Kesarwani & Ashish Kumar Kesarwany (VITB) Trees and Fundamental circuits April 12, 2024 7/1
Some Properties of trees
☞ There is one and only one path between every pair of vertices in a tree, T .
☞ If in a graph G there is one and only one path between every pair of vertices,
G is a tree.
Juhi Kesarwani & Ashish Kumar Kesarwany (VITB) Trees and Fundamental circuits April 12, 2024 7/1
Some Properties of trees
☞ There is one and only one path between every pair of vertices in a tree, T .
☞ If in a graph G there is one and only one path between every pair of vertices,
G is a tree.
Juhi Kesarwani & Ashish Kumar Kesarwany (VITB) Trees and Fundamental circuits April 12, 2024 7/1
Some Properties of trees
☞ There is one and only one path between every pair of vertices in a tree, T .
☞ If in a graph G there is one and only one path between every pair of vertices,
G is a tree.
Juhi Kesarwani & Ashish Kumar Kesarwany (VITB) Trees and Fundamental circuits April 12, 2024 7/1
Some Properties of trees
☞ There is one and only one path between every pair of vertices in a tree, T .
☞ If in a graph G there is one and only one path between every pair of vertices,
G is a tree.
Juhi Kesarwani & Ashish Kumar Kesarwany (VITB) Trees and Fundamental circuits April 12, 2024 7/1
Some Properties of trees
☞ There is one and only one path between every pair of vertices in a tree, T .
☞ If in a graph G there is one and only one path between every pair of vertices,
G is a tree.
☞ In any tree (with two or more vertices), there are at least two pendant vertices.
Juhi Kesarwani & Ashish Kumar Kesarwany (VITB) Trees and Fundamental circuits April 12, 2024 7/1
Example
A graph G has ten vertices and twelve edges. Is it a tree?
Juhi Kesarwani & Ashish Kumar Kesarwany (VITB) Trees and Fundamental circuits April 12, 2024 8/1
Example
A graph G has ten vertices and twelve edges. Is it a tree?
Solution
No. Because, we know that any tree with ten vertices has nine edges, not twelve.
Juhi Kesarwani & Ashish Kumar Kesarwany (VITB) Trees and Fundamental circuits April 12, 2024 8/1
Example
Find all nonisomorphic trees with four vertices.
Juhi Kesarwani & Ashish Kumar Kesarwany (VITB) Trees and Fundamental circuits April 12, 2024 9/1
Example
Find all nonisomorphic trees with four vertices.
Solution
We know that any tree with four vertices has three edges. Thus, by handshaking
theorem, the total degree of a tree with four vertices must be 6. Also, every tree
with more than one vertex has at least two vertices of degree 1. Thus the following
combinations of degrees for the vertices are the only ones possible:
1, 1, 1, 3 and 1, 1, 2, 2.
There are two nonisomorphic trees corresponding to both of these possibilities, as
shown below.
Juhi Kesarwani & Ashish Kumar Kesarwany (VITB) Trees and Fundamental circuits April 12, 2024 9/1
Example
Give an example of a graph with five vertices and four edges that is not a tree.
Juhi Kesarwani & Ashish Kumar Kesarwany (VITB) Trees and Fundamental circuits April 12, 2024 10 / 1
Example
Give an example of a graph with five vertices and four edges that is not a tree.
Solution
Such a graph cannot be connected because we know that Any connected graph
with n vertices and n − 1 edges is a tree. One example of such a disconnected
graph is shown below.
Juhi Kesarwani & Ashish Kumar Kesarwany (VITB) Trees and Fundamental circuits April 12, 2024 10 / 1
Exercise 1:
In each of the following, either draw a graph with the given specifications or explain
why no such graph exists.
(a) Tree, nine vertices, nine edges
(b) Graph, connected, nine vertices, nine edges
(c) Graph, circuit-free, nine vertices, six edges
(d) Tree, six vertices, total degree 14
(e) Tree, five vertices, total degree 8
(f) Graph, connected, six vertices, five edges, has a nontrivial circuit
(g) Graph, two vertices, one edge, not a tree
(h) Graph, circuit-free, seven vertices, four edges
(i) Tree, twelve vertices, fifteen edges
(j) Graph, six vertices, five edges, not a tree
(k) Tree, five vertices, total degree 10
(l) Graph, connected, ten vertices, nine edges, has a nontrivial circuit
(m) Simple graph, connected, six vertices, six edges
(n) Tree, ten vertices, total degree 24
Juhi Kesarwani & Ashish Kumar Kesarwany (VITB) Trees and Fundamental circuits April 12, 2024 11 / 1
Exercise 2:
Answer the following:
(a) A connected graph has twelve vertices and eleven edges. Does it have a vertex
of degree 1? Why?
(b) A connected graph has nine vertices and twelve edges. Does it have a nontrivial
circuit? Why?
(c) Suppose that v is a vertex of degree 1 in a connected graph G and that e is
the edge incident on v . Let G be the subgraph of G obtained by removing v
and e from G . Must G be connected? Why?
(d) A graph has eight vertices and six edges. Is it connected? Why?
Juhi Kesarwani & Ashish Kumar Kesarwany (VITB) Trees and Fundamental circuits April 12, 2024 12 / 1
Distance and centers in tree
Definition (Distance)
In a connected graph G , the distance d(vi , vj ) between two of its vertices vi and vj
is the length of the shortest path (i.e., the number of edges in the shortest path)
between them.
Juhi Kesarwani & Ashish Kumar Kesarwany (VITB) Trees and Fundamental circuits April 12, 2024 13 / 1
Distance and centers in tree
Definition (Distance)
In a connected graph G , the distance d(vi , vj ) between two of its vertices vi and vj
is the length of the shortest path (i.e., the number of edges in the shortest path)
between them.
Note
The definition of distance between any two vertices is valid for any connected graph
(not necessarily a tree). In a graph that is not a tree, there are generally several
paths between a pair of vertices. We have to enumerate all these paths and find
the length of the shortest one. (There may be several shortest paths.)
Juhi Kesarwani & Ashish Kumar Kesarwany (VITB) Trees and Fundamental circuits April 12, 2024 13 / 1
Example
For instance, some of the paths between vertices v1 and v2 in Fig. ?? are (a, e),
(a, c, f ), (b, c, e), (b, f ), (b, g , h), and (b, g , i, k). There are two shortest paths
(a, e) and (b, f ), each of length two. Hence d(v1 , v2 ) = 2.
Juhi Kesarwani & Ashish Kumar Kesarwany (VITB) Trees and Fundamental circuits April 12, 2024 14 / 1
Remark
In a tree, since there is exactly one path between any two vertices, the determination
of distance is much easier.
Juhi Kesarwani & Ashish Kumar Kesarwany (VITB) Trees and Fundamental circuits April 12, 2024 15 / 1
Remark
In a tree, since there is exactly one path between any two vertices, the determination
of distance is much easier.
Example
For instance, in the tree of Fig. ??, d(a, b) = 1, d(a, c) = 2, d(c, b) = 1.
Figure 5: Tree
Juhi Kesarwani & Ashish Kumar Kesarwany (VITB) Trees and Fundamental circuits April 12, 2024 15 / 1
Remark
The distance between vertices of a connected graph satisfies the following
conditions:
Juhi Kesarwani & Ashish Kumar Kesarwany (VITB) Trees and Fundamental circuits April 12, 2024 16 / 1
Remark
The distance between vertices of a connected graph satisfies the following
conditions:
Juhi Kesarwani & Ashish Kumar Kesarwany (VITB) Trees and Fundamental circuits April 12, 2024 16 / 1
Remark
The distance between vertices of a connected graph satisfies the following
conditions:
Juhi Kesarwani & Ashish Kumar Kesarwany (VITB) Trees and Fundamental circuits April 12, 2024 16 / 1
Center of a graph
Definition(Center of a graph)
The eccentricity E (v ) of a vertex v in a graph G is the distance from v to the
vertex farthest from v in G ; that is,
E (v ) = max d(v , vi )
vi ∈V (G )
Juhi Kesarwani & Ashish Kumar Kesarwany (VITB) Trees and Fundamental circuits April 12, 2024 17 / 1
Example
The eccentricities of the four vertices in Fig. ?? are E (a) = 2, E (b) = 1,
E (c) = 2, and E (d) = 2. Hence vertex b is the center of this tree.
Figure 6: Tree
Juhi Kesarwani & Ashish Kumar Kesarwany (VITB) Trees and Fundamental circuits April 12, 2024 18 / 1
Example
The following tree has two vertices having the same minimum eccentricity. Hence
this tree has two centers.
E (a) = 3
E (b) = 2
E (c) = 3
E (d) = 2
E (e) = 3
E (f ) = 3
Juhi Kesarwani & Ashish Kumar Kesarwany (VITB) Trees and Fundamental circuits April 12, 2024 19 / 1
Example
What is/are center/s in the following tree.
(a)
Juhi Kesarwani & Ashish Kumar Kesarwany (VITB) Trees and Fundamental circuits April 12, 2024 20 / 1
Ans:
Juhi Kesarwani & Ashish Kumar Kesarwany (VITB) Trees and Fundamental circuits April 12, 2024 21 / 1
(b)
Juhi Kesarwani & Ashish Kumar Kesarwany (VITB) Trees and Fundamental circuits April 12, 2024 22 / 1
(b)
Ans:
Juhi Kesarwani & Ashish Kumar Kesarwany (VITB) Trees and Fundamental circuits April 12, 2024 22 / 1
(c)
Juhi Kesarwani & Ashish Kumar Kesarwany (VITB) Trees and Fundamental circuits April 12, 2024 23 / 1
(c)
Ans:
(d)
Juhi Kesarwani & Ashish Kumar Kesarwany (VITB) Trees and Fundamental circuits April 12, 2024 23 / 1
(c)
Ans:
(d)
Ans:
Juhi Kesarwani & Ashish Kumar Kesarwany (VITB) Trees and Fundamental circuits April 12, 2024 23 / 1
Theorem
Every tree has either one or two centers.
Juhi Kesarwani & Ashish Kumar Kesarwany (VITB) Trees and Fundamental circuits April 12, 2024 24 / 1
Theorem
Every tree has either one or two centers.
Theorem
If a tree T has two centers, the two centers must be adjacent.
Juhi Kesarwani & Ashish Kumar Kesarwany (VITB) Trees and Fundamental circuits April 12, 2024 24 / 1
Definition(Radius and Diameter)
The eccentricity of a center (which is the distance from the center of the tree to
the farthest vertex) in a tree is defined as the radius of the tree. The diameter of
a tree T , on the other hand, is defined as the length of the longest path in T . A
radius in a tree is not necessarily half its diameter.
Juhi Kesarwani & Ashish Kumar Kesarwany (VITB) Trees and Fundamental circuits April 12, 2024 25 / 1
V3 V4
heFind
eccentricity
the eccentricity ofof
all all vertices, radius, diameter and
Exercise 3:
vertices, radius, diameter and centre of the graph given
ven that
below. It isthe
given distance between
that the distance between anyany two adjacent
two adjacent vertices is 1. vertic
Juhi Kesarwani & Ashish Kumar Kesarwany (VITB) Trees and Fundamental circuits April 12, 2024 27 / 1
Rooted tree
Definition(Rooted tree)
A tree in which one vertex (called the root) is distinguished from all the others is
called a rooted tree. In other words, a rooted tree is a tree in which one vertex has
been designated as the root and every edge is directed away from the root.
Example
All rooted trees with four vertices are shown in Fig. ??.
Level of a vertex: The level of a vertex is the number of edges along the unique
path between it and the root.
Juhi Kesarwani & Ashish Kumar Kesarwany (VITB) Trees and Fundamental circuits April 12, 2024 28 / 1
Fundamental terminologies
Level of a vertex: The level of a vertex is the number of edges along the unique
path between it and the root.
Height of a rooted tree: The height of a rooted tree is the maximum level of any
vertex of the tree.
Juhi Kesarwani & Ashish Kumar Kesarwany (VITB) Trees and Fundamental circuits April 12, 2024 28 / 1
Fundamental terminologies
Level of a vertex: The level of a vertex is the number of edges along the unique
path between it and the root.
Height of a rooted tree: The height of a rooted tree is the maximum level of any
vertex of the tree.
Juhi Kesarwani & Ashish Kumar Kesarwany (VITB) Trees and Fundamental circuits April 12, 2024 28 / 1
Fundamental terminologies
Level of a vertex: The level of a vertex is the number of edges along the unique
path between it and the root.
Height of a rooted tree: The height of a rooted tree is the maximum level of any
vertex of the tree.
Juhi Kesarwani & Ashish Kumar Kesarwany (VITB) Trees and Fundamental circuits April 12, 2024 28 / 1
Fundamental terminologies
Level of a vertex: The level of a vertex is the number of edges along the unique
path between it and the root.
Height of a rooted tree: The height of a rooted tree is the maximum level of any
vertex of the tree.
Siblings of a vertex: Vertices with the same parent are called siblings.
Juhi Kesarwani & Ashish Kumar Kesarwany (VITB) Trees and Fundamental circuits April 12, 2024 28 / 1
Ancestors of a vertex: The ancestors of a vertex other than the root are the
vertices in the path from the root to this vertex, excluding the vertex itself and
including the root (that is, its parent, its parent’s parent, and so on, until the root
is reached).
Juhi Kesarwani & Ashish Kumar Kesarwany (VITB) Trees and Fundamental circuits April 12, 2024 29 / 1
Ancestors of a vertex: The ancestors of a vertex other than the root are the
vertices in the path from the root to this vertex, excluding the vertex itself and
including the root (that is, its parent, its parent’s parent, and so on, until the root
is reached).
Juhi Kesarwani & Ashish Kumar Kesarwany (VITB) Trees and Fundamental circuits April 12, 2024 29 / 1
Ancestors of a vertex: The ancestors of a vertex other than the root are the
vertices in the path from the root to this vertex, excluding the vertex itself and
including the root (that is, its parent, its parent’s parent, and so on, until the root
is reached).
Juhi Kesarwani & Ashish Kumar Kesarwany (VITB) Trees and Fundamental circuits April 12, 2024 29 / 1
Ancestors of a vertex: The ancestors of a vertex other than the root are the
vertices in the path from the root to this vertex, excluding the vertex itself and
including the root (that is, its parent, its parent’s parent, and so on, until the root
is reached).
Internal vertices: Vertices that have children are called internal vertices. The root
is an internal vertex unless it is the only vertex in the graph, in which case it is a
leaf.
Juhi Kesarwani & Ashish Kumar Kesarwany (VITB) Trees and Fundamental circuits April 12, 2024 29 / 1
Ancestors of a vertex: The ancestors of a vertex other than the root are the
vertices in the path from the root to this vertex, excluding the vertex itself and
including the root (that is, its parent, its parent’s parent, and so on, until the root
is reached).
Internal vertices: Vertices that have children are called internal vertices. The root
is an internal vertex unless it is the only vertex in the graph, in which case it is a
leaf.
Subtree: If a is a vertex in a tree, the subtree with a as its root is the subgraph of the
tree consisting of a and its descendants and all edges incident to these descendants.
Juhi Kesarwani & Ashish Kumar Kesarwany (VITB) Trees and Fundamental circuits April 12, 2024 29 / 1
Example
In the rooted tree T (with root a) shown in Fig. ??, find the parent of c, the
children of g , the siblings of h, all ancestors of e, all descendants of b, all internal
vertices, and all leaves. What is the subtree rooted at g ?
Juhi Kesarwani & Ashish Kumar Kesarwany (VITB) Trees and Fundamental circuits April 12, 2024 30 / 1
Solution
The parent of c is b. The children of g are h, i, and j . The siblings of h are i and
j. The ancestors of e are c, b, and a. The descendants of b are c, d, and e. The
internal vertices are a, b, c, g , h, and j. The leaves are d, e, f , i, k, l, and m. The
subtree rooted at g is shown in Fig. ??.
Juhi Kesarwani & Ashish Kumar Kesarwany (VITB) Trees and Fundamental circuits April 12, 2024 32 / 1
Remark
The trees which are not rooted are called nonrooted trees or free trees.
Example
1 4
<latexit sha1_base64="uz9XrFtIwy5ge+/Te0U5ApGNITA=">AAACznichVFLS8NAEJ7GV1tfVY9egq3gQUriRY8FH3gRKpi2UEtJ0m0MzYvNtlBL8erNq/40/S0e/HZNBS3SDZuZ/eabb2d2nCTwU2EY7zltaXlldS1fKK5vbG5tl3Z2G2k85C6z3DiIecuxUxb4EbOELwLWSjizQydgTWdwLuPNEeOpH0d3YpywTmh7kd/3XVsAsiqsa1a6pbJRNdTS5x0zc8qUrXpc+qB76lFMLg0pJEYRCfgB2ZTia5NJBiXAOjQBxuH5Ks5oSkXkDsFiYNhAB/h7OLUzNMJZaqYq28UtATZHpk6H2FdK0QFb3srgp7Cf2I8K8/69YaKUZYVjWAeKBaV4A1zQAxiLMsOMOatlcabsSlCfzlQ3PupLFCL7dH90LhDhwAYqotOlYnrQcNR5hBeIYC1UIF95pqCrjnuwtrJMqUSZog09DitfH/VgzObfoc47jZOqaVTNW7NcO84Gnqd9OqAjTPWUanRNddThQvOFXulNq2sjbao9fVO1XJazR7+W9vwFd+OP3Q==</latexit>
sha1_base64="XswH8IvX+M78VY4erKm+2KTDmVs=">AAACznichVHLTsJAFD3UF+ALHzs3RDBxYUjrRpckPuLGBBNBEiCkLQM29JW2kCAhbt251U/Tb3Hh6VBMlBhuM713zj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a5mfKrlK6p1PVDUd9sUJkn+6PzjkiAlhfRXS6UEwPGo46D/ECIayFCuQrTxV01XEP1laWKZUwU7ShJ2Dl66MejNn8O9RZp3FUNY2qeWOWa4fZwPO0S3t0gKmeUI2uqI46XGi+0Cu9aXVtqE20p2+qlstydujX0p6/AHyxj98=</latexit>
sha1_base64="QA5DwdX7OUbJabZzzOG0J1i5jc8=">AAACznichVHLTsJAFD3UF+ALHzs3RDBxYUirC12S+IgbE0zkkQAhbRmwobRNW0iQELfu3Oqn6be48HQoJkoMt5neO+eee+beGcOzrSBU1Y+EsrS8srqWTKXXNza3tjM7u5XAHfimKJuu7fo1Qw+EbTmiHFqhLWqeL/S+YYuq0buM8tWh8APLdR7CkSeafb3rWB3L1ENC5bxoneVbmZxaUKVl5wMtDnLFRGMftJKb+UQDbbgwMUAfAg5CxjZ0BPzq0KDCI9bEmJjPyJJ5gQnSrB2QJcjQifb473JXj1GH+0gzkNUmT7G5fFZmccR1IxUNsqNTBeOA/ovrSWLdf08YS+WowxG9QcWUVLwjHuKRjEWV/Zg562VxZTRViA4u5DQW+/MkEs1p/uhcMeMT68lMFteS2aWGIfdD3oBDX2YH0S3PFLJy4ja9Lr2QKk6sqFPPp49un/3wmbW/jzofVE4LmlrQ7rVc8QRTS+IAhzjmq56jiFuU2IdJzVe84V0pKUNlojxPqUoirtnDL1NevgEIuJCQ</latexit>
e3
2 3
Juhi Kesarwani & Ashish Kumar Kesarwany (VITB) Trees and Fundamental circuits April 12, 2024 32 / 1
Definition(Binary Trees)
A binary tree is defined as a tree in which there is exactly one vertex of degree two,
and each of the remaining vertices is of degree one or three. (Obviously, we are
talking about trees with three or more vertices.) Since the vertex of degree two is
distinct from all other vertices, this vertex serves as a root. Thus every binary tree
is a rooted tree.
Juhi Kesarwani & Ashish Kumar Kesarwany (VITB) Trees and Fundamental circuits April 12, 2024 33 / 1
Example
Juhi Kesarwani & Ashish Kumar Kesarwany (VITB) Trees and Fundamental circuits April 12, 2024 34 / 1
The following two properties of binary trees follow directly from the definition:
Juhi Kesarwani & Ashish Kumar Kesarwany (VITB) Trees and Fundamental circuits April 12, 2024 35 / 1
The following two properties of binary trees follow directly from the definition:
Juhi Kesarwani & Ashish Kumar Kesarwany (VITB) Trees and Fundamental circuits April 12, 2024 35 / 1
The following two properties of binary trees follow directly from the definition:
Proof.
This is because there is exactly one vertex of even degree, and the remaining n − 1
vertices are of odd degrees. Since we know that in a graph, number of vertices of
odd degree is even, n − 1 is even. Hence n is odd.
Juhi Kesarwani & Ashish Kumar Kesarwany (VITB) Trees and Fundamental circuits April 12, 2024 35 / 1
The following two properties of binary trees follow directly from the definition:
Proof.
This is because there is exactly one vertex of even degree, and the remaining n − 1
vertices are of odd degrees. Since we know that in a graph, number of vertices of
odd degree is even, n − 1 is even. Hence n is odd.
n+1
Property-2: The number of pendant vertices in a tree with n vertices in 2 .
Juhi Kesarwani & Ashish Kumar Kesarwany (VITB) Trees and Fundamental circuits April 12, 2024 35 / 1
The following two properties of binary trees follow directly from the definition:
Proof.
This is because there is exactly one vertex of even degree, and the remaining n − 1
vertices are of odd degrees. Since we know that in a graph, number of vertices of
odd degree is even, n − 1 is even. Hence n is odd.
n+1
Property-2: The number of pendant vertices in a tree with n vertices in 2 .
Proof.
Let p be the number of pendant vertices in a binary tree T . Then n − p − 1 is
the number of vertices of degree three. Therefore, by hand shaking theorem, the
number of edges in T equals
p + 3(n − p + 1) + 2 = 2(n − 1)
hence
n+1
p= .
2
Juhi Kesarwani & Ashish Kumar Kesarwany (VITB) Trees and Fundamental circuits April 12, 2024 35 / 1