MATLAB Answers

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

7 views (last 30 days)
Gregorio Alanis-Lobato
Gregorio Alanis-Lobato on 23 Jan 2012
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


Sign in to comment.

Answers (0)

Community Treasure Hunt

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

Start Hunting!