GATE DA 2026 Q40: Reachability in a graph and its reverse
- Programming, Data Structures and Algorithms
- 2 marks
- MCQ
- −2/3 if wrong
Question
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 ?
Try it: multiple choice: exactly one correct option
Show answer and explanation
Answer: D (official GATE 2026 final answer key)
Concept used: A path in is exactly a path in ; BFS and DFS find the same reachable set.
First step: Reversing every edge of a path from to gives a path from to ; reachability from the same start vertex is not preserved.
Full step-by-step solution
Detailed working, common mistakes and linked mock tests will be available with a free GATEiit account. Log-in is coming soon.
Share this question
Source: official GATE 2026 DA question paper and final answer key, organised by IIT Guwahati. Question paper · Answer key
More Programming, Data Structures and Algorithms PYQs
- 2026 · Q15Expected-time recurrence for randomised-input quicksort
- 2026 · Q16Python mutable default argument output
- 2026 · Q25Binary tree from preorder and inorder traversals
- 2026 · Q31Worst-case comparisons in binary search of 1000 elements
- 2026 · Q39Number of calls made by a Fibonacci-like recursion
- 2026 · Q49Comparisons by bubble sort and insertion sort on a nearly sorted array