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.4 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 Jun 6, 2025
-> The HTET TGT Applciation Portal will reopen on 1st June 2025 and close on 5th June 2025.
-> HTET Exam Date is out. HTET TGT Exam will be conducted on 26th and 27th July 2025
-> 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.