Question

The maximum value of xx such that the edge between the nodes B and C is included in every minimum spanning tree of the given graph is _________ . (answer in integer)

An undirected weighted complete graph on 4 vertices A (top-left), B (top-right), D (bottom-left), and C (bottom-right) with edge weights: (A, B) = 7, (A, D) = 6, (D, C) = 8, (B, C) = x, diagonal (B, D) = 1, and diagonal (A, C) = 3.
Official answer and solution
Official answer
5
From
Official GATE 2025 answer key

Solution

Find the minimum spanning tree of the graph without edge (B,C)(B, C), identify the maximum edge weight on the unique path between BB and CC in that tree, and require xx to be strictly smaller.

  1. Consider the graph without edge (B,C)(B, C): its edges sorted by weight are (B,D)=1(B, D) = 1, (A,C)=3(A, C) = 3, (A,D)=6(A, D) = 6, (A,B)=7(A, B) = 7, and (D,C)=8(D, C) = 8.
  2. By Kruskal's algorithm, the MST of G∖{(B,C)}G \setminus \{(B, C)\} consists of the three edges:
    (B,D)=1,(A,C)=3,(A,D)=6(B, D) = 1, \quad (A, C) = 3, \quad (A, D) = 6
  3. Adding edge (B,C)(B, C) of weight xx to this tree creates the fundamental cycle B−D−A−C−BB - D - A - C - B, whose other edges have weights 1,6,1, 6, and 33 (maximum weight =6= 6).
  4. By the MST cycle property, edge (B,C)(B, C) is included in every MST of GG if and only if its weight xx is strictly less than the heaviest other edge in this cycle (x<6x < 6, since at x=6x = 6 there is a tie with (A,D)=6(A, D) = 6).
  5. Therefore, the maximum integer value of xx is 5.
Final answer

5

Common trap

Answering 6 by overlooking that the question requires (B,C)(B, C) to be included in every MST.

The answer is the one in the official GATE answer key. The solution is this site's own explanation.

Source

Paper
GATE 2025 Computer Science and Information Technology - Session 1 (CS1)
Question
64 of 65
Section
Computer Science and Information Technology

Report an error in this question

GATE questions are the work of the organising institutes. This site is independent and is not affiliated with them.