GateAI
Graph Theory

GATE CSE 2014 Set 1 · Q51

NAT2 marksMedium

Time

Consider an undirected graph GG where self-loops are not allowed. The vertex set of GG is {(i,j):1≤i≤12,1≤j≤12}\{(i,j): 1 \le i \le 12, 1 \le j \le 12\}. There is an edge between (a,b)(a,b) and (c,d)(c,d) if ∣a−c∣≤1|a - c| \le 1 and ∣b−d∣≤1|b - d| \le 1. The number of edges in this graph is _______.

Your answerNumerical answer

Enter a value to check

Solution

Step-by-step verified solution

Official answer: 506 (±0)

Graph Theory

The graph GG has 12×12=14412 \times 12 = 144 vertices arranged in a grid. An edge connects two distinct vertices (a,b)(a, b) and (c,d)(c, d) if they are adjacent horizontally, vertically, or diagonally (i.e., at Chebyshev distance 1).

We can find the degree of each type of vertex in the 12×1212 \times 12 grid:

  1. Corner vertices (4 vertices): Located at (1,1),(1,12),(12,1),(12,12)(1,1), (1,12), (12,1), (12,12). Each has 2×2−1=32 \times 2 - 1 = 3 neighbors.

    Sum of degrees=4×3=12\text{Sum of degrees} = 4 \times 3 = 12
  2. Boundary non-corner vertices (4×10=404 \times 10 = 40 vertices): Each has 2×3−1=52 \times 3 - 1 = 5 neighbors.

    Sum of degrees=40×5=200\text{Sum of degrees} = 40 \times 5 = 200
  3. Interior vertices (10×10=10010 \times 10 = 100 vertices): Each has 3×3−1=83 \times 3 - 1 = 8 neighbors.

    Sum of degrees=100×8=800\text{Sum of degrees} = 100 \times 8 = 800

Using the Handshaking Lemma:

∑v∈Vdeg⁡(v)=2∣E∣\sum_{v \in V} \deg(v) = 2|E|
12+200+800=1012=2∣E∣12 + 200 + 800 = 1012 = 2|E|
∣E∣=10122=506|E| = \frac{1012}{2} = 506

Thus, the number of edges is 506.

Try the question first, then check your work.

Think the official key or this write-up is wrong?

Report error or challenge

Examiner trap

The misconception this question tests

This Graph Theory previous year question is Q51 of the GATE CSE 2014 Set 1 paper. Find more GATE CSE PYQs on Graph Theory in Engineering Mathematics, or browse all GATE CSE PYQs.

Free diagnostic

Where do you stand for GATE?

Take the 20-minute diagnostic: the 3 topics that cost you the most marks, and a rank range. Or sit 5 related Graph Theory PYQs now with no account.

One GATE CSE PYQ every morning

An official question by email at 7 AM IST, with a link to its verified solution. Unsubscribe in one click.

Graph Theory in GATE CSE

Graph Theory has 21 GATE CSE PYQs across 14 papers from 2012 to 2026. 7 of them are 2-mark NAT questions like this one, and GATE CSE 2014 Set 1 has 2.

How GATE tests Graph Theory

More from GATE CSE 2014 Set 1

Share this solution

A plain-text card for WhatsApp or Telegram study groups.

GateAI solution cardGATE CSE 2014 Set 1 · Q51 · NAT

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. The number of edges in this graph is …

Topic-wise GATE CS PYQs with verified steps

Independent practice explanation verified by the GateAI team. GATE is conducted by the IITs; question text follows the official paper.