- GATE CS
- 2026–27 pattern practice
- Algorithms
- Greedy algorithms
- Medium
In a connected undirected graph with all edge weights distinct, which statement is TRUE?
Algorithm Design
Pick an option to check your answer.
Answer: D. Solution
With distinct weights there is exactly one MST. The lightest edge is always in it (cut property: it is the lightest edge crossing the cut around one of its endpoints).
Why not the others
- The heaviest edge is never in any MST — it can be a bridge, which every spanning tree must include.
- Kruskal's and Prim's algorithms can return different MSTs — the MST is unique, so both return it.
- The MST contains exactly E − V edges — a spanning tree has edges.