GATE CS 2024 Set 2 | Question 59

Algorithms › Graph Algorithms · NAT · 2 marks · Answer: 9

  1. Question 59Algorithmsnat2 marks
    The number of distinct minimum-weight spanning trees of the shown weighted graph (vertices a,b,c,d,e,f,g) is _________
    GATE CS 2024 Set 2 Question 59 figure

    Answer: 9

    Solution

    Answer: 9 All four weight-1 edges () are forced into every MST (no cycle among them), connecting and , with isolated. The MST (weight 8) then needs 2 weight-2 edges to join the three parts , , :
    to g from {a,b,f}: a-g, b-g, f-g      (3 choices)
    to join {c,d,e}: either g-c / g-d / g-e (to g side)
    Counting the valid ways the weight-2 edges connect all three components without a cycle gives distinct MSTs.

More GATE PYQ on Graph Algorithms

All GATE CS Algorithms PYQ →

Attempt GATE CS 2024 Set 2 in real GATE exam mode

Full paper with a timer, the GATE interface and a topic-wise analysis — free.

Create free account →