标题: Prims Algorithm(无向图最小生成树算法)Matlab源代码 [打印本页] 作者: 建不了的模。 时间: 2014-9-11 11:35 标题: Prims Algorithm(无向图最小生成树算法)Matlab源代码 Prims Algorithm(无向图最小生成树算法)Matlab源代码
n the mathematical field of graph theory, a spanning tree of a connected, undirected graph is a tree which includes every vertex of that graph. More generally, a spanning forest of an arbitrary undirected graph is a forest which includes every vertex of the graph. Spanning forests always exist, and can always be constructed so as to have exactly one tree for each connected component. In certain fields of graph theory, involving weighted graphs, it is often useful to find a minimal spanning tree.
Prim's algorithm builds a tree while having the graph connected at all times.