UGC NET CS 2019Data Structures and Algorithms › Graph AlgorithmsVerified
UGC NET CS 2019 PYQ: The weight of minimum spanning tree in graph $G$, calculated using Kruskal’s algorithm is:
The weight of minimum spanning tree in graph $G$, calculated using Kruskal’s algorithm is:

- A14
- B15Correct answer
- C17
- D18
Answer
(B) 15
Approach
The graph G has 5 vertices: top (T), left-middle (L), right-middle (R), bottom-left (BL), bottom-right (BR), with edges $T\!-\!L=2$, $T\!-\!R=8$, $L\!-\!R=6$, $L\!-\!BL=5$, $R\!-\!BR=7$, $L\!-\!BR=4$, $BL\!-\!BR=3$.
Kruskal's algorithm sorts edges by weight: 2,3,4,5,6,7,8 and greedily adds an edge whenever it joins two different components.
- Weight 2 ($T\!-\!L$): accepted.
- Weight 3 ($BL\!-\!BR$): accepted.
- Weight 4 ($L\!-\!BR$): accepted; now $\{T,L,BR,BL\}$ form one component.
- Weight 5 ($L\!-\!BL$): rejected, since $L$ and $BL$ are already connected through $L\!-\!BR\!-\!BL$, so it closes a cycle.
- Weight 6 ($L\!-\!R$): accepted, bringing $R$ in.
Now 4 edges ($n-1=5-1$) are chosen, so the MST is complete with total weight $2+3+4+6=15$.
The remaining edges (7 and 8) are skipped because they would form cycles. Hence the minimum spanning tree weight is $\boxed{15}$, matching option (B). This agrees with the sole candidate answer, and my independent check of each union step confirms it.
Reviewed by UGC IQ Editorial Team.