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

Discussion

What is the difference between tree search and graph search?

  • A.Tree search is complete whereas graph search may loop indefinitely
  • B.Graph search expands nodes in a different order from tree search
  • C.Graph search keeps an explored set to avoid revisiting states
  • D.Graph search operates on graphs while tree search operates on trees

Answer: C

Both build a search tree; the difference is that graph search remembers which states it has already expanded and discards duplicates, which prevents loops and exponential blowup from repeated paths. The price is storing every expanded state. The underlying problem may be a graph in either case. Naming the algorithms by whether they remember, rather than by what they search, avoids the confusion the conventional names invite.

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

Post your comment

Please log in or register to post a comment.