文件名称:FindaMininalSpanningTree
-
所属分类:
- 标签属性:
- 上传时间:2012-11-16
-
文件大小:37.39kb
-
已下载:0次
-
提 供 者:
-
相关连接:无下载说明:别用迅雷下载,失败请重下,重下不扣分!
介绍说明--下载内容来自于网络,使用问题请自行百度
输入含权图的邻接矩阵,输出最小生成树的邻接矩阵
1、本实验用到的理论知识
Prim算法
算法设计
设图G =(V,E),其生成树的顶点集合为U。
①、把v0放入U。
②、在所有u∈U,v∈V-U的边(u,v)∈E中找一条最小权值的边,加入生成树。
③、把②找到的边的v加入U集合。如果U集合已有n个元素,则结束,否则继续执行②。-Enter the right graph with adjacency matrix, the output of the adjacency matrix of a minimum spanning tree, this experiment used the theoretical knowledge Prim algorithm for algorithm design based map G = (V, E), its spanning the vertex set of U. ①, the v0 into U. ②, in all u ∈ U, v ∈ VU edge (u, v) ∈ E in finding a minimum weight edge, by adding spanning tree. ③, ② to find the edge to join the U of v set. If U has a collection of n elements, then the end, otherwise continue ②.
1、本实验用到的理论知识
Prim算法
算法设计
设图G =(V,E),其生成树的顶点集合为U。
①、把v0放入U。
②、在所有u∈U,v∈V-U的边(u,v)∈E中找一条最小权值的边,加入生成树。
③、把②找到的边的v加入U集合。如果U集合已有n个元素,则结束,否则继续执行②。-Enter the right graph with adjacency matrix, the output of the adjacency matrix of a minimum spanning tree, this experiment used the theoretical knowledge Prim algorithm for algorithm design based map G = (V, E), its spanning the vertex set of U. ①, the v0 into U. ②, in all u ∈ U, v ∈ VU edge (u, v) ∈ E in finding a minimum weight edge, by adding spanning tree. ③, ② to find the edge to join the U of v set. If U has a collection of n elements, then the end, otherwise continue ②.
(系统自动生成,下载前可以参看下载内容)
下载文件列表
实验一 Find a Mininal Spanning Tree.doc
本网站为编程资源及源代码搜集、介绍的搜索网站,版权归原作者所有! 粤ICP备11031372号
1999-2046 搜珍网 All Rights Reserved.