You are on page 1of 15

Graph Theory

Trees
Trees
A tree is an acyclic (cycle free) connected graph. We often
use T rather than G to denote a tree.
An acyclic graph is called a forest. Thus, each component
of a forest is a tree.
All non-isomorphic trees up to order six are shown below:
Common Classes of Trees
Path: Nontrivial tree with exactly two end-vertices.
Star: Tree with at most one vertex having degree more
than one.
Double Star: Tree containing exactly two vertices that are
not end-vertices.
Caterpillar: Tree of order 3 or more, the removal of whose
end-vertices produces a path (called the spine of the
caterpillar).
Remark: Every path, star, and double star is a caterpillar.

3
Theorem: A graph G is a tree if and only if every two
vertices of G are connected by a unique path.
Proof. First, let G be a tree. Then G is connected by
definition. Thus, every two vertices of G are connected by
a path. Assume, to the contrary, that there are two vertices
of G that are connected by two distinct paths. Then these
two paths induce a cycle, which is a contradiction.
Conversely, suppose that every two distinct vertices of G
are connected by a unique path. Clearly then, G is
connected.
Assume, to the contrary, that G has a cycle C. Let u and v
be two distinct vertices of C. Then C determines two
distinct u − v paths, producing a contradiction. Thus, G is
acyclic and so G is a tree.

4
Theorem: Every nontrivial tree has at least two end-vertices.
Proof. Let T be a nontrivial tree. We consider a longest path P
in T. Suppose that P is a u − v path, say P = (u = u0, u1, …, uk
= v), where k ≥ 1. We show that u and v are end-vertices of G.
Clearly, neither u nor v is adjacent to any vertex not on P, for
otherwise, a path of length greater than k would be produced.
Certainly, u is adjacent to u1 on P and v is adjacent to uk−1 on
P. Moreover, since T contains no cycles, neither u nor v is
adjacent to any other vertices in P. Therefore, deg u=deg v= 1.

Remark: If T is a tree of order k + 1 ≥ 2, then for each end-


5
vertex v of T, the subgraph T − v is a tree of order k.
Theorem: Every tree of order n has size n − 1.
Proof.
We proceed by induction on n.
There is only one tree of order 1, namely the trivial tree K1,
which has size 0.
Thus, the result is true for n = 1.
Assume for a positive integer k that the size of every tree
of order k is k − 1.
Let T be a tree of order k + 1. We know that T contains at
least two end-vertices. Let v be one of them. Then T′ = T −
v is a tree of order k. By the induction hypothesis, the size
of T′ is m′ = k − 1. Since T has exactly one more edge than
T′ , the size of T is m = m′ + 1 = (k − 1) + 1 = (k + 1) − 1, as
desired.

6
Corollary: Every forest of order n with k components has
size n − k.
Proof. Suppose that the size of a forest F is m.
Let G1, G2, …, Gk be the components of F, and Gi has
order ni and size mi for 1 ≤ i ≤ k.
Then n = n1+ n2+…+ nk and m = m1+ m2+…+ mk.
Since each component Gi is a tree, we have mi = ni − 1.
Therefore, m = m1+ m2+…+ mk
= (n1 – 1) + (n2 – 1) +…+ (nk – 1)
= (n1+n2+…+nk) – k
= n – k.
Remark. Since each edge of a tree is a bridge, a tree of
order n is the weakest connected graph with n-1 edges.
It follows that the size of every connected graph of order
n is at least n − 1.
7
Exercise 4.2
4.8: Prove that if every vertex of a graph G has degree
at least 2, then G contains a cycle.
Solution.
We shall prove the contrapositive, i.e., if G contains no
cycles, then G has a vertex with degree less than 2.
Suppose that G has no cycles. Then G must be a forest.
Let T be a component of G. If T is trivial, then T, and thus
G, has a vertex of degree 0. If T is a nontrivial tree, then T
has at least two end-vertices. These are of degree 1.
Thus, if G has no cycles, then G has at least one vertex
with degree less than 2.

