GATE / CS ARCHIVE

GATE CSE 1997 / QUESTION 6.2

Components for step8 or12 edges

Discrete Mathematics · Trees & Connectivity · Full GATE CSE 1997 paper

GATE 1997, Q6.2 2 marks · MCQ
Report issue

Trees & Connectivity

Question 6.2, GATE 1997: Vertices 1…100 are adjacent when their difference is 8 or 12. Count connected components among 8, 4, 12, 25.
Tap to enlarge
Your answer
Answer & solution

Answer: B: 4 (no official key was published)

Every allowed difference is divisible by 4, so a path preserves residue modulo 4. There are at least four components. Each residue class contains 25 vertices; after rescaling by 4, its edges connect indices differing by 2 or 3. These 25 indices form a connected graph: all odd indices connect by 2, all even indices connect by 2, and the edge 1–4 of difference 3 joins the two chains. Hence each residue class is one component, proving exactly four, B. The boundary argument is necessary; a gcd observation alone would only prove the lower bound for a finite interval.

Original paper, page 5