Forums
New posts
Search forums
Members
Current visitors
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Search forums
Menu
Log in
Register
Install the app
Install
Forums
Archive
Archive
Java
Distance normalized TSP algorithm
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
[QUOTE="JSH, post: 3597148"] Good catch. That is just a miss on my part, but it's easily fixable, by saying that a path is calculated for each possible starting node in turn. The algorithm is still polynomial time with that change. As that's fairly easy I'd like to focus first on getting a full path from an arbitrary start at just any node, say, chosen randomly. I realized an omission in my primary algorithm, as I simply forget about the cost for T_1 from N_1 to the node being considered, which is kind of an odd thing to forget. The solution and correction to the algorithm is that cost is multiplied as well. So if cost from N_1 to N_2 is cost_1 for T_1 and cost from N_1 to N_3 is cost_2 for T_2, then the calculation is cost_1*cost_2*distance, where here distance is 1, so it is cost_1*cost_2. With the correction you'd have two weight values for each, so cost_1*cost_2*time_1*time_2*distance If more than one path has the least value then you randomly pick. Oh, that's not good. I'll need to consider this carefully later. Kind of in a rush this morning... Thanks for the reply! I'll have to consider it in detail later as I'm in a rush this morning, but wanted to add the correction. If you are correct then that kills the usefulness of the idea for TSP, but doesn't mean I won't still program the algorithm out of curiosity. James Harris [/QUOTE]
Verification
Post reply
Forums
Archive
Archive
Java
Distance normalized TSP algorithm
Top