Docsity

Graph Algorithms Three - Introduction to Algorithms - Lecture Slides, Slides of Computer Science

Partial preview of the text

Download Graph Algorithms Three - Introduction to Algorithms - Lecture Slides and more Slides Computer Science in PDF only on Docsity!

Algorithms

Graph Algorithms

Review: Depth-First Search

● Depth-first search is another strategy for

exploring a graph

■ Explore “deeper” in the graph whenever possible

■ Edges are explored out of the most recently

discovered vertex v that still has unexplored edges

■ When all of v ’s edges have been explored,

backtrack to the vertex from which v was

discovered

source vertex

source vertex d f

source vertex d f

source vertex d f

source vertex d f

source vertex d f

source vertex d f

What is the structure of the yellow vertices? What do they represent?

source vertex d f

source vertex d f

source vertex d f

source vertex d f

source vertex d f