Master Mathematics.

Machine Learning · Search, Logic & Reasoning (AI) · Problem 5

BFS and DFS on n → n + 1, n + 2

Consider a state space where the start state is number . The successor function for state returns states and . States in the unexpanded list are expanded in ascending order of numbers, and previously expanded states are not added to the unexpanded list. Which statement about breadth-first search (BFS) and depth-first search (DFS) is true, when reaching the goal state ?

  1. (A) BFS expands more states than DFS.
  2. (B) DFS expands more states than BFS.
  3. (C) Both BFS and DFS expand equal number of states.
  4. (D) Both BFS and DFS do not reach the goal state number 6.

Source: GATE DA