Minimum Spanning Tree - Muhammad Zuhair Qadir

Download Report

Transcript Minimum Spanning Tree - Muhammad Zuhair Qadir

Design & Analysis of
Algorithms
CS3444 – Design & Analysis of Algorithms
Instructor : Zuhair Qadir
Lecture # 25
21st-May-2014
1
Lecture # 25
Graphs
Design & Analysis of
Algorithms
Design & Analysis
of Algorithms
2
Design & Analysis of Algorithms
Difference between Trees and Graphs
3
Design & Analysis of Algorithms
Difference between Trees and Graphs
4
Design & Analysis of Algorithms
Difference between Trees and Graphs
5
Design & Analysis of Algorithms
Graph Applications
6
Spanning Tree
• If there are N vertices in a graph then there are n-1 edges in a
spanning Tree
Design & Analysis of Algorithms
• a spanning tree of that graph is a subgraph that is a tree and
connects all the vertices together
7
MST- Minimum Spanning Tree
Design & Analysis of Algorithms
• A minimum spanning tree (MST) or minimum weight
spanning tree is then a spanning tree with weight less than or
equal to the weight of every other spanning tree
8
MST- Algorithms
• Kruskal’s Algorithm
Design & Analysis of Algorithms
• Prim’s Algorithm
9