Skip to content
Official PYQ · 2005

GATE CS 2005 Q6 — Minimum Spanning Trees

Explain with AI

An undirected graph GG has nn nodes. its adjacency matrix is given by an n×nn \times n square matrix whose (i) diagonal elements are 0’s and (ii) non-diagonal elements are 1’s. Which one of the following is TRUE?

Choose one option
View worked solution

Answer: C

Based on the given adjacency matrix, the graph GG is a complete graph KnK_n on nn vertices where:

  • The diagonal elements are 00, meaning there are no self-loops.
  • All non-diagonal elements are 11, meaning there is an edge of weight 11 between every pair of distinct vertices.

Let's analyze the properties of the spanning trees of this graph:

  1. Number of edges: Any spanning tree of a connected graph with nn vertices must contain exactly n−1n-1 edges.
  2. Cost of any spanning tree: Since every edge in GG has a weight of 11, the cost of any spanning tree is: Cost=(n−1)×1=n−1\text{Cost} = (n - 1) \times 1 = n - 1 Since all spanning trees have the same minimum possible cost, every spanning tree is a Minimum Spanning Tree (MST).
  3. Number of distinct spanning trees: By Cayley's formula, the number of distinct spanning trees in a complete graph KnK_n is nn−2n^{n-2}. For n≥3n \ge 3, this value is greater than 11, meaning there are multiple distinct spanning trees.

Thus, the graph GG has multiple distinct MSTs, and each has a cost of n−1n-1.

Free practice · Your answers on this page are not saved.

Published
Report a correction
Keep exploringMore Minimum Spanning Trees questions