This project implements the algorithms of Boruvka and Kruskal for creating a minimum spanning tree (MST) of a weighted, undirected graph in C with parallelization via MPI.
Boruvka's algorithm:
- Track components via union-find data structure with union by rank and path compression
- Parallelized search for minimum outgoing edge
Kruskal's algorithm:
- Sorting edges via parallelized merge sort
- Track components via union-find data structure with union by rank and path compression
Use of Boruvka's algorithm is recommended to find the MST of a graph.
To compile:
mpicc filename
To run:
mpirun ./a.out graph1.csv -np 4