Given a collection of towns in Borneo, Your task is to design a program using C++ programming language to find a way to visit all the towns and return to the starting point by minimising the distance travelled. Please note that each town can be visited only once, except for the starting point.

Recommended Answers

All 4 Replies

Your task is to do your own bloody homework.

Given a series of points and costs to move between points, create a program to determine the lowest cost (and other possible criteria) to move between all points without repetition. Not all points need to connect to all points. This is famous style of problem in computer science optimization. Good luck with it. I have heard about a few versions of this over the years. Some of them are even not brute force search comparisons.

Do a search on the Travelling Salesman Problem, for details as to the algorithmic complexity of the problem and various solutions available for it, but keep in mind that your professor will - not might, but definitely will - do the same search as well. Copying the code from any of these sources will only get you the failing grade you deserve.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.