Industry-relevant training in Business, Technology, and Design to help professionals and graduates upskill for real-world careers.
Fun, engaging games to boost memory, math fluency, typing speed, and English skills—perfect for learners of all ages.
Prim's algorithm is a greedy method used to construct a minimum cost spanning tree in a weighted undirected graph. It builds the spanning tree by continuously selecting the edge with the smallest weight connecting the current tree to a vertex not yet included in the tree. The algorithm's correctness is established through the minimum separator lemma, ensuring that the smallest edge connecting two distinct subsets of the graph is always included in the minimum spanning tree.
Enroll to start learning
You’ve not yet enrolled in this course. Please enroll for free to listen to audio lessons, classroom podcasts and take practice test.
References
ch30 part a.pdfClass Notes
Memorization
What we have learnt
Final Test
Revision Tests
Term: Minimum Spanning Tree
Definition: A spanning tree of a weighted graph that has the minimum sum of edge weights.
Term: Greedy Algorithm
Definition: An algorithm that makes a series of choices, each of which looks best at the moment, aiming for a locally optimal solution hoping it leads to a globally optimal solution.
Term: Minimum Separator Lemma
Definition: A theoretical property stating that, in a connected graph, the smallest edge that connects two distinct partitions of the vertex set must be included in every minimum spanning tree.