TSP problem using dp

Plz tell how to print the path as well…in the code where we use dp+ bitmasking…
I am not able to print the path…
Share the code as welll…

@S19LPPP0202,

Just put print statements and check where you can print the paths.

Also, please share your code

I also know that to print we have use print statement…
Plz share the code to print the path…while using bitmasking…thatbis what i want …as I am not able to think hiw to do that

https://ide.codingblocks.com/s/3899 this is my code…add the printing path in this only…

Plz reply at the earliest

@S19LPPP0202,
https://ide.codingblocks.com/s/323264 code with path.

plz explain the code for printing and also tell how could i make a visulaizaer/animation of tsp problem where we see it getting solved…
what is max value of n for which this approach will work…??

plz reply at the earliest

@S19LPPP0202,
I apologize for the delay in response.

Initially mark all nodes as unvisited, now if a path to a node is possible and that node has not been visited yet, mark the node as visited and update the source. Finally just print the value.

Also, I suggest that you watch videos of this problem again for a better understanding and attempt the visualizer/animation on your own.

how to build visualizer/animation??

@S19LPPP0202,
You can attempt that on your own. Write relevant print statements and attempt that.

Is there any software to do that …I saw videos on YouTube for animation
…of tsp problem…there was visualiser but they didn’t tell how to make it…

@S19LPPP0202,
No idea mate.

how is top down dp applicable in this problem ??in the video by prateek bhaiya i dont see any overlapping subproblems or recursive cases…

plz reply to this at the earleist

why arent u replying???