If G is a forest with n vertices and K connected components, then how many edges does G have?
If G is a forest with n vertices and K connected components, then how many edges does G have? Correct Answer n - K
Concept:
- A group of trees is nothing but forest.
Explanation:
Example:
- In above graph G there are 3 tress, k=3 and total 6 nodes, n=6 so if we subtract k from n then we will get number of edges equal to 3.
- General formula to get total number of edges will be n – k
Hence option 2 is the correct answer.
মোঃ আরিফুল ইসলাম
Feb 20, 2025