What is A Spanning Tree?
undirected graph G=(V,E), a
spanning tree of that graph is
a subgraph that is a tree and
connects all the vertices
Can a graph have more than one
Can an unconnected graph have a
Some Application areas of Spanning
• 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
• Cluster Analysis
Minimal Spanning Tree.
• The weight of a subgraph is the
sum of the weights of it edges.
• A minimum spanning tree for a
weighted graph is a spanning tree
with minimum weight.
• Can a graph have more then one
minimum spanning tree?
Mst T: w( T )=
w(u,v ) is minimized
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.
Example of a Problem that
Translates into a MST
• 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.
Minimal Spanning Tree – Greedy
• 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.