GATE 1999
October 6, 2023
Web-Technologies
October 6, 2023
GATE 1999
October 6, 2023
Web-Technologies
October 6, 2023

Data-Structures

Question 46

Let G be an undirected graph. Consider a depth-first traversal of G, and let T be the resulting depth-first search tree. Let u be a vertex in G and let ν be the first new (unvisited) vertex visited after visiting u in the traversal. Which of the following statements is always true?

A
{u, v} must be an edge in G, and u is a descendant of v in T
B
{u, v} must be an edge in G, and v is a descendant of u in T
C
If {u, v} is not an edge in G then u is a leaf in T
D
If {u, v} is not an edge in G then u and v must have the same parent in T
Question 46 Explanation: 

In DFS after visiting u, there is no child node then back tracking is happen and then visit the node v. There is no need of (u,v) be an edge.
Correct Answer: C
Question 46 Explanation: 

In DFS after visiting u, there is no child node then back tracking is happen and then visit the node v. There is no need of (u,v) be an edge.
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!!