Nepedia
Back to Discover
Advanced Reader
🔢

Travelling salesman problem

math Maturity 11-13 Next article →

The travelling salesman problem, or TSP, is a famous puzzle in combinatorial optimization.

Illustration of an unsolved travelling salesman problem
Illustration of an unsolved travelling salesman problem

It asks a simple question about efficiency. Given a list of cities and the distances between every pair, what is the shortest route? This route must visit every city exactly once. Finally, the traveler must return to the original starting city. This creates a closed loop known as a Hamiltonian cycle.

GLPK solution of a travelling salesman problem
GLPK solution of a travelling salesman problem

Solving this helps save time, fuel, and money in many industries.

To solve this, mathematicians use a model called a weighted graph.

Weighted K4
Weighted K4

In this model, cities are called vertices. The paths between them are called edges. Each edge has a weight, which represents a cost like distance or time. There are two main types of TSP. In a symmetric TSP, the distance is the same in both directions. This halves the number of possible solutions. In an asymmetric TSP, the distances change based on direction. This happens because of one-way streets, traffic, or different airfares.

Finding the perfect answer is computationally difficult. In 1972, Richard M. Karp proved the Hamiltonian cycle problem is NP-complete. This means the TSP is NP-hard. As you add more cities, the time needed to find the best route grows superpolynomially. This makes it much harder than simple math problems. Because of this, researchers often use heuristics. These are clever strategies that find a very good answer quickly, even if it is not the absolute shortest.

Bruteforce
Bruteforce
Nearestneighbor
Nearestneighbor

History shows a long journey of discovery for this problem. While a 1832 handbook mentioned tours through Germany, formal math came later. In the 19th century, William Rowan Hamilton studied similar ideas through his icosian game.

William Rowan Hamilton painting
William Rowan Hamilton painting

In the 1930s, Karl Menger helped define the problem. Later, Merrill M. Flood studied it to solve school bus routing. The name "travelling salesman problem" first appeared in a 1949 RAND Corporation report by Julia Robinson. The problem became very popular in scientific circles during the 1950s and 1960s.

Major breakthroughs happened at the RAND Corporation. Researchers George Dantzig, Delbert Ray Fulkerson, and Selmer M. Johnson developed the cutting plane method. They expressed the problem as an integer linear program. Using these new methods, they solved an instance with 49 cities perfectly. They used only 26 cuts to find the optimal tour. They also used branch-and-bound algorithms for the first time.

Branchbound
Branchbound

In 1976, Christofides and Serdyukov independently created a new algorithm. Their method ensures the solution is at most 1.5 times the optimal length.

Modern technology allows us to tackle massive versions of this puzzle. In the 1990s, the Concorde program was developed for high-level solutions. In 2006, researchers solved a version with 85,900 cities. This specific problem involved a microchip layout. Today, we can find solutions for millions of cities within a 2% to 3% margin of error. One famous "world tour" problem was solved within 0.05% of the best possible answer. This shows how much computing power has grown.

This math is essential for many modern systems. In warehouses, it helps workers pick orders from shelves efficiently. In manufacturing, it guides robots that drill holes in microchips. It even helps scientists sequence DNA fragments. Astronomers use it to move telescopes between stars quickly. Even Google uses versions of this to route data between processing nodes. What began as a simple travel puzzle now powers much of our high-tech world.

561 words

Where will your curiosity go next?

Keep exploring at your chosen reading level.

🖼️ Images & Media (11)
File:Illustration of an unsolved travelling salesman problem.svg
Illustration of an unsolved travelling...
File:GLPK solution of a travelling salesman problem.svg
GLPK solution of a travelling salesman problem.svg
File:William Rowan Hamilton painting.jpg
William Rowan Hamilton painting.jpg
File:Weighted K4.svg
Weighted K4.svg
File:Bruteforce.gif
Bruteforce.gif
File:Branchbound.gif
Branchbound.gif
File:Nearestneighbor.gif
Nearestneighbor.gif
File:Creating a matching.svg
Creating a matching.svg
File:UbMjAyAmQrSwtP0gdeKe matchingshortcut.svg
UbMjAyAmQrSwtP0gdeKe matchingshortcut.svg
File:Showing a step of the two-opt heuristic.svg
Showing a step of the two-opt heuristic.svg
File:AntColony.gif
AntColony.gif
More to explore

What is Nepedia?

A free, ad-free encyclopedia for children. Every article is written at five reading levels, so the same page works for a five-year-old and a fifteen-year-old — use the level switcher above to see this one change. No account needed to read.