MCQ · 2 marks · Discrete Mathematics

GATE CS 2021 CS-1 — Q36

Let G=(V,E)G = (V, E) be an undirected unweighted connected graph. The diameter of GG is defined as:
diam(G)=max⁡u,v∈V{the length of shortest path between u and v}\mathrm{diam}(G) = \max_{u, v \in V} \{\text{the length of shortest path between } u \text{ and } v\}
Let MM be the adjacency matrix of GG.
Define graph G2G_2 on the same set of vertices with adjacency matrix NN, where
Nij={1if Mij>0 or Pij>0, where P=M20otherwiseN_{ij} = \begin{cases} 1 & \text{if } M_{ij} > 0 \text{ or } P_{ij} > 0, \text{ where } P = M^2 \\ 0 & \text{otherwise} \end{cases}
Which one of the following statements is true?
Select one option