1 / 9

7.3 Kruskal’s Algorithm

7.3 Kruskal’s Algorithm. Kruskal’s Algorithm was developed by JOSEPH KRUSKAL. 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

tranquilla
Download Presentation

7.3 Kruskal’s Algorithm

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  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 7 5 4 2 8 10 3 6

  5. Apply Kruskal’s algorithm to find the minimum spanning tree 7 5 10 4 2 10 8 3 6 MST: 2+3+4+5+10=24

  6. Apply Kruskal’s algorithm to find the minimum spanning tree

  7. Apply Kruskal’s algorithm to find the minimum spanning tree

  8. Apply Kruskal’s algorithm to find the minimum spanning tree D B H W P

  9. 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 Find the length of the shortest network connecting the three cities A, B, C shown in each figure. C A B 250 mi 300 mi 25° 25° 37° 212 mi A 212 mi B C 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

More Related