English

Kruskal-EDS: Edge Dynamic Stratification

Data Structures and Algorithms 2026-03-03 v1

Abstract

We introduce \textbf{Kruskal-EDS} (\emph{Edge Dynamic Stratification}), a distribution-adaptive variant of Kruskal's minimum spanning tree (MST) algorithm that replaces the mandatory Θ(mlogm)\Theta(m\log m) global sort with a three-phase procedure inspired by Birkhoff's ergodic theorem. In Phase 1, a sample of m\sqrt{m} edges estimates the weight distribution in Θ(mlogm)\Theta(\sqrt{m}\log m) time. In Phase 2, all mm edges are assigned to kk strata in Θ(mlogk)\Theta(m\log 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 n1n{-}1 MST edges are accepted. We prove an effective complexity of Θ(m+p(m/k)log(m/k))\Theta(m + p\cdot(m/k)\log(m/k)), where pkp \leq k is the number of strata actually processed. On sparse graphs or heavy-tailed weight distributions, pkp \ll k and the algorithm achieves near-Θ(m)\Theta(m) behaviour. We further derive the optimal strata count k=m/ln(m+1)k^* = \lceil\sqrt{m/\ln(m+1)}\,\rceil, 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×\mathbf{10\times} in wall-clock time and 33×\mathbf{33\times} 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.

Keywords

Cite

@article{arxiv.2603.02006,
  title  = {Kruskal-EDS: Edge Dynamic Stratification},
  author = {Yves Mercadier},
  journal= {arXiv preprint arXiv:2603.02006},
  year   = {2026}
}
R2 v1 2026-07-01T10:59:26.979Z