克鲁斯的算法 is a 贪心算法 in 图论发现最小生成树为连接 加权的图。这意味着它找到的一个子集边缘 ,形成一棵树,其中包含每个顶点,在那里在树中的所有边缘的总重量最小化。...">
Home » Source Code » Kruskal algorithm

Kruskal algorithm

John
2014-08-23 23:38:22
The author
View(s):
Download(s): 0
Point (s): 1 
Category Category:
AlgorithmAlgorithm CC

Description

family:sans-serif;font-size:14px;line-height:22.399999618530273px;white-space:normal;background-color:#FFFFFF;">克鲁斯的算法 is a 贪心算法 in 图论发现最小生成树连接 加权的图。这意味着它找到的一个子集边缘 ,形成一棵树,其中包含每个顶点,在那里在树中的所有边缘的总重量最小化。如果图不连通的那么它找到最小生成森林 (最小生成树为每个连接组件)。


  • 创建一个目录林F(树一组),在那里每个顶点在图中的是一个单独的
  • 创建一组S包含在图中的所有边缘
  • 虽然S is 非空F 还不是跨越
    • 删除边缘与最小重量从S
    • 如果该边缘连接两个不同的树,然后将它添加到森林里,将两棵树合并成一棵树

在算法的终止,森林形式的最小生成图形的森林。如果图连通,森林具有单个组件,形成最小生成树。



Sponsored links

File list

Tips: You can preview the content of files by clicking file names^_^
Name Size Date
kruskal.cpp3.19 kB26-03-14|22:56
kruskal2.cpp949.00 B02-04-14|23:18
kruskal3.cpp1,006.00 B10-04-14|02:02
Kruskal0.00 B30%|26-03-14
...
Sponsored links

Comments

(Add your comment, get 0.1 Point)
Minimum:15 words, Maximum:160 words
  • 1
  • Page 1
  • Total 1

Kruskal algorithm (2.53 kB)

Need 1 Point(s)
Your Point (s)

Your Point isn't enough.

Get 22 Point immediately by PayPal

Point will be added to your account automatically after the transaction.

More(Debit card / Credit card / PayPal Credit / Online Banking)

Submit your source codes. Get more Points

LOGIN

Don't have an account? Register now
Need any help?
Mail to: support@codeforge.com

切换到中文版?

CodeForge Chinese Version
CodeForge English Version

Where are you going?

^_^"Oops ...

Sorry!This guy is mysterious, its blog hasn't been opened, try another, please!
OK

Warm tip!

CodeForge to FavoriteFavorite by Ctrl+D