I need help to implement a naive solution in Java to the (in)famous travelling sales person problem. For the naive solution I need to: A) Consider city A as the starting point. B) Generate all possible paths from A through all the nodes in the graph and back to A. C) Calculate the cost of the paths and keep track of the minimum cost path. D) Return the minimum cost path.
regarding B: how does one calculate all different paths and store the total cost associated? Such as ABCDA, ABDCA, etc
Don't post a file download... try a normal picture
@joachim @woodrow73 Agree! Personally I don't open downloads.
@mathmate how do I attach a picture? I don't see that option, except "attach file"...
Indeed, use "attach file" option. A file can have a .jpg or .png suffix, in which case it will show up as a link to a picture.
Join our real-time social learning platform and learn together with your friends!