all possible spanning tree
Mostra commenti meno recenti
how can i generate all possible spanning tree ranked by the order of minimality ( based on edge weighting)., so that from the Ic I can select.
Risposte (1)
Rajani Mishra
il 2 Ago 2020
Modificato: Rajani Mishra
il 2 Ago 2020
0 voti
You can try below approach to find out all possible spanning trees:-
- Select permutations of vertices (as Start node and target node), find out all paths between them. Refer to these links for this step: 1) https://in.mathworks.com/matlabcentral/answers/171277-how-can-i-get-all-paths-between-two-nodes 2) https://in.mathworks.com/matlabcentral/answers/379462-find-all-possible-paths-from-a-single-sourcenode-to-a-single-targetnode-without-visiting-old-paths
- Check weather the complete path is a spanning tree or not. You can use function graphisspantree for this step
- Calculate total weight of the path.
Thus, you can find out all spanning trees/paths and their corresponding weights.
Hope this helps!
Categorie
Scopri di più su MATLAB in Centro assistenza e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!