11.07.2015 Views

Data Structures and Algorithm Analysis - Computer Science at ...

Data Structures and Algorithm Analysis - Computer Science at ...

Data Structures and Algorithm Analysis - Computer Science at ...

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Sec. 11.3 Graph Traversals 385ACall DFS on ACAMark AProcess (A, C)Print (A, C) <strong>and</strong>call DFS on CBCAMark CProcess (C, A)Process (C, B)Print (C, B) <strong>and</strong>call DFS on CDFBCAMark BProcess (B, C)Process (B, F)Print (B, F) <strong>and</strong>call DFS on FFBCAMark FProcess (F, B)Process (F, C)Process (F, D)Print (F, D) <strong>and</strong>call DFS on DFBCAMark DProcess (D, C)Process (D, F)Pop DEFFBCAProcess (F, E)Print (F, E) <strong>and</strong>call DFS on EBCAMark EProcess (E, A)Process (E, F)Pop EBCADone with FPop FCADone with BPop BAContinue with CProcess (C, E)Process (C, F)Pop CContinue with AProcess (A, E)Pop ADFS completeFigure 11.9 A detailed illustr<strong>at</strong>ion of the DFS process for the graph of Figure11.8(a) starting <strong>at</strong> Vertex A. The steps leading to each change in the recursionstack are described.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!