all possible spanning tree

7 次查看(过去 30 天)
sibabalo noludwwe
sibabalo noludwwe 2020-7-25
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.

回答(1 个)

Rajani Mishra
Rajani Mishra 2020-8-2
编辑:Rajani Mishra 2020-8-2
You can try below approach to find out all possible spanning trees:-
  • 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!

类别

Help CenterFile Exchange 中查找有关 Get Started with MATLAB 的更多信息

产品


版本

R2018a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by