离散数学课件(英文版)e----trees.pptVIP

  • 1
  • 0
  • 约 34页
  • 2016-11-30 发布于湖南
  • 举报
离散数学课件(英文版)e----trees

* * * * * Prim’s Algorithm for MST 27 26(9) 42 21(4) 21(8) 53 25(6) 33 28 36 18(2) 17(3) 34 29 22 A I H J E C B G F D 16(7) 21(5) 25(1) Step 1: V={A}, E={} Step 2: Select the nearest neighbor of V, u, add the edge connecting u and some vertex in V into E Step 3: Repeat step 2 until E contains n-1 edges End of Algorithm Kruskal’s Algorithm for MST 27 26(9) 42 21(4) 21(7) 53 25(9) 33 28 36 18(3) 17(2) 34 29 22 A I H J E C B G F D 16(1) 21(6) 25(8) Step 1: E={} Step 2: Select the edge with the least weight, and not making a cycle with members of E Step 3: Repeat ste

文档评论(0)

1亿VIP精品文档

相关文档