Traverse a directed graph visiting all edges at least once?
13 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
I am working on a project utilizing the Chinese Postman Problem where I want to find the shortest path in a directed matrix that visits each edge at least once starting from a specified node. Are there any Graph Theory functions that deal with this kind of problem?
0 Kommentare
Antworten (1)
Christine Tobler
am 24 Mär. 2021
There aren't any functions for MATLAB's graph object that solve this problem. Possibly you can formulate this as an optimization problem? See https://www.mathworks.com/help/optim/ug/traveling-salesman-problem-based.html for an example of how to solve the related Traveling Salesman Problem using the optimization toolbox.
4 Kommentare
Christine Tobler
am 25 Mär. 2021
This could be used to solve the Traveling Salesman problem (not efficiently), but not for the variant your looking for.
Here I'm just going through all possible ways of visiting each node exactly once, and then taking the minimum of that large set of possibilities. But when nodes can be visited many times, there's no way to just write up all possible orders of visiting the nodes, there are infinitely many ways to do this.
Siehe auch
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!