Going back to unvisited node through visited node by minimum weight of edge
Show older comments
I made a list of unvisited nodes, edges and visited nodes. Starting node is 4 and algoritm chooses edge by its minimum weight, so the next node is 6. I have two problems:
- How can I avoid looping edges from node 4 to 6 and vice versa?
- What should I do to go to node 3 through visited node 4?

3 Comments
Michal Zimnicki
on 25 Feb 2023
Edited: Michal Zimnicki
on 25 Feb 2023
Matt J
on 25 Feb 2023
Well, in the graph you've shown, there are no paths that visit all nodes only once. So, the objective is not achievable. Perhaps you should describe your ulterior motives more fully, so that a better objective can be discussed.
Accepted Answer
More Answers (0)
Categories
Find more on Directed Graphs in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!