tailieunhanh - Lecture Design and Analysis of Algorithms: Lecture 30 - Dr. Sohail Aslam

As we traverse the graph in DFS order, we will associate two numbers with each vertex. When we first discover a vertex u, store a counter in d[u]. When we are finished processing a vertex, we store a counter in f[u]. These two numbers are time stamps. Consider the recursive version of depth-first traversal. In this lecture, you find clear explanations of Depth-first Traversal. |