2023 Term 1 · Afternoon — Worked Solutions

Every question solved from scratch: the reasoning, the algorithm trace, and the shortcuts that get you to the answer fast.

Q1SEARCH

Q1 — DFS and BFS on a State Space

MoveGen table search — trace DFS and BFS to find a path from S to G, inspecting only new nodes.

DFSBFSMoveGenState space search
Q2TSP BnB

Q2 — TSP Branch-and-Bound: Six Cities

A six-city TSP instance resolved via a 6-level BnB tree — the 456 tour through A,C,E,D,B,F.

TSPBranch-and-BoundTour reconstruction
Q3SEARCH FOR OPTIMAL SOLUTION

Q3 — A* Search for Optimal Solution (Edge Cost 5)

A* on a uniform-cost graph (edge = 5) — the h function overestimates and A* returns S,B,F,L,G at cost 20.

A*AdmissibilityManhattan heuristic
Q4GAMES

Q4 — Games: Strategies, Alpha-Beta, Force MinMax

A 3-ply game tree — strategy I,K, best line B,D at 46, α-β pruning, and forcing the MinMax value to 36.

MinimaxGame strategiesAlpha-Beta pruningForce MinMax
Q5PROBLEM DECOMPOSITION

Q5 — AO* on an AND–OR Decomposition

S=10, A=12, B=2, C=6 — OR(C) wins at 8, the marker flips to AND(A,B) at 14, and S lands at 16.

AO*AND-OR graphsCost revision
Q6RULE BASED EXPERT SYSTEMS

Q6 — Rete Net: Vehicle Classification

Luxury-Car, Minivan and Truck all match — Truck's three conditions win specificity, Luxury-Car's ts-107 wins recency.

Rete algorithmConflict setSpecificityRecency
Q7AUTOMATED PLANNING

Q7 — Blocks World: Applicable vs Relevant, Planning-Graph Mutexes

D stacks on B, C on A — the same start/goal as the 2024/2025 papers with identical answers.

STRIPSBlocks worldApplicable actionsRelevant actionsGraphPlanMutex
Q8CONSTRAINT SATISFACTION

Q8 — Waltz Line Labeling

A six-junction drawing with a cross-connector — the propagation wipes out to NIL.

Waltz labelingLine drawingsConstraint propagation