GATE / CS ARCHIVE

GATE CSE 1996 / QUESTION 16(b)

Find a vertex-sum MST

Algorithms · Graph Algorithms · Full GATE CSE 1996 paper

GATE 1996, Q16(b) Descriptive
Report issue

Graph Algorithms

Question 16(b), GATE 1996: A complete undirected graph on vertices 0,1,…,n−1 has weight w(u,v)=u+v for distinct vertices. Draw a minimum spanning tree.
Question 16(b), GATE 1996: A complete undirected graph on vertices 0,1,…,n−1 has weight w(u,v)=u+v for distinct vertices. Draw a minimum spanning tree.
Tap to enlarge
Answer & solution

Answer: Star centered at 0, edges (0,v) for 1≤v<n; total n(n−1)/2. (no official key was published)

For each vertex v>0, consider the cut separating v from every other vertex. Its incident edges have weights v+u, with u≠v. The smallest possible u is 0, so (v,0) is the unique minimum-weight edge across this cut. By the cut property every MST must contain it.

Doing this for every v=1,…,n−1 gives exactly the star centered at 0. These n−1 edges connect all vertices and have no cycle, so the mandatory set itself is a spanning tree. Its weight is Σ_(v=1)n−1 v=n(n−1)/2. Text diagram: center 0 with a spoke to each v; spoke (0,v) has label v.

A second lower-bound proof roots any spanning tree at 0. Each nonroot vertex v has one parent p(v)≥0, so its parent edge costs v+p(v)≥v. Summing over all nonroot vertices gives total at least Σv. The star attains equality by taking every parent to be 0. This argument also shows uniqueness for n≥2: equality requires all parents 0. For n=1 there are no spokes and the minimum weight is 0. The complete graph assumption guarantees that every required spoke exists.

Original paper, page 9