Graph Algorithms

Answer & solution
Official answer: C
Approach: A BFS tree preserves shortest-path distances from its root. Compare this constraint with the endpoint depths of each DFS edge type, using the usual simple directed-graph classification.
1. A non-tree forward edge u→w goes from a vertex to a proper descendant that is not its child. Thus depth_T(w)≥depth_T(u)+2.
2. But the edge supplies a root-to-w path of length depth_T(u)+1, shorter than its tree depth. This contradicts T being a BFS tree, so forward edges cannot exist. C is true.
3. Back edges are possible. In the directed cycle v→a→b→v, both DFS and BFS from v have the path v→a→b as their tree, and b→v is a back edge. Thus A and D are false.
4. Cross edges are also possible. Use edges v→a, v→b, b→a, with a explored before b in DFS. Both trees have a and b as root children, while b→a is a cross edge to the already completed branch.
Answer: C only.