Graph Algorithms

Answer & solution
Answer: D (no official key was published)
1. In an undirected DFS, every non-tree edge joins a vertex to an ancestor. Since u is a DFS leaf, all its neighbors lie on its single root-to-u tree path.
2. Let w be its highest ancestor-neighbor. The tree path w to u plus the edge uw forms a cycle containing every neighbor of u, since all those neighbors lie between w and u.
3. Degree at least two ensures a genuine cycle. Thus D.
4. Two distinct cycles sharing only a root refute the asserted common cycle; other DFS graphs refute the universal common neighbor and separator assertions.
5. Teaching check: DFS in an undirected graph has no cross edge joining separate finished subtrees. A leaf’s non-parent neighbors must therefore be ancestors. The path from its highest such neighbor to the leaf contains every other neighbor along that ancestor chain, and the closing back edge creates the required cycle.