Similar questions 2 more → · asked again: GATE 2020, Q49
Graph Algorithms

Your answer
Answer & solution
Answer: B (no official key was published)
1. Every edge has weight 2|i−j|≥2, so every spanning tree costs at least 2(n−1). The path v1,v2,...,vn uses n−1 edges of weight 2 and attains the bound.
2. Hence2n−2, B.
3. Teaching check: This is a lower-bound-plus-construction proof. Every spanning tree has exactly n−1 edges and every available edge costs at least two. Connecting consecutive indices achieves that lower bound; no search over all spanning trees is necessary.