|The stupid question is the question not asked|
Travelling problemby Dirk80 (Monk)
|on Dec 20, 2013 at 21:11 UTC||Need Help??|
Dirk80 has asked for the
wisdom of the Perl Monks concerning the following question:
there is a start place and a destination place. In the middle there are 22 other places. I want to find a short way (not the shortest because I know that this would consume too much time to calculate it) from the start place to the destination place considering all places between. The goal is that all 24 places were visited exactly once.
My input is the distance in km between all places.
My idea was to take the Graph::Simple module. I tried it with 4 places.
Here my code snippet:
The result is
But why is my point "C" not considered? I would need a route from "A" to "D" which visits also "B" and "C".
What is your suggestion to solve this problem? Is it a good idea to take a graph module to solve it?
Thank you very much.