0% found this document useful (0 votes)
20 views7 pages

Minimum Spanning Trees

The document discusses minimum spanning trees. A minimum spanning tree is a subgraph that connects all vertices of a graph with minimum total edge weight. There are two main algorithms to find a minimum spanning tree: Prim's algorithm, which is preferred for dense graphs, and Kruskal's algorithm, which is preferred for sparse graphs. Both algorithms are demonstrated on an example graph to find the minimum spanning tree with the lowest total edge weight.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
20 views7 pages

Minimum Spanning Trees

The document discusses minimum spanning trees. A minimum spanning tree is a subgraph that connects all vertices of a graph with minimum total edge weight. There are two main algorithms to find a minimum spanning tree: Prim's algorithm, which is preferred for dense graphs, and Kruskal's algorithm, which is preferred for sparse graphs. Both algorithms are demonstrated on an example graph to find the minimum spanning tree with the lowest total edge weight.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 7

Minimum Spanning Trees

presented by:
Muhammad Mahad Hanif (BCSM-F20-204)
Mohsin Amjad (BCSM-F20-405)
presented to:
Sir Saleem Mustafa
Minimum Spanning Trees
• The Minimum Spanning Tree is the one whose cumulative edge weights have
the smallest value

• To find the minimum spanning tree among all the spanning trees, we need to
calculate the total edge weight for each spanning tree.

• Applications of MST:
1. Telephone and Cable Network
2. To find paths in map
Algorithms to find MST
• Prim’s Algorithm
– Prim’s Algorithm is preferred when the graph is dense.

• Kruskal’s Algorithm
– Kruskal’s Algorithm is preferred when the graph is sparse.
Example for MST
• This graph consists of
6 Vertices
8 Edges

• We have to find the


shortest path of this graph.
Results for Prim’s Algorithm
• Cost=14 Units
• Edges= 5
Results for Kruskal’s Algorithm
• Cost= 14 Units
• Edges=5
Difference between Kruskal’s and Prim’s Algorithm

You might also like