IAE Academy

GATE 2026 CS2 Q.36: solution and answer

GATE 2026 · CS2Q.36 · 2 marks · MCQ

Consider a complete graph with vertices (). Note that multiple spanning trees can be constructed over . Each of these spanning trees is represented as a set of edges. The Jaccard coefficient between any two sets is defined as the ratio of the size of the intersection of the two sets to the size of the union of the two sets.

Which one of the following options gives the lowest possible value for the Jaccard coefficient between any two spanning trees of ?

  1. (A)

  2. (B)

  3. (C)

  4. (D)

See the question in the paper

Answer and solution

ANSWER

The lowest possible Jaccard coefficient between two spanning trees of () is — option (C).

Official answer: CSource: Official answer key, GATE 2026 CS2 (IIT Guwahati)

  1. Every spanning tree of has exactly edges (a spanning tree on vertices always has edges), so each spanning tree corresponds to an -element subset of 's edge set.

  2. The Jaccard coefficient of two such edge sets is , which is always ; it is minimized to exactly precisely when and share no edge at all, i.e. when the two spanning trees are edge-disjoint.

  3. So the question reduces to: can (for ) always supply two pairwise edge-disjoint spanning trees? has edges in total. Since each spanning tree needs of them, the number of pairwise edge-disjoint spanning trees that can possibly be packed into is at most .

  4. This bound is a classical tight result for complete graphs: can always be decomposed into (or shown to contain) pairwise edge-disjoint spanning trees — the bound is attained, not merely an upper limit. This also follows from the Nash-Williams/Tutte spanning-tree-packing theorem, since in the trivial vertex partition (no merging) gives the binding constraint.

  5. For (i.e. ), , so at least 2 pairwise edge-disjoint spanning trees of always exist. Pick any such pair .

  6. For this pair, , so their Jaccard coefficient equals .

  7. Since the Jaccard coefficient can never be negative, and the value is shown to be attainable for every , the lowest possible value of the Jaccard coefficient between any two spanning trees of is — option (C).

KEY IDEA

The Jaccard coefficient of two spanning-tree edge sets is minimized (to ) exactly when two edge-disjoint spanning trees of can be found; the maximum number of pairwise edge-disjoint spanning trees packable into is the classical result , which is at least for every .

WATCH OUT FOR

Assuming any two spanning trees of must share at least one edge (confusing "distinct" with "edge-disjoint"), or forgetting that the classical spanning-tree-packing bound for is tight (achievable), not just an upper bound — leading test-takers to pick a small nonzero value like instead of .

From the GATE 2026 CS2 paper. Every question of this paper · Download the full paper · All 28 Graph algorithms questions, with notes

More Graph algorithms questions