count of minimum spanning tree with adjacency matrix of a graph

4 Ansichten (letzte 30 Tage)
Alireza Lashgary
Alireza Lashgary am 9 Aug. 2016
Kommentiert: Walter Roberson am 10 Aug. 2016
Hi friends I have a graph and it's adjacency matrix How can i calculate count of minimum spanning tree with matlab ? Thanks

Antworten (2)

Walter Roberson
Walter Roberson am 9 Aug. 2016
Bearbeitet: Walter Roberson am 9 Aug. 2016
  2 Kommentare
Alireza Lashgary
Alireza Lashgary am 10 Aug. 2016
thanks for your reply can you learn me how to use it please? thanks
Walter Roberson
Walter Roberson am 10 Aug. 2016
[r, c] = find(YourAdjacencyMatrix);
edgelist = [r, c]; %N by 2
g = graph(edgelist);
nt = nsptrees(g);
disp(nt)

Melden Sie sich an, um zu kommentieren.


Steven Lord
Steven Lord am 9 Aug. 2016
Take a look at the minspantree method of the graph and digraph classes.
  1 Kommentar
Walter Roberson
Walter Roberson am 9 Aug. 2016
That method appears to find one minimum spanning tree, and does not appear to allow one to count the spanning trees.

Melden Sie sich an, um zu kommentieren.

Kategorien

Mehr zu Graph and Network Algorithms finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by