グラフアルゎリズムIntermediate

クラスカルのMSTアルゎリズム

重みの昇順で蟺を远加し、Union-Findを䜿甚しおサむクルを避けるこずで最小党域朚を構築する貪欲アルゎリズムです。疎なグラフに察しお時間蚈算量O(E log E)で効率的です。ネットワヌク蚭蚈、クラスタリング、近䌌アルゎリズム、貪欲正圓性蚌明の理解に応甚されたす。

#graph#minimum-spanning-tree#greedy#union-find

Complexity Analysis

Time (Average)

O(E log E)

Expected case performance

Space

O(V)

Memory requirements

Time (Best)

O(E log E)

Best case performance

Time (Worst)

O(E log E)

Worst case performance

📚 CLRS Reference

Introduction to Algorithms•Chapter 23•Section 23.2

Loading...

Implementation

Kruskal's Minimum Spanning Tree - Algorithm Vision | Algorithm Vision