The expected complexity of Prim's minimum spanning tree algorithm

被引:15
作者
Martel, C [1 ]
机构
[1] Univ Calif Davis, Dept Comp Sci, Davis, CA 95616 USA
基金
美国国家科学基金会;
关键词
graph algorithms; data structures; minimum spanning tree; expected performance;
D O I
10.1016/S0020-0190(01)00220-4
中图分类号
TP [自动化技术、计算机技术];
学科分类号
0812 ;
摘要
We study the expected performance of Prim's minimum spanning tree (MST) algorithm implemented using ordinary heaps. We show that this implementation runs in linear or almost linear expected time on a wide range of graphs. This helps to explain why Prim's algorithm often beats MST algorithms which have better worst-case run times. Specifically, we show that if we start with any n node m edge graph and randomly permute its edge weights, then Prim's algorithm runs in expected O(m + n loan log(2m/n)) time. Note that O(m + n loan log(2m/n)) = 0(m) when in 0 (n log n log log n). We extend this result to show that the same expected run times apply even when an adversary can select the weights of m/log n edges and the possible weights of the remaining edges (which are then randomly assigned). (C) 2002 Elsevier Science B.V. All rights reserved.
引用
收藏
页码:197 / 201
页数:5
相关论文
共 8 条
[1]  
[Anonymous], DIMACS SERIES DISCRE
[2]   FIBONACCI HEAPS AND THEIR USES IN IMPROVED NETWORK OPTIMIZATION ALGORITHMS [J].
FREDMAN, ML ;
TARJAN, RE .
JOURNAL OF THE ACM, 1987, 34 (03) :596-615
[3]   EFFICIENT ALGORITHMS FOR FINDING MINIMUM SPANNING-TREES IN UNDIRECTED AND DIRECTED-GRAPHS [J].
GABOW, HN ;
GALIL, Z ;
SPENCER, T ;
TARJAN, RE .
COMBINATORICA, 1986, 6 (02) :109-122
[4]  
GOLDBERG AV, 1996, 96062 NEC RES I
[5]   A RANDOMIZED LINEAR-TIME ALGORITHM TO FIND MINIMUM SPANNING-TREES [J].
KARGER, DR ;
KLEIN, PN ;
TARJAN, RE .
JOURNAL OF THE ASSOCIATION FOR COMPUTING MACHINERY, 1995, 42 (02) :321-328
[6]  
Kruskal J. B., 1956, Proc. of American Mathematical Society, V7, P48, DOI [DOI 10.1090/S0002-9939-1956-0078686-7, 10.1090/S0002-9939-1956-0078686-7]
[7]   A THEOREM ON THE EXPECTED COMPLEXITY OF DIJKSTRA SHORTEST-PATH ALGORITHM [J].
NOSHITA, K .
JOURNAL OF ALGORITHMS, 1985, 6 (03) :400-408
[8]   SHORTEST CONNECTION NETWORKS AND SOME GENERALIZATIONS [J].
PRIM, RC .
BELL SYSTEM TECHNICAL JOURNAL, 1957, 36 (06) :1389-1401