文件名称:MST
介绍说明--下载内容均来自于网络,请自行研究使用
prime算法的基本思想
1.清空生成树,任取一个顶点加入生成树
2.在那些一个端点在生成树里,另一个端点不在生成树里的边中,选取一条权最小的边,将它和另一个端点加进生成树
3.重复步骤2,直到所有的顶点都进入了生成树为止,此时的生成树就是最小生成树-The basic idea of the prime algorithm. Empty spanning tree, take any a vertex joined spanning tree. those endpoints in the spanning tree, another edge endpoint is not in the spanning tree, select a right to the smallest edge to it and other endpoint added Spanning Tree 3 Repeat step 2 until all vertices are entered until the spanning tree, spanning tree at this time is the minimum spanning tree
1.清空生成树,任取一个顶点加入生成树
2.在那些一个端点在生成树里,另一个端点不在生成树里的边中,选取一条权最小的边,将它和另一个端点加进生成树
3.重复步骤2,直到所有的顶点都进入了生成树为止,此时的生成树就是最小生成树-The basic idea of the prime algorithm. Empty spanning tree, take any a vertex joined spanning tree. those endpoints in the spanning tree, another edge endpoint is not in the spanning tree, select a right to the smallest edge to it and other endpoint added Spanning Tree 3 Repeat step 2 until all vertices are entered until the spanning tree, spanning tree at this time is the minimum spanning tree
(系统自动生成,下载前可以参看下载内容)
下载文件列表
MST.CPP