Click here to load reader

Thuat toan Prim

  • View
    1.001

  • Download
    1

Embed Size (px)

Text of Thuat toan Prim

  • 1. THUT TON PRIM 1

2. - Bt u ti mt nh A bt k ca th G gm n nh, ta tm mt nh gn nh A nht trong s cc nh c ng i t nh A, gi s nh l nh B 2 3. - T nhng nh c ng i t nh A v t nh B, ta li chn mt nh gn nh A hoc gn nh B nht sao cho khng to nn chu trnh, gi s nh tm c l nh C - Qu trnh tip tc nh vy cho n khi khng tm c nh no tha mn. Kt qu thu c l cy khung nh nht c n nh v n 1 cnh 3 4. 1 2 3 4 8 5 6 109 7 6 9 15 9 12 15 3 5 16 8 17 11 7 2 4 5. 1 2 3 4 8 5 6 109 7 6 9 15 9 12 15 3 5 16 8 17 11 7 2 5 6. 1 2 3 4 8 5 6 109 7 6 9 15 9 12 15 3 5 16 8 17 11 7 2 6 7. 1 2 3 4 8 5 6 109 7 6 9 15 9 12 15 3 5 16 8 17 11 7 2 7 8. 1 2 3 4 8 5 6 109 7 6 9 15 9 12 15 3 5 16 8 17 11 7 2 8 9. 1 2 3 4 8 5 6 109 7 6 9 15 9 12 15 3 5 16 8 17 11 7 2 9 10. 1 2 3 4 8 5 6 109 7 6 9 15 9 12 15 3 5 16 8 17 11 7 2 10 11. 1 2 3 4 8 5 6 109 7 6 9 15 9 12 15 3 5 16 8 17 11 7 2 11 12. 1 2 3 4 8 5 6 109 7 6 9 15 9 12 15 3 5 16 8 17 11 7 2 12 13. 1 2 3 4 8 5 6 109 7 6 9 15 9 12 15 3 5 16 8 17 11 7 2 13 14. 1 2 3 4 8 5 6 109 7 6 9 15 9 12 15 3 5 16 8 17 11 7 2 14 15. 1 2 3 4 8 5 6 109 7 6 9 15 9 12 15 3 5 16 8 17 11 7 2 15 16. 1 2 3 4 8 5 6 109 7 6 9 15 9 12 15 3 5 16 8 17 11 7 2 16 17. 1 2 3 4 8 5 6 109 7 6 9 15 9 12 15 3 5 16 8 17 11 7 2 17 18. 1 2 3 4 8 5 6 109 7 6 9 15 9 12 15 3 5 16 8 17 11 7 2 18 19. 1 2 3 4 8 5 6 109 7 6 9 15 9 12 15 3 5 16 8 17 11 7 2 19 20. 1 2 3 4 8 5 6 109 7 6 9 15 9 12 15 3 5 16 8 17 11 7 2 20 21. 1 2 3 4 8 5 6 109 7 6 9 15 9 12 15 3 5 16 8 17 11 7 2 21 22. - Kim tra tnh lin thng ca th: gi s th G c n nh, sau khi thc hin thut ton Prime - tm cy khung nh nht kt qu thu c khng n nh th th khng lin thng - Trong giao thng vn ti: xy cu ng, 22