GATE CS 2021 Set 1 | Question 46

Algorithms › Graph Algorithms · MCQ · 2 marks · Answer: A

  1. Question 46Algorithmsmcq2 marks
    Let be an undirected unweighted connected graph. The *diameter* of is defined as:
    Let be the adjacency matrix of . Define graph on the same set of vertices with adjacency matrix , where if or (where ), and otherwise. Which one of the following statements is true?
    • A.
      ✓
    • B.
    • C.
    • D.

    Answer: A

    Solution

    connects any two vertices within distance 2 in , so every edge in corresponds to a path of length in . Distances halve (with ceiling), giving .

More GATE PYQ on Graph Algorithms

All GATE CS Algorithms PYQ →

Attempt GATE CS 2021 Set 1 in real GATE exam mode

Full paper with a timer, the GATE interface and a topic-wise analysis — free.

Create free account →