Kruskal算法 最小生成树

上传者: 39471470 | 上传时间: 2022-12-20 17:41:46 | 文件大小: 19.6MB | 文件类型: ZIP
克鲁斯卡尔算法的基本思想是以边为主导地位,始终选择当前可用(所选的边不能构成回路)的最小权植边。所以Kruskal算法的第一步是给所有的边按照从小到大的顺序排序。这一步可以直接使用库函数qsort或者sort。接下来从小到大依次考察每一条边(u,v)。 具体实现过程如下: <1> 设一个有n个顶点的连通网络为G(V,E),最初先构造一个只有n个顶点,没有边的非连通图T={V,空},图中每个顶点自成一格连通分量。 <2> 在E中选择一条具有最小权植的边时,若该边的两个顶点落在不同的连通分量上,则将此边加入到T中;否则,即这条边的两个顶点落到同一连通分量 上,则将此边舍去(此后永不选用这条边),重新选择一条权植最小的边。 <3> 如此重复下去,直到所有顶点在同一连通分量上为止。

文件下载

资源详情

[{"title":"( 30 个子文件 19.6MB ) Kruskal算法 最小生成树","children":[{"title":"Kruskal算法","children":[{"title":".vs","children":[{"title":"Kruskal算法","children":[{"title":"v15","children":[{"title":"Browse.VC.db <span style='color:#111;'> 4.50MB </span>","children":null,"spread":false},{"title":".suo <span style='color:#111;'> 30.00KB </span>","children":null,"spread":false},{"title":"ipch","children":[{"title":"AutoPCH","children":[{"title":"61210e4df848825","children":[{"title":"MAIN.ipch <span style='color:#111;'> 24.44MB </span>","children":null,"spread":false}],"spread":true},{"title":"fb4043a3a17c84d5","children":[{"title":"FINDROOT.ipch <span style='color:#111;'> 24.44MB </span>","children":null,"spread":false}],"spread":true},{"title":"8d91aad4cf96b296","children":[{"title":"EDGETYPE.ipch <span style='color:#111;'> 24.44MB </span>","children":null,"spread":false}],"spread":true},{"title":"6c146b74d594cb9f","children":[{"title":"KRUSKAL.ipch <span style='color:#111;'> 24.44MB </span>","children":null,"spread":false}],"spread":true}],"spread":true}],"spread":true}],"spread":true}],"spread":true}],"spread":true},{"title":"Kruskal算法","children":[{"title":"FindRoot.cpp <span style='color:#111;'> 303B </span>","children":null,"spread":false},{"title":"Kruskal算法.vcxproj.filters <span style='color:#111;'> 1.31KB </span>","children":null,"spread":false},{"title":"Kruskal算法.vcxproj <span style='color:#111;'> 5.93KB </span>","children":null,"spread":false},{"title":"EdgeType.h <span style='color:#111;'> 118B </span>","children":null,"spread":false},{"title":"Kruskal.cpp <span style='color:#111;'> 772B </span>","children":null,"spread":false},{"title":"Debug","children":[{"title":"FindRoot.obj <span style='color:#111;'> 26.02KB </span>","children":null,"spread":false},{"title":"Kruskal.obj <span style='color:#111;'> 45.55KB </span>","children":null,"spread":false},{"title":"Kruskal算法.tlog","children":[{"title":"CL.write.1.tlog <span style='color:#111;'> 2.06KB </span>","children":null,"spread":false},{"title":"CL.read.1.tlog <span style='color:#111;'> 37.77KB </span>","children":null,"spread":false},{"title":"CL.command.1.tlog <span style='color:#111;'> 1.69KB </span>","children":null,"spread":false},{"title":"Kruskal算法.lastbuildstate <span style='color:#111;'> 201B </span>","children":null,"spread":false},{"title":"link.write.1.tlog <span style='color:#111;'> 512B </span>","children":null,"spread":false},{"title":"link.command.1.tlog <span style='color:#111;'> 1.26KB </span>","children":null,"spread":false},{"title":"link.read.1.tlog <span style='color:#111;'> 3.13KB </span>","children":null,"spread":false}],"spread":true},{"title":"vc141.idb <span style='color:#111;'> 395.00KB </span>","children":null,"spread":false},{"title":"Main.obj <span style='color:#111;'> 65.88KB </span>","children":null,"spread":false},{"title":"Kruskal算法.log <span style='color:#111;'> 189B </span>","children":null,"spread":false},{"title":"vc141.pdb <span style='color:#111;'> 404.00KB </span>","children":null,"spread":false}],"spread":true},{"title":"Main.cpp <span style='color:#111;'> 447B </span>","children":null,"spread":false},{"title":"MGraph.h <span style='color:#111;'> 1.44KB </span>","children":null,"spread":false}],"spread":true},{"title":"Debug","children":[{"title":"Kruskal算法.pdb <span style='color:#111;'> 740.00KB </span>","children":null,"spread":false},{"title":"Kruskal算法.exe <span style='color:#111;'> 56.00KB </span>","children":null,"spread":false},{"title":"Kruskal算法.ilk <span style='color:#111;'> 461.84KB </span>","children":null,"spread":false}],"spread":true},{"title":"Kruskal算法.sln <span style='color:#111;'> 1.42KB </span>","children":null,"spread":false}],"spread":true}],"spread":true}]

评论信息

免责申明

【只为小站】的资源来自网友分享,仅供学习研究,请务必在下载后24小时内给予删除,不得用于其他任何用途,否则后果自负。基于互联网的特殊性,【只为小站】 无法对用户传输的作品、信息、内容的权属或合法性、合规性、真实性、科学性、完整权、有效性等进行实质审查;无论 【只为小站】 经营者是否已进行审查,用户均应自行承担因其传输的作品、信息、内容而可能或已经产生的侵权或权属纠纷等法律责任。
本站所有资源不代表本站的观点或立场,基于网友分享,根据中国法律《信息网络传播权保护条例》第二十二条之规定,若资源存在侵权或相关问题请联系本站客服人员,zhiweidada#qq.com,请把#换成@,本站将给予最大的支持与配合,做到及时反馈和处理。关于更多版权及免责申明参见 版权及免责申明