The educational insights and opportunities afforded by the nuances of Prim's and Kruskal's MST algorithms.

ITiCSE(2018)

引用 0|浏览83
暂无评分
摘要
The computation of a minimum spanning tree (MST) is a fundamental topic in any algorithms course. In this paper, we outline a series of projects based on a thorough exploration of the performances of two well-known MST algorithms: Prim’s and Kruskal’s. For a graph of n nodes and e edges, both run in O(e lgn) time but these results are based on picking the right data structures. Prim’s relies on a priority queue that supports priority modification in O(lgn) time while Kruskal’s relies on a disjoint-set that supports find/union operations in O(lgn) time. The performance ramifications of using simpler data structures allow students to thoroughly understand the operations of these two algorithms, get a deeper comprehension of asymptotic complexity analysis, negotiate empirical results with analytical predictions, and illustrate the value of “programming to the interface”. Our study also includes the performance consequences of the qualities of the graphs on which MSTs are computed: structure (random vs scale-free), density (sparse vs dense), and edge cost distribution. Finally, as an additional inquiry to engage students in a somewhat unexplored direction, we focus on the average pairwise-distance of the MSTs produced by Prim’s vs Kruskal’s.
更多
查看译文
关键词
Minimum Spanning Trees, Prim's algorithm, Kruskal's algorithm, Data Structures, Empirical results, Asymptotic complexity
AI 理解论文
溯源树
样例
生成溯源树,研究论文发展脉络
Chat Paper
正在生成论文摘要