01Spanning tree, minimum total weight
Take a connected, undirected, weighted graph. A spanning tree is a set of edges that connects all V vertices and contains no cycle; it always has exactly V − 1 edges. A minimum spanning tree (MST) is one whose total weight is as small as possible.
Note the difference from shortest paths: the MST minimizes the sum of all chosen edges, not the distance from one source. The route between two vertices inside an MST can be long; what is cheap is the network as a whole.
For the 7-vertex graph of the visualizer the MST uses 6 edges with total weight 39. There can be several MSTs with the same total when weights repeat, but the minimum total is unique.