Ask your own question, for FREE!
Computer Science 10 Online
OpenStudy (joachim):

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.

OpenStudy (joachim):

regarding B: how does one calculate all different paths and store the total cost associated? Such as ABCDA, ABDCA, etc

OpenStudy (woodrow73):

Don't post a file download... try a normal picture

OpenStudy (mathmate):

@joachim @woodrow73 Agree! Personally I don't open downloads.

OpenStudy (joachim):

@mathmate how do I attach a picture? I don't see that option, except "attach file"...

OpenStudy (mathmate):

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.

Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!
Latest Questions
Arriyanalol: i need help
2 days ago 7 Replies 1 Medal
Arriyanalol: CONGRATS to me
2 days ago 8 Replies 2 Medals
Legomaster346: What colleges are good that are near Arab Alabama?
1 week ago 5 Replies 0 Medals
Arriyanalol: i need help
1 week ago 6 Replies 2 Medals
Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!