知识卡片
Kruskal排序主导复杂度
采用按秩合并与路径压缩时,并查集操作总成本近线性;排序 E 条边为 O(E lg E)。
连通简单图有 lg E=O(lg V),总时间 O(E lg V)。
这张卡片看不懂?
这张卡片已通过人工审查,不再接受失败反馈。
已有反馈 · 0 条
还没有人提交反馈。
在整书笔记中的位置
原书出处 · 1 处
- 第21章 最小生成树 · 查看原书依据
The running time of Kruskal’s algorithm for a graph G = (V, E) depends on the specific implementation of the disjoint-set data structure. Let’s assume that it uses the disjoint-set-forest implementation of Section 19.3 with
参考来源
- 位置:《算法导论(第4版)》第21章《最小生成树》(OEBPS/chapter021.xhtml,文本字符[15000,20000))。
- 结论依据:原文分开分析排序与并查集操作,并利用连通图边数界化简总复杂度。
- 原始内容:The running time of Kruskal’s algorithm for a graph G = ( V , E ) depends on the specific implementation of the disjoint-set data structure. Let’s assume that it uses the disjoint-set-forest implementation of Section 19.3 with