The degree of a vertex V in a graph is defined as the number of graph edges that touches the vertex V.
In a graph,
the total sum of all degree of
vertex = 2 * E [E = number of edge]
For a Tree,
the total sum of all degree of
vertex = 2 * E
= 2 * (n-1)
So if the sum of all degree of
vertex = 2*(n-1) then it must be a tree
Related Problem:
No comments:
Post a Comment