count of minimum spanning tree with adjacency matrix of a graph
1 次查看(过去 30 天)
显示 更早的评论
Hi friends I have a graph and it's adjacency matrix How can i calculate count of minimum spanning tree with matlab ? Thanks
0 个评论
回答(2 个)
Walter Roberson
2016-8-9
编辑:Walter Roberson
2016-8-9
2 个评论
Walter Roberson
2016-8-10
[r, c] = find(YourAdjacencyMatrix);
edgelist = [r, c]; %N by 2
g = graph(edgelist);
nt = nsptrees(g);
disp(nt)
Steven Lord
2016-8-9
1 个评论
Walter Roberson
2016-8-9
That method appears to find one minimum spanning tree, and does not appear to allow one to count the spanning trees.
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Graph and Network Algorithms 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!