CS223-0401-Unweighted

CS223-0401-Unweighted - s to every other vertex in G with...

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

View Full Document Right Arrow Icon
CS223 Advanced Data Structures and Algorithms 1 Unweighted Shortest Path Unweighted Shortest Path Neil Tang Neil Tang 4/1/2008 4/1/2008
Background image of page 1

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

View Full DocumentRight Arrow Icon
CS223 Advanced Data Structures and Algorithms 2 Class Overview Class Overview The unweighted shortest path problem Breadth First Search (BFS) The algorithms Time complexity
Background image of page 2
CS223 Advanced Data Structures and Algorithms 3 Unweighted Shortest Path Problem Unweighted Shortest Path Problem The unweighted shortest path problem: Given an unweighted graph G and a source vertex s, find a path from
Background image of page 3

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

View Full DocumentRight Arrow Icon
Background image of page 4
Background image of page 5

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

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

Unformatted text preview: s to every other vertex in G with minimum number of edges. CS223 Advanced Data Structures and Algorithms 4 BFS BFS CS223 Advanced Data Structures and Algorithms 5 An Algorithm An Algorithm Time complexity: O(|V| 2 ) CS223 Advanced Data Structures and Algorithms 6 Time Complexity Time Complexity A bad case More efficient implementation: Use a queue Time complexity of a queue-based implementation: O(|V|+| E|)...
View Full Document

This note was uploaded on 04/17/2008 for the course CS 223 taught by Professor Tang during the Spring '07 term at MSU Bozeman.

Page1 / 6

CS223-0401-Unweighted - s to every other vertex in G with...

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

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