Tutorials › Graph Theory (Undergraduate) › The Cycle Property For Heavy Edges

Minimum Spanning Trees · Tutorial 137 of 799

The Cycle Property For Heavy Edges

Learn how a cycle identifies edges that no minimum spanning tree can use, and how to find minimum spanning trees of explicitly weighted cycles.

Intermediate 9 min read

What You'll Learn

  • Define the cycle property for a finite connected weighted graph.
  • Prove the exchange argument that excludes a uniquely heaviest cycle edge from every minimum spanning tree.
  • Find minimum spanning trees of weighted cycles by comparing the weights of their omitted edges.
  • Distinguish what the property says when the maximum cycle weight is tied.
  • Check spanning-tree candidates by their connectivity, edge counts and total weights.

Why a Heavy Edge on a Cycle Can Be Avoided

A spanning tree must connect every vertex without creating a cycle. When a graph contains a cycle, one of its edges can be removed without disconnecting the vertices. The weights matter: if one edge on that cycle is strictly heavier than all the others, it is never a sensible choice for a minimum spanning tree. The reason is an exchange: removing that edge from a spanning tree separates the tree into two parts, and another edge of the cycle reconnects those parts at lower weight.

Throughout, graphs are finite and simple, and each edge \(e\) has a real weight \(w(e)\). We consider a connected graph \(G=(V,E)\). A spanning tree of \(G\) is a subgraph that contains every vertex and is connected and acyclic. Its total weight is \(w(T)=\sum_{e\in E(T)}w(e)\). A minimum spanning tree (MST) is a spanning tree whose total weight is no greater than that of any other spanning tree of \(G\). A cycle is a closed sequence of edges through distinct vertices, apart from the repeated starting and ending vertex.

Because the graph is finite and connected, it has at least one spanning tree, and there are only finitely many spanning trees. Thus a minimum spanning tree exists. Edge weights need not be positive for this discussion.

Definition: An edge \(e\) on a cycle \(C\) is uniquely heaviest on \(C\) if \(w(e)>w(f)\) for every other edge \(f\) of \(C\). The cycle property says that such an edge belongs to no minimum spanning tree of \(G\).

The Cycle Property and Its Exchange Proof

Theorem (Cycle Property): Let \(G\) be a finite connected weighted graph, and let \(C\) be a cycle in \(G\). If an edge \(e\in E(C)\) is uniquely heaviest on \(C\), then no minimum spanning tree of \(G\) contains \(e\).

Proof. Suppose, to obtain a contradiction, that a minimum spanning tree \(T\) contains \(e\). Removing an edge of a tree separates it into exactly two connected components: the unique path in \(T\) between the endpoints of \(e\) used \(e\), and without \(e\) those endpoints are disconnected; every vertex remains connected to one of the two endpoints by its former tree paths. Call the two components \(A\) and \(B\), with the endpoints of \(e\) in different components.

Traverse the cycle \(C\) from one endpoint of \(e\) to the other without using \(e\). This route starts in \(A\) and ends in \(B\), so at some step it uses an edge \(f\) with one endpoint in \(A\) and one in \(B\). This edge is not \(e\), and it lies on \(C\). Since \(e\) is uniquely heaviest on \(C\), \(w(f)<w(e)\).

Now form \(T'=(T-e)+f\). The graph \(T-e\) has two components, and \(f\) joins those components. Therefore \(T'\) is connected and contains every vertex. It is acyclic: any cycle using \(f\) would require a path between the components already present in \(T-e\), but no such path exists. Thus \(T'\) is a spanning tree. Its weight is \(w(T')=w(T)-w(e)+w(f)<w(T)\), contradicting the minimality of \(T\). Hence no MST contains \(e\). \(\square\)

The strict inequality is essential to this argument. If two or more edges tie for the greatest weight on a cycle, replacing one by another tied edge does not produce a strictly lighter tree. The cycle property therefore excludes a uniquely heaviest edge; it does not, by itself, exclude every edge tied for the maximum.

Minimum Spanning Trees of a Weighted Cycle

Proposition: Suppose the graph itself is a cycle \(C_n\), where \(n\ge3\), and its edge weights are arbitrary real numbers. Every spanning tree is obtained by deleting exactly one edge of \(C_n\). Its minimum spanning-tree weight is the sum of all cycle-edge weights minus the maximum edge weight. The minimum spanning trees are exactly those obtained by deleting an edge of maximum weight.

Proof. A spanning tree on \(n\) vertices has \(n-1\) edges. The cycle has \(n\) edges, so any spanning tree formed from its edges must omit exactly one edge. Conversely, deleting any one edge from the cycle leaves a path through all \(n\) vertices, which is connected and acyclic, and hence is a spanning tree. If the sum of all cycle-edge weights is \(S\), deleting an edge \(e\) gives a tree of weight \(S-w(e)\). This quantity is smallest exactly when \(w(e)\) is largest. If several edges tie for the largest weight, deleting any one of them gives a minimum; if the largest edge is unique, it is the unique edge omitted. \(\square\)

This proposition is specific to a graph that consists of a cycle and no other edges. In a larger graph, a cycle may have other routes and attachments, so subtracting the largest cycle-edge weight from the total weight of the whole graph is not a general way to compute an MST. The cycle property remains valid there as a local exclusion rule.

Worked Example: A Four-Cycle with One Heaviest Edge

Let \(G\) be the weighted cycle with \(V=\{a,b,c,d\}\), \(E=\{ab,bc,cd,da\}\), and weights \(w(ab)=1\), \(w(bc)=4\), \(w(cd)=2\), and \(w(da)=3\). Find its minimum spanning tree.

