Breadth-first tree search is complete and optimal for minimizing rounds. If a successful escape has finite length , there are only finitely many nodes at depths below , since the branching factor is at most five. Breadth-first tree search therefore reaches a shallowest successful node after finite work, even if other branches continue forever.
It is an optimal search algorithm because every search transition model step costs one round, so minimum depth is exactly the desired minimum number of rounds. The goal test must be applied to the surviving complete-round successor. Here a complete search algorithm guarantees finding an escape when one exists; it need not terminate on every unsolvable instance.
Breadth-first tree search remains complete but is not optimal for maximizing the bonus. Completeness depends on the finite branching factor and a finite successful depth, not on the objective used to compare escapes.
Use the one-row, seven-square example from part (e). The one-round escape at column leaves the fox at column , so its graph distance to the exit, and hence the bonus, is . The two-round escape at column leaves the fox at column , giving bonus . The earliest successful node therefore has bonus when bonus is achievable. Breadth-first tree search orders by rounds rather than terminal graph distance.
Breadth-first tree search is complete and is still not bonus-optimal. Fix any deterministic rule for choosing among equally short fox routes; the completeness argument again uses only the finite branching factor. The unobstructed corridor of part (g) has unique shortest paths, so its fox moves are exactly the same under the new strategy. The one-round bonus is and the two-round bonus is , proving nonoptimality without any tie-breaking ambiguity.
If there is no route between fox and rabbit, the printed shortest-path rule needs a convention; letting the fox stay supplies a natural extension. The completeness argument is unchanged, and the counterexample above uses only connected squares. When the fox and rabbit initially belong to the same connected component of a graph, the shortest-path pursuit distance bound also makes every surviving branch finite. That additional property does not make the first escape maximize its bonus.
Depth-first tree search is complete under the stated initial reachability assumption, but is not bonus-optimal.
Let be the graph distance between fox and rabbit after round , with their initial graph distance. Initial reachability makes finite, and ordinary moves preserve membership in their common connected component of a graph. After the rabbit's next move, the triangle inequality gives intermediate separation at most . If that separation is at most two, the fox catches the rabbit that round. Otherwise the fox takes two steps along a shortest path, leavingThus a successful surviving history has at most rounds; if it does not escape by then, the next round captures it. The shortest-path pursuit distance bound excludes infinite live branches, even when the rabbit stays. Together with the finite branching factor, it makes the whole relevant search tree finite, so depth-first tree search eventually finds an escape whenever one exists.
For nonoptimality, take the corridor of part (g) and let depth-first tree search try left first. It immediately returns the one-round escape with bonus , whereas trying right twice earns . The decreasing separation proves termination, not optimality of the first returned escape.
Shortest-path pursuit distance bound 2026-10-25
Suppose two pieces occupy a common connected component of a graph in an unweighted undirected graph. For integers , in each round an evader moves at most edges, then a pursuer moves up to edges along a shortest path to the new evader position, stopping upon capture. Let be their finite graph distance at a surviving round boundary.
The triangle inequality bounds the separation after the evader moves by . If that separation is at most , the pursuer captures it. Otherwise the pursuer reduces it by exactly , givingHence every surviving history has at most rounds. With a finite branching factor, the surviving search tree is finite and depth-first tree search becomes a complete search algorithm. This does not make its first goal optimal for arbitrary rewards. Initial reachability is essential: an infinite graph distance supplies no decreasing finite bound.
Uniform-cost search 2026-10-25
Best-first search prioritizing accumulated path cost, equivalently A-star search with zero heuristic function. With finite branching factor and positive lower-bounded step costs, tree search is complete for finite solutions and returns a least-cost goal if the goal test is applied on removal from the search frontier. Goal testing at generation can instead return an expensive edge before a cheaper multi-edge route is explored.