Exams › GATE › Technical
Let G(V,E) be an undirected and unweighted graph with 100 vertices. Let d(u,v) denote the number of edges in a shortest path between vertices u and v in V. Let the maximum value of d(u,v), u,v ∈ V such that u ≠ v, be 30. Let T be any breadth-first-search tree of G. Which ONE of the given options is CORRECT for every such graph G?
- The height of T is exactly 15.
- The height of T is exactly 30.
- The height of T is at least 15.
- The height of T is at least 30.
Correct answer: The height of T is at least 15.
Solution
The height of the breadth-first search tree T must be at least 15 because the maximum distance between any two vertices in the graph is 30, and in a BFS tree, the height represents the longest path from the root to any leaf. Since the maximum distance is 30, the tree must span at least half of that distance to connect vertices, ensuring a minimum height of 15.
Related GATE Technical questions
⚔️ Practice GATE Technical free + battle 1v1 →