Minimum spanning tree

Consider an undirected graph $$G$$ with edge costs. A minimal spanning tree $$T$$ on $$G$$ is a spanning tree such that the sum of its edges is as small as possible. Such an MST is not necessarily unique.

There are two main algorithms to find minimal spanning trees: Prim's Algorithm and Kruskal's Algorithm.