GATE / CS ARCHIVE

GATE CSE 2014 SET 1 / QUESTION 51

GATE CSE 2014 Set 1 Q51

Discrete Mathematics · Graph Theory · Full GATE CSE 2014 Set 1 paper

GATE 2014 Set 1, Q51 2 marks · NAT
Report issue

Graph Theory

Question 51, GATE 2014: A simple undirected graph has vertices (i,j) with 1≤i,j≤12. Two distinct vertices (a,b),(c,d) are adjacent exactly when |a−c|≤1 and |b−d|≤1. Self-loops are excluded. How many edges exist?
Tap to enlarge
Answer & solution

Official answer: 506

1. Method and setup. The adjacency condition permits horizontal, vertical and diagonal neighboring grid points, like king moves on a chessboard. Count each undirected edge in one direction only. There are eleven gaps per row or column and two diagonals per unit square; longer or wrapping moves are not allowed.

2. Work through the result and its assumptions. Count horizontal and vertical nearest-neighbor edges: 12·11 each. Each of the 11·11 unit squares contributes two diagonals. These are all permitted distinct vertex pairs, so E=132+132+242=506; self-loops are excluded.

Original paper, page 20 · Answer key