GATE CS 2011 · Question 54 · Algorithms · Multiple choice (MCQ) · 2 marks · −2/3 for a wrong answer
Statement for Linked Answer Questions 54 and 55:
An undirected graph G(V,E) contains n (n > 2) nodes named v₁, v₂, …, vₙ. Two nodes vᵢ, vⱼ are connected if and only if 0 < |i - j| ≤ 2. Each edge (vᵢ, vⱼ) is assigned a weight i + j. A sample graph with n = 4 is shown below.
What will be the cost of the minimum spanning tree (MST) of such a graph with n nodes?

- (A) 1/12(11n² - 5n)
- (B) n² - n + 1
- (C) 6n - 11
- (D) 2n + 1
Answer
Answer (B)
Answer from the official GATE CS 2011 answer key.
The step-by-step solution, where available, is part of GATE CS Pro. See what Pro includes