Skip to content
Official PYQ · 1995

GATE CS 1995 Q22 — Minimum Spanning Trees

Explain with AI

How many minimum spanning trees does the following graph have? Draw them. (Weights are assigned to edges).

View worked solution

Answer: 2

The given graph consists of 5 vertices {A,B,C,D,E}\{A, B, C, D, E\} with the following weighted edges:

  • Weight 1: (A,B)(A, B), (B,C)(B, C), (D,E)(D, E)
  • Weight 2: (A,C)(A, C), (C,D)(C, D), (C,E)(C, E)
  • Weight 3: (B,D)(B, D)

To find the number of Minimum Spanning Trees (MSTs), we apply Kruskal's Algorithm:

  1. Select edges of weight 1: We choose (A,B)(A, B), (B,C)(B, C), and (D,E)(D, E) as they do not form any cycles. This connects the vertices into two components: {A,B,C}\{A, B, C\} and {D,E}\{D, E\}.
  2. Select edges of weight 2: Edge (A,C)(A, C) forms a cycle with (A,B)(A, B) and (B,C)(B, C), so it is rejected. To connect the two remaining components, we can choose either edge (C,D)(C, D) or edge (C,E)(C, E).

This choice gives exactly 2 distinct minimum spanning trees, both with a total weight of 55:

  • MST 1: {(A,B),(B,C),(D,E),(C,D)}\{(A, B), (B, C), (D, E), (C, D)\}
  • MST 2: {(A,B),(B,C),(D,E),(C,E)}\{(A, B), (B, C), (D, E), (C, E)\}

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

Published
Report a correction
Keep exploringMore Minimum Spanning Trees questions