HiveBrain v1.2.0
Get Started
← Back to all entries
patternModerate

Do Kruskal's and Prim's algorithms yield the same minimum spanning tree?

Submitted by: @import:stackexchange-cs··
0
Viewed 0 times
kruskalsametheminimumalgorithmsprimyieldandspanningtree

Problem

Assuming the edges are undirected, have unique weight, and no negative paths, do these algorithms produce the same Minimum Spanning Trees?

Solution

Found this which states that if all the conditions I mentioned above are met, a graph necessarily has a unique MST. Therefore, in terms of my question, Kruskal's and Prim's algorithms necessarily produce the same result.

Context

StackExchange Computer Science Q#84159, answer score: 14

Revisions (0)

No revisions yet.