SlideShare a Scribd company logo
1 of 16
WELCOME TO MY
PRESENTATION
Md. Harun Or Rashid
ID: 193-15-2966
PC-A
PRESENTATION TOPIC
Minimum Spanning Tree
WHAT IS SPANNING TREE?
• Before we learn about spanning trees, we need to understand two
graphs: undirected graphs and connected graphs.
1. Undirected Graph: An undirected graph is a graph in which the
edges do not point in any direction (ie. the edges are bidirectional).
2. Connected Graph: A connected graph is a graph in which there is
always a path from a vertex to any other vertex.
• Spinning Tree: A spanning tree is a sub-graph of an undirected
connected graph, which includes all the vertices of the graph with a
minimum possible number of edges.
WHAT IS MINIMUM SPANNING TREE?
• Minimum Spanning Tree: A minimum spanning tree is a spanning tree
in which the sum of the weight of the edges is as minimum as possible.
• The minimum spanning tree from a graph is found using the following
algorithms:
1. Prim’s Algorithms.
2. Kruskal’s Algorithms.
PRIM’S ALGORITHM
Prim's algorithm is a minimum spanning tree algorithm that finds the
subset of the edges of that graph which
• form a tree that includes every vertex.
• has the minimum sum of weights among all the trees that can be
formed from the graph.
HOW PRIM'S ALGORITHM WORKS
• We start from one vertex and keep adding edges with the lowest
weight until we reach our goal.
• The steps for implementing Prim's algorithm are as follows:
1.Initialize the minimum spanning tree with a vertex chosen at
random.
2.Find all the edges that connect the tree to new vertices, find the
minimum and add it to the tree
3.Keep repeating step 2 until we get a minimum spanning tree
EXAMPLE OF PRIM'S ALGORITHM
Start with a weighted graph
EXAMPLE OF PRIM'S ALGORITHM
Choose a vertex
EXAMPLE OF PRIM'S ALGORITHM
Choose the shortest edge from this vertex
and add it.
EXAMPLE OF PRIM'S ALGORITHM
Choose the nearest vertex not yet in the
solution.
EXAMPLE OF PRIM'S ALGORITHM
Choose the nearest edge not yet in the
solution, if there are multiple choices,
choose one at random.
EXAMPLE OF PRIM'S ALGORITHM
Find the minimum spanning tree.
MINIMUM CONNECTOR ALGORITHMS
Kruskal’s Algorithm Prim’s Algorithm
Se
THANK YOU

More Related Content

Similar to Minimum Spanning Tree.pptx

Shortest path by using suitable algorithm.pdf
Shortest path by using suitable algorithm.pdfShortest path by using suitable algorithm.pdf
Shortest path by using suitable algorithm.pdf
zefergaming
 
Minimum Spanning Tree Using Prism's Algorithm
Minimum  Spanning Tree Using  Prism's AlgorithmMinimum  Spanning Tree Using  Prism's Algorithm
Minimum Spanning Tree Using Prism's Algorithm
Mrunal Patil
 
Mastering Greedy Algorithms: Optimizing Solutions for Efficiency"
Mastering Greedy Algorithms: Optimizing Solutions for Efficiency"Mastering Greedy Algorithms: Optimizing Solutions for Efficiency"
Mastering Greedy Algorithms: Optimizing Solutions for Efficiency"
22bcs058
 
APznzaZLM_MVouyxM4cxHPJR5BC-TAxTWqhQJ2EywQQuXStxJTDoGkHdsKEQGd4Vo7BS3Q1npCOMV...
APznzaZLM_MVouyxM4cxHPJR5BC-TAxTWqhQJ2EywQQuXStxJTDoGkHdsKEQGd4Vo7BS3Q1npCOMV...APznzaZLM_MVouyxM4cxHPJR5BC-TAxTWqhQJ2EywQQuXStxJTDoGkHdsKEQGd4Vo7BS3Q1npCOMV...
APznzaZLM_MVouyxM4cxHPJR5BC-TAxTWqhQJ2EywQQuXStxJTDoGkHdsKEQGd4Vo7BS3Q1npCOMV...
KUSHDHIRRA2111026030
 

Similar to Minimum Spanning Tree.pptx (16)

Lecture 5.2 - 6.1 MINIMUM SPANNING TREE.pptx
Lecture 5.2 - 6.1 MINIMUM SPANNING TREE.pptxLecture 5.2 - 6.1 MINIMUM SPANNING TREE.pptx
Lecture 5.2 - 6.1 MINIMUM SPANNING TREE.pptx
 
