Consider a directed graph 𝐺 = (𝑉,𝐸), where 𝑉 is the finite set of vertices…

GATE Β· 2026 Β· DA Β· Data Science & AI

Consider a directed graph 𝐺 = (𝑉,𝐸), where 𝑉 is the finite set of vertices and 𝐸 is the set of directed edges between the vertices. 𝐺 may contain cycles but there is no self-loop. Further, 𝐺 may not be strongly connected. Let 𝐺𝑅 be the graph obtained by reversing the directions of all the edges in 𝐺 without changing the set of vertices. Assume that Breadth First Search (BFS) or Depth First Search (DFS) from any given vertex 𝑣 of a graph visits only the reachable vertices from 𝑣 in that graph. Which of the following statements must always be true, regardless of the structure of 𝐺?

  1. A.

    If 𝑒 is a reachable vertex in the BFS of 𝐺𝑅 from 𝑣, then 𝑒 is also a reachable vertex in the DFS of 𝐺 from 𝑣.

  2. B.

    In 𝐺𝑅 , the BFS traversal from 𝑣 will visit exactly the same set of vertices as the DFS from 𝑣 in 𝐺.

  3. C.

    The order of vertices visited in the BFS of 𝐺𝑅 from 𝑣 is the reverse of the order of vertices visited in the DFS of 𝐺 from 𝑣.

  4. D.

    If 𝑒 is a reachable vertex in the DFS of 𝐺 from 𝑣, then 𝑣 is also a reachable vertex in the BFS of 𝐺𝑅 from 𝑒.

Attempted by 15 students.

Sign up free to check your answer

Sign up free

Explore the full course: Gate Guidance By Sanchit Sir

Loading lesson…