知识卡片
DFS时间区间只嵌套或分离
任意两个顶点的发现到完成区间,必然互不相交,或其中一个完全包含另一个。区间包含关系正对应 DFS 树中的祖先与后代。
这张卡片看不懂?
这张卡片的反馈已满 10 条,暂时无法继续提交。
已有反馈 · 0 / 10 条
还没有人提交反馈。
在整书笔记中的位置
原书出处 · 1 处
- 第20章 基本图算法 · 查看原书依据
Theorem 20.7 (Parenthesis theorem) In any depth-first search of a (directed or undirected) graph G = (V, E), for any two vertices u and v, exactly one of the following three conditions holds: the intervals [u.d, u.f] and [v.d, v.f] are entirely disjoint, and neither u nor v is a descendant of the other in the depth-first forest, the interval [u.d, u.f] is contained entirely within the interval [v.d, v.f], and u is a descendant of v in a depth-first tree, or the interval [v.d, v.f] is contained entirely within the interval [u.d, u.f], and v is a descendant of u in a depth-first tree.
参考来源
- 位置:《算法导论(第4版)》第20章《基本图算法》(OEBPS/chapter020.xhtml,文本字符[35000,40000))。
- 结论依据:定理20.7将任意两顶点的时间区间限定为互斥或一方包含另一方三种情形,并对应非祖先或后代关系。
- 原始内容:Theorem 20.7 (Parenthesis theorem) In any depth-first search of a (directed or undirected) graph G = ( V , E ), for any two vertices u and v , exactly one of the following three conditions holds: the intervals [ u.d , u.f ] and [ v.d , v.f ] are entirely disjoint, and neither u nor v is a descendant of the other in the depth-first forest, the interval [ u.d , u.f ] is contained entirely within the interval [ v.d , v.f ], and u is a descendant of v in a depth-first tree, or the interval [ v.d , v.f ] is contained entirely within the interval [ u.d , u.f ], and v is a descendant of u in a depth-first tree.