8
4.13: A certain tree T of order 21 has only vertices of
degree 1, 3, 5 and 6. If T has exactly 15 end-vertices
and one vertex of degree 6, how many vertices of T
have degree 5?
Solution.
Let x be the number of vertices of degree 5 and y the
number of vertices of degree 3.
Then 15 + y + x +1 = 21 and so y = 5 – x.
Also, the size of T is 21 − 1 = 20.
Therefore, by the First Theorem of Graph Theory we have,
1·15 + 3y + 5x + 6·1 = 2·(20)
Or 3(5-x) + 5x = 40 – 15 – 6
Or 2x = 19 – 15
x = 2.
Hence, T has two vertices of degree 5. 9
4.15: A tree T with 50 end-vertices has an equal number
of vertices of degree 2, 3, 4 and 5 and no vertices of
degree greater than 5. What is the order of T?
Solution.
Let x be the number of vertices of degree 2.
Then the order of T is n = 50 + 4x.
Thus m = 49 + 4x.
Adding the degrees of vertices, we obtain
50·1 + 2x + 3x + 4x + 5x = 2(49 + 4x)
14x – 8x = 98 – 50
6x = 48 and so x = 8.
Thus, n = 50 + 4·8 = 82.

10
4.18: A certain tree T of order n contains only vertices
of degree 1 and 3. Show that T contains (n − 2)/2
vertices of degree 3.
Solution:
A tree of order n has size m = n−1. Let x, y be number of
vertices of degree 1 and 3 respectively, then x + y = n.
Since the sum of degrees of all vertices in a graph is
double the size, we have
1·x+3·y = 2(n−1)
(n - y) + 3·y = 2(n−1)
2y = n – 2. That is y = (n − 2)/2 = n/2 - 1
Remark: Solving for x we get x = (n + 2)/2 = n/2 + 1.
Thus, the number of vertices of degree 1 are (two) more
than the number of vertices of degree 3.
11
4.19: Let T be a tree of order n and size m having ni
vertices of degree i for i ≥ 1.
Then 𝒏 = σ𝒊 𝒏𝒊 and 𝟐 𝒏 − 𝟏 = 𝟐𝒎 = σ𝒊 𝒊𝒏𝒊 .
(a) Prove that n1 = 2 + n3 + 2n4 + 3n5 + 4n6 + …
Solution:
Given 𝑛 = σ𝑖 𝑛𝑖 and 2 𝑛 − 1 = 2𝑚 = σ𝑖 𝑖𝑛𝑖 ,
Substituting n in the form of summation in the 2nd equation,
we have
2 σ𝑖 𝑛𝑖 − 1 = σ𝑖 𝑖𝑛𝑖
and so σ𝑖(2 − 𝑖)𝑛𝑖 = 2.
Expanding the summation for i = 1, 2, 3,… we have
n1 – n3 – 2n4 – 3n5 – 4n6 – … = 2
Or n1 = 2 + n3 + 2n4 + 3n5 + 4n6 + …

12
4.19: (b) A tree T has three vertices of degree 2, five
vertices of degree 3, two vertices of degree 4 and no
vertices of degree 5 or more. According to the formula
in (a), how many end-vertices does T have?
Solution:
Given that n2 = 3, n3 = 5, n4 = 2, n5 = n6 = … = 0
Using the formula in (a), the number n1 of end-vertices of T
are given as
n1 = 2 + n3 + 2n4 + 3n5 + 4n6 + ….
n1 = 2 + 5 + 2·2 + 0 + 0 +…
n1 = 11.

13
4.23: Find all trees T such that 𝑻 ഥ is also a tree.
Solution:
Let T be a tree of order n. Since T and 𝑇ത are both trees of
order n, it follows that the sizes of T and 𝑇ത are n − 1.
𝑛(𝑛−1)
Thus, 𝑛 − 1 + 𝑛 − 1 = 2 𝑛 − 1 = 𝑛2 = .
2
Hence 4(n − 1) = n(n − 1)
and so (n − 1)(n − 4) = 0,
This implies n = 1 or n = 4.
If n = 1, then T = K1.
If n = 4, then T = P4 or T = K1, 3.
Since 𝑃ത4 = 𝑃4 but 𝐾ഥ1,3 = 𝐶3 is not a tree, it follows that T = P4.
Hence all trees T such that 𝑇ത is also a tree are T=K1 or T=P4.

14
HOME WORK
Exercise 4.2
Problems 4.7 – 4.19, 4.22, 4.23.

15

You might also like