Minimal spanning tree class 15


Published on

Published in: Education, Technology, Business
1 Like
  • Be the first to comment

No Downloads
Total views
On SlideShare
From Embeds
Number of Embeds
Embeds 0
No embeds

No notes for slide

Minimal spanning tree class 15

  1. 1. Minimum Spanning Tree Algorithms
  2. 2. What is A Spanning Tree? • Given a connected, undirected graph G=(V,E), a spanning tree of that graph is a subgraph that is a tree and connects all the vertices together. • Can a graph have more than one spanning tree? • Can an unconnected graph have a spanning tree? a b u e c v f d
  3. 3. Some Application areas of Spanning Trees • Network Design (Telephone, Electrical, Hydraulic, TV cable and Road connectivity etc..) • Approximation Algorithms for NP Hard Problems (Travelling Sales Man Problem, Steiner tree) • Indirect Applications – – – – – – max bottleneck paths LDPC codes for error correction image registration with Renyi entropy Learning sailent features for real-time face verification reducing data storage in sequencing amino acids in a protein autoconfig protocol for Ethernet bridging to avoid cycles in a network • Cluster Analysis
  4. 4. Minimal Spanning Tree. • The weight of a subgraph is the sum of the weights of it edges. a 4 • A minimum spanning tree for a weighted graph is a spanning tree with minimum weight. 4 9 3 b u 14 2 10 • Can a graph have more then one minimum spanning tree? e c v 3 f 8 d Mst T: w( T )= 15 (u,v) T w(u,v ) is minimized
  5. 5. Minimal Spanning Tree • A MST is a tree formed from a subset of the edges in a given undirected graph with the following two properties: 1. It shows the spans of the graph that is it includes each vertex of the graph. 2. It is minimum that is the total weight of all the edges is as minimum as possible.
  6. 6. Example of a Problem that Translates into a MST The Problem • Several pins of an electronic circuit must be connected using the least amount of wire. Modeling the Problem • The graph is a complete, undirected graph G = ( V, E ,W ), where V is the set of pins, E is the set of all possible interconnections between the pairs of pins and w(e) is the length of the wire needed to connect the pair of vertices. • Find a minimum spanning tree.
  7. 7. Minimal Spanning Tree – Greedy Algorithms • Kruskal's Algorithm: Consider edges in ascending order of cost. Add the next edge to T unless doing so would create a cycle. • Prim's Algorithm: Start with any vertex s and greedily grow a tree T from s. At each step, add the cheapest edge to T that has exactly one endpoint in T.