原书出处
Introduction to Algorithms, Fourth Edition
20 第20章 基本图算法
raph is acyclic if and only if a depth-first search yields no “back” edges (Lemma 20.11).
The depth-first forest Gπ produced by a depth-first search on graph G can contain four types of edges: Tree edges are edges in the depth-first forest Gπ. Edge (u, v) is a tree edge if v was first discovered by exploring edge (u, v). Back edges are those edges (u, v) connecting a vertex u to an ancestor v in a depth-first tree. We consider self-loops, which may occur in directed graphs, to be back edges. Forward edges are those nontree edges (u, v) connecting a vertex u to a proper descendant v in a depth-first tree. Cross edges are all other edges. They can go between vertices in the same depth-first tree, as long as one vertex is not an ancestor of the other, or they can go between vertices in different depth-first trees.
In Figures 20.4 and 20.5, edge labels indicate edge types. Figure 20.5(c) also shows how
原书定位详情
来源:a19c7933-4eda-4176-aebd-30fe7e1ad292
正文位置:extracted/Introduction to Algorithms, Fourth Edition/_epub-src/OEBPS/chapter020.xhtml
EPUB SHA-256:ec7ced04bb875b93983816aef7a667855a4b71c5cf53b63406b9439c74e27aea