GATE / CS ARCHIVE

GATE CSE 2021 SET 1 / QUESTION 36

GATE CSE 2021 Set 1 Q36

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

GATE 2021 Set 1, Q36 2 marks · MCQ
Report issue

Graph Theory

Question 36, GATE 2021: G is an undirected unweighted connected graph with adjacency matrix M and diameter equal to its largest shortest-path distance. Let P=M² and define G2 on the same vertices by N_ij=1 if M_ij>0 or P_ij>0, otherwise 0. Which holds universally? A diam(G2)≤⌈diam(G)/2⌉; B ⌈diam(G)/2⌉<diam(G2)<diam(G); C diam(G2)=diam(G); D diam(G)<diam(G2)≤2 diam(G).
Tap to enlarge
Your answer
Answer & solution

Official answer: A

G2 connects vertices whose original distance is at most 2. A shortest G path of lengthd can be compressed into ceil(d/2) G2 edges. Conversely each G2 edge expands into at most 2 G edges, so no shorter G2 path than ceil(d/2) is possible. Thus d_G2(u, v)=ceil(d_G(u, v)/2), and diam(G2)=ceil(diam(G)/2), which in particular satisfies A’s ≤ bound. Self-loops from M² do not shorten distances.

Each positive entry of M² represents a two-edge walk, so a G2 edge can cover at most two original edges. A d-edge shortest path can be grouped into pairs, with one singleton if d is odd, giving an upper bound ⌈d/2⌉. Expanding any k-edge G2 path yields a G walk of at most 2k edges, proving k≥⌈d/2⌉. Taking the maximum over all vertex pairs establishes equality, which is stronger than the selected non-strict bound.

Original paper, page 30 · Answer key