Problem_Solving_Slides2

Problem_Solving_Slides2 - IE562 Fall 2010 Lecture Notes 2...

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

IE562 Fall 2010 Lecture Notes # 2 Problem Solving and Search (Contd.) Soundar Kumara

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

View Full Document
Search Graph (page 18 of notes 1) Depth first search examines the graph in the order {A B E K S L T F M C G N H O P U D I Q J R} Breadth first search examines in the order {A B C D E F G H I J K L M N O P Q R S T U}
Procedure Breadth First Search Lists: OPEN: Lists states that have been generated but whose children have not been examined. CLOSED: records states that have been already examined Procedure BFS Initialize: Open: = [start]; Closed: = []; While Open [ ] do Begin remove left most state from open, call it x; if x is goal then return (success); generate all children of x; put x on closed; eliminate any children of x already on either open or closed, as these will cause loops in the search; put the remaining descendents in order of discovery on the right end of OPEN; end.

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

View Full Document
BFS (Contd.)
Depth First Search DFS algorithm: The only difference; “put the remaining children of X in order of discovery on the left of open” (LIFO)

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

View Full Document
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

Page1 / 17

Problem_Solving_Slides2 - IE562 Fall 2010 Lecture Notes 2...

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

View Full Document
Ask a homework question - tutors are online