GATE CS 2021 · Set-1 · Shortest Path Algorithms

MCQ · 2 marks · Problem PROG-GRPH-0050

Let \(G=(V,E)\) be an undirected unweighted connected graph. The diameter of \(G\) is defined as:\(diam(G)=\displaystyle \max_{u,v \in V} \{ \text{the length of shortest path between }u \text{ and }v \}\)Let \(M\) be the adjacency matrix of \(G\).Define graph \(G_2\) on the same set of vertices with adjacency matrix \(N\), where\[N_{ij}=\left\{\begin{array} {lcl} 1 &\text{if}\; M_{ij}>0 \text{ or } P_{ij}>0, \text{ where }P=M^2\\0 &\text{otherwise} \end{array}\right.\]Which one of the following statements is true?
  1. A
    \(diam(G_2)\leq \left \lceil diam(G)/2 \right \rceil\)
  2. B
    \(\left \lceil diam(G)/2 \right \rceil \lt diam(G_2) \lt diam(G)\)
  3. C
    \(diam(G_2) =diam(G)\)
  4. D
    \(diam(G) \lt diam(G_2) \leq 2 \; diam(G)\)

Solve it on GATE DA practice →More Graph Theory & Algorithms problems

Show the worked solutionOfficial GATE Answer Key: Option A.See full step-by-step discussion on GateOverflow: https://gateoverflow.in/357415/gate-cse-2021-set-1-question-36

GATE DA practice: past exam problems by chapter, with worked solutions · gatedaprep.com