Arrays
October 7, 2023
Data-Structures
October 7, 2023
Arrays
October 7, 2023
Data-Structures
October 7, 2023

Graphs

Question 15

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?

A
d[u] < d[v]
B
d[u] < f[v]
C
f[u] < f[v]
D
f[u] > f[v]
Question 15 Explanation: 

Option A:
d[u]<d[v], if="" we="" directly="" start="" dfs="" on="" v="" first,="" then="" 1="" call="" x="" which="" visits="" u.
Option B:
d[u]<f[v]; same="" as="" a.
Option C:
f[u]<f[v]; same="" as="" a.
So, option D is True.
Correct Answer: D
Question 15 Explanation: 

Option A:
d[u]<d[v], if="" we="" directly="" start="" dfs="" on="" v="" first,="" then="" 1="" call="" x="" which="" visits="" u.
Option B:
d[u]<f[v]; same="" as="" a.
Option C:
f[u]<f[v]; same="" as="" a.
So, option D is True.
0 0 votes
Article Rating
Subscribe
Notify of
0 Comments
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x
error: Alert: Content selection is disabled!!