文件名称:最小生成树
介绍说明--下载内容均来自于网络,请自行研究使用
问题描述:给定一个地区的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 |