SlideShare a Scribd company logo
KRUSKAL ALGORITHM
By Group 12
Kruskal's Algorithm is used to find the minimum spanning tree for a
connected weighted graph. The main target of the algorithm is to find
the subset of edges by using which we can traverse every vertex of the
graph. It follows the greedy approach that finds an optimum solution at
every stage instead of focusing on a global optimum.
# About Kruskal’s Algorithm
Spanning tree - A spanning tree is the subgraph of an undirected
connected graph.
Minimum Spanning tree - Minimum spanning tree can be defined as
the spanning tree in which the sum of the weights of the edge is
minimum. The weight of the spanning tree is the sum of the weights
given to the edges of the spanning tree.
Some Basic Terms Before Starting:
InKruskal's algorithm,westart fromedgeswiththelowest
weightandkeepaddingtheedgesuntilthegoalis reached.
Thesteps to implementKruskal's algorithmarelisted as
follows -
First, sort alltheedgesfromlowweighttohigh.
Now
,take the edgewith the lowest weight andaddit
tothespanningtree.If theedgetobeaddedcreatesa
cycle,thenreject theedge.
Continuetoaddtheedges untilwereachallvertices,
anda minimumspanningtreeis created.
Exampleof Kruskal’
s A
lgorithm
How Does Kruskal’s
Algorithm works? Let’
s lookat howKruskal’
s approach functions
using anexample.Using anexample,it willbe
easier to comprehendKruskal’
s algorithm.
Let’
s assumeaweightedgraphis –
1.) Table after organizing the edges in the ascending
order according to their weights :-
Edge AB DE BC CD AE AC AD
Weight 1 2 3 4 5 7 10
Phase 1– J
oin the edge PQ
having the weight 1to the
MST.
Phase 2 – J
oin the edge ST
having the weight 2 to the
MST
.Also,point to be
noted that this is not
making any cycle.
Phase 3 –Add the edge
QR having the weight 3
to the MST
Phase 4 – Select the edge
RS having the weight 4 to
the MST;also,you will
notice that it is not
composing the cycle
Phase 5 –Now, we will select the edge PT having the weight 5.
Adding this edge will form the cycle, so we will dump it.
Phase 6 –Pick the edge PR having the weight 7.Adding this edge
will form the cycle,so we will dump it.
Phase 7–Pick the edge PS having the weight 10.Adding this edge
will form the cycle,so we will dump it.
Total value of MST is =PQ +ST +QR +RS
=1+2 +3 +4 =1
0 .
In the above tree,the number of edges
now equals the number of vertices
minus one.As a result,the algorithm
has reached its conclusion.
The final minimum spanning tree
obtained from the given weighted
graph by using Kruskal's
algorithm
THE APPLICATIONS OF KRUSKAL’S
ALGORITHM
The technique by Kruskal can be used to build out
electrical wiring across cities.
It’s possible to operate it to set up LAN connections.
Group Members:
• Shashwat Mishra 23BAI10448
• Dev Marwah 23BAI10310
• Dhanni Watti 23BCY10343
• Prateek Chhabra 23BAI10169
• Rajrup Roy Choudhury 23BAI10213
• Aryan Desai 23BAI10179
THANK YOU

More Related Content

PPTX
Kruskal’s algorithm
PPTX
Kruskal algorithm
PPTX
Kruskal’s Algorithm: Finding the Minimum Spanning Tree
PPTX
Understanding Kruskal's Algorithm: From Theory to Real-World Application
PPTX
Kruskal's Algorithm finds a minimum spanning tree.
PPTX
Application of Kruskals algorithm
PPTX
Minimum Spanning Tree using Kruskal's Algorithm
PPTX
Data structure
Kruskal’s algorithm
Kruskal algorithm
Kruskal’s Algorithm: Finding the Minimum Spanning Tree
Understanding Kruskal's Algorithm: From Theory to Real-World Application
Kruskal's Algorithm finds a minimum spanning tree.
Application of Kruskals algorithm
Minimum Spanning Tree using Kruskal's Algorithm
Data structure

Similar to Kruskal Algorithm for minimum spanning.. (20)

