Minimum Spanning Trees (MSTs) Prim's Algorithm For each vertex not in the tree, keep track of the lowest cost edge that would connect it to the tree This.

Similar presentations

Presentation on theme: "Minimum Spanning Trees (MSTs) Prim's Algorithm For each vertex not in the tree, keep track of the lowest cost edge that would connect it to the tree This."— Presentation transcript:

1
Minimum Spanning Trees (MSTs) Prim's Algorithm For each vertex not in the tree, keep track of the lowest cost edge that would connect it to the tree This can be as a heap-based priority queue Each time, join a vertex out of tree T with the edge with the smallest weight This is the Prim algorithm