Remark. [00ME]

We also note that \mathsf {DFS}(G,v) terminates even if we call it on a visited vertex v, since it will proceed to call itself recursively on only the unvisited neighbors of v, so the above theorem applies to each of the recursive calls.