Kruskal's Algorithm for Minimum Spanning Tree with MATLAB Implementation
Implementation of Kruskal's algorithm for Minimum Spanning Tree in graph theory with visualization program. M-function format [Wt, Pp] = mintreek(n, W) where n represents number of graph vertices, W is weighted adjacency matrix (non-connected vertices use 'inf'). Displays MST edges/vertices: Wt stores total weight, Pp(:,1:2) contains edge vertices, Pp(:,3) edge weights, Pp(:,4) edge indices. Red lines in plot indicate MST connections.