Distinguishing depth cutoffs from exhausted searches

A diagnostic program runs depth-limited search on the finite tree shown. Each row represents an independent call, with depth zero assigned to that row's starting state. E is the only goal, and the diagram contains every edge.


Use this exact recursive policy:

  • Test whether the current state is a goal; if so, return success.
  • Otherwise, if the remaining depth limit is zero, return cutoff: this call stopped at its depth boundary without examining successors.
  • Otherwise, search the successors alphabetically with the remaining limit reduced by one. Return success as soon as a child succeeds. If none succeeds, return cutoff if any child returned cutoff; otherwise return failure: the permitted recursive exploration ended without a goal or a cutoff.

A non-goal leaf with a positive remaining limit therefore returns failure. The depth-boundary test occurs before successor inspection.


A directed search tree starts at S and has E as its only goal.


Complete each result with exactly one word: success, cutoff, or failure.

Starting stateDepth limitResult
S1
S2
S3
B2
B3
E0

Create a free account to get started

Unlock full course notes by signing up

  • Video lessons taught by top educators
  • Practice questions with guided solutions
  • Written review notes for reference
  • Expert answers anytime from course tutors

More Search Questions: