Traveling Salesman Problem - TSP
Updated 2026-07-30
Summary
The Traveling Salesman Problem (TSP) is an NP-hard problem in combinatorial optimization, of great importance in operations research and theoretical computer science. The problem is stated as: "Given a list of cities and the distances between each pair of cities, find the shortest possible route that visits each city exactly once and returns to the origin city." TSP is a special case of the traveling purchaser problem and the vehicle routing problem. As a typical decision problem in computational complexity theory, one version of TSP is: given a graph and a length L, determine whether there exists a tour (circuit) shorter than L. This problem is classified as NP-complete. It is known that the worst-case time complexity of TSP algorithms grows super-polynomially (possibly exponentially) with the number of cities. The problem was formulated in the 1930s...
Definition
Given a set of cities and the distances between them, find the shortest possible route that visits each city exactly once and returns to the starting city. As the number of cities increases, the computational complexity of finding the route grows exponentially (NP-hard), making it impossible to find the optimal solution through exhaustive search. Scaffold use: The wisdom of suboptimal solutions. When facing complex logistics, scheduling, or life planning, do not attempt to find the "absolute optimal solution" (which would consume a lifetime to compute). Accept the "good enough" suboptimal solution found by "heuristic algorithms"; action is better than perfect planning.
Introduction
How to use
The wisdom of suboptimal solutions. When facing complex logistics, scheduling, or life planning, do not attempt to find the "absolute optimal solution" (which would consume a lifetime to compute). Accept the "good enough" suboptimal solution found by "heuristic algorithms"; action is better than perfect planning.
Mechanism
Finding the shortest route that visits n cities exactly once and returns to the origin is a classic NP-hard combinatorial optimization problem; as the number of cities increases slightly, the solution space explodes factorially.
Practice
In progress 0/2Practice this model in one real situation:
Cases
- Logistics delivery route planning, optimization of drilling order for printed circuit boards.
Common pitfalls
- Using brute-force enumeration when the number of cities increases; ignoring practical constraints such as time windows and load capacity.
Sources
Source support: Explicit
References currently contain only Wikipedia links; primary sources still need review.
- zh.wikipedia.orghttps://zh.wikipedia.org/wiki/%E6%97%85%E8%A1%8C%E6%8E%A8%E9%94%80%E5%91%98%E9%97%AE%E9%A2%98verified
account_treeGenealogyexpand_more
PRIVATE NOTES · Only visible to you
SAVED Q&A
ENTRY Q&A · Private saving available
Ask with a clear boundary
thinkingmodels answers from published entry context only.
Your question is sent to thinkingmodels. The answer uses public entry context only.
RELATED MODELS