Skip to content
← All questions

What is the Traveling Salesman Problem and how many possible routes are there for 8 cities?

The Traveling Salesman Problem (TSP) is a classic optimization problem that asks for the shortest possible route that visits a given set of cities exactly once and returns to the starting city. For an instance with 8 cities, there are 5040 possible routes.

Conditions

  • The route must visit every city in the set exactly once.
  • The route must return to the starting city.
  • The goal is to minimize the total distance traveled.

Reasoning, step by step

  1. Identify the set of cities to be visited.
  2. Determine the distances between each pair of cities.
  3. Find the shortest possible route that visits each city exactly once and returns to the start.

Example

The video introduces the TSP with a map of the United States showing 8 cities and states, "There are 5040 possible routes between these 8 cities".

Common misconceptions

  • Believing that the TSP only requires visiting each city once without returning to the start.
  • Assuming that the number of possible routes grows linearly with the number of cities.

Watch the explanation

Explore next

Answers are generated from source material and independently checked. Consult the original video or creator if something is unclear.