Skip to content
Official PYQ · 2016

GATE CS 2016 Set 1 Q39 — Minimum Spanning Trees

Explain with AI
Let GG be a complete undirected graph on 44 vertices, having 66 edges with weights being 1,2,3,4,5,1, 2, 3, 4, 5, and 66. The maximum possible weight that a minimum weight spanning tree of GG can have is __________
View worked solution

Answer: 7

To find the maximum possible weight of a minimum spanning tree (MST) of GG, we want to assign the edge weights 1,2,3,4,5,1, 2, 3, 4, 5, and 66 to the complete graph K4K_4 in a way that forces Kruskal's algorithm to choose larger weights.

Let the sorted weights of the edges be e1<e2<e3<e4<e5<e6e_1 < e_2 < e_3 < e_4 < e_5 < e_6 with weights 1,2,3,4,5,61, 2, 3, 4, 5, 6 respectively.

  1. Kruskal's algorithm will always select the edge of weight 11 (e1e_1).
  2. It will then select the edge of weight 22 (e2e_2), as two edges cannot form a cycle.
  3. To maximize the MST weight, we must force the algorithm to reject the edge of weight 33 (e3e_3). This is only possible if the edges with weights 1,2,1, 2, and 33 form a cycle (a triangle) on three vertices, say v1,v2,v_1, v_2, and v3v_3.

With v1,v2,v3v_1, v_2, v_3 forming a triangle, the fourth vertex v4v_4 must connect to this component. The edges incident to v4v_4 are connected to v1,v2,v_1, v_2, and v3v_3, and their weights must be a permutation of the remaining weights: 4,5,4, 5, and 66.

To connect v4v_4 to the spanned component, Kruskal's algorithm will choose the minimum weight edge incident to v4v_4, which is the edge of weight 44.

Thus, the edges selected for the MST will have weights 1,2,1, 2, and 44.
Maximum possible weight of MST=1+2+4=7\text{Maximum possible weight of MST} = 1 + 2 + 4 = 7

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

Published
Report a correction
Keep exploringMore Minimum Spanning Trees questions