GATE CSE 2025 Session 2 Q29: True statements about BFS and DFS trees of an undirected graph
- Algorithms
- 1 mark
- MSQ
- No negative marking
Question
Which of the following statements regarding Breadth First Search (BFS) and Depth First Search (DFS) on an undirected simple graph G is/are TRUE?
Try it: multiple select: one or more correct options
Show answer and explanation
Answer: B, C, D (official GATE 2025 final answer key)
Concept used: Edge classification: undirected DFS has no cross edges; BFS levels of adjacent vertices differ by at most 1.
First step: Test (A) on a triangle: DFS from one vertex reaches the third vertex at depth 2, though it is a neighbour.
Full step-by-step solution
Detailed working, common mistakes and linked mock tests will be available with a free GATEiit account. Log-in is coming soon.
Share this question
Source: official GATE 2025 Session 2 CS question paper and final answer key, organised by IIT Roorkee. Question paper · Answer key
More Algorithms PYQs
- 2026 Session 1 · Q17Solve nested recurrences T1 = 4T1(n/2) + T2, T2 = 5T2(n/4) + log n
- 2026 Session 1 · Q41Shortest paths with at most k edges: two statements
- 2026 Session 1 · Q47Condition forcing a vertex into every minimum vertex cover
- 2026 Session 1 · Q49Cycle and cut properties of MSTs with distinct weights
- 2026 Session 1 · Q50Impossible DFS discovery/finish orderings for a DAG edge
- 2026 Session 1 · Q55Properties of 2-colorable (bipartite) graphs