GATE Computer ScienceVery hardGATE CS (PYQ pattern)

How many connected labelled simple graphs on the vertex set {1, 2, 3, 4, 5} have exactly 5 edges?

  1. A. 252
  2. B. 125
  3. C. 210
  4. D. 222

Correct answer: D. 222

Connected with n edges on n vertices = unicyclic. Count by the cycle length k: choose and orient the cycle (C(5,k)(k−1)!/2), then attach the remaining vertices as a forest rooted on the k cycle vertices: k·5^(5−k−1). k = 3: 10 · 1 · 3·5 = 150; k = 4: 5 · 3 · 4 = 60; k = 5: 12. Total 222.

More Discrete Mathematics questions

Exams that ask this topic