GateAI
Graph Traversals, MSTs and Shortest Paths

GATE CSE 2014 Set 2 · Q52

NAT2 marksMedium

Time

The number of distinct minimum spanning trees for the weighted graph below is ‾ \underline{\hspace{1cm}}

GATE CSE 2014 Set 2 Q52 diagram

Your answerNumerical answer

Enter a value to check

Solution

Step-by-step verified solution

Official answer: 6

Graph Traversals, MSTs and Shortest Paths

To find the number of distinct Minimum Spanning Trees (MSTs) using Kruskal's algorithm:

  1. Edges of weight 1:

    • There are 5 edges of weight 1 in the graph (4 in the left subcomponent and 1 in the right triangle).

    • These edges do not form any cycles among themselves, so all 5 edges with weight 1 must be included in every MST.

  2. Edges of weight 2:

    • The connected components formed after selecting all weight-1 edges need to be connected using edges of weight 2 without creating cycles.

    • The bridge between the two components has a single connecting path using weight-2 edges.

    • In the right-hand triangle, with the weight-1 edge already chosen, we have a choice of weight-2 edges to complete the connections.

    • In the left component, there are 3 distinct independent choices to connect the remaining vertices using weight-2 edges.

    • In total, there are 3×2=63 \times 2 = 6 distinct combinations of weight-2 edges that span all vertices while maintaining minimum total weight.

Therefore, the number of distinct MSTs is 6.

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 Graph Traversals, MSTs and Shortest Paths previous year question is Q52 of the GATE CSE 2014 Set 2 paper. Find more GATE CSE PYQs on Graph Traversals, MSTs and Shortest Paths 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 Graph Traversals, MSTs and Shortest Paths 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.

Graph Traversals, MSTs and Shortest Paths in GATE CSE

Graph Traversals, MSTs and Shortest Paths has 7 GATE CSE PYQs across 7 papers from 2014 to 2025. 4 of them are 2-mark NAT questions like this one, and it is the only one in GATE CSE 2014 Set 2.

How GATE tests Graph Traversals, MSTs and Shortest Paths

More from GATE CSE 2014 Set 2

Share this solution

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

GateAI solution cardGATE CSE 2014 Set 2 · Q52 · NAT

The number of distinct minimum spanning trees for the weighted graph below is 1cm

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.