Skip to content
Official PYQ · 2020

GATE CS 2020 Q49 — Minimum Spanning Trees

Explain with AI
Consider a graph G=(V,E)G = (V,E), where V={v1,v2,…,v100}V = \{v_1,v_2, \dots ,v_{100}\}, E={(vi,vj)∣1≤i<j≤100}E = \{(v_i,v_j) \mid 1\leq i < j \leq 100\}, and weight of the edge (vi,vj)(v_i,v_j) is ∣i–j∣\mid i – j \mid. The weight of minimum spanning tree of GG is _________
View worked solution

Answer: 99

We are given a graph G=(V,E)G = (V, E) with 100100 vertices, V={v1,v2,…,v100}V = \{v_1, v_2, \dots, v_{100}\}.

The weight of the edge between any two vertices viv_i and vjv_j is given by w(vi,vj)=∣i−j∣w(v_i, v_j) = |i - j|.

1. Number of Edges in a Spanning Tree

Any spanning tree of a graph with nn vertices must contain exactly n−1n - 1 edges. Here, n=100n = 100, so any spanning tree of GG must have exactly 9999 edges.

2. Minimum Edge Weight

Since i≠ji \neq j for any edge, the minimum possible weight of any edge in the graph is:

∣i−j∣≥1|i - j| \geq 1

Therefore, the weight of any spanning tree must be at least 99×1=9999 \times 1 = 99.

3. Constructing the Minimum Spanning Tree (MST)

We can construct a spanning tree by connecting consecutive vertices in a path:

v1−v2−v3−⋯−v100v_1 - v_2 - v_3 - \dots - v_{100}

The edges in this path are:

{(v1,v2),(v2,v3),…,(v99,v100)}\{(v_1, v_2), (v_2, v_3), \dots, (v_{99}, v_{100})\}

The weight of each such edge (vi,vi+1)(v_i, v_{i+1}) is:

∣i−(i+1)∣=1|i - (i+1)| = 1

Since this set of 9999 edges connects all 100100 vertices without forming any cycles, it is a valid spanning tree. The total weight of this spanning tree is:

99×1=9999 \times 1 = 99

Since 9999 is the absolute lower bound for the weight of any spanning tree in this graph, the weight of the minimum spanning tree is 99.

Free practice · Your answers on this page are not saved.

Published
Report a correction
Keep exploringMore Minimum Spanning Trees questions