Question
Download Solution PDFIf G is a forest with n vertices and K connected components, then how many edges does G have?
This question was previously asked in
HTET PGT Official Computer Science Paper - 2017
Answer (Detailed Solution Below)
Option 2 : n - K
Free Tests
View all Free tests >
HTET PGT Official Computer Science Paper - 2019
4.5 K Users
60 Questions
60 Marks
60 Mins
Detailed Solution
Download Solution PDFConcept:
- 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.
Last updated on Jul 12, 2025
-> HTET Exam Date is out. HTET Level 1 and 2 Exam will be conducted on 31st July 2025 and Level 3 on 30 July
-> Candidates with a bachelor's degree and B.Ed. or equivalent qualification can apply for this recruitment.
-> The validity duration of certificates pertaining to passing Haryana TET has been extended for a lifetime.
-> Enhance your exam preparation with the HTET Previous Year Papers.