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

2 views (last 30 days)
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

Answers (0)

Categories

Find more on MATLAB in Help Center and File Exchange

Products

Community Treasure Hunt

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

Start Hunting!