知识卡片
Johnson稀疏图复杂度优势
- 以斐波那契堆实现逐源 Dijkstra,Johnson 总时间 O(V²lg V+VE);
- 二叉堆版一般为 O(V(V+E)lg V),仅在 E=Ω(V) 时可简写为 O(VE lg V)。
若 E=O(V),两者都优于 O(V³) 的 Floyd-Warshall 渐进界。
这张卡片看不懂?
这张卡片已通过人工审查,不再接受失败反馈。
已有反馈 · 0 条
还没有人提交反馈。
在整书笔记中的位置
原书出处 · 1 处
- 第23章 所有结点对的最短路径 · 查看原书依据
If the min-priority queue in Dijkstra’s algorithm is implemented by a Fibonacci heap, Johnson’s algorithm runs in O(V2 lg V + VE) time. The simpler binary min-heap implementation yields a running time of O(VE lg V), which
参考来源
- 位置:《算法导论(第4版)》第23章《所有结点对的最短路径》(OEBPS/chapter023.xhtml,文本字符[35000,40000))。
- 结论依据:第23章给出斐波那契堆界和二叉堆简写界;逐源 Dijkstra 的二叉堆单次成本为 O((V+E)lg V),运行 V 次,E=Ω(V) 时才能省略 V 项。
- 原始内容:If the min-priority queue in Dijkstra’s algorithm is implemented by a Fibonacci heap, Johnson’s algorithm runs in O ( V 2 lg V + VE ) time. The simpler binary min-heap implementation yields a running time of O ( VE lg V ), which