知识卡片
BFS暂存距离不低于最短值
BFS 给 v 的有限 d 值来自某条已发现路径的边数,所以始终有 v.d≥δ(s,v);未发现时为无穷也满足。
证明再利用队列层序,排除“严格大于”的情形,才能得到相等。
这张卡片看不懂?
这张卡片已通过人工审查,不再接受失败反馈。
已有反馈 · 0 条
还没有人提交反馈。
在整书笔记中的位置
原书出处 · 1 处
- 第20章 基本图算法 · 查看原书依据
Lemma 20.2 Let G = (V, E) be a directed or undirected graph, and suppose that BFS is run on G from a given source vertex s ∈ V. Then, for each vertex v ∈ V, the value v.d computed by BFS satisfies v.d ≥ δ(s, v) at all times, including at termination.
参考来源
- 位置:《算法导论(第4版)》第20章《基本图算法》(OEBPS/chapter020.xhtml,文本字符[20000,25000))。
- 结论依据:引理20.2证明d为真实最短边数的上界,尚未单独推出相等。
- 原始内容:Lemma 20.2 Let G = ( V , E ) be a directed or undirected graph, and suppose that BFS is run on G from a given source vertex s ∈ V . Then, for each vertex v ∈ V , the value v.d computed by BFS satisfies v.d ≥ δ( s , v ) at all times, including at termination.