Question
Official answer and solution
- Official answer
- A and B
- From
- Official GATE 2021 answer key
Solution
Trace the graph topology, identify directed cycles, back edges encountered during depth-first search, and examine reachability.
Evaluate statement A:
A directed graph has a topological order if and only if it is acyclic (a DAG). The given graph contains directed cycles (for example, cycles formed by backward edges). Since it contains cycles, no topological order exists. Statement A is correct.
Evaluate statement B:
In a depth-first traversal of a directed graph starting from vertex , directed edges that lead from a descendant to an ancestor in the DFS tree are classified as back edges. In this grid-structured graph, the three upward/backward oriented edges return to ancestors in the current DFS path, so exactly three back edges are classified. Statement B is correct.
Evaluate statement C:
Every directed graph has at least one strongly connected component (each individual vertex is a trivial SCC of size 1, and maximal strongly connected subgraphs always partition the vertex set). Hence the statement that the graph does not have an SCC is false. Statement C is incorrect.
Evaluate statement D:
Because the graph is not strongly connected, there are pairs of vertices with no directed path from to . Statement D is incorrect.
A, B
The answer is the one in the official GATE answer key. The solution is this site's own explanation.
Source
- Paper
- GATE 2021 Computer Science and Information Technology - Session 2 (CS2)
- Question
- 56 of 65, printed as CS Q.46
- Section
- Computer Science and Information Technology
Report an error in this question
GATE questions are the work of the organising institutes. This site is independent and is not affiliated with them.