1

Do the Prim’s algorithm and the Kruskal’s algorithm always obtain the same minimum spanning tree (MST) on a given input graph?

I have tried drawing a bunch of graphs with non-unique edges and executing both algorithms (for Prim, I tried every different starting node) and always end up with the same MST as Kruskal.

piwave2716
  • 11
  • 1
  • I believe the answers to https://cs.stackexchange.com/q/84159/755 answer your question (both for the case where the edge weights are unique, and where they are not unique). Please let me know if you think that is not correct. – D.W. Nov 30 '21 at 06:43

0 Answers0