Class KruskalMinimumSpanningTree<V,W>

java.lang.Object
org.episteme.core.mathematics.discrete.KruskalMinimumSpanningTree<V,W>
All Implemented Interfaces:
MinimumSpanningTree<V,W>

public class KruskalMinimumSpanningTree<V,W> extends Object implements MinimumSpanningTree<V,W>
Kruskal's algorithm for finding Minimum Spanning Tree.

Alternative to Prim's algorithm. Sorts edges by weight and greedily adds them if they don't create a cycle. Uses Union-Find data structure. O(E log E) time.

*

Reference:
Kruskal, J. B. (1956). On the shortest spanning subtree of a graph and the traveling salesman problem. Proceedings of the American Mathematical Society, 7(1), 48-50.

Since:
1.0
Author:
Silvere Martin-Michiellot, Gemini AI (Google DeepMind)