Consider the following statements about Depth-First Search on an undirected graph :
(I) Every non-tree edge is a back edge.
(II) The DFS forest can contain forward edges.
(III) If an edge connects to an already visited vertex, it must be a back edge.
Which of the above statements is/are TRUE?
B
Step-by-Step Solution
Key idea: This is a bounding question testing the edge classification theorem for undirected DFS. Evaluate each statement against the theorem that undirected DFS produces only tree and back edges.
Evaluating each statement:
Statement I: "Every non-tree edge is a back edge." TRUE. Since undirected DFS produces only tree and back edges, every non-tree edge must be a back edge.
Statement II: "The DFS forest can contain forward edges." FALSE. This is the ignoring_constraint trap. The theorem explicitly states that forward edges cannot exist in undirected DFS.
Statement III: "If an edge connects to an already visited vertex, it must be a back edge." TRUE. In undirected DFS, if an edge is explored and is already visited (gray or black), then must be an ancestor of , making a back edge.
Therefore, statements I and III are true, and II is false.
Why option D is the trap: A student might think all three are true, forgetting that forward edges cannot exist in undirected DFS.
Verification: The theorem guarantees that undirected DFS produces only tree and back edges. This makes I and III true, and II false.
Answer: B