Trees & Connectivity

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.