Click here to Skip to main content
15,887,214 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
See more:
The Traveling Salesman Problem (TSP) is a classic optimization problem in computer science. Given a list of cities and the distances between each pair of cities, the goal is to find the shortest possible route that visits each city exactly once and returns to the starting city.

What I have tried:

Your task is to write an algorithm to solve the TSP for a large number of cities efficiently. The current algorithm you have implemented has a time complexity that grows exponentially with the number of cities, making it impractical for larger datasets.
Posted
Comments
Graeme_Grant 10-Oct-23 8:22am    
Lol, are you asking us to do your homework assignment for you?

If you want someone to write code for you, then there are these services:
* fiverr[^]
* Upwork[^]
* Freelancer[^]
* Guru[^]
* PeoplePerHour[^]
* TaskRabbit[^]
* Karat[^]

1 solution

If you google "Traveling Salesman Problem" you get 20,200,000 hits.

This is just one of them;
Travelling Salesman Problem using Dynamic Programming - GeeksforGeeks[^]
This will get you started.
 
Share this answer
 
Comments
CPallini 10-Oct-23 9:08am    
Indeed. My 5.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900