Select an algorithm to start!
Vertices: 6
Edges: 0
Selected Edges: 0
Current Weight: 0
MST Weight: 0
• Sort edges by weight
• Add edge if no cycle formed
• Uses Union-Find structure
• Click the correct next edge!
• Start from any vertex
• Always add minimum weight edge
• Grows tree from single vertex
• Click the correct next edge!
A spanning tree is a subgraph that includes all vertices and is both connected and acyclic.
Properties:
Applications:
Network design, cluster analysis, image segmentation, and approximation algorithms.
A greedy algorithm that finds the MST by sorting edges and adding them if they don't create cycles.
Algorithm Steps:
Time Complexity:
O(E log E) where E is the number of edges, dominated by the sorting step.
A greedy algorithm that grows the MST from a starting vertex by always adding the minimum weight edge.
Algorithm Steps:
Time Complexity:
O(E log V) with binary heap, O(E + V log V) with Fibonacci heap.