GATE CS 2025 Set 1 | Question 43

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

  1. Question 43Algorithmsmcq2 marks
    Let be an undirected, unweighted graph with 100 vertices. Let denote the number of edges in a shortest path between and . Suppose (the diameter). Let be any breadth-first-search tree of . Which ONE of the options is CORRECT for every such graph ?
    • A.
      The height of is exactly 15.
    • B.
      The height of is exactly 30.
    • C.
      The height of is at least 15.
      ✓
    • D.
      The height of is at least 30.

    Answer: C

    Solution

    Answer: (C) The height of is at least 15. A BFS tree rooted at has height equal to the eccentricity of (the maximum distance from to any vertex). For any root and the diametral pair with :
    So , i.e. the BFS-tree height is at least 15 for every root. It can be exactly 15 (root at the center) or as large as 30 (root at a diametral endpoint), so "exactly 15/30" and "at least 30" are not guaranteed.

More GATE PYQ on Graph Algorithms

All GATE CS Algorithms PYQ →

Attempt GATE CS 2025 Set 1 in real GATE exam mode

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

Create free account →