Kruskal's Algorithm for Minimum Spanning Forest

Maximilian P. L. Haslbeck, Peter Lammich and Julian Biendarra

14 February 2019

Abstract

This Isabelle/HOL formalization defines a greedy algorithm for finding a minimum weight basis on a weighted matroid and proves its correctness. This algorithm is an abstract version of Kruskal's algorithm. We interpret the abstract algorithm for the cycle matroid (i.e. forests in a graph) and refine it to imperative executable code using an efficient union-find data structure. Our formalization can be instantiated for different graph representations. We provide instantiations for undirected graphs and symmetric directed graphs.
BSD License

Depends On

Topics

Related Entries

Theories