PPTX
DATA STRUCTURE AND ALGORITHM LMS MST KRUSKAL'S ALGORITHM
PPTX
Data Structures and Algorithms Kruskals algorithm
PPTX
prim's and kruskal's algorithm
PPTX
uva-201026072839.pptxvcvczcvzvcxbxcvbcxvbvcxbcx
PDF
Ijciras1101
PPT
Graph Theory PPT presentation created by Selvam.
PPT
Krusadfafadfadfafdasdfasdfaasdfasdcsdkal.ppt
PPTX
Minimum Spinning Tree Full Explaination pptx
PPT
Greedy Approach in Design Analysis and Algorithms
PPTX
Minimum Spanning Tree
PDF
OTP, Phishing, QR code, Shares, Visual Cryptography.
PDF
Unit3_1.pdf
PPTX
Data structure
PPTX
kruskal and prims algorithm _
PDF
Shortest path by using suitable algorithm.pdf
PPTX
Prim's and Kruskal's Algorithm
PPT
minimum spanning trees Algorithm
PPTX
_A C program for Prim's Minimum Spanning Tree (MST) algorithm. The program is...
PPTX
Kruskal Algorithm
DATA STRUCTURE AND ALGORITHM LMS MST KRUSKAL'S ALGORITHM
Data Structures and Algorithms Kruskals algorithm
prim's and kruskal's algorithm
uva-201026072839.pptxvcvczcvzvcxbxcvbcxvbvcxbcx
Ijciras1101
Graph Theory PPT presentation created by Selvam.
Krusadfafadfadfafdasdfasdfaasdfasdcsdkal.ppt
Minimum Spinning Tree Full Explaination pptx
Greedy Approach in Design Analysis and Algorithms
Minimum Spanning Tree
OTP, Phishing, QR code, Shares, Visual Cryptography.
Unit3_1.pdf
Data structure
kruskal and prims algorithm _
Shortest path by using suitable algorithm.pdf
Prim's and Kruskal's Algorithm
minimum spanning trees Algorithm
_A C program for Prim's Minimum Spanning Tree (MST) algorithm. The program is...
Kruskal Algorithm
Ad

Recently uploaded (20)

