GATE Assistant

Past questions › Data Science and Artificial Intelligence › GATE 2026

GATE 2026 · DA · MCQ · 2 marks · Programming, Data Structures and Algorithms › Graph Theory & Traversals

GATE 2026 Data Science and Artificial Intelligence question: Consider a directed graph G = (V, E), where V is the finite set of vertices and E is the…

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 .

Show answer

This question is in an all-India live mock that is open now. Its answer appears here when the mock closes.

Practise this question with exam-style marking