Kruskal-EDS: Edge Dynamic Stratification
Abstract
We introduce Kruskal-EDS (Edge Dynamic Stratification), a distribution-adaptive variant of Kruskal's minimum spanning tree (MST) algorithm that replaces the mandatory (m m) global sort with a three-phase procedure inspired by Birkhoff's ergodic theorem. In Phase 1, a sample of m edges estimates the weight distribution in (m m) time. In Phase 2, all m edges are assigned to k strata in (m k) time via binary search on quantile boundaries -- no global sort. In Phase 3, strata are sorted and processed in order; execution halts as soon as n-1 MST edges are accepted. We prove an effective complexity of (m + p·(m/k)(m/k)), where p ≤ k is the number of strata actually processed. On sparse graphs or heavy-tailed weight distributions, p k and the algorithm achieves near-(m) behaviour. We further derive the optimal strata count k* = m/(m+1)\,, balancing partition overhead against intra-stratum sort cost. An extensive benchmark on 14 graph families demonstrates correctness on 12 test cases and practical speedups reaching 10× in wall-clock time and 33× in sort operations over standard Kruskal. A 3-dimensional TikZ visualisation of the complexity landscape illustrates the algorithm's adaptive behaviour as a function of graph density and weight distribution skewness.
Turn this paper into a full lesson
ArcXiv compiles a staged curriculum from this paper: 8-12 lessons across beginner → advanced, synthesised section guides, visuals, flashcards, a quiz, exercises, and on-demand deep dives per section. Grounded in the abstract, never invented.