Abstract

Kruskal’s Algorithm is already shown correct in its own note via the Cut Property. This note gives an independent, second proof of the same result, using the Exchange Argument technique instead — a worked example of applying that general technique to a specific algorithm.


High Level Description

Given an undirected, connected graph with positive edge weights:

  • Start with only the vertices.
  • Repeat until the graph is connected:
    • Add the lightest edge that does not create a cycle.

Alternate Description

Given a connected undirected graph with positive edge weights :

  • Let be the edge with the lightest weight.
  • Add to the output set.
  • Create a graph that fuses the vertices and together into one vertex.
  • Repeat on until there are no other edges.

This “fuse the endpoints together” framing is what the induction below builds on: each greedy choice shrinks the graph by one vertex, giving a clean recursive structure to induct over.


Exchange Argument

Let be an undirected connected graph with positive edge weights. Let be the lightest edge (the first greedy choice). Let be some arbitrary spanning tree that does not include .

Create that:

  • Must include .
  • Must be a spanning tree.
  • Must be lighter than or equal to .

Construction: create by adding to (this creates a cycle, since is already a spanning tree and ) and deleting the heaviest edge in that cycle.

is a spanning tree: it is a tree (the cycle created by adding is broken by removing ) and it still spans all vertices (removing an edge from a cycle never disconnects a graph, since the two endpoints remain connected via the rest of the cycle).

: since we exchanged in for , and is the lightest edge in the entire graph — so in particular for the heaviest edge on that cycle — the swap can only keep the total weight the same or decrease it.


Induction

Base Case (): trivially true — a single vertex has no edges, so any (empty) spanning tree is optimal.

Inductive Hypothesis: suppose that for some , Kruskal’s is optimal for any graph on vertices.

Inductive Step: consider a graph with vertices. Let be some arbitrary solution (spanning tree) of . By the Exchange Argument above, there exists a solution that includes and has weight .

Let be the meta-graph obtained by fusing the two endpoints of together into one vertex (per the Alternate Description). Then , where is the rest of viewed as a solution on . Since has vertices, the Inductive Hypothesis gives . By definition, .

Putting it together:

So for any spanning tree — Kruskal’s Algorithm is optimal.

Note

On the quantity being compared This proof compares total edge weight, not edge count — every spanning tree on vertices has exactly edges regardless of which one you pick, so cardinality alone can’t distinguish a minimum spanning tree from any other spanning tree. What Kruskal’s actually minimizes is , which is why that’s the quantity carried through every step of the induction above.


References / Links