知识卡片
Prim二叉堆复杂度
用二叉最小堆时,
- V 次提取最小为 O(V lg V),
- 最多 O(E) 次降键为 O(E lg V);
连通图化简为 O(E lg V)。
这张卡片看不懂?
这张卡片的反馈已满 10 条,暂时无法继续提交。
已有反馈 · 0 / 10 条
还没有人提交反馈。
在整书笔记中的位置
原书出处 · 1 处
- 第21章 最小生成树 · 查看原书依据
Thus, the total time for Prim’s algorithm is O(V lg V + E lg V) = O(E lg V), which is asymptotically the same as for our implementation of Kruskal’s algorithm. You can further improve the asymptotic running time of Prim’s
参考来源
- 位置:《算法导论(第4版)》第21章《最小生成树》(OEBPS/chapter021.xhtml,文本字符[20000,25000))。
- 结论依据:原文逐项计算提取和降键操作,给出总时间界。
- 原始内容:Thus, the total time for Prim’s algorithm is O ( V lg V + E lg V ) = O ( E lg V ), which is asymptotically the same as for our implementation of Kruskal’s algorithm. You can further improve the asymptotic running time of Prim’s