Kruskal’s Tree
Kruskal’s Tree refers to an algorithm used in graph theory to find the Minimum Spanning Tree (MST) of a connected, undirected graph. The MST is a subset of the edges that connects all the vertices together without any cycles and with the minimum possible total edge weight.
The algorithm was developed by Joseph Kruskal in 1956 and operates on the principle of sorting edges by their weights. Here’s a step-by-step breakdown of how Kruskal’s algorithm works:
- Sort all edges: Begin by sorting all the edges in the graph in non-decreasing order based on their weights.
- Initialize Forest: Create a forest (a set of trees) where each vertex in the graph is its own tree.
- Select edges: Iterate through the sorted edge list, and for each edge, check if it forms a cycle with the trees in the forest. If it does not form a cycle, include this edge in the MST and unite the two trees it connects.
- Repeat: Continue this process until there are (V-1) edges in the MST, where V is the number of vertices in the graph.
Kruskal’s algorithm is particularly efficient for sparse graphs, where the number of edges is much less than the square of the number of vertices. Its time complexity is dominated by the sorting step, making it O(E log E), where E is the number of edges.
Overall, Kruskal’s algorithm is widely used in network design, clustering, and other applications where minimum connection costs are crucial.