4. If G is a forest with n vertices and k connected components, how many edges does G have?
Answers
Answered by
2
A forest is a graph consisting of disconnected trees, which means it is an acyclic graph, unlike a tree which has its nodes connected to each other. So in general, a forest is a graph and its components are disjoint trees with edges being the connections between the trees.
The number of edges is n-k. Where n is the number of vertices, and k is the number of components (trees).
Similar questions