Algorithmes de grapheIntermediate

Prim's MST Algorithm

Greedy algorithm that grows a minimum spanning tree by repeatedly adding the cheapest edge connecting the tree to a new vertex. Uses a priority queue for efficiency with O(E log V) time. Preferred for dense graphs and real-time applications like network broadcasting and circuit design.

#graph#minimum-spanning-tree#greedy#priority-queue

Complexity Analysis

Time (Average)

O(E log V)

Expected case performance

Space

O(V)

Memory requirements

Time (Best)

O(E log V)

Best case performance

Time (Worst)

O(E log V)

Worst case performance

📚 CLRS Reference

Introduction to Algorithms•Chapter 23•Section 23.2

Loading...

Implementation

Prim's Minimum Spanning Tree - Algorithm Vision