Presentation is loading. Please wait.

Presentation is loading. Please wait.

LANWANInternet a b e c d f.

Similar presentations


Presentation on theme: "LANWANInternet a b e c d f."— Presentation transcript:

1

2

3 LANWANInternet

4

5 a b e c d f

6

7

8

9

10

11

12

13

14

15 1.S<- NULL 2.FOR EACH VERTEX, v V[G] 3. MAINTAIN A MINIMUM PRIORITY QUEUE V G 4.MAKE SET(v)

16 5. FOR EACH VERTEX V V[G] 6.U <- EXTRACT-MIN (Q V ) 7.IF(u,v) S 8. S<- S U {(u,v)} 9.FOR EACH EDGE (u,v) E(S) 10. IF FIND-SET(u) ≠ FIND-SET(v) 11. UNION(u,v)

17 12. FOR EACH EDGE, (u,v) E(G) 13. IF FIND-SET(u)= FIND-SET(v) 14. w(u,v)=∞ 15.FOR EACH VERTEX, v V[G] 16. u<- EXTRACT-MIN( Q V ) 17. IF (u,v) S 18. S<- S U {(u,v)}

18 19. IF FIND-SET (u)≠ FIND-SET (v) 20. UNION (u,v) 21. ELSE 22. S<- MAX{(x,y)}, (xy) SET(u) 23. RETURN S

19

20

21

22

23

24

25

26

27

28

29 28

30 29

31

32

33

34

35

36

37

38

39

40

41

42

43

44

45

46

47


Download ppt "LANWANInternet a b e c d f."

Similar presentations


Ads by Google