You are on page 1of 15

Lecture 5

Review of Uninformed Search


Algorithms
Question 1: The following figure is for a product which
consist of four parts. Represents all the actions (Draw a
search Tree) that are required to assemble the final product.
Stop once you have expanded all states in level 1.
Question 2: Turn search Graph problem (S to G) into search
Tree problem, and then find the path to the goal using DFS.

Search Graph Search Tree


Question 3: Convert state space graph to Search Tree.
Quiz
Question 4: For the 8-puzzle problem, given this initial
starting state

2 8 7
3 1 4
5 6

(A) Using BFS, show the search tree that would be built down to
level 2 (assume level zero is the initial starting state).

(B) Using DFS, show the state of the search tree down the level
3 (stop once you have expanded one node that goes to level 3).
Answer: Breadth First Search
Answer: Depth First Search
Question 5: Create a table with three columns (Step,
Expanded Node and Queue list) to show list the steps in
which DFS and BFS traverses the search tree given in
figure.
Answer: Depth first search.
Answer: Breadth First Search.

0. A {B, C}
1. B {C, D, E}
2. C {D,E,F}
3. D {E,F,G,H}
4. E {E,F,G,H}
Question 6: Answer the following:

Does Breadth First Search and Depth First Search find


least-cost path ? If not, why ?

Answer: Breadth first search is only guaranteed to find a


path with the shortest number of links; it does not
consider link cost at all.

Depth First Search also does not consider link cost at all.
Question 7: Consider S to be the start state and G to be
the goal state. Simulate uniform cost search and at each
step show the state of the node that’s being expanded, the
length of that path, and the Queue of Nodes list.

State Space Graph


Answer: Simulate UCS.

State Length Queue of Node List


Expanded of Path
S 0 {A(1), G(12)}
A 1 {C(2), B(4), G(12)
C 2 {D(3), B(4), G’(4), G(12)}
D 3 {B(4), G(4), G’’(6), G(12)}

B 4 {G(4), G(6), D(7), G(12)}
G 4 {G(6), D(7), G(12)} ‘’’ ’’

Search Tree
Question 8: Answer the following:

What is the main disadvantage in DFS and DLS?


Answer: DFS is no guarantee of finding the solution,
because it may go to the infinite loop.

Answer: DLS has a disadvantage of incompleteness, and


the finding solution may not be optimal.

You might also like