知识卡片
负边不必然破坏最短路
负权边本身仍可有定义良好的最短路径;真正使权重无下界的是从源点可达并通向目标的负权环。
Dijkstra 要求边权非负,Bellman-Ford 允许负边但需检查可达负环。
这张卡片看不懂?
这张卡片的反馈已满 10 条,暂时无法继续提交。
已有反馈 · 0 / 10 条
还没有人提交反馈。
在整书笔记中的位置
原书出处 · 1 处
- 第22章 单源最短路径 · 查看原书依据
Some shortest-paths algorithms, such as Dijkstra’s algorithm, assume that all edge weights in the input graph are nonnegative, as in a road network. Others, such as the Bellman-Ford algorithm, allow negative-weight
参考来源
- 位置:《算法导论(第4版)》第22章《单源最短路径》(OEBPS/chapter022.xhtml,文本字符[5000,10000))。
- 结论依据:原文分别说明负边可用与两种算法的输入限制。
- 原始内容:Some shortest-paths algorithms, such as Dijkstra’s algorithm, assume that all edge weights in the input graph are nonnegative, as in a road network. Others, such as the Bellman-Ford algorithm, allow negative-weight