{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

breadthfirstsearch - 15.082 and 6.855J Breadth First Search...

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

View Full Document Right Arrow Icon
Breadth first search animation 15.082 and 6.855J Breadth First Search
Background image of page 1

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

View Full Document Right Arrow Icon
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
Background image of page 2
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
Background image of page 3

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

View Full Document Right Arrow Icon
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 2 Next := Next + 1 order(j) := next add j to LIST 2 2
Background image of page 4
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 2 Next := Next + 1 order(j) := next add j to LIST 2 2 5 5
Background image of page 5

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

View Full Document Right Arrow Icon
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 2 Next := Next + 1 order(j) := next add j to LIST 2 2 5 5 3 4 3
Background image of page 6
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 2 2 2 5 5 3 4 3
Background image of page 7

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

View Full Document Right Arrow Icon
Image of page 8
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}