Discussion Forum
Que. | Consider an undirected unweighted graph G. Let a breadth-first traversal of G be done starting from a node r. Let d(r,u) and d(r,v) be the lengths of the shortest paths from r to u and v respectively in G. If u is visited before v during the breadth-first traversal, which of the following statements is correct? |
a. | d(r, u) < d(r, v) |
b. | d(r,u) > d(r,v) |
c. | d(r,u) <= (r,v) |
d. | None of the above |
Answer:d(r,u) <= (r,v) |