知识卡片

普通读书笔记卡 · 3650.b.1

DFS时间区间只嵌套或分离

理解等级:中级

任意两个顶点的发现到完成区间,必然互不相交,或其中一个完全包含另一个。区间包含关系正对应 DFS 树中的祖先与后代。

这张卡片看不懂?

已有反馈 · 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.