BFS - 4/1/2003 8:35 AM Breadth-First Search 1 Breadth-First...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: 4/1/2003 8:35 AM Breadth-First Search 1 Breadth-First Search C B A E D L L 1 F L 2 4/1/2003 8:35 AM Breadth-First Search 2 Outline and Reading Breadth-first search (12.3.2) Algorithm Example Properties Analysis Applications DFS vs. BFS Comparison of applications Comparison of edge labels 4/1/2003 8:35 AM Breadth-First Search 3 Breadth-First Search Breadth-first search (BFS) is a general technique for traversing a graph A BFS traversal of a graph G Visits all the vertices and edges of G Determines whether G is connected Computes the connected components of G Computes a spanning forest of G BFS on a graph with n vertices and m edges takes O ( n + m ) time BFS can be further extended to solve other graph problems Find and report a path with the minimum number of edges between two given vertices Find a simple cycle, if there is one 4/1/2003 8:35 AM Breadth-First Search 4 BFS Algorithm The algorithm uses a mechanism for setting and getting labels of vertices...
View Full Document

Page1 / 2

BFS - 4/1/2003 8:35 AM Breadth-First Search 1 Breadth-First...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online