# 旅行商问题

旅行商问题（TSP）所问的是：给定一份城市清单以及每两座城市之间的距离或成本，求一条最短的路线，使它恰好访问清单上的每一座城市一次，并回到出发城市。它是组合优化的核心问题之一，在数学、经济学、计算机科学与工程学中均有研究，也是评估优化算法的标准基准。<sup>[1](https://technav.ieee.org/topic/traveling-salesman-problems/)</sup><sup> • </sup><sup>[2](https://link.springer.com/article/10.1007/s10479-025-06641-5)</sup>

| 关键事实 | 详情 |
|---|---|
| 巡回路线数量 | 一个含 n 座城市的对称实例有 (n−1)!/2 条不同的巡回路线；这一阶乘级的数量使得即使 n 中等大小，穷举枚举也不切实际<sup>[1](https://technav.ieee.org/topic/traveling-salesman-problems/)</sup> |
| 复杂度 | 判定版本是 NP完全的（依据理查德·卡普 1972 年对哈密顿回路为 NP完全的证明）；优化版本是 NP困难的<sup>[1](https://technav.ieee.org/topic/traveling-salesman-problems/)</sup> |
| 最佳精确通用算法 | 理查德·贝尔曼（1962）以及迈克尔·赫尔德与理查德·卡普（1962）的动态规划，运行时间为 O(n² 2ⁿ)<sup>[3](https://www.cs.princeton.edu/courses/archive/spring13/cos423/lectures/IntractabilityIII.pdf)</sup> |
| 首个里程碑式解法 | 乔治·丹齐格、雷·富尔克森与塞尔默·约翰逊于 1954 年用线性规划求解了一个 49 座城市的实例（每州一城，外加华盛顿特区）<sup>[4](https://ideas.repec.org/a/inm/oropre/v2y1954i4p393-410.html)</sup> |
| 已解出的最大实例 | pla85900，一个来自超大规模集成电路（VLSI）应用的实例，含 85,900 座城市，2005/06 年用 Concorde 求解；最优巡回路线长度为 142,382,641 个单位<sup>[5](https://www.math.uwaterloo.ca/tsp/pla85900/index.html)</sup> |
| 最佳近似保证 | Christofides 1976 年的算法对度量 TSP 保证不超过最优解的 3/2；2020 年安娜·卡林、内森·克莱因与沙扬·奥韦斯·加兰将这一保证改进为 3/2 − ε，其中 ε > 10⁻³⁶<sup>[6](https://arxiv.org/abs/2007.01409)</sup> |
| 应用 | 车辆路径与最后一公里配送、印刷电路板钻孔、机床上的作业排序、DNA测序、望远镜观测调度，以及超大规模集成电路布线<sup>[1](https://technav.ieee.org/topic/traveling-salesman-problems/)</sup> |

## 问题陈述与变体

在标准表述中，一个完全图的每条边上都带有成本，而一条巡回路线是一个恰好访问每个顶点一次的环；任务是找出总成本最小的巡回路线。当每一对城市之间的成本在两个方向上相同时，问题是对称的；当旅行成本因方向而异时——例如由于单行道——就是非对称 TSP（ATSP）。<sup>[7](https://pmc.ncbi.nlm.nih.gov/articles/PMC6697698/)</sup> 当成本满足三角不等式时，问题称为度量 TSP，这一类情形具有强有力的近似保证。<sup>[1](https://technav.ieee.org/topic/traveling-salesman-problems/)</sup>

判定版本问的是：是否存在一条总长度至多为给定上界的巡回路线；这一版本属于 NP，并且是 NP完全的。优化版本——找出成本最小的巡回路线——是 NP困难的。<sup>[1](https://technav.ieee.org/topic/traveling-salesman-problems/)</sup> 一大类变体扩展了基本问题，包括路径 TSP、瓶颈 TSP、广义 TSP、聚类 TSP、带奖赏收集的 TSP、时间依赖 TSP，以及带时间窗的 TSP；2025 年的一篇综述在统一的定义框架下梳理了这些变体的可近似性结果。<sup>[2](https://link.springer.com/article/10.1007/s10479-025-06641-5)</sup>

## 历史

与 TSP 相关的数学问题在 19 世纪曾由爱尔兰数学家威廉·罗恩·哈密顿爵士（Sir William Rowan Hamilton）研究过——他的“二十面体游戏”要求玩家利用指定的连接完成经过 20 个点的巡回路线——英国数学家托马斯·彭宁顿·柯克曼（Thomas Penyngton Kirkman）也研究过。问题的一般形式似乎最早由数学家在 20 世纪 30 年代开始研究，包括在维也纳和哈佛的卡尔·门格尔（Karl Menger）；后来它又由普林斯顿的哈斯勒·惠特尼（Hassler Whitney）与梅里尔·弗勒德（Merrill Flood）加以推广。<sup>[8](https://www.math.uwaterloo.ca/tsp/history/)</sup>

这个名称本身无法归功于某一个人。最早包含该词条的文献似乎是朱莉娅·罗宾逊（Julia Robinson）1949 年的报告《论哈密顿游戏（一个旅行商问题）》，但她的文字表明她并非在引入这个名称。证据指向该名称出现于 20 世纪 30 或 40 年代的某个时候，最可能是在普林斯顿；到 20 世纪 50 年代中期，它已被广泛使用。<sup>[9](https://assets.press.princeton.edu/chapters/s8451.pdf)</sup> 实际的路线规划远早于这些数学：1832 年一本供旅行商务代理使用的德语手册《旅行商人》（*Der Handlungsreisende*）讨论了如何在客户区域之间规划经济的路线。<sup>[9](https://assets.press.princeton.edu/chapters/s8451.pdf)</sup>

## 精确计算

理查德·贝尔曼（Richard Bellman，1962）以及迈克尔·赫尔德（Michael Held）与理查德·卡普（Richard Karp，1962）的精确动态规划算法，对每个城市子集及其中每个端点，计算从某个固定起点出发、经过该子集到达该端点的最便宜路径，然后把最好的完整路径闭合成一条巡回路线。它的运行时间为 O(n² 2ⁿ)，至今仍是通用问题上的最先进方法；构造一个对某个 c < 2 具有 O*(cⁿ) 时间的精确算法，仍是一个未解问题。<sup>[3](https://www.cs.princeton.edu/courses/archive/spring13/cos423/lectures/IntractabilityIII.pdf)</sup><sup> • </sup><sup>[10](https://people.engr.tamu.edu/j-chen3/courses/689/2006/reading/w1.pdf)</sup>

**割平面与 Concorde。** 精确方法上的突破出现在 1954 年，当时乔治·丹齐格（George Dantzig）、雷·富尔克森（Ray Fulkerson）与塞尔默·约翰逊（Selmer Johnson）利用道路距离求解了一个覆盖 48 个相邻州加华盛顿特区的 49 城实例，实际上求解了一个 42 城的线性规划，其解可延拓到整个实例。<sup>[4](https://ideas.repec.org/a/inm/oropre/v2y1954i4p393-410.html)</sup><sup> • </sup><sup>[11](https://www.math.uwaterloo.ca/tsp/history/pictorial/dfj.html)</sup> 他们的割平面方法为此后五十年的进展奠定了基础。<sup>[9](https://assets.press.princeton.edu/chapters/s8451.pdf)</sup> 现代的分支切割方法求解一个线性规划松弛，从子巡回消除约束中添加割平面，并在松弛不收敛时进行分支；这正是用 ANSI C 编写的 Concorde 求解器所实现的方法，它已为全部 110 个 TSPLIB 实例找到了最优解。<sup>[1](https://technav.ieee.org/topic/traveling-salesman-problems/)</sup><sup> • </sup><sup>[12](https://www.math.uwaterloo.ca/tsp/concorde/)</sup>

已解出的实例规模稳步增长：1954 年 49 座城市，1971 年 64 座（迈克尔·赫尔德与理查德·卡普），1980 年 318 座，1987 年 2,392 座，1998 年 13,509 座，2004 年 24,978 座（瑞典），2006 年 85,900 座。<sup>[13](https://www.math.uwaterloo.ca/tsp/history/milestone.html)</sup> 2006 年的纪录——来自贝尔实验室 20 世纪 80 年代末一个超大规模集成电路应用的 pla85900 实例——其最优巡回路线长度为 142,382,641 个单位；随着它的解出，TSPLIB 中整套挑战性问题都已用 Concorde 求解完毕。<sup>[5](https://www.math.uwaterloo.ca/tsp/pla85900/index.html)</sup>

## 近似与启发式

对于度量 TSP，由 Christofides 于 1976 年提出的 Christofides 算法保证巡回路线至多为最优解的 1.5 倍，长期以来一直是已知的最佳保证。<sup>[1](https://technav.ieee.org/topic/traveling-salesman-problems/)</sup><sup> • </sup><sup>[14](https://arxiv.org/abs/2004.02437)</sup> 2020 年，安娜·卡林（Anna Karlin）、内森·克莱因（Nathan Klein）与沙扬·奥韦斯·加兰（Shayan Oveis Gharan）给出了度量 TSP 的随机化 (3/2 − ε) 近似，其中 ε > 10⁻³⁶，这是近半个世纪以来对 3/2 界的首次改进。<sup>[6](https://arxiv.org/abs/2007.01409)</sup><sup> • </sup><sup>[15](https://toc.csail.mit.edu/node/1405)</sup> 对于平面上的欧几里得 TSP，存在多项式时间近似方案，对任意 ε > 0 可在 n<sup>O(1/ε)</sup> 时间内找到 (1 + ε) 近似。<sup>[16](https://doi.org/10.1109/SFCS.1996.548458)</sup> 对于非对称问题，Svensson、Tarnawski 与 Végh 给出了第一个常数因子近似算法，因子为 5,500，改进了此前那些保证随顶点数对数增长的算法。<sup>[7](https://pmc.ncbi.nlm.nih.gov/articles/PMC6697698/)</sup>

当不要求证明最优性时，启发式方法可提供实用的近优解。构造型启发式——如最近邻与贪心插入——能快速生成一条初始巡回路线；而改进型启发式——最著名的是 2-opt 与 3-opt 交换加上 Lin-Kernighan 移动——反复取出若干段并将它们放回别处，以降低总成本。元启发式方法，如模拟退火、禁忌搜索、遗传算法与蚁群优化，借助概率规则或基于种群的规则，通过允许或产生不改进巡回路线的移动来跳出局部最优。<sup>[1](https://technav.ieee.org/topic/traveling-salesman-problems/)</sup>

## 应用

TSP 及其变体遍布工程、物流与科学计算：车辆路径与最后一公里配送优化，规划印刷电路板的钻孔顺序以使钻头移动尽可能少，为机床上的作业排序以缩短工序间的装设时间，组装 DNA序列，调度望远镜观测以最小化目标间的转动，以及在制造超大规模集成电路时处理网络设计与布线布局。<sup>[1](https://technav.ieee.org/topic/traveling-salesman-problems/)</sup> 具体到印刷电路板制造，TSP 算法被用来缩短孔与孔之间的钻孔路径；一项已发表的案例研究为在一块奔腾 II 个人电脑主板上测得的 2,096 个孔优化了刀具路径。<sup>[17](https://www.sciencedirect.com/science/article/abs/pii/S0360835207002835)</sup>

一个近期的应用领域将卡车与无人机结合起来。Murray 与 Chu 于 2015 年提出了飞行助手 TSP（FSTSP），其中卡车与无人机协同投递包裹，以及并行无人机调度 TSP（PDSTSP）；在 FSTSP 中，每位客户由卡车或无人机服务一次，某些请求对无人机可能不可行，目标是最小化返回仓库的总投递时间。<sup>[18](https://onlinelibrary.wiley.com/doi/10.1002/rob.22231)</sup> 关于无人机辅助配送的综述指出，TSP-D 的各类变体——包括多无人机与多卡车的扩展——与现代物流网络直接相关。<sup>[19](https://www.mdpi.com/1999-4893/19/4/278)</sup>

## References

1. [Traveling salesman problems, IEEE Technology Navigator](https://technav.ieee.org/topic/traveling-salesman-problems/)
2. [Saller, S., Koehler, J., Karrenbauer, A. A survey on approximability of traveling salesman problems using the TSP-T3CO definition scheme, Annals of Operations Research](https://link.springer.com/article/10.1007/s10479-025-06641-5)
3. [Exact algorithms for TSP and Hamilton cycle (lecture notes, Princeton COS 423)](https://www.cs.princeton.edu/courses/archive/spring13/cos423/lectures/IntractabilityIII.pdf)
4. [Dantzig, G., Fulkerson, R., Johnson, S. (1954). Solution of a Large-Scale Traveling-Salesman Problem, Operations Research 2(4), 393–410](https://ideas.repec.org/a/inm/oropre/v2y1954i4p393-410.html)
5. [Optimal 85,900-Point Tour (pla85900), University of Waterloo TSP pages](https://www.math.uwaterloo.ca/tsp/pla85900/index.html)
6. [Karlin, A. R., Klein, N., Oveis Gharan, S. A (Slightly) Improved Approximation Algorithm for Metric TSP, arXiv:2007.01409](https://arxiv.org/abs/2007.01409)
7. [Bounded Asymmetry in Road Networks, Scientific Reports (2019)](https://pmc.ncbi.nlm.nih.gov/articles/PMC6697698/)
8. [History of the TSP, University of Waterloo](https://www.math.uwaterloo.ca/tsp/history/)
9. [Applegate, D., Bixby, R., Chvátal, V., Cook, W. The Traveling Salesman Problem: A Computational Study, Chapter 1, Princeton University Press](https://assets.press.princeton.edu/chapters/s8451.pdf)
10. [Exact Algorithms for NP-Hard Problems: A Survey](https://people.engr.tamu.edu/j-chen3/courses/689/2006/reading/w1.pdf)
11. [1954: 49 cities, TSP Pictorial History, University of Waterloo](https://www.math.uwaterloo.ca/tsp/history/pictorial/dfj.html)
12. [Concorde TSP Solver, University of Waterloo](https://www.math.uwaterloo.ca/tsp/concorde/)
13. [Milestones in the Solution of TSP Instances, University of Waterloo](https://www.math.uwaterloo.ca/tsp/history/milestone.html)
14. [A historical note on the 3/2-approximation algorithm for the metric traveling salesman problem, arXiv:2004.02437](https://arxiv.org/abs/2004.02437)
15. [Nathan Klein: A (Slightly) Improved Approximation Algorithm for Metric TSP, MIT CSAIL](https://toc.csail.mit.edu/node/1405)
16. [Polynomial time approximation schemes for Euclidean TSP and other geometric problems, IEEE FOCS 1996](https://doi.org/10.1109/SFCS.1996.548458)
17. [The optimization of printed circuit board manufacturing by improving the drilling process productivity, Computers & Industrial Engineering](https://www.sciencedirect.com/science/article/abs/pii/S0360835207002835)
18. [Saunders et al. Autonomous aerial robotics for package delivery: A technical review, Journal of Field Robotics (2024)](https://onlinelibrary.wiley.com/doi/10.1002/rob.22231)
19. [A Comprehensive Review of Metaheuristics for the Modern Traveling Salesman Problem and Drone-Assisted Delivery, Algorithms 19(4):278](https://www.mdpi.com/1999-4893/19/4/278)

---
*Initially written Sep 17, 2026 · Reviewed: Sep 30, 2026; Oct 15, 2026 · Edited: Sep 30, 2026; Oct 15, 2026 · Last review: Oct 15, 2026*

Topic: 物质世界与数学 › 数学与统计学 › 逻辑与离散数学 › General discrete mathematics and discrete structures › Graph theory › Computational graph problems and algorithms › NP-hard graph problems and their algorithms

Copyright 2026 Edgepedia

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

Source: https://www.edgepedia.org/zh/travelling-salesman-problem

English original: https://www.edgepedia.org/travelling-salesman-problem
