This is closely related to the traveling salesman problem...
https://en.wikipedia.org/wiki/Travel...lesman_problem
an NP-complete problem and one of the most difficult to solve. AFAIK, no general solution exists.
For the benefit of those unfamiliar with the problem, I'll quote the description from the above referenced Wikipedia reference.
"Given a list of cities and the distances between each pair of cities, what is the shortest possible route that visits each city and returns to the origin city?"
(Most descriptions of the problem specify that each city is to be visited only once.)

LinkBack URL
About LinkBacks
Reply With Quote

Bookmarks