0% found this document useful (0 votes)
6 views8 pages

Kruskal's

Kruskal's algorithm is a greedy method used to find the Minimum Spanning Tree (MST) of a connected, weighted graph by sorting edges and adding them without forming cycles. The algorithm has a time complexity of O(E * log E) and is less efficient for dense graphs, requiring effective cycle detection and consuming high memory for large graphs. It is not suitable for dynamic graphs with frequent edge updates and does not generate continuous paths.

Uploaded by

Ms. Pavithra D
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)
6 views8 pages

Kruskal's

Kruskal's algorithm is a greedy method used to find the Minimum Spanning Tree (MST) of a connected, weighted graph by sorting edges and adding them without forming cycles. The algorithm has a time complexity of O(E * log E) and is less efficient for dense graphs, requiring effective cycle detection and consuming high memory for large graphs. It is not suitable for dynamic graphs with frequent edge updates and does not generate continuous paths.

Uploaded by

Ms. Pavithra D
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/ 8

Kruskal’s algorithm

What is Kruskal’s algorithm?


Kruskal's algorithm is a popular method in greedy graph theory used to find the Minimum Spanning

Tree (MST) for a connected, weighted graph. The MST is a subgraph that connects all the vertices of the

graph with the minimum possible total edge weight, without any cycles.

How to find MST using Kruskal’s algorithm?

•Sort all the edges in a non-decreasing order of their weight.

•Pick the smallest edge. Check if it forms a cycle with the spanning tree formed so far. If the cycle is

not formed, include this edge. Else, discard it.


Graph
Graph
Time Complexity:

O(E * log E) or O(E * log V)

Disadvantages of Kruskal's Algorithm:


•Inefficient for dense graphs due to the O(E log E) sorting time.
•Requires an efficient cycle detection method, adding complexity.
•Not suitable for dynamic graphs with frequent edge updates.
•High memory consumption for storing all edges in large graphs.
•No continuous path generation since it merges components instead of growing a single tree.

You might also like