Let G be the graph with 100 vertices numbered 1 to 100. Two vertices i and j…
1997
Let G be the graph with 100 vertices numbered 1 to 100. Two vertices i and j are adjacent if |i−j|=8 or |i−j|=12. The number of connected components in G is
- A.
8
- B.
4
- C.
12
- D.
25
Attempted by 11 students.
Show answer & explanation
Correct answer: B
The graph has edges between vertices with differences of 8 or 12. Since GCD(8,12)=4, any two vertices with the same residue modulo 4 are connected. With 100 vertices and 4 possible residues mod 4, there are exactly 4 connected components.
From the description it is clear that vertices are connected as follows:
1−9−17−...−97
2−10−18−...−98
3−11−19−...−99
4−12−20−...−10
5−13−21−...−93
6−14−22−...−94
7−15−23−...−95
8−16−24−...−96
We have covered all vertices using 8 vertex sets considering only ∣i−j∣=8 .
Using ∣i−j∣=12 we can see the vertex 11 is connected to 13, 2−14, 3−15 and 4−16, so the top 4 vertex sets are in fact connected to the bottom 4 sets, thus reducing the connected components to 4.