PDF
IFIT3 RNA-binding activity primores influenza A viruz infection and translati...
PPTX
Taita Taveta Laboratory Technician Workshop Presentation.pptx
PPTX
G5Q1W8 PPT SCIENCE.pptx 2025-2026 GRADE 5
PDF
ELS_Q1_Module-11_Formation-of-Rock-Layers_v2.pdf
PDF
Sciences of Europe No 170 (2025)
DOCX
Viruses (History, structure and composition, classification, Bacteriophage Re...
PPTX
EPIDURAL ANESTHESIA ANATOMY AND PHYSIOLOGY.pptx
PPTX
ECG_Course_Presentation د.محمد صقران ppt
PPTX
Protein & Amino Acid Structures Levels of protein structure (primary, seconda...
PPT
The World of Physical Science, • Labs: Safety Simulation, Measurement Practice
PPTX
famous lake in india and its disturibution and importance
PDF
Mastering Bioreactors and Media Sterilization: A Complete Guide to Sterile Fe...
PDF
The scientific heritage No 166 (166) (2025)
PDF
AlphaEarth Foundations and the Satellite Embedding dataset
PDF
Placing the Near-Earth Object Impact Probability in Context
PPTX
2Systematics of Living Organisms t-.pptx
PDF
HPLC-PPT.docx high performance liquid chromatography
PDF
Formation of Supersonic Turbulence in the Primordial Star-forming Cloud
PDF
VARICELLA VACCINATION: A POTENTIAL STRATEGY FOR PREVENTING MULTIPLE SCLEROSIS
PPTX
BIOMOLECULES PPT........................
IFIT3 RNA-binding activity primores influenza A viruz infection and translati...
Taita Taveta Laboratory Technician Workshop Presentation.pptx
G5Q1W8 PPT SCIENCE.pptx 2025-2026 GRADE 5
ELS_Q1_Module-11_Formation-of-Rock-Layers_v2.pdf
Sciences of Europe No 170 (2025)
Viruses (History, structure and composition, classification, Bacteriophage Re...
EPIDURAL ANESTHESIA ANATOMY AND PHYSIOLOGY.pptx
ECG_Course_Presentation د.محمد صقران ppt
Protein & Amino Acid Structures Levels of protein structure (primary, seconda...
The World of Physical Science, • Labs: Safety Simulation, Measurement Practice
famous lake in india and its disturibution and importance
Mastering Bioreactors and Media Sterilization: A Complete Guide to Sterile Fe...
The scientific heritage No 166 (166) (2025)
AlphaEarth Foundations and the Satellite Embedding dataset
Placing the Near-Earth Object Impact Probability in Context
2Systematics of Living Organisms t-.pptx
HPLC-PPT.docx high performance liquid chromatography
Formation of Supersonic Turbulence in the Primordial Star-forming Cloud
VARICELLA VACCINATION: A POTENTIAL STRATEGY FOR PREVENTING MULTIPLE SCLEROSIS
BIOMOLECULES PPT........................
Ad

Kruskal Algorithm for minimum spanning..

  • 2. Kruskal's Algorithm is used to find the minimum spanning tree for a connected weighted graph. The main target of the algorithm is to find the subset of edges by using which we can traverse every vertex of the graph. It follows the greedy approach that finds an optimum solution at every stage instead of focusing on a global optimum. # About Kruskal’s Algorithm
  • 3. Spanning tree - A spanning tree is the subgraph of an undirected connected graph. Minimum Spanning tree - Minimum spanning tree can be defined as the spanning tree in which the sum of the weights of the edge is minimum. The weight of the spanning tree is the sum of the weights given to the edges of the spanning tree. Some Basic Terms Before Starting:
  • 4. InKruskal's algorithm,westart fromedgeswiththelowest weightandkeepaddingtheedgesuntilthegoalis reached. Thesteps to implementKruskal's algorithmarelisted as follows - First, sort alltheedgesfromlowweighttohigh. Now ,take the edgewith the lowest weight andaddit tothespanningtree.If theedgetobeaddedcreatesa cycle,thenreject theedge. Continuetoaddtheedges untilwereachallvertices, anda minimumspanningtreeis created. Exampleof Kruskal’ s A lgorithm How Does Kruskal’s Algorithm works? Let’ s lookat howKruskal’ s approach functions using anexample.Using anexample,it willbe easier to comprehendKruskal’ s algorithm. Let’ s assumeaweightedgraphis –
  • 5. 1.) Table after organizing the edges in the ascending order according to their weights :- Edge AB DE BC CD AE AC AD Weight 1 2 3 4 5 7 10
  • 6. Phase 1– J oin the edge PQ having the weight 1to the MST. Phase 2 – J oin the edge ST having the weight 2 to the MST .Also,point to be noted that this is not making any cycle.
  • 7. Phase 3 –Add the edge QR having the weight 3 to the MST Phase 4 – Select the edge RS having the weight 4 to the MST;also,you will notice that it is not composing the cycle
  • 8. Phase 5 –Now, we will select the edge PT having the weight 5. Adding this edge will form the cycle, so we will dump it. Phase 6 –Pick the edge PR having the weight 7.Adding this edge will form the cycle,so we will dump it. Phase 7–Pick the edge PS having the weight 10.Adding this edge will form the cycle,so we will dump it.
  • 9. Total value of MST is =PQ +ST +QR +RS =1+2 +3 +4 =1 0 . In the above tree,the number of edges now equals the number of vertices minus one.As a result,the algorithm has reached its conclusion. The final minimum spanning tree obtained from the given weighted graph by using Kruskal's algorithm
  • 10. THE APPLICATIONS OF KRUSKAL’S ALGORITHM The technique by Kruskal can be used to build out electrical wiring across cities. It’s possible to operate it to set up LAN connections.
  • 11. Group Members: • Shashwat Mishra 23BAI10448 • Dev Marwah 23BAI10310 • Dhanni Watti 23BCY10343 • Prateek Chhabra 23BAI10169 • Rajrup Roy Choudhury 23BAI10213 • Aryan Desai 23BAI10179