Lecture 5.2 - 6.1 MINIMUM SPANNING TREE.pptx
Lecture 5.2 - 6.1 MINIMUM SPANNING TREE.pptxLecture 5.2 - 6.1 MINIMUM SPANNING TREE.pptx
Lecture 5.2 - 6.1 MINIMUM SPANNING TREE.pptx
 
Shortest path by using suitable algorithm.pdf
Shortest path by using suitable algorithm.pdfShortest path by using suitable algorithm.pdf
Shortest path by using suitable algorithm.pdf
 
Data structure
Data structureData structure
Data structure
 
Data structure and algorithm
Data structure and algorithmData structure and algorithm
Data structure and algorithm
 
1 sollins algorithm
1 sollins algorithm1 sollins algorithm
1 sollins algorithm
 
Minimum Spanning Tree Using Prism's Algorithm
Minimum  Spanning Tree Using  Prism's AlgorithmMinimum  Spanning Tree Using  Prism's Algorithm
Minimum Spanning Tree Using Prism's Algorithm
 
Mastering Greedy Algorithms: Optimizing Solutions for Efficiency"
Mastering Greedy Algorithms: Optimizing Solutions for Efficiency"Mastering Greedy Algorithms: Optimizing Solutions for Efficiency"
Mastering Greedy Algorithms: Optimizing Solutions for Efficiency"
 
Minimum Spanning Tree using Kruskal's Algorithm
Minimum Spanning Tree using Kruskal's Algorithm Minimum Spanning Tree using Kruskal's Algorithm
Minimum Spanning Tree using Kruskal's Algorithm
 
APznzaZLM_MVouyxM4cxHPJR5BC-TAxTWqhQJ2EywQQuXStxJTDoGkHdsKEQGd4Vo7BS3Q1npCOMV...
APznzaZLM_MVouyxM4cxHPJR5BC-TAxTWqhQJ2EywQQuXStxJTDoGkHdsKEQGd4Vo7BS3Q1npCOMV...APznzaZLM_MVouyxM4cxHPJR5BC-TAxTWqhQJ2EywQQuXStxJTDoGkHdsKEQGd4Vo7BS3Q1npCOMV...
APznzaZLM_MVouyxM4cxHPJR5BC-TAxTWqhQJ2EywQQuXStxJTDoGkHdsKEQGd4Vo7BS3Q1npCOMV...
 
Ram minimum spanning tree
Ram   minimum spanning treeRam   minimum spanning tree
Ram minimum spanning tree
 
Approximation Algorithms TSP
Approximation Algorithms   TSPApproximation Algorithms   TSP
Approximation Algorithms TSP
 
Shortest path (Dijkistra's Algorithm) & Spanning Tree (Prim's Algorithm)
Shortest path (Dijkistra's Algorithm) & Spanning Tree (Prim's Algorithm)Shortest path (Dijkistra's Algorithm) & Spanning Tree (Prim's Algorithm)
Shortest path (Dijkistra's Algorithm) & Spanning Tree (Prim's Algorithm)
 
UNIT III.pptx
UNIT III.pptxUNIT III.pptx
UNIT III.pptx
 
Unit V - ppt.pptx
Unit V - ppt.pptxUnit V - ppt.pptx
Unit V - ppt.pptx
 
15 chapter9 graph_algorithms_mst
15 chapter9 graph_algorithms_mst15 chapter9 graph_algorithms_mst
15 chapter9 graph_algorithms_mst
 

More from HrRajon2 (6)

Measure of Central Tendency .pptx
Measure of Central Tendency .pptxMeasure of Central Tendency .pptx
Measure of Central Tendency .pptx
 
Logic Gate.pptx
Logic Gate.pptxLogic Gate.pptx
Logic Gate.pptx
 
NetworkTopology.pptx
NetworkTopology.pptxNetworkTopology.pptx
NetworkTopology.pptx
 
Shortest Path.pptx
Shortest Path.pptxShortest Path.pptx
Shortest Path.pptx
 
 Etiquette, Personal Behavior and Professionalism .pptx
 Etiquette, Personal Behavior and Professionalism.pptx Etiquette, Personal Behavior and Professionalism.pptx
 Etiquette, Personal Behavior and Professionalism .pptx
 
SQl Injection.ppt
SQl Injection.pptSQl Injection.ppt
SQl Injection.ppt
 

Recently uploaded

Spellings Wk 3 English CAPS CARES Please Practise
Spellings Wk 3 English CAPS CARES Please PractiseSpellings Wk 3 English CAPS CARES Please Practise
Spellings Wk 3 English CAPS CARES Please Practise
AnaAcapella
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdf
ciinovamais
 
Salient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functionsSalient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functions
KarakKing
 
