# Will the minimum spanning tree not have only those edges specified by the cycle property? [duplicate]

I have just started to understand the "Minimum Spanning Trees" (MSTs), and had come across the cycle property. I am referring to the book - Algorithm Design by Jon Kleinberg and Eva Tardos. The statement of the property as written in the book is:

Assume that all edge costs are distinct. Let C be any cycle in G, and let edge e = (v,w) be the most expensive edge belonging to C. Then e does not belong to any minimum spanning tree.

Now my doubt is: Are the edges of a graph (undirected graph with edges having distinct positive weights) that do not satisfy the cycle property the only ones which aren't present in the MST or will there be any other edges that don't belong to the MST and aren't covered by this property?

I am unable to come up with a proof to argue about whether such edges exist or not. Can some please give a proof for this?

• You can prove it directly by checking the cycle that is created when that edge is added to an MST. Commented May 22, 2020 at 6:24

Let us say that an edge $$e$$ in $$G$$ is BAD if there exists a cycle in $$G$$ in which $$e$$ has maximum weight.

Define $${\cal B}=\{e~|~e$$ is BAD in $$G\}$$ to be the collection of all bad edges.

Your question is whether the graph $$(G - {\cal B})$$ the MST of $$G$$ (assuming all edge-weights are distinct). The answer is YES!

In order to prove this it suffices to show that $$(G - {\cal B})$$ is acyclic.

Assume on contrary that $$(G - {\cal B})$$ contains a cycle, say $$C$$. Observe that $$C$$ is a cycle in $$G$$ also. Let $$e^*$$ be the edge of maximum weight in cycle $$C$$. Now $$e^*$$ is a BAD edge, so it should not have been is graph $$(G - {\cal B})$$ on first place. This shows that $$(G - {\cal B})$$ is acyclic.

Sorry if I didn't understand your question, but what I think you meant to ask is, whether it is possible for an edge to not be in a MST if this edge is not in a cycle.