Past exam of the computer science course of the University of Oxford 2018 Algorithms 2 d Solution 2026-10-31
In depth-first search of an undirected graph, every edge joins a vertex to one of its ancestors or descendants in the discovery tree. To see this directly, suppose is discovered before its neighbour . If is still undiscovered, the search from cannot finish before discovering : it eventually scans . Thus is discovered while the call for remains active and belongs to its descendant subtree.[ref]
Depth-first search by Jeff Erickson. Chapter 6, §6.1: active recursion intervals, tree/back edges and ancestor relations
For any edge , its ancestor endpoint therefore has a proper descendant and hence at least one child. It is an internal vertex of a rooted tree. Every edge has an internal endpoint, so the internal vertices form a vertex cover. The relevant leaves of a rooted tree here have no children in the rooted discovery tree; a root of vertex degree one can still be internal.