Skip to main content

GATE CSE 2024Algorithms › Graph AlgorithmsVerified

GATE CSE 2024 PYQ: The number of distinct minimum-weight spanning trees of the following graph is

The number of distinct minimum-weight spanning trees of the following graph is

GATE CSE 2024 Graph Algorithms diagram: The number of distinct minimum-weight spanning trees of the

    Answer

    9

    Approach

    Apply Kruskal's algorithm and the cycle property: first include all edges of the smallest weight that can be part of an MST, exclude edges that are strictly the heaviest on a cycle, then count the independent choices needed to connect the remaining components.

    The graph's minimum spanning trees must use all four weight-1 edges, must exclude the two weight-3 edges, and must then use one of three weight-2 edges from g to {a,b,f} together with one of three weight-2 edges from g to {c,d,e}. This gives 3 × 3 = 9 distinct minimum-weight spanning trees.

    Reviewed by GateIQ Editorial Team: IIT & IISc Alumni.