a) Given the following search graph, how many states will be visited until reaching the goal state using breadth-first search? Trace the states inside the search agenda until reaching the goal state assume the goal state is 30. S 2. 6 6 V 8 10 11 12 13 1415161718 303732333435 b) If we assumed depth-first search what will be the change in the number of visited states and the states inside the search agenda? c) Comment on the result from a) and b)

65 1

Get full Expert solution in seconds

$1.97 ONLY

EXPERT ANSWER

answered this

Ans a. Traversal of the graph to reach goal state using Breadth first search

1 5 2 3 4 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30

so as per traversal 29 states are visited until reaching goal state.

b. Traversal of the graph to reach goal state using Depth first search

1 5 2 6 14 3 7 15 16 8 17 18 19 20 9 21 22 23 24 10 25 4 11 26 27 28 29 12 30

so as per traversal 28 states are visited until reaching goal state.

Ans c.

  BFS DFS

Memory consumptionTime consumptionInefficientBFS is slower than DFSBFS is useful in finding shortest path   EfficientDFS is more faster than BFSDFS in not so useful in finding shortest path