1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdf
QucHHunhnh
 

Recently uploaded (20)

SKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptx
SKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptxSKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptx
SKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptx
 
Micro-Scholarship, What it is, How can it help me.pdf
Micro-Scholarship, What it is, How can it help me.pdfMicro-Scholarship, What it is, How can it help me.pdf
Micro-Scholarship, What it is, How can it help me.pdf
 
How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17
 
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptxHMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
 
FSB Advising Checklist - Orientation 2024
FSB Advising Checklist - Orientation 2024FSB Advising Checklist - Orientation 2024
FSB Advising Checklist - Orientation 2024
 
Spellings Wk 3 English CAPS CARES Please Practise
Spellings Wk 3 English CAPS CARES Please PractiseSpellings Wk 3 English CAPS CARES Please Practise
Spellings Wk 3 English CAPS CARES Please Practise
 
Single or Multiple melodic lines structure
Single or Multiple melodic lines structureSingle or Multiple melodic lines structure
Single or Multiple melodic lines structure
 
How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17
 
Unit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptxUnit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptx
 
Understanding Accommodations and Modifications
Understanding  Accommodations and ModificationsUnderstanding  Accommodations and Modifications
Understanding Accommodations and Modifications
 
Spatium Project Simulation student brief
Spatium Project Simulation student briefSpatium Project Simulation student brief
Spatium Project Simulation student brief
 
Google Gemini An AI Revolution in Education.pptx
Google Gemini An AI Revolution in Education.pptxGoogle Gemini An AI Revolution in Education.pptx
Google Gemini An AI Revolution in Education.pptx
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdf
 
Kodo Millet PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
Kodo Millet  PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...Kodo Millet  PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
Kodo Millet PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
 
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdfUGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
 
Making communications land - Are they received and understood as intended? we...
Making communications land - Are they received and understood as intended? we...Making communications land - Are they received and understood as intended? we...
Making communications land - Are they received and understood as intended? we...
 
Holdier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfHoldier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdf
 
Application orientated numerical on hev.ppt
Application orientated numerical on hev.pptApplication orientated numerical on hev.ppt
Application orientated numerical on hev.ppt
 
Salient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functionsSalient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functions
 
1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdf
 

Minimum Spanning Tree.pptx

  • 2. Md. Harun Or Rashid ID: 193-15-2966 PC-A
  • 4. WHAT IS SPANNING TREE? • Before we learn about spanning trees, we need to understand two graphs: undirected graphs and connected graphs. 1. Undirected Graph: An undirected graph is a graph in which the edges do not point in any direction (ie. the edges are bidirectional). 2. Connected Graph: A connected graph is a graph in which there is always a path from a vertex to any other vertex. • Spinning Tree: A spanning tree is a sub-graph of an undirected connected graph, which includes all the vertices of the graph with a minimum possible number of edges.
  • 5. WHAT IS MINIMUM SPANNING TREE? • Minimum Spanning Tree: A minimum spanning tree is a spanning tree in which the sum of the weight of the edges is as minimum as possible. • The minimum spanning tree from a graph is found using the following algorithms: 1. Prim’s Algorithms. 2. Kruskal’s Algorithms.
  • 6. PRIM’S ALGORITHM Prim's algorithm is a minimum spanning tree algorithm that finds the subset of the edges of that graph which • form a tree that includes every vertex. • has the minimum sum of weights among all the trees that can be formed from the graph.
  • 7. HOW PRIM'S ALGORITHM WORKS • We start from one vertex and keep adding edges with the lowest weight until we reach our goal. • The steps for implementing Prim's algorithm are as follows: 1.Initialize the minimum spanning tree with a vertex chosen at random. 2.Find all the edges that connect the tree to new vertices, find the minimum and add it to the tree 3.Keep repeating step 2 until we get a minimum spanning tree
  • 8. EXAMPLE OF PRIM'S ALGORITHM Start with a weighted graph
  • 9. EXAMPLE OF PRIM'S ALGORITHM Choose a vertex
  • 10. EXAMPLE OF PRIM'S ALGORITHM Choose the shortest edge from this vertex and add it.
  • 11. EXAMPLE OF PRIM'S ALGORITHM Choose the nearest vertex not yet in the solution.
  • 12. EXAMPLE OF PRIM'S ALGORITHM Choose the nearest edge not yet in the solution, if there are multiple choices, choose one at random.
  • 13. EXAMPLE OF PRIM'S ALGORITHM Find the minimum spanning tree.
  • 14. MINIMUM CONNECTOR ALGORITHMS Kruskal’s Algorithm Prim’s Algorithm Se
  • 15.