GATE CSE 2020 Q41: Checking whether an MST survives the addition of one edge
- Algorithms
- 2 marks
- MCQ
- −2/3 if wrong
Question
Let be a weighted undirected graph and let be a Minimum Spanning Tree (MST) of maintained using adjacency lists. Suppose a new weighted edge is added to . The worst case time complexity of determining if is still an MST of the resultant graph is
Try it: multiple choice: exactly one correct option
Show answer and explanation
Answer: D (official GATE 2020 final answer key)
Concept used: Cycle property: the new edge closes exactly one cycle with ; stays minimum unless the new edge is lighter than the heaviest edge on that cycle.
First step: Find the – path in by a traversal of the tree (it has edges) and track its maximum edge weight.
Full step-by-step solution
Detailed working, common mistakes and linked mock tests will be available with a free GATEiit account. Log-in is coming soon.
Share this question
Source: official GATE 2020 CS question paper and final answer key, organised by IIT Delhi. Question paper · Answer key
More Algorithms PYQs
- 2026 Session 1 · Q17Solve nested recurrences T1 = 4T1(n/2) + T2, T2 = 5T2(n/4) + log n
- 2026 Session 1 · Q41Shortest paths with at most k edges: two statements
- 2026 Session 1 · Q47Condition forcing a vertex into every minimum vertex cover
- 2026 Session 1 · Q49Cycle and cut properties of MSTs with distinct weights
- 2026 Session 1 · Q50Impossible DFS discovery/finish orderings for a DAG edge
- 2026 Session 1 · Q55Properties of 2-colorable (bipartite) graphs