A forest is an unconnected graph that is a disjoint union of
A forest is an unconnected graph that is a disjoint union of trees. If G is an n-vertex forest of t trees, how many edges does it have?
Solution
A Forest is a disjoint union of trees
Given
G is n-vertex forest of t trees
If ti is a non-empty tree,
Then |E(ti)|=|V(ti)|-1 ……(1)
As given there are t trees that is t1,t2,…..tt,
Let each ti has ni vertices.
By adding we have
|E(G)|= Sum of edges of all trees
Use the equation (1) here
|E(G)| = Sum of all vertices of Ti -1
= sum of all ni -1
Hence no of edges of G = no of vertices of G - t
where t is no of trees.
