知识卡片
DAG边按完成时间递减
对 DAG 边(u,v),扫描时 v 不可能为灰色,否则构成返祖边;v 若白色会成为 u 后代,若黑色已完成。
两种情况都得 v.f,因此完成时间递减序合法。
这张卡片看不懂?
这张卡片已通过人工审查,不再接受失败反馈。
已有反馈 · 0 条
还没有人提交反馈。
在整书笔记中的位置
原书出处 · 1 处
- 第20章 基本图算法 · 查看原书依据
Theorem 20.12 TOPOLOGICAL-SORT produces a topological sort of the directed acyclic graph provided as its input. Proof Suppose that DFS is run on a given dag G = (V, E) to determine finish times for its vertices. It suffices to show that for
参考来源
- 位置:《算法导论(第4版)》第20章《基本图算法》(OEBPS/chapter020.xhtml,文本字符[50000,55000))。
- 结论依据:定理20.12分白色与黑色两种可行状态证明每条边满足完成时间次序。
- 原始内容:Theorem 20.12 T OPOLOGICAL -S ORT produces a topological sort of the directed acyclic graph provided as its input. Proof Suppose that DFS is run on a given dag G = ( V , E ) to determine finish times for its vertices. It suffices to show that for