Consider an undirected graph G where self-loops are not allowed. The vertex…
2016
Consider an undirected graph G where self-loops are not allowed.
The vertex set of G is {(i, j) | 1 ≤ i ≤ 12, 1 ≤ j ≤ 12}.
There is an edge between (a, b) and (c, d) if
|a − c| ≤ 1 and |b − d| ≤ 1 and (a, b) ≠ (c, d).
The number of edges in this graph is ______.
- A.
726
- B.
796
- C.
506
- D.
616
Attempted by 138 students.
Show answer & explanation
Correct answer: C
Final answer: 506
Reasoning and counting steps:
Interpreting the vertex set as the integer grid with i = 1,...,12 and j = 1,...,12 gives 12 × 12 = 144 vertices.
The intended adjacency is that two distinct vertices are connected when both coordinate differences are at most 1 (i.e. max(|a−c|,|b−d|) ≤ 1), so each vertex is adjacent to its horizontal, vertical and diagonal neighbours (the king-move adjacency).
Count edges by direction (each adjacent pair is counted exactly once):
Horizontal adjacent pairs: in each of the 12 rows there are 11 horizontal edges, so 12 × 11 = 132.
Vertical adjacent pairs: similarly 12 × 11 = 132.
Down-right diagonal pairs (between row i and i+1 and column j and j+1): 11 × 11 = 121.
Down-left diagonal pairs (between row i and i+1 and column j and j−1): 11 × 11 = 121.
Total edges = 132 + 132 + 121 + 121 = 506.
Note: If the problem were interpreted differently (for example adjacency only when coordinates are equal in one coordinate), the edge count would be different. The count above matches 506 and is consistent with the adjacency giving all immediate horizontal, vertical and diagonal neighbours on a 12×12 integer grid.
A video solution is available for this question — log in and enroll to watch it.