count of minimum spanning tree with adjacency matrix of a graph

4 ビュー (過去 30 日間)
Alireza Lashgary
Alireza Lashgary 2016 年 8 月 9 日
コメント済み: Walter Roberson 2016 年 8 月 10 日
Hi friends I have a graph and it's adjacency matrix How can i calculate count of minimum spanning tree with matlab ? Thanks

回答 (2 件)

Walter Roberson
Walter Roberson 2016 年 8 月 9 日
編集済み: Walter Roberson 2016 年 8 月 9 日
  2 件のコメント
Alireza Lashgary
Alireza Lashgary 2016 年 8 月 10 日
thanks for your reply can you learn me how to use it please? thanks
Walter Roberson
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
Steven Lord 2016 年 8 月 9 日
Take a look at the minspantree method of the graph and digraph classes.
  1 件のコメント
Walter Roberson
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 ExchangeGraph and Network Algorithms についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by