Consider this original connected graph on vertices . Its undirected edges, already in increasing weight order, are
Here means the unordered pair ; the weights are dimensionless costs. Accept and , with total . Reject : its endpoints already have the graph path , so it would close the graph cycle . Accept and , reaching all five vertices with four edges. The resulting minimum spanning tree is
Stop here: and need not be examined. If processing continued, both would be rejected because their endpoints are already in the same connected component of a graph.
Figure 1.
Five sorted edge decisions produce a minimum spanning tree of cost 12
. Original five-vertex example. Green edges are accepted, the red dashed edge is rejected, and grey edges are unexamined. The third decision rejects without changing the accepted forest. Details.
Taking the three cheapest edges instead gives a graph cycle on , leaving isolated: it is neither a forest nor a spanning tree. Even taking the four cheapest edges adds only and leaves isolated. A cheap infeasible selection cannot compete with a minimum spanning tree. For this small graph, checking all four-edge subsets gives a direct certificate: among those that are spanning trees, exactly one has minimum cost , namely . The general algorithm avoids this exhaustive search.

Articles by others on the same topic (0)

There are currently no matching articles.