# 罗伯特·C·普里姆（Robert C. Prim）

**罗伯特·C·普里姆**（1921年9月25日，得克萨斯州斯威特沃特（Sweetwater, Texas）——2021年11月18日）是一位美国数学家和计算机科学家，他的名字与图论中最著名的算法之一相连，即发表于1957年11月《贝尔系统技术杂志》（Bell System Technical Journal）的《最短连接网络及若干推广》（Shortest Connection Networks And Some Generalizations）中的最小生成树方法<sup>[1](https://proofwiki.org/wiki/Mathematician:Robert_Clay_Prim)</sup><sup> • </sup><sup>[2](https://archive.org/details/bstj36-6-1389)</sup>。这个名字在某种意义上是一个历史偶然：[沃伊捷赫·亚尔尼克](https://www.edgepedia.org/zh/vojtech-jarnik)（Vojtěch Jarník）曾于1930年发表过一个相关算法，而[奥塔卡尔·博鲁夫卡](https://www.edgepedia.org/zh/otakar-boruvka)（Otakar Borůvka）于1926年给出了该问题的第一个算法解，因此该方法也被称为DJP算法、亚尔尼克算法或亚尔尼克–普里姆算法<sup>[3](https://course.ccs.neu.edu/cs2510sp22/lecture32.html)</sup><sup> • </sup><sup>[1](https://proofwiki.org/wiki/Mathematician:Robert_Clay_Prim)</sup>。普里姆1957年的论文独立表述了一类通用的贪心构造过程，并给出了以尽可能最短的直接链路网络将一组终端互连起来的实用图解方法和计算方法<sup>[2](https://archive.org/details/bstj36-6-1389)</sup><sup> • </sup><sup>[4](https://www.math.ucdavis.edu/~saito/data/acha.read.w12/graham-hell-mst.pdf)</sup>。

| 关键事实 | 详情 |
|---|---|
| 生卒日期 | 1921年9月25日生于得克萨斯州斯威特沃特（Sweetwater, Texas）；2021年11月18日去世<sup>[1](https://proofwiki.org/wiki/Mathematician:Robert_Clay_Prim)</sup> |
| 教育 | 1941年获电气工程学士；1949年获普林斯顿大学（Princeton University）数学博士学位，博士论文《理想气体的稳态旋转流》（Steady Rotational Flow of Ideal Gases）<sup>[5](https://ithistory.org/honor-roll/dr-robert-clay-prim)</sup><sup> • </sup><sup>[6](https://www.genealogy.math.ndsu.nodak.edu/id.php?id=43018)</sup> |
| 代表论文 | 《最短连接网络及若干推广》（Shortest Connection Networks And Some Generalizations），《贝尔系统技术杂志》（Bell System Technical Journal）36(6)，1957年11月，第1389–1401页；标注日期为1957年5月8日<sup>[2](https://archive.org/details/bstj36-6-1389)</sup> |
| 动机 | 设计贝尔系统（Bell System）租用线路的最低成本网络，以连接地理位置相距遥远的商业办公室<sup>[7](https://textbooks.cs.ksu.edu/cc315/iii-graphs/9-graphs--minimum-spanning-trees/4-prim/)</sup> |
| 前驱工作 | 博鲁夫卡1926；亚尔尼克1930（他处记为1929）；克鲁斯卡尔（Kruskal）1956；迪杰斯特拉（Dijkstra）1959年重新发表<sup>[3](https://course.ccs.neu.edu/cs2510sp22/lecture32.html)</sup><sup> • </sup><sup>[8](https://rellek.net/book-2017/s_graphalgorithms_historical-notes.html)</sup> |
| 复杂度 | 使用二叉堆时为O(m log n)，使用斐波那契堆时为O(m + n log n)，使用d叉堆时为O(m \( log_{d} \) n)<sup>[9](https://www.cs.jhu.edu/~mdinitz/IntroAlgorithms/Lectures/lecture14.pdf)</sup><sup> • </sup><sup>[10](https://www.arl.wustl.edu/~jon.turner/gads/graphAlgorithms/mst/mst.html)</sup> |
| 今日地位 | 实践中属于最快的MST算法之一；已知最快的算法是博鲁夫卡方法与普里姆方法的混合<sup>[11](https://link.springer.com/chapter/10.1007/BFb0028279)</sup><sup> • </sup><sup>[3](https://course.ccs.neu.edu/cs2510sp22/lecture32.html)</sup> |

## 生平与职业生涯

普里姆早期职业生涯有文献记载的时间线贯穿普林斯顿和战时工程工作。他于1941年获得电气工程学士学位，并在1941年至1944年第二次世界大战期间担任工程师，随后加入美国海军军械实验室（United States Naval Ordnance Laboratory）<sup>[5](https://ithistory.org/honor-roll/dr-robert-clay-prim)</sup>。之后，他于1948年至1949年在普林斯顿大学担任助理研究员，并于1949年在该校完成数学博士学位<sup>[5](https://ithistory.org/honor-roll/dr-robert-clay-prim)</sup>。[数学](https://www.edgepedia.org/zh/mathematics)谱系项目（Mathematics Genealogy Project）将学位论文题目记录为《理想气体的稳态旋转流》<sup>[6](https://www.genealogy.math.ndsu.nodak.edu/id.php?id=43018)</sup>。

1957年的工作是在[贝尔实验室](https://www.edgepedia.org/zh/bell-labs)（Bell Laboratories）完成的。普里姆知道约瑟夫·B·克鲁斯卡尔此前在同一问题上的工作，因为普里姆的论文发表时，两人是贝尔实验室的同事<sup>[8](https://rellek.net/book-2017/s_graphalgorithms_historical-notes.html)</sup>。贝尔实验室的机构史将这一贡献置于其计算研究背景中：对于边与节点之比较高的图，罗伯特·C·普里姆于1957年提供了一种更高效的流程<sup>[12](https://archive.computerhistory.org/resources/access/text/2022/08/102804421-05-01-acc.pdf)</sup>。广为流传的传记说法称普里姆曾在洛斯阿拉莫斯（Los Alamos）参与[曼哈顿计划](https://www.edgepedia.org/zh/manhattan-project)（Manhattan Project），后来在桑迪亚公司（Sandia Corporation）、米特尔公司（MITRE Corporation）和“美国数学”（Math for America）任职，但这些说法未得到任何独立已发表记录的证实；IT历史学会（IT History Society）的条目反而记载了战时工程工作和海军军械实验室<sup>[5](https://ithistory.org/honor-roll/dr-robert-clay-prim)</sup>。

## 1957年的论文

普里姆的论文将其基本问题表述为：用尽可能最短的直接链路网络将给定的一组终端互连起来，并给出了以图解方式和计算方式求解该问题的简单而实用的流程；这些流程还解决了一个更一般的问题<sup>[2](https://archive.org/details/bstj36-6-1389)</sup>。其应用是具体的：普里姆引用了“大规模通信”，特别是“贝尔系统租用线路”业务，其中在不同城市或州设有办公室的公司希望所有办公室都连通，同时避免过多的线路<sup>[7](https://textbooks.cs.ksu.edu/cc315/iii-graphs/9-graphs--minimum-spanning-trees/4-prim/)</sup>。

正如格雷厄姆与赫尔（Graham and Hell）对该问题历史的梳理所重构的那样，普里姆实际上基于两条原则构建了一类通用算法：任何孤立终端都可以连接到最近邻，任何孤立片段都可以通过一条可用的最短链路连接到最近邻<sup>[4](https://www.math.ucdavis.edu/~saito/data/acha.read.w12/graham-hell-mst.pdf)</sup>。出于计算上的原因，普里姆更偏爱片段生长变体，它操作的是从生长中的片段到尚未连接终端的距离的F表<sup>[4](https://www.math.ucdavis.edu/~saito/data/acha.read.w12/graham-hell-mst.pdf)</sup>。这种片段生长形式正是现代教科书所称的[普里姆算法](https://www.edgepedia.org/zh/prims-algorithm)：从一个顶点开始，反复加入恰好有一个端点已在树中的最低权重边<sup>[3](https://course.ccs.neu.edu/cs2510sp22/lecture32.html)</sup>。

## 归属与历史

最小生成树问题的历史比其常见名称所暗示的更悠久。博鲁夫卡算法是最古老、也可以说是最简单的MST方法，可追溯至1926年，远在计算机出现之前，并曾被多次重新发现<sup>[13](https://www.cs.cmu.edu/afs/cs/academic/class/15210-f12/www/lectures/lecture18.pdf)</sup>。沃伊捷赫·亚尔尼克在博鲁夫卡结果的基础上进行了简化，并于1930年发表了一个相关算法；该算法同样直到普里姆于1957年重新发现它之前并不广为人知<sup>[3](https://course.ccs.neu.edu/cs2510sp22/lecture32.html)</sup>。一本教科书的历史注记将亚尔尼克的优先权定在1929年而非1930年，文献中的这一差异仍未解决<sup>[8](https://rellek.net/book-2017/s_graphalgorithms_historical-notes.html)</sup>。

**为什么普里姆的名字留了下来。** 格雷厄姆与赫尔观察到，讨论该问题的作者通常将克鲁斯卡尔（1956）和普里姆（1957）引为该问题及其首批高效解法的来源，尽管两者都将博鲁夫卡（1926）引为前驱；他们还指出，若干表面上独立的来源和算法解法曾出现在[捷克斯洛伐克](https://www.edgepedia.org/zh/czechoslovakia)（Czechoslovakia）、法国（France）和波兰（Poland），时间可追溯至20世纪初<sup>[4](https://www.math.ucdavis.edu/~saito/data/acha.read.w12/graham-hell-mst.pdf)</sup>。埃兹格·迪杰斯特拉于1959年在《数值数学》（Numerische Mathematik）上重新发表了同一算法，使其成为第三次发表，这也是该方法也带有他的名字的原因<sup>[7](https://textbooks.cs.ksu.edu/cc315/iii-graphs/9-graphs--minimum-spanning-trees/4-prim/)</sup><sup> • </sup><sup>[8](https://rellek.net/book-2017/s_graphalgorithms_historical-notes.html)</sup>。没有来源解释普里姆的名字取代亚尔尼克名字的机制；命名惯例本身，即DJP算法、亚尔尼克算法、普里姆–亚尔尼克算法，都有文献记载，其中1957年的算法被描述为独立于迪杰斯特拉和亚尔尼克发现<sup>[1](https://proofwiki.org/wiki/Mathematician:Robert_Clay_Prim)</sup>。

## 普里姆与克鲁斯卡尔、博鲁夫卡之比较

普里姆算法与[克鲁斯卡尔算法](https://www.edgepedia.org/zh/kruskals-algorithm)仅在选择加入边的顺序上不同。普里姆始终维护一棵树，每次增加一条边；克鲁斯卡尔按全局权重顺序扫描边，保证每一步都最小，但会构建许多最终连接起来的独立树<sup>[3](https://course.ccs.neu.edu/cs2510sp22/lecture32.html)</sup>。两者都生成最小生成树，而在存在相等权重的图上，两种方法可能生成外观不同但都有效且总成本相等的树；当没有两条边共享同一权重时，MST是唯一的<sup>[7](https://textbooks.cs.ksu.edu/cc315/iii-graphs/9-graphs--minimum-spanning-trees/4-prim/)</sup>。

迪杰斯特拉在为1959年重新表述辩护时认为，他的版本优于克鲁斯卡尔版本，因为每一步需要在内存中存储的图信息更少<sup>[8](https://rellek.net/book-2017/s_graphalgorithms_historical-notes.html)</sup>。克鲁斯卡尔本人1997年在贝尔实验室撰文回忆说，他论文中的推理如此简单，以至于他征求过意见，问是否值得投稿<sup>[14](https://dml.cz/bitstream/handle/10338.dmlcz/107592/ArchMathRetro_033-1997-1_3.pdf)</sup>。

在实证性能方面，在最多13万个节点（稀疏）或75万条边（稠密）的图上进行的大规模实验，将使用各种优先队列的普里姆算法与克鲁斯卡尔算法、谢里顿–塔里扬（Cheriton–Tarjan）算法和弗雷德曼–塔里扬（Fredman–Tarjan）算法进行比较；在测试规模范围内，使用配对堆、有时使用二叉堆的普里姆算法明显更可取<sup>[11](https://link.springer.com/chapter/10.1007/BFb0028279)</sup>。如今已知最快的MST算法是博鲁夫卡与普里姆结果的混合<sup>[3](https://course.ccs.neu.edu/cs2510sp22/lecture32.html)</sup>。

## 数据一览

普里姆算法使用二叉堆时的运行时间为O(m log n)，使用[斐波那契堆](https://www.edgepedia.org/zh/fibonacci-heap)时为O(m + n log n)，与迪杰斯特拉算法的运行时间基本相同；边堆实现从不需要减小键（Decrease-Key）操作，这使它在实践中甚至快于迪杰斯特拉算法，尽管在渐近意义上并非如此<sup>[9](https://www.cs.jhu.edu/~mdinitz/IntroAlgorithms/Lectures/lecture14.pdf)</sup>。包括普里姆算法在内的经典MST算法通常以O(E log V)时间运行<sup>[15](https://ar5iv.labs.arxiv.org/html/2507.04867)</sup>。

d叉堆版本说明了普里姆算法为何在每种图密度下都高效。当d = 2 + ⌊m/n⌋时，运行时间变为O(m \( log_{d} \) n)：对于m ≥ \( n^{3/2} \)的稠密图为O(m)，对于m = n log n的稀疏图为O(n (log n)² / log log n)，对于m = 3n的极稀疏图为O(n log n)；普里姆算法对稠密图是最优的<sup>[10](https://www.arl.wustl.edu/~jon.turner/gads/graphAlgorithms/mst/mst.html)</sup>。相比之下，克鲁斯卡尔算法在使用比较排序时需要O(m log n)，使用基数排序等线性时间排序时需要O(m α(m,n))，其性能关键取决于边排序方法<sup>[10](https://www.arl.wustl.edu/~jon.turner/gads/graphAlgorithms/mst/mst.html)</sup>。对于稠密图，查泽勒（Chazelle）的软堆方法达到O(m α(m,n))，近期工作提出了一种“带状–枢轴普里姆”（Band–Pivot Prim）变体，旨在突破MST的排序屏障<sup>[16](https://openreview.net/pdf?id=suQWzY4lrG)</sup>。

该算法仍是活跃的研究对象。一篇2025年的arXiv论文分析了普里姆算法所发现子树的局部结构，表明它首先在局部邻域中花费次线性时间，形成一个入侵渗流簇，然后再探索图的远处部分<sup>[15](https://ar5iv.labs.arxiv.org/html/2507.04867)</sup>。

## References

1. [Mathematician: Robert Clay Prim, ProofWiki](https://proofwiki.org/wiki/Mathematician:Robert_Clay_Prim)
2. [R. C. Prim, "Shortest Connection Networks And Some Generalizations", Bell System Technical Journal 36(6), November 1957, pp. 1389–1401, Internet Archive](https://archive.org/details/bstj36-6-1389)
3. [Lecture 32: Minimum Spanning Trees, Northeastern University](https://course.ccs.neu.edu/cs2510sp22/lecture32.html)
4. [R. L. Graham and P. Hell, "On the History of the Minimum Spanning Tree Problem", UC Davis](https://www.math.ucdavis.edu/~saito/data/acha.read.w12/graham-hell-mst.pdf)
5. [Dr. Robert Clay Prim, IT History Society Honor Roll](https://ithistory.org/honor-roll/dr-robert-clay-prim)
6. [Robert C. Prim, III, The Mathematics Genealogy Project](https://www.genealogy.math.ndsu.nodak.edu/id.php?id=43018)
7. [Prim, CC 315 Textbook, Kansas State University](https://textbooks.cs.ksu.edu/cc315/iii-graphs/9-graphs--minimum-spanning-trees/4-prim/)
8. [AC Historical Notes: graph algorithms](https://rellek.net/book-2017/s_graphalgorithms_historical-notes.html)
9. [Prim's Algorithm, Johns Hopkins University lecture notes 14.2](https://www.cs.jhu.edu/~mdinitz/IntroAlgorithms/Lectures/lecture14.pdf)
10. [Minimum Spanning Trees, Washington University in St. Louis](https://www.arl.wustl.edu/~jon.turner/gads/graphAlgorithms/mst/mst.html)
11. [An empirical analysis of algorithms for constructing a minimum spanning tree, Springer](https://link.springer.com/chapter/10.1007/BFb0028279)
12. [A History of Computing at Bell Research Laboratories (1937–1975), Computer History Museum archive](https://archive.computerhistory.org/resources/access/text/2022/08/102804421-05-01-acc.pdf)
13. [Kruskal's algorithm, Prim's algorithm and Borůvka's, CMU lecture notes](https://www.cs.cmu.edu/afs/cs/academic/class/15210-f12/www/lectures/lecture18.pdf)
14. [Joseph B. Kruskal retrospective, Archivum Mathematicum 33 (1997)](https://dml.cz/bitstream/handle/10338.dmlcz/107592/ArchMathRetro_033-1997-1_3.pdf)
15. [Local limit of Prim's algorithm, arXiv 2507.04867 (2025)](https://ar5iv.labs.arxiv.org/html/2507.04867)
16. [Band–Pivot Prim: Breaking the Sorting Barrier for Minimum Spanning Tree, OpenReview](https://openreview.net/pdf?id=suQWzY4lrG)

---
*Initially written Oct 10, 2026 · Edited: Oct 11, 2026; Oct 15, 2026*

Topic: 技术与人造世界 › 工程师与计算机科学家 › 计算机科学家与人工智能研究者 › Researchers in theoretical computer science, cryptography, quantum computing, graphics, and HCI › Algorithms and data structures

Copyright 2026 Edgepedia

License: Edgepedia Community License 1.0, https://www.edgepedia.org/edgepedia/license

Source: https://www.edgepedia.org/zh/robert-c-prim

English original: https://www.edgepedia.org/robert-c-prim
