Description: 最小生成树问题
问题描述:若要在n个城市之间架设通讯网络,只需要架设n-1条线路即可。如何以最低的经济代价建设这个通讯网,是一个网的最小生成树问题。
设计要求:利用克鲁斯卡尔算法求网的最小生成树;以文本形式输出生成树中各条边以及它们的权值。
-The issue of minimum spanning tree problem Description: n To set up a communication network between cities, only need to set up n-1 lines can be. How to minimize the economic costs of building the communications network is a network of minimum spanning tree problem. Design requirements: the use of Kruskal algorithm for minimum spanning tree network to the text of the various forms of output spanning tree edges and their weights. Platform: |
Size: 196608 |
Author:利莉 |
Hits: