知识卡片
Johnson逐源求最短路
- Johnson 先用超级源上的 Bellman-Ford 检测负环并计算势函数,
- 随后重赋权,
- 再以每个原顶点为源运行 Dijkstra,
- 最后把新权重结果还原为原权重矩阵。
这张卡片看不懂?
这张卡片的反馈已满 10 条,暂时无法继续提交。
已有反馈 · 0 / 10 条
还没有人提交反馈。
在整书笔记中的位置
原书出处 · 1 处
- 第23章 所有结点对的最短路径 · 查看原书依据
Johnson’s algorithm to compute all-pairs shortest paths uses the Bellman-Ford algorithm (Section 22.1) and Dijkstra’s algorithm (Section 22.3) as subroutines. The pseudocode appears in the procedure JOHNSON on page 666. It
参考来源
- 位置:《算法导论(第4版)》第23章《所有结点对的最短路径》(OEBPS/chapter023.xhtml,文本字符[30000,35000))。
- 结论依据:原文伪代码明确串联 Bellman-Ford、重赋权和逐源 Dijkstra。
- 原始内容:Johnson’s algorithm to compute all-pairs shortest paths uses the Bellman-Ford algorithm ( Section 22.1 ) and Dijkstra’s algorithm ( Section 22.3 ) as subroutines. The pseudocode appears in the procedure J OHNSON on page 666. It