GATE CS 2024 Set 1 | Question 60
Algorithms › Graph Algorithms · NAT · 2 marks · Answer: 60
- Question 60Algorithmsnat2 marksA DFS traversal of an undirected graph with 100 vertices produces a forest with 40 edges. The number of connected components in is _________
Answer: 60
Solution
Answer: 60 A DFS forest with trees on vertices has edges (each tree on vertices contributes edges). Here . Each DFS tree corresponds to one connected component, so there are 60 components.
More GATE PYQ on Graph Algorithms
All GATE CS Algorithms PYQ →Attempt GATE CS 2024 Set 1 in real GATE exam mode
Full paper with a timer, the GATE interface and a topic-wise analysis — free.
Create free account →