GateAI
Graph Traversals, MSTs and Shortest Paths

GATE CSE 2015 Set 1 · Q43

NAT2 marksMedium

Time

The graph shown below has 8 edges with distinct integer edge weights. The minimum spanning tree (MST) is of weight 36 and contains the edges: {(A,C),(B,C),(B,E),(E,F),(D,F)}\{(A, C), (B, C), (B, E), (E, F), (D, F)\}. The edge weights of only those edges which are in the MST are given in the figure shown below. The minimum possible sum of weights of all 8 edges of this graph is _________.

GATE CSE 2015 Set 1 Q43 diagram

Your answerNumerical answer

Enter a value to check

Solution

Step-by-step verified solution

Official answer: 69

Graph Traversals, MSTs and Shortest Paths

Given the MST edges and their weights from the figure:

  • w(A,C)=9w(A, C) = 9

  • w(B,C)=2w(B, C) = 2

  • w(B,E)=15w(B, E) = 15

  • w(E,F)=4w(E, F) = 4

  • w(D,F)=6w(D, F) = 6

Sum of MST edge weights =9+2+15+4+6=36= 9 + 2 + 15 + 4 + 6 = 36.

The non-MST edges are (A,B)(A, B), (D,E)(D, E), and (C,D)(C, D). By the cycle property of Minimum Spanning Trees, the weight of any non-tree edge must be strictly greater than the maximum edge weight on the unique tree path between its endpoints (since all edge weights are distinct integers).

  1. For edge (A,B)(A, B):

    • Path in MST between AA and BB: A−C−BA - C - B.

    • Maximum edge weight on this path =max⁡(w(A,C),w(B,C))=max⁡(9,2)=9= \max(w(A, C), w(B, C)) = \max(9, 2) = 9.

    • Therefore, $w(A, B) > 9$.

  2. For edge (D,E)(D, E):

    • Path in MST between DD and EE: D−F−ED - F - E.

    • Maximum edge weight on this path =max⁡(w(D,F),w(E,F))=max⁡(6,4)=6= \max(w(D, F), w(E, F)) = \max(6, 4) = 6.

    • Therefore, $w(D, E) > 6$.

  3. For edge (C,D)(C, D):

    • Path in MST between CC and DD: C−B−E−F−DC - B - E - F - D.

    • Maximum edge weight on this path =max⁡(w(C,B),w(B,E),w(E,F),w(F,D))=max⁡(2,15,4,6)=15= \max(w(C, B), w(B, E), w(E, F), w(F, D)) = \max(2, 15, 4, 6) = 15.

    • Therefore, $w(C, D) > 15$.

All 8 edges must have distinct integer weights. The weights already used in the MST are {2,4,6,9,15}\{2, 4, 6, 9, 15\}.

To minimize the total weight:

  • For w(D,E)>6w(D, E) > 6, the smallest available integer not in the set is 77.

  • For w(A,B)>9w(A, B) > 9, the smallest available integer not in the set (and distinct from 77) is 1010.

  • For w(C,D)>15w(C, D) > 15, the smallest available integer not in the set (and distinct from 7,107, 10) is 1616.

Minimum possible sum of all 8 edge weights:

Total Sum=36+7+10+16=69\text{Total Sum} = 36 + 7 + 10 + 16 = 69

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 Q43 of the GATE CSE 2015 Set 1 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 2015 Set 1.

How GATE tests Graph Traversals, MSTs and Shortest Paths

More from GATE CSE 2015 Set 1

Share this solution

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

GateAI solution cardGATE CSE 2015 Set 1 · Q43 · NAT

The graph shown below has 8 edges with distinct integer edge weights. The minimum spanning tree (MST) is of weight 36 and contains the edges: {(A, C), (B, C), (B, E), (E, F), (D, F)}. The edge weights of only those edges which are in the MST are given in the figure shown below. The minimum possible sum of weights of all 8 edges of this 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.