[Math] Given a graph with distinct edge weights and a not-minimum ST, there always exist another ST of lesser total weight that differs only by one edge

graph theoryproof-writingtrees

I have to show that, if all the edge weights of a graph are distinct, given a spanning tree $T$ that is not a MST, there always exist a spanning tree $T'$ of lesser total weight, s.t. $T'$ differs from $T$ only by one edge.

I started reasoning from this question, but it's not helpful for my case and I cannot go over.

Best Answer

Actually that question (in particular this answer) is helpful.

A proof using cycle property:

Let $G=(V,E)$ be the original graph. Let the set of edges $T \subseteq E$ be a spanning tree on $G$ that is not minimum.

Now, there will exist an edge $e$ which belongs to the MST and not to $T$.

Adding $e$ it to $T$ creates a cycle. By cycle property, the most expensive edge of this cycle (call it $e'$) does not belong to the MST, so it must belong to $T$.

Removing $e'$ we break the cycle and we obtain a new subgraph $T'$ with lesser total weight than $T$. Furthermore, $T'$ is a spanning tree because:

  • It doesn't have cycles: we broke the cycle removing $e'$.
  • It is connected: creating and breaking a cycle cannot affect connectivity.
  • It covers all the vertices of $G$: the two vertices of the removed edge $e'$ are still covered by the adjacent edges of $e'$.

So there must exist a spanning tree of lesser total weight, s.t. it differs from $T$ only by one edge.