Trees & Connectivity

Answer & solution
Official answer: D
Approach: Exchange one cycle edge in a spanning tree and compare the two total weights modulo two.
1. Derivation. Fix a cycle C and an edge e on it. The path C minus e is acyclic and can be extended to a spanning tree T. For any other cycle edge f, T−f+e is another spanning tree. Both tree weights are even, so w(e)−w(f) is even. Thus every pair of cycle edges has the same parity, proving D. A and B fail for a graph that is itself a tree with edge weights 1, 1, 2: its only spanning tree has even total 4 but mixed parity. C fails for a triangle with all three weights 1, whose spanning trees all weigh2 although its cycle edges are odd.
2. Explanation and checks. The extension step is justified because any acyclic edge set in a connected graph can be extended to a spanning tree by repeatedly joining components. Adding e to the tree containing C−e creates exactly the cycle C, so removing any f in that cycle returns a tree. Equal parity of tree sums forces equal parity of e and f. Bridges do not belong to cycles, explaining why D places no restriction on their individual parity and why global uniform parity need not follow.