354 views
0 0 votes

Consider a directed graph G = (V, E), a source vertex s ∈ V, and a tree edge set Eₜ ⊆ E such that for every vertex v ∈ V, the unique simple path from s to v in (V, Eₜ) is a shortest path in G.

Which of the following statements is TRUE?

A) Such a tree Eₜ must always be generated by running BFS from s on G, with appropriate vertex ordering in adjacency lists.

B) Such a tree Eₜ can never be generated by BFS, because BFS does not compute shortest paths.

C) There exists a graph G and a shortest-path tree Eₜ such that Eₜ cannot be produced by any BFS traversal of G, no matter how adjacency lists are ordered.

D) Every shortest-path tree in G must correspond to some BFS tree from s, since BFS always finds all shortest paths.

1 Answer

Position:
Show:

Related questions

0 0 votes
1 1 answer
255
255 views
NIL DAS asked Nov 15, 2025
255 views
Q. Given a tree T = (V, E) with n vertices, the diameter of the tree is the length (in number of edges) of the longest shortest path between any two vertices in the tree....
0 0 votes
0 0 answers
17
17 views
NIL DAS asked Dec 8, 2025
17 views
This post was deleted with below mentioned reason.
Delete Reason Name: Add your approach/doubt where you were struck while solving it in the question itself.
Delete Reason Note:
Has Author Submitted Revision Edit?: NOT YET
The post is awaiting revision edit from its author accordingly with mentioned reason.