breadthfirstsearch - Breadth first search animation 15.082...

Info iconThis preview shows pages 1–8. 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

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

View Full DocumentRight Arrow Icon

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

View Full DocumentRight 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: Breadth first search animation 15.082 and 6.855J Breadth First Search Unmark all nodes in N; Mark node s Breadth first search animation 2 Initialize LIST 1 2 4 5 3 6 9 7 8 1 pred(1) = 0 next := 1 order(next) = 1 LIST:= {1} next 1 1 2 4 5 3 6 9 7 8 1 1 Breadth first search animation 3 Select a node i in LIST LIST In breadth first search, i is the first node in LIST 1 2 4 5 3 6 9 7 8 1 1 next 1 1 1 Select an admissible arc (i,j) 1 Mark Node j pred(j) := i Breadth first search animation 4 If node i is incident to an admissible arc… LIST 1 2 4 5 3 6 9 7 8 1 1 next 2 1 1 2 Next := Next + 1 order(j) := next add j to LIST 2 2 Select an admissible arc (i,j) 2 Mark Node j pred(j) := i Breadth first search animation 5 If node i is incident to an admissible arc… LIST 1 2 4 5 3 6 9 7 8 3 1 1 next 3 1 1 2 Next := Next + 1 order(j) := next add j to LIST 2 2 5 5 Select an admissible arc (i,j) 23 Mark Node j pred(j) := i Breadth first search animation 6 4 If node i is incident to an admissible arc… LIST 1 2 4 5 3 6 9 7 8 3 1 1 next 1 1 2 Next := Next + 1 order(j) := next add j to LIST 2 2 5 5 3 4 3 1 23 Breadth first search animation 7 4 If node i is not incident to an admissible arc… LIST Delete node i from LIST 1 2 4 5 3 6 9 7 8 3 1 next 1 1 2 2 2 5 5 3 4 3 1 1...
View Full Document

This note was uploaded on 03/15/2010 for the course IE 505 taught by Professor Yok during the Spring '10 term at Galatasaray Üniversitesi.

Page1 / 25

breadthfirstsearch - Breadth first search animation 15.082...

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

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