• S
    SwaseekhGATE Preparation
General
  • Dashboard
  • Syllabus
  • Questions
  • Aptitude
  • Mock Tests
  • TCS NQT 2026
Account
  • Pricing
  • Contact
  1. GATE CS
  2. PYQs
  3. Discrete Mathematics

If G is the forest with n vertices and k connected components, how many edges does G have? A. floor(n/k). B. ceil(n/k). C. n - k. D. n - k + 1.

GATE 2014 · Discrete Mathematics · Graph Connectivity · medium

Answer: n - k edges -> Option C.

  1. Edges of each tree: sum over i: sum (p_i - 1) = (sum p_i) - k
  2. Substitute the vertex total: sum p_i = n, so total edges = n - k