GATE IT 2006 · Shortest Path Algorithms

MCQ · 1 mark · Problem PROG-GRPH-0104

Consider the depth-first-search of an undirected graph with 3 vertices P, Q, and R. Let discovery time d(u) represent the time instant when the vertex u is first visited, and finish time f(u) represent the time instant when the vertex u is last visited. Given that\[\begin{array}{l|l}\hline \text{$d(P) = 5$ units } & \text{ $f(P) = 12$ units } \\\hline \text{$d(Q) = 6$ units} & \text{ $f(Q) = 10$ units} \\\hline \text{$d(R) = 14$ unit} & \text{$f(R) = 18$ units} \\\hline \end{array}\]Which one of the following statements is TRUE about the graph?
  1. A
    There is only one connected component
  2. B
    There are two connected components, and P and R are connected
  3. C
    There are two connected components, and Q and R are connected
  4. D
    There are two connected components, and P and Q are connected

Solve it on GATE DA practice →More Graph Theory & Algorithms problems

Show the worked solutionOfficial GATE Answer Key: Option D.See full step-by-step discussion on GateOverflow: https://gateoverflow.in/3590/gate2006-it-47

GATE DA practice: past exam problems by chapter, with worked solutions · gatedaprep.com