Download presentation
Presentation is loading. Please wait.
1
7.3 Kruskal’s Algorithm
2
Kruskal’s Algorithm was developed by JOSEPH KRUSKAL
3
Kruskal’s Algorithm Pick the cheapest link (edge) available and mark it Pick the next cheapest link available and mark it again Continue picking and marking link that does not create the circuit ***Kruskal’s algorithm is efficient and optimal
4
Apply Kruskal’s algorithm to find the minimum spanning tree 5 7 8 3 6 4 2 10
5
Apply Kruskal’s algorithm to find the minimum spanning tree 5 7 8 3 6 4 2 10 MST: 2+3+4+5+10=24 10
6
Apply Kruskal’s algorithm to find the minimum spanning tree
8
B D H P W
9
Find the length of the shortest network connecting the three cities A, B, C shown in each figure. 37° 300 mi 250 mi 25° 212 mi Apply Kruskal’s Algorithm: Since we know that length AB is always longer than the other two edges, so we pick: 250 mi and 300 mi. MST = 550 mi This is an isosceles triangle so there must be two equal edges Apply Kruskal’s Algorithm: Since we know that length AB is always longer than the other two edges, so we pick: 212 mi and 212 mi. MST = 424 mi A B C A B C
Similar presentations
© 2024 SlidePlayer.com. Inc.
All rights reserved.