GATE IT 2007 · Shortest Path Algorithms

MCQ · 1 mark · Problem PROG-GRPH-0099

A depth-first search is performed on a directed acyclic graph. Let d[u] denote the time at which vertex u is visited for the first time and f[u] the time at which the DFS call to the vertex u terminates. Which of the following statements is always TRUE for all edges (u, v) in the graph ?
  1. A
    d[u] < d[v]
  2. B
    d[u] < f[v]
  3. C
    f[u] < f[v]
  4. D
    f[u] > f[v]

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/3457/gate2007-it-24

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