1 / 24

Minimum spanning tree

Minimum spanning tree. Prof Amir Geva Eitan Netzer. Definition. A sub group of edges from weighted graph G Spanning – reach all vertex Minimal – the sum of its edges is the lowest of all spanning trees Uses – connect a network with while spending minimum money

kadeem
Download Presentation

Minimum spanning tree

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. Minimum spanning tree Prof Amir Geva Eitan Netzer

  2. Definition A sub group of edges from weighted graph G • Spanning – reach all vertex • Minimal – the sum of its edges is the lowest of all spanning trees • Uses – connect a network with while spending minimum money • Graph need to be connective

  3. Prim algorithm (1957) • Greedy algorithm • Start with an empty list of vertex. • Choose starting vertex from G. Randomly or a given choice. • Add edge with minimal weight that not used yet to an un explored vertex. • Continue until list of vertex contain all vertex in G.

  4. Pseudo Code

  5. Kruskal'salgorithm (1956) • Greedy algorithm • Create a “forest” F a set of trees • Create a set S containing all edges of G • While S is not empty and F is not a spanning tree yet • Remove minimum edge from S • If edge connects to trees in F combine them • Else discard edge

  6. Pseudo Code

More Related