文件名称:最小生成树
介绍说明--下载内容来自于网络,使用问题请自行百度
问题描述:给定一个地区的n个城市间的距离网,用Prim算法或Kruskal算法建立最小生成树,并计算得到的最小生成树的代价。
基本要求:
1、城市间的距离网采用邻接矩阵表示,邻接矩阵的存储结构定义采用课本中给出的定义,若两个城市之间不存在道路,则将相应边的权值设为自己定义的无穷大值。要求在屏幕上显示得到的最小生成树中包括了哪些城市间的道路,并显示得到的最小生成树的代价。
2、表示城市间距离网的邻接矩阵(要求至少6个城市,10条边)
3、最小生成树中包括的边及其权值,并显示得到的最小生成树的代价。(Problem Descr iption: given the distance network between n cities in a region, the minimum spanning tree is established by prim algorithm or Kruskal algorithm, and the cost of the minimum spanning tree is calculated.
Basic requirements:
1. The distance network between cities is represented by adjacency matrix, and the definition of adjacency matrix storage structure is given in the textbook. If there is no road between two cities, the weight of the corresponding edge is set to its own infinite value. It is required to display the roads between cities in the minimum spanning tree and the cost of the minimum spanning tree.
2. Adjacency matrix representing distance network between cities (at least 6 cities and 10 edges are required)
3. The minimum spanning tree includes the edges and their weights, and shows the cost of the minimum spanning tree.)
基本要求:
1、城市间的距离网采用邻接矩阵表示,邻接矩阵的存储结构定义采用课本中给出的定义,若两个城市之间不存在道路,则将相应边的权值设为自己定义的无穷大值。要求在屏幕上显示得到的最小生成树中包括了哪些城市间的道路,并显示得到的最小生成树的代价。
2、表示城市间距离网的邻接矩阵(要求至少6个城市,10条边)
3、最小生成树中包括的边及其权值,并显示得到的最小生成树的代价。(Problem Descr iption: given the distance network between n cities in a region, the minimum spanning tree is established by prim algorithm or Kruskal algorithm, and the cost of the minimum spanning tree is calculated.
Basic requirements:
1. The distance network between cities is represented by adjacency matrix, and the definition of adjacency matrix storage structure is given in the textbook. If there is no road between two cities, the weight of the corresponding edge is set to its own infinite value. It is required to display the roads between cities in the minimum spanning tree and the cost of the minimum spanning tree.
2. Adjacency matrix representing distance network between cities (at least 6 cities and 10 edges are required)
3. The minimum spanning tree includes the edges and their weights, and shows the cost of the minimum spanning tree.)
(系统自动生成,下载前可以参看下载内容)
下载文件列表
文件名 | 大小 | 更新时间 |
---|---|---|
软件B192李辰朝 201907044208最小生成树.docx | 240832 | 2020-06-21 |
本网站为编程资源及源代码搜集、介绍的搜索网站,版权归原作者所有! 粤ICP备11031372号
1999-2046 搜珍网 All Rights Reserved.