Solution

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

Partition the items into successive groups of size two, with a singleton final group if is odd. For a pair on the east bank, execute
For a singleton , execute
Return the empty boat east between groups. Each group starts and ends with marker , and its items finish west, proving all preconditions and the final goal by mathematical induction over the groups. For there are outward journeys and crossings in total; is the ceiling function. Again needs no actions.

New to topics? Read the docs here!