This preview shows page 1. Sign up to view the full content.
Unformatted text preview: connected components. 3. Previsit and postvisit numbers. a. During DFS, for each node u, record: a.i. Time of initial discovery: (pre[u]) a.ii. Time of final departure: post[u] b. A (1) B (2) E (3 pre) (4 post) F (5 pre 6 post) B (7 post) A (8 post) C (9 pre) D (10, 11) g(12, 13) C(14) c. Procedure previsit(u) Pre[u] = clock++ Procedure postvisit(u) Post[u] = clock++; Property: either they are nested within each other or they are completely disjoint. d. For any nodes u and w, the intervals pre[u], post[u] and pre[w], post[w] are either disjoint [ ] [ ]or nested [ [ ] ] 4. DFS on directed graphs a. Same idea, but is directed...
View Full Document
- Spring '08