GATE CS 2021 Set 2 | Question 56
Algorithms › Graph Algorithms · MSQ · 2 marks · Answer: A, B
- Question 56Algorithmsmsq2 marksConsider the directed graph shown in the figure. Which of the following is/are correct about the graph?

- A.The graph does not have a topological order.✓
- B.A depth-first traversal starting at vertex classifies three directed edges as back edges.✓
- C.The graph does not have a strongly connected component.
- D.For each pair of vertices and , there is a directed path from to .
Answer: A, B
Solution
The graph contains directed cycles, so it has no topological order (A true). A DFS from encounters three edges that go back to an ancestor, i.e. three back edges (B true). Every graph has strongly connected components (at least singletons), so (C) is false, and the graph is not strongly connected, so (D) is false. - A.
More GATE PYQ on Graph Algorithms
All GATE CS Algorithms PYQ →Attempt GATE CS 2021 Set 2 in real GATE exam mode
Full paper with a timer, the GATE interface and a topic-wise analysis — free.
Create free account →