Online Judge | Problem Set | Authors | Online Contests | User | ||||||
---|---|---|---|---|---|---|---|---|---|---|
Web Board Home Page F.A.Qs Statistical Charts | Current Contest Past Contests Scheduled Contests Award Contest |
此题的Prim 和 Kruskal 解法论述:如图 A-D 4 A-E 4 D-X 5 E-B 5 X-B 3 用Krus,找一的MST是:X-B A-D A-E E-B 用Prim,找到的MST是:A-D A-E D-X X-B 此题,用Krus方法易求得正确结果,但优化Prim也是可以通过的。 例如用Prim,在选择了A-D A-E后,下一步有D-X B-E两边供选,我们选择B-E就OK了。 Followed by:
Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator