Growth Strategy
Prim's grows a single tree. It starts at an arbitrary node and expands by choosing the minimum weight edge from the tree to an unvisited node.
Loading...
Loading Curriculum...
Loading Subject...
Loading Topic...
Loading Lesson...
Loading Lab...
A greedy approach that builds the Minimum Spanning Tree node-by-node. It starts from a single node and constantly adds the cheapest edge connecting the current tree to any new vertex.
Prim's grows a single tree. It starts at an arbitrary node and expands by choosing the minimum weight edge from the tree to an unvisited node.
A Min-Priority Queue stores potential edges that could connect the tree to new nodes, sorted by their weights.
At each step, we look at the "cut" between the current tree and all other nodes, picking the minimum edge crossing that cut.
Crucial for network design (cabling, telecommunications) where the goal is to connect all points with minimum total distance.