The cycle-edge weight sum is \(1+4+2+3=10\). The edge \(bc\) is uniquely heaviest because \(4>1\), \(4>2\), and \(4>3\). By the cycle property, no MST contains \(bc\). For this graph, the proposition also gives the minimum weight directly: deleting an edge of weight \(4\) leaves weight \(10-4=6\). The resulting tree has edges \(\{ab,cd,da\}\).

Check: The selected edges have total weight \(w(ab)+w(cd)+w(da)=1+2+3=6\), and they form the path \(b-a-d-c\), which connects all four vertices without a cycle. The other possible deletions give weights \(10-1=9\), \(10-2=8\), and \(10-3=7\), each greater than \(6\). Thus the proposed tree is minimum.

Worked Example: A Heavy Edge in a Triangle with an Attachment

Let \(G\) have \(V=\{a,b,c,d\}\), \(E=\{ab,bc,ca,cd\}\), and weights \(w(ab)=2\), \(w(bc)=9\), \(w(ca)=3\), and \(w(cd)=1\). Find an MST and check its weight against the alternatives.

The edges \(ab,bc,ca\) form a triangle. On that cycle \(bc\) is uniquely heaviest, since \(9>2\) and \(9>3\). The cycle property excludes \(bc\) from every MST. The edge \(cd\) must be included in any spanning tree because it is the only edge incident to \(d\). Once \(bc\) is excluded, both \(ab\) and \(ca\) are needed to connect \(a,b,c\). Thus the MST is \(\{ab,ca,cd\}\), with total weight \(2+3+1=6\).

Check: The three chosen edges connect \(a,b,c,d\) as the path \(b-a-c-d\), so they form a spanning tree, and their weight is \(2+3+1=6\). Any other spanning tree must include \(cd\) and use exactly two edges of the triangle. The two alternatives that include \(bc\) have weights \(w(ab)+w(bc)+w(cd)=2+9+1=12\) and \(w(ca)+w(bc)+w(cd)=3+9+1=13\). Both exceed \(6\).

Worked Example: A Cycle with Tied Heaviest Edges

Let \(G\) be the cycle on \(V=\{1,2,3,4\}\) with \(E=\{12,23,34,41\}\), and weights \(w(12)=1\), \(w(23)=4\), \(w(34)=4\), and \(w(41)=2\). Find all its minimum spanning trees.

The total weight of the cycle is \(1+4+4+2=11\), and its maximum edge weight is \(4\), attained by both \(23\) and \(34\). By the proposition, a minimum spanning tree results from deleting either maximum-weight edge, and each resulting tree has weight \(11-4=7\). The two trees are \(\{12,34,41\}\) and \(\{12,23,41\}\).

Check: The first tree has weight \(1+4+2=7\) and is the path \(2-1-4-3\). The second has weight \(1+4+2=7\) and is the path \(3-2-1-4\). Deleting \(12\) instead gives weight \(11-1=10\), and deleting \(41\) gives \(11-2=9\). Thus the two listed trees, and no other spanning trees of this cycle, are minimum. Neither tied maximum edge is excluded from every MST: each belongs to one of the two minimum trees.

Using the Property Carefully

The cycle property is useful whenever a cycle in a weighted graph contains a uniquely heaviest edge. It lets us rule out that edge before constructing or comparing all spanning trees. It does not, on its own, determine which other edges must be selected, nor does it assert that every edge not ruled out belongs to an MST.

Common mistake: treating the cycle property as a rule to keep only one of the other cycle edges. In the triangle-with-attachment example, after \(bc\) is excluded, it is wrong to choose just \(ab\) or just \(ca\) to connect \(a,b,c\). If \(ab\) is chosen without \(ca\), then \(c\) is disconnected from \(a,b\); if \(ca\) is chosen without \(ab\), then \(b\) is disconnected from \(a,c\). Both \(ab\) and \(ca\) are needed, and with \(cd\) they form the spanning tree of weight \(2+3+1=6\).

Another important limitation is the strictness of the hypothesis. For a tied maximum on a cycle, the theorem’s premise fails. The tied-edge example shows why one cannot conclude that all maximum-weight edges are absent from every MST: either one can be retained if the other is omitted. The proposition for a graph that is itself a cycle describes this case precisely, but in a larger graph the tied edges must be considered in the context of the rest of the graph.

When applying the property, check three things: the edges really form a cycle; the edge being excluded is strictly heavier than every other edge on that cycle; and the graph is connected so that an MST is defined. The conclusion is only that the specified uniquely heaviest edge belongs to no MST.

Check Your Understanding

For each question, state the relevant edge weights and justify the conclusion from the definition or result above.

  1. On a cycle with edge weights \(2,6,3,5\), which edge is excluded from every MST, and what is the minimum spanning-tree weight if the graph consists of that cycle alone?
  2. A cycle has weights \(1,4,4,2\). Does the cycle property exclude either edge of weight \(4\) from every MST? Explain.
  3. In the triangle with edge weights \(w(ab)=3\), \(w(bc)=8\), and \(w(ca)=5\), suppose a fourth vertex \(d\) is attached only by an edge \(cd\). Which edge is excluded by the cycle property, and why must an MST include \(cd\)?
  4. Explain why adding a lighter edge \(f\) to \(T-e\) in the exchange proof produces a spanning tree rather than a disconnected graph or a graph with a cycle.
  5. For a graph that is itself a cycle, prove that if its maximum edge weight occurs on exactly \(k\) edges, it has exactly \(k\) minimum spanning trees.