Depth-first search parenthesis property
ID: depth-first-search-parenthesis-property
The discovery-to-finishing intervals of distinct vertices in a depth-first search are either disjoint or strictly nested. A recursive call completes before its caller returns; separate completed branches have disjoint intervals. Thus the displayed nesting holds exactly when is a proper descendant in a rooted tree of in the discovery forest. A directed path alone does not imply this nesting, because it can leave the current branch through an already discovered ancestor.
New to topics? Read the docs here!