count of minimum spanning tree with adjacency matrix of a graph
조회 수: 2 (최근 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!