GATE | GATE CS 1997 | Question 42
Let G be the graph with 100 vertices numbered 1 to 100. Two vertices i and j are adjacent iff |i−j|=8 or |i−j|=12. The number of connected components in G is
(A) 8
(B) 4
(C) 12
(D) 25
Answer: (B)
Explanation: When vertices are arranged with difference of 8 there are 8 components as shown by 8 columns in the image below:

When vertices are arranged with difference of 12 the number of components is reduced to 4 as first column will be connected with fifth column, second column will be connected with sixth column, third column will be connected with seventh column and fourth column will be connected with eighth column. No other form of connection exists so total 4 connected components are there.
So, option (B) is correct.
This explanation is contributed by Pradeep Pandey.
Quiz of this Question
Recommended Posts:
- GATE | GATE CS 1997 | Question 39
- GATE | GATE CS 1997 | Question 38
- GATE | GATE CS 1997 | Question 4
- GATE | GATE CS 1997 | Question 37
- GATE | GATE CS 1997 | Question 25
- GATE | GATE CS 1997 | Question 5
- GATE | GATE CS 1997 | Question 6
- GATE | GATE CS 1997 | Question 7
- GATE | GATE CS 1997 | Question 8
- GATE | GATE CS 1997 | Question 9
- GATE | GATE CS 1997 | Question 40
- GATE | GATE CS 1997 | Question 47
- GATE | GATE CS 1997 | Question 41
- GATE | GATE CS 1997 | Question 46
- GATE | GATE CS 1997 | Question 45
Improved By : PRADEEP PANDEY



