5

Given an undirected weighted graph $G$ with two edges of minimum weight and all other edges are distinct. Does G have a unique minimum spanning tree?

I know the proof for if all edge weights are distinct (it does give a unique MST) and I am thinking that if two edges of minimum weight are in $G$ then I should be able to show a counter example. But so far I have not been able to produce one.

So my question is does it give a unique MST if the graph $G$ contains two minimum weight edges?

gprime
  • 467
  • 1
  • 4
  • 13

3 Answers3

5

Yes $G$ has a unique MST (assuming it is not a multigraph). Take a look at Kruskal's algorithm: the edges are ordered ascending by weight and then added to the MST unless there is a cycle. After adding the two minimum edges, you can't have a cycle, therefore both are in the MST.

Edit: As Paresh pointed out, this is not a complete proof, since there may be MSTs which cannot be produced by Kruskal's after permutating equally weighted edges in the sorted list. But Kruskal's is in fact able to produce any MST. Proof.

Simon S
  • 593
  • 3
  • 14
3

Yes.

To build a minimum spanning tree you will order edges by weights from smallest to largest. An edge is included as long as it does not make a cycle. If there are two minimum weight edges, then these edges are first and second. The first two edges do not make a cycle. Therefore, since all other edges are distinct, then you will end up with one minimum spanning tree. That is, whatever order of selecing the two minimum edges, the tree would be the same. QED.

A bit of clarification: Whether you are using Prim or Kruskal, the same result applies. Here is why. Kruskal order ALL edges ascendingly. In Prim, at each node $v$, the edges are ordered ascendingly in this manner $(v,u)$ where $u$ is a neighbor of $v$. Whenever an edge $(u,v)$ is selected, the edge $(v,u)$ is deleted [note they are the same since it is an undirected edge]. The edge with smallest minimum weight $e _{min(1)} =(x,y)$ is the first in the global ordering. It also should be the first at node x and y otherwise it is not the smallest. The argument applies to the second minimum edge $e _{min(2)}$.

In general, Kruskal follows a total order of edges, while Prim uses a partial order of edges.

AJed
  • 2,432
  • 19
  • 25
0

Yes.

Here is a proof that does not rely on any algorithm such as Kruskal's algorithm or Prim's algorithm.

For any cycle $C$ in $G$, $C$ has 3 or more than edges, one of which must weigh differently from the (global) minimum weight. So the maximum edge-weight of $C$ is not the global minimum weight. Since except two edges of the global minimum weight, all other edges in $G$ weigh distinctly, $C$ must have a unique heaviest edge. Let $e$ be an arbitrary edge in $G$. If $e$ is not the unique heaviest edge in any cycle, then it is not a heaviest edge in any cycle. According to the characterization by "extreme cycle edge" of uniqueness of MST, $G$ has a unique MST.

John L.
  • 39,205
  • 4
  • 34
  • 93