文章目录
Graph
Minimum Spanning Tree(最小生成树))
定义:For an undirected graph G,is a tree formed from graph edges that:
① connects all the vertices of G ② at lowest total cost.
存在性:MST exists iff G is connected.
graph G | MST |
---|---|
![]() |
![]() |
生成算法
Prim’s algorithm( 普林演算法 ) | Kruskal’s algorithm(克鲁斯卡尔算法) | |
---|---|---|
定义 | 首先以某一節點當作出發點,加入到树 T 内。 LOOP:在与树 T 邻接的树外 |