count of minimum spanning tree with adjacency matrix of a graph

조회 수: 3 (최근 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 CenterFile Exchange에서 Graph and Network Algorithms에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by