Skip to content
Related Articles
Open in App
Not now

Related Articles

GATE | GATE-CS-2003 | Question 90

Improve Article
Save Article
  • Last Updated : 28 Jun, 2021
Improve Article
Save Article

What is the weight of a minimum spanning tree of the following graph ?

(A) 29
(B) 31
(C) 38
(D) 41

Answer: (B)

Explanation: (a,c), (a,d), (d,b), (b,g), (g,h), (h,f), (h,i), (i,j), (i,e) = 31

Background required – Minimum Spanning Tree (Prims / Kruskal)

In these type of questions, always go for kruskal’s algorithm to find out the the minimum spanning tree as it is easy and there are less chances of doing silly mistakes.


Always pick the minimum edge weight and try to add to current forest (Collection of Trees) if no cycle is formed else discard.
As soon as u have added n-1 edges to the forest, stop and you have got your minimum spanning tree.

See the below image for construction of MST of this question.


Weight of minimum spanning tree = Sum of all the edges in Minimum Spanning tree
= 31

This explanation has been provided by Pranjul Ahuja.

Visit the following links to learn more:

Quiz of this Question

My Personal Notes arrow_drop_up
Related Articles

Start Your Coding Journey Now!