Consider the directed graph G = (V, E) where V is the finite set of vertices and E is the set of directed edges between the vertices. G may contain cycle but there is no self-loop, further G may not be strongly connected. Let GR be the graph obtained by reversing direction of all edges without changing set of vertices. Assume that BFS or DFS for any given vertex V of a graph will visit only the reachable vertices from V in that graph. Which of the following statement must always be true regardless of the structure of G?
Solution :
The correct option is: If U is a reachable vertex in the DFS of G from V then V is also a reachable vertex in the BFS of GR from U.
Here is the step-by-step explanation of why this statement is always true:
1. Understanding Reachability in Graph G:
If a vertex U is reachable from V in the directed graph G, it means there exists a directed path starting at V and ending at U. Let this path be represented as:
where each transition represents a directed edge in the set of edges E of G.
2. Reversing the Edges (Graph GR):
The graph GR is constructed by reversing the direction of all edges in G. This means that for every directed edge in G, there exists a corresponding directed edge in GR.
3. Path in the Reversed Graph:
Applying this reversal to our original path from V to U, the reversed path exists in GR as:
Since this sequence of directed edges exists in GR, it implies that V is reachable from U in the graph GR.
4. Traversal Reachability:
By definition, a Breadth-First Search (BFS) or Depth-First Search (DFS) starting from a vertex will visit all vertices that are reachable from it. Since V is reachable from U in GR, any BFS traversal starting from U in GR must eventually visit V. Thus, V is a reachable vertex in the BFS of GR from U.
Completely free for students. Educators & coaching institutes get 2 months free Pro trial to create tests.
Access unlimited practice questions, detailed step-by-step solutions, and exam study materials — completely free for students.
Create and conduct professional online assessments with AI question generation, tab proctoring, and comprehensive batch management.
Prepare effectively for GATE 2026 Computer Science & Information Technology (CS & IT) with this comprehensive Question Paper with Solutions. This resource includes detailed explanations, concept-wise solutions, previous year paper analysis, and exam-oriented practice to help aspirants strengthen core subjects like Data Structures, Algorithms, Operating Systems, DBMS, Computer Networks, Theory of Computation, Compiler Design, and more. Perfect for revision, self-assessment, and boosting your GATE 2026 preparation strategy.
Prepare for GATE 2026 Electrical Engineering (EE) with high-quality study material, previous year question papers, mock tests, syllabus updates, exam pattern, and expert preparation strategies. Master core EE subjects including Power Systems, Control Systems, Electrical Machines, Circuit Theory, Signals & Systems, Power Electronics, and Measurements to secure a top rank in GATE 2026.
Copyright © 2026 Combe Labs Private Limited. All Rights Reserved.