设图G有n个结点,以下算法产生的是最小生成树:
a) 选取最小权边e1,置边数i=1,
b) i=n-1结束,否则转c),
c) 设已选择边为e1,e2,...ei,在G中选取不同与e1,e2,...ei的边ei+1,使{e1,e2,...ei,ei+1}中无回路且ei+1是满足此条件的最小边,
d) i=i+1,转b) .
利用Kruskal算法的原理,将各省的省会看作结点;直辖市也看作结点,以城市间的距离为边的权,将调度问题化为图论中类似与最小树的问题。
我们边的选择做以下约定:
城市之间的边(两个城市相连接):两个城市之中,必须要有一个是缺水城市。若缺水城市和供水城市之间相连,这表示该缺水城市由该供水城市供水,若缺水城市和缺水城市相连接,这表示这两个城市可以看作一个城市,当一个城市获得供水的时候,另一个城市也能获得供水。
基于Kruskal算法,我们现在水调度的算法:
a) 记录缺水城市数为n;
b) 选取最小权边e1,置边数i=1,(权为城市见的距离)
c) 缺i=n-1,结束,否则转d);
d) 设已选择边为e1,e2,...ei,在调度图中选取不同于e1,e2,...ei的边ei+1,使{e1,e2,...ei,ei+1}中无回路且ei+1是满足此条件的最小边,
e) i=i+1,转c)
供水城市的选择:
供水城市的选择主要就两方面,一是在富水地区选择,保证对缺水城市的供水,二是就近原则,供水城市应靠近缺水地区,可以多选几个作为备选,但明显远的供水城市应该舍弃。
选择的供水城市有:青海、陕西、安徽、浙江、辽宁
英语翻译 将下面的文字翻译成英文,请相关专业认识帮忙翻译一下,很急...
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,
请帮我将下面的中文翻译成英文,万分感谢!
请帮我将下面的中文翻译成英文,万分感谢! 45 谁可以帮个忙?谢谢!!我正在翻译一段话,但是由于我英语很烂,翻译了好久,都不行...因为我是高中毕业的,毕业已经好多年了...英语都忘记好多了...但是现在要用到,可是我翻译不了啊...我用... 谁可以帮个忙? 谢谢!! 我正在翻译一段话,但是由于我英语很烂,...
英语自我介绍。麻烦帮我将下面的中文翻译成英文,谢谢!急!
This is my first time to participate in the interview, I do not have much working experience, but I am learning and adaptive ability, I will try to apply the learned knowledge to work. I think my advantage is a strong sense of team, strong communication skills, organizational a...
请将以下文字翻译成英文,谢谢!
the combinations together, went to the road of self-cultivation. Awaiting them will be enormous and dangerous challenges, and Wong, who were caught in this life-and-death contest gradually grow up together.
麻烦帮我将下面的文字翻译成英文,谢谢!
pack inside seller palmed off some bad batteries onto you.In that case if we seller palmed off some bad batteries and cargo version of the product the price of your ruquest can be satisfy thee needs fo yours and maybe even low,l wonder your consider more carefully please....
麻烦各位大虾帮忙翻译一下下面的文字成英文,万分感谢!!!
2. To catch mice and fixed (as above), right hand numbness of the mouth will be fed by gavage tube device into the mouth. Gently press with a stomach tube on the palate in mice, so that the mouth and esophagus in a straight line, and then slowly fed into the tube along...
请帮我把下面这些话翻译成英文~谢谢
smile. These body language can make us look polite.On the other hand,we should pay attention to our conversation, decent conversation can make us look good 总的来说,所有人都应该学习给别人留下一个好的印象 In general, all of us should learn to give others a good impression ...
英文翻译(请把下面一段画翻译成英文,谢谢)
I pay great attention to my development of moral, knowledge, physical abilities, the capacity of integration and practicing, besides, I have out-standing working and orgnising ability. At the same time, I am sincere sincere to others, good at communication, I'm also given the ...
谁帮我把以下文字翻译成英语。。高手帮下忙!!~~
One day, my class went to tour a small village. It was a village far from the cities, and is very peaceful. The people there are passionate and hospitable. They all live in stone houses, where the temperature is very high during the day, but is very cold when the night ...
将以下文字翻译成英文,重酬~!
70 letters per minute. so i hope i can find a job that has something to do with these. These positions are all ok such as secretary, assisstant and so on. I'm looking forward to having the chance to challenge myself.很希望能帮助你, 祝你找到好工作。。。别忘了采纳呵。