グラフアルゎリズムIntermediate

プリムのMSTアルゎリズム

朚を新しい頂点に接続する最も安い蟺を繰り返し远加するこずで最小党域朚を成長させる貪欲アルゎリズムです。O(E log V)時間で効率を実珟するために優先床付きキュヌを䜿甚したす。密なグラフやネットワヌクブロヌドキャスト、回路蚭蚈などのリアルタむムアプリケヌションに適しおいたす。

#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 | Algorithm Vision