How does Matlab's implementation of Kruskal and Prim algorithms choose edges with the same weight and initial nodes?

2 Ansichten (letzte 30 Tage)
Hi,
I was wondering how Matlab's implementation of Kruskal algorithm, decides which edge to choose as part of the MST when there are two (or more) edges with the same weight.
On the other hand, when no root is passed to Prim's algorithm, which node is chosen as starting point?
Thanks very much in advance for your help!
Cheers, Gregorio

Antworten (0)

Kategorien

Mehr zu MATLAB finden Sie in Help Center und File Exchange

Produkte

Community Treasure Hunt

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

Start Hunting!

Translated by