Skip to content
Official PYQ · 2009

GATE CS 2009 Q38 — Minimum Spanning Trees

Explain with AI

Consider the following graph:

Which one of the following is NOT the sequence of edges added to the minimum spanning tree using Kruskal’s algorithm?

Choose one option
View worked solution

Answer: D

In Kruskal's algorithm, edges are considered and added to the Minimum Spanning Tree (MST) in strictly non-decreasing order of their weights, provided they do not form a cycle.

From the given graph, the weights of the relevant edges are:

  • w(b,e)=2w(b, e) = 2
  • w(a,c)=3w(a, c) = 3
  • w(e,f)=3w(e, f) = 3
  • w(b,c)=4w(b, c) = 4
  • w(f,g)=5w(f, g) = 5
  • w(c,d)=6w(c, d) = 6

Since Kruskal's algorithm must process all edges of weight 33 before any edge of weight 44:

  • Both (a,c)(a, c) and (e,f)(e, f) (each of weight 33) must be processed and added before (b,c)(b, c) (weight 44).

Let's analyze Option D: (b, e) (e, f) (b, c) (a, c) (f, g) (c, d)

Here, the edge (b,c)(b, c) with weight 44 is added before the edge (a,c)(a, c) with weight 33. This violates the greedy choice property of Kruskal's algorithm. Thus, Option D is NOT a valid sequence.

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

Published
Report a correction
Keep exploringMore Minimum Spanning Trees questions