Let G=(V,E) be an undirected unweighted connected graph. The diameter of G is defined as:
![]()
Let M be the adjacency matrix of G.
Define graph G2 on the same set of vertices with adjacency matrix N, where

Which one of the following statements is true? So basically there is an edge between a,b iff there is some vertex c st. there is an edge (a,c) and an edge (c,b) in G. Attention reader! Don’t stop learning now. Learn all GATE CS concepts with Free Live Classes on our youtube channel.
(A) diam(G2)≤⌈ diam(G)/2⌉
(B) ⌈ diam(G)/2⌉
(C) diam(G2) = diam(G)
(D) diam(G)< diam(G2)≤2 diam(G)
Answer: (A)
Explanation: M2 will be the adjacency matrix of the graph H derived from G as follow:
H(a,b) = 1 iff (there exists a vertex c st. G(a,c) = 1 and G(c,b) = 1)
When we do G∪H in the resulting graph diameter reduces to 0.5 of the original graph
Quiz of this Question



