GateAI
Minimum Spanning Trees

GATE CSE 2024 Set 2 · Q59

NAT2 marksMedium

Time

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

GATE CSE 2024 Set 2 Q59 diagram

Your answerNumerical answer

Enter a value to check

Solution

Step-by-step verified solution

Official answer: 9

Minimum Spanning Trees

We use Kruskal's algorithm to find the number of distinct minimum spanning trees (MSTs):

  1. Graph properties:

    • Vertices: V={a,b,c,d,e,f,g}V = \{a, b, c, d, e, f, g\}, so ∣V∣=7|V| = 7.

    • Any spanning tree must contain ∣V∣−1=6|V| - 1 = 6 edges.

  2. Edges of weight 1:

    • Edges: (a,b),(a,f),(c,d),(e,d)(a, b), (a, f), (c, d), (e, d).

    • None of these 4 edges form a cycle.

    • Therefore, all 4 edges must be selected in any MST.

    • After including these edges, we have 3 connected components:

      {a,b,f},{c,d,e},{g}\{a, b, f\}, \quad \{c, d, e\}, \quad \{g\}
  3. Edges of weight 2:

    • Edges connecting component {a,b,f}\{a, b, f\} to vertex gg: (a,g),(b,g),(f,g)(a, g), (b, g), (f, g) (3 choices).

    • Edges connecting component {c,d,e}\{c, d, e\} to vertex gg: (c,g),(d,g),(e,g)(c, g), (d, g), (e, g) (3 choices).

    • To connect all 3 components into a single connected tree, we need exactly 2 more edges of weight 2:

      • One edge from {(a,g),(b,g),(f,g)}\{(a, g), (b, g), (f, g)\}

      • One edge from {(c,g),(d,g),(e,g)}\{(c, g), (d, g), (e, g)\}

  4. Total number of MSTs:

    Number of distinct MSTs=3×3=9\text{Number of distinct MSTs} = 3 \times 3 = 9

All selected trees will have the same minimum total weight: 4(1)+2(2)=84(1) + 2(2) = 8.

Try the question first, then check your work.

Think the official key or this write-up is wrong?

Report error or challenge

Examiner trap

The misconception this question tests

This Minimum Spanning Trees previous year question is Q59 of the GATE CSE 2024 Set 2 paper. Find more GATE CSE PYQs on Minimum Spanning Trees in Algorithms, or browse all GATE CSE PYQs.

Free diagnostic

Where do you stand for GATE?

Take the 20-minute diagnostic: the 3 topics that cost you the most marks, and a rank range. Or sit 5 related Minimum Spanning Trees PYQs now with no account.

One GATE CSE PYQ every morning

An official question by email at 7 AM IST, with a link to its verified solution. Unsubscribe in one click.

Minimum Spanning Trees in GATE CSE

Minimum Spanning Trees has 13 GATE CSE PYQs across 9 papers from 2011 to 2026. 3 of them are 2-mark NAT questions like this one, and GATE CSE 2024 Set 2 has 2.

How GATE tests Minimum Spanning Trees

More from GATE CSE 2024 Set 2

Share this solution

A plain-text card for WhatsApp or Telegram study groups.

GateAI solution cardGATE CSE 2024 Set 2 · Q59 · NAT

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

Topic-wise GATE CS PYQs with verified steps

Independent practice explanation verified by the GateAI team. GATE is conducted by the IITs; question text follows the official paper.