0% found this document useful (0 votes)
10 views1 page

Kruskal’s Algorithm for Minimum Spanning Tree

Kruskal's Algorithm is a greedy method for finding the Minimum Spanning Tree (MST) in a connected, undirected, and weighted graph by selecting edges with the lowest weight that do not form cycles. The algorithm involves sorting edges, using a Disjoint Set Union structure, and adding edges to the MST until it contains (V - 1) edges. Its applications include network design, clustering in machine learning, and civil engineering projects.

Uploaded by

A I M E N
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
10 views1 page

Kruskal’s Algorithm for Minimum Spanning Tree

Kruskal's Algorithm is a greedy method for finding the Minimum Spanning Tree (MST) in a connected, undirected, and weighted graph by selecting edges with the lowest weight that do not form cycles. The algorithm involves sorting edges, using a Disjoint Set Union structure, and adding edges to the MST until it contains (V - 1) edges. Its applications include network design, clustering in machine learning, and civil engineering projects.

Uploaded by

A I M E N
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 1

Kruskal’s Algorithm for Minimum Spanning Tree

Problem Description:

In many applications like designing road networks, electrical circuits, or computer networks, we
need to connect all points (nodes) using the shortest total distance or cost without creating loops.
This is known as the Minimum Spanning Tree (MST) problem.
Objective:
Given a connected, undirected, and weighted graph, find a subset of the edges that forms a tree
including every vertex and minimizes the total edge weight.

Algorithmic Approach – Kruskal's Algorithm:

Kruskal’s Algorithm is a greedy algorithm that solves the MST problem by always choosing the
edge with the lowest weight that doesn’t form a cycle.

Steps of the Algorithm:


1. Sort all edges in non-decreasing order of their weights.
2. Initialize an empty MST.
3. Use a Disjoint Set Union (DSU) structure to keep track of connected components.
4. For each edge in the sorted list:
If the edge connects two different components (doesn’t form a cycle), add it to the MST.
5. Stop when the MST contains exactly (V - 1) edges (where V is the number of vertices)

Complexity Analysis

Time Complexity: O(E log E)


Where:
E = number of edges
V = number of vertices

Real-world Applications:
Network Design: Laying cables or pipelines using minimal material.
Clustering in Machine Learning: Creating clusters with minimal intra-group distances.
Approximation Algorithms: For NP-hard problems like traveling salesman.
Civil Engineering: Road/bridge construction with minimal cost.
Social Networks: Community detection and group communication efficiency.

You might also like