知识卡片
单终点可反转边化为单源
要找每个顶点到固定终点 t 的最短路,可反转图中全部边并从 t 运行单源算法。路径方向反转但边权和不变,故对应权重相同。
这张卡片看不懂?
这张卡片的反馈已满 10 条,暂时无法继续提交。
已有反馈 · 0 / 10 条
还没有人提交反馈。
在整书笔记中的位置
原书出处 · 1 处
- 第22章 单源最短路径 · 查看原书依据
By reversing the direction of each edge in the graph, you can reduce this problem to a single-source problem. Single-pair shortest-path problem: Find a shortest path from u to v for given vertices u and v. If you
参考来源
- 位置:《算法导论(第4版)》第22章《单源最短路径》(OEBPS/chapter022.xhtml,文本字符[0,5000))。
- 结论依据:原文把单终点问题归约为反向图上的单源问题。
- 原始内容:By reversing the direction of each edge in the graph, you can reduce this problem to a single-source problem. Single-pair shortest-path problem: Find a shortest path from u to v for given vertices u and v . If you