# Whether the 2 minimum spanning tree of same graph contains the lowest edges in common?

If two minimum spanning trees on the same graph only have 2 edges in common, then those two edges must be the lowest costs edges in the graph.

True/false? and why?

Because according to me if there is a only edge which connects 2 subgraphs then that will be included in the MST whatever might be the value. So according to me the answer is False but the solution says the answer to be true. Please explain.

• I am curious as to whether every pair of minimum spanning trees contain the same 2 edges or just some pair of them? Something to think about it as follows, if you look at the greedy algorithm for minimum spanning trees, it would be clear that the first edge that gets added is the lowest cost edge, and nowhere during the algorithm will it get replaced by another edge. So every minimum spanning trees of a graph must necessarily contain the lowest cost edge of the graph. – csTheoryBeginner Dec 1 '17 at 6:09
• i think you are right considering it to be a greedy MST algorithm it will always start with the smallest edges 1st so even if the graph has 2 MST it will always contain the smallest edges :) @csTheoryBeginner – AlgoMan Dec 1 '17 at 6:50

To prove that it's false you just need a counter-example. The two MST can be Noticed that the only two common edge is not the lowest cost edge. Hence the statement is FALSE.

However, if all the edges have unique weights, the answer is TRUE.

Any MST of a size larger than 1 contains the smallest and the second smallest edge.

The smallest edge must be in any MST. Suppose not, we can always include it and form a cycle, and remove the largest edge in the cycle to form a smaller tree.

The second smallest edge must also be in any MST (of the size larger than 1). Suppose not; we can include it and form a cycle. Noticed that a cycle must have at least 3 edges. Hence, the largest edge that is removed must be larger than the second smallest edge. Hence we also form a smaller tree.

Since any MST must contain the 2 smallest edge, when they only have 2 edges in common, it must be both of them, which are also the lowest costs edge in the graph.

• A very nice answer with an extra observation. Here is the observation refined. If all the edges have unique weights, then there is only one MST. Now if we select 2 MSTs that only have 2 distinct edges in common, then the unique MST has only 2 edges. Those two edges must be the two lowest costs edges in the (non-multi simple) graph (which has either 2 edges or 3 edges in total) – John L. Aug 17 '18 at 21:35