Machine-translated by Google. Questions are authored in English.
Top

Discussion

Why is depth first search still widely used despite its weaknesses?

  • A.It is complete in every state space including infinite ones
  • B.Its linear memory requirement makes large problems feasible
  • C.It finds the optimal solution more often than breadth first
  • D.It is easier to implement than any other search strategy

Answer: B

In a space where breadth first would exhaust memory in seconds, depth first needs only the current path, which is often the difference between an impossible search and a slow one. Backtracking search over constraint problems relies on it entirely. It is not optimal, ease of implementation is comparable, and it is incomplete in infinite spaces. When memory is the binding constraint, an algorithm's memory profile outweighs every other property it has. The quantity that varies and the quantity that does not are worth naming before any substitution is attempted.

No comment is present. Be the first to comment.
Loading…

Post your comment

Please log in or register to post a comment.