Theorem. DFS terminates [00MC]

For any finite graph G and any unvisited vertex u, \mathsf {DFS}(G,u):

  • terminates in finite time, and
  • decreases the number of unvisited vertices.

Context

Correctness of DFS [00MB]

Backlinks

DFS solves connectivity [00MD]