CameraIcon
CameraIcon
SearchIcon
MyQuestionIcon
MyQuestionIcon
1
You visited us 1 times! Enjoying our articles? Unlock Full Access!
Question

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 v 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 v is a descendant of u in T
No worries! We‘ve got your back. Try BYJU‘S free classes today!
B
{u, v} must be an edge in G, and u is a descendant of v in T
No worries! We‘ve got your back. Try BYJU‘S free classes today!
C
If {u, v} is not an edge in G then u is a leaf in T
Right on! Give the BNAT exam to get a 100% scholarship for BYJUS courses
D
If {u} is not an edge in G then u and v must have the same parent in T
No worries! We‘ve got your back. Try BYJU‘S free classes today!
Open in App
Solution

The correct option is C If {u, v} is not an edge in G then u is a leaf in T
Draw some random graph and try to verify the options.

flag
Suggest Corrections
thumbs-up
0
Join BYJU'S Learning Program
similar_icon
Related Videos
thumbnail
lock
Modulus Function
MATHEMATICS
Watch in App
Join BYJU'S Learning Program
CrossIcon