Consider the following pseudocode for depth-first search (DFS) algorithm which
takes a directed graph ๐บ(๐, ๐ธ) as input, where ๐[๐ฃ] and ๐[๐ฃ] are the discovery time
and finishing time, respectively, of the vertex ๐ฃ โ๐.
๐ท๐น๐(๐บ):
๐ข๐๐๐๐๐ ๐๐๐ ๐ฃโ๐
๐ก โ0
๐๐๐ ๐๐๐โ ๐ฃโ๐
๐๐ ๐ฃ ๐๐ ๐ข๐๐๐๐๐๐๐
๐กโ๐ธ๐ฅ๐๐๐๐๐(๐บ, ๐ฃ, ๐ก)
๐๐๐ ๐๐
๐๐๐ ๐๐๐
๐ธ๐ฅ๐๐๐๐๐(๐บ, ๐ฃ, ๐ก):
๐๐๐๐ ๐ฃ
๐ก โ๐ก+ 1
๐[๐ฃ] โ๐ก
๐๐๐ ๐๐๐โ (๐ฃ, ๐ค) โ๐ธ
๐๐ ๐ค ๐๐ ๐ข๐๐๐๐๐๐๐
๐กโ๐ธ๐ฅ๐๐๐๐๐(๐บ, ๐ค, ๐ก)
๐๐๐ ๐๐
๐๐๐ ๐๐๐
๐ก โ๐ก + 1
๐[๐ฃ] โ๐ก
๐๐๐ก๐ข๐๐ ๐ก
Suppose that the input directed graph ๐บ(๐, ๐ธ) is a directed acyclic graph (DAG).
For an edge (๐ข, ๐ฃ) โ๐ธ, which of the following options will NEVER be correct?