Solution

ID: past-exam-of-the-computer-science-course-of-the-university-of-oxford/2019/artificial-intelligence/2/b/solution

Use the knight-variable representation and build a placement one knight at a time. The initial state is the empty placement. An action places the next knight on an empty square attacking no previously placed knight; the search transition model appends that square. The goal test is that knights have been placed. Each action adds exactly one, so any solution has depth .
Put . At depth , there are at most choices, hence branching factor at most . A coarse search tree size bound is . Keeping the shrinking choice count gives the sharper bound
where is a falling factorial. This counts ordered placements before attack pruning.
For a full expansion down to depth , the number of depth- leaves is at most , or approximately when is small relative to . If denotes the number of legal unlabelled -knight placements, the exact number of legal depth- leaves is . There can also be earlier dead-end leaves: a legal placement may leave no further nonattacking square. Writing for the number of inclusion-maximal legal -knight placements, the fully explored pruned tree has
leaves. Its leaf count is still at most the unpruned , since each early leaf replaces a disjoint nonempty subtree of the unpruned tree. Breadth-first search that stops at its first goal can construct less of the last layer; if no solution exists, it exhausts the reachable partial placements.
Identifying different insertion orders changes the representation. With a state that is an unlabelled set of occupied squares and repeated-state elimination, the corresponding depth- state bound is , with legal goal states. The factorial and binomial bounds refer to these different representations, not competing counts of the same tree.

New to topics? Read the docs here!