以下文字资料是由(历史新知网www.lishixinzhi.com)小编为大家搜集整理后发布的内容,让我们赶快一起来看一下吧!
A graph G has n nodes, the following algorithm produces is the minimum spanning tree: a) select the minimum right side e1, buy edge number I = 1, b) I = n - 1 end, or turn c), c) have already selected edges for e1 and e2,... Ei, select the different in G and e1 and e2,... Ei edge ei + 1, {e1 and e2,... Ei, ei + 1} no loop and ei + 1 is to meet the conditions of the minimum edge, d) I = I + 1, turn b). Use Kruskal algorithm principle, the capital of the provinces as node; Municipalities also as node, with the distance between the cities for side of the right, the sche ... ng problem into a graph theory and similar minimum spanning tree problem. We choose to do the edge of the following agreement: the city between edge (two cities connected) : two cities in, must have a water shortage city. If the city water shortage and water supply between city linked together, this means that the water shortage city water supply by the urban water supply, water shortage and water shortage city city if connected, which means that the two cities can be viewed as a city, as a city for water supply, another city can also get water supply. Based on the Kruskal algorithm, we now water sche ... ng algorithm: a) record number of city water shortage for n; B) select the minimum right side e1, buy edge number I = 1, (right for city seen distance) c) lack of I = n - 1, close, or turn d); D) a selected edge for e1 and e2,... Ei, select the operation chart in different from e1 and e2,... Ei edge ei + 1, {e1 and e2,... Ei, ei + 1} no loop and ei + 1 is to meet the conditions of the minimum edge, e) I = I + 1, turn c) water city choice: the choice of city water supply mainly two aspects, one is rich in water area selection, to ensure that the water shortage city water supply, and the second is principle nearby, the water supply should be close to the city water area, can choose a few as alternative, but obviously far water city should give up. Choice of city water supply, qinghai, shaanxi, anhui, zhejiang, liaoning
纯手打,我打了半个小时.求求你了 !选为满意回答吧!
谢谢!望采纳!祝你学习快乐!
相关知识
(●—●)唔姆,余的胸怀不够广阔么?
有以下程序段 int i,n; for(i=0;i
一种语义驱动的混合现实场景下的虚拟宠物行为生成方法与流程
基于KH
找出数组a[]中符合a[i]+a[j]=K的数对
牛客训练赛40 A,C
ID3算法(含实例)
noip模拟赛(一)宠物之战
贝叶斯决策理论之入门篇
GAN实战笔记——第六章渐进式增长生成对抗网络(PGGAN)
网址: 英语翻译设图G有n个结点,以下算法产生的是最小生成树:a) 选取最小权边e1,置边数i=1,b) i=n https://m.mcbbbk.com/newsview259144.html
上一篇: 你可能不知道的养猫好处,看看养猫 |
下一篇: 有缘千里来相会,打一字= |