Let be an undirected and unweighted graph with vertices. Let denote the number of edges in a shortest path between vertices and in . Let the maximum value of such that , be . Let be any breadth-first-search tree of . Which ONE of the given options is CORRECT for every such graph ?
View worked solution
Answer: C
The maximum shortest path distance between any two vertices in the graph is defined as the diameter of the graph. Here, the diameter is:
Let be two vertices such that the shortest path distance between them is exactly , i.e., .
Let be a Breadth-First Search (BFS) tree of rooted at an arbitrary vertex . The height of the BFS tree is the maximum distance from the root to any other vertex in the graph:
By the triangle inequality of shortest path distances, we have:
Since and , we can substitute these into the inequality:
Thus, the height of any BFS tree must be at least .
Evaluating the Options:
- Option A & B: If we construct as a simple path of length (with other vertices connected such that they do not increase the diameter):
- Choosing the root at the center of this path yields a BFS tree of height . This disproves Option B.
- Choosing the root at one of the endpoints of the path yields a BFS tree of height . This disproves Option A.
- Option D: As shown above, a BFS tree rooted at the center of the path has a height of , which is strictly less than . This disproves Option D.
- Option C: Since holds universally for any choice of root , the height of is always at least .
Free practice · Your answers on this page are not saved.
