Back to course home
0% completed
Prim's Algorithm
Prim’s algorithm is another popular method for finding the Minimum Spanning Tree (MST) of a connected, undirected graph. Unlike Kruskal's algorithm, which adds the smallest edge regardless of the current MST, Prim’s algorithm builds the MST by always adding the smallest edge that extends the growing tree. It starts with a single vertex and expands the MST one edge at a time by selecting the smallest edge that connects a vertex in the MST to a vertex outside the MST.
- Goal: Connect all vertices in the graph with the minimum total edge weight without forming cycles.
- Process:
.....
.....
.....
Like the course? Get enrolled and start learning!
Table of Contents
Contents are not accessible
Contents are not accessible
Contents are not accessible
Contents are not accessible
Contents are not accessible