methods for solving this simple routing problem

المشرف العام

Administrator
طاقم الإدارة
In my transport geography class, we were asked to do a "best guess" on the route which does the following on this graph:

  1. Starts at A
  2. Visits each node
  3. Returns to A
  4. minimizes distance.


I wrote up program which calculated all of the five step paths that started from A, visited every node, and returned to A. I then calculated the cost of these paths.

How would other people solve this?

My teacher gave us a "hint" that we should read about Dijkstra's algorithm, but I couldn't see how to apply that to solve this particular problem. My solution would fall apart pretty quickly as the number of steps or nodes increased.



أكثر...
 
أعلى