Question 1A directed graph has edges S->A cost2,S->B cost1,A->G cost4,B->C cost2,C->G cost2. Heuristics to G are h(S)=4,h(A)=4,h(B)=3,h(C)=1,h(G)=0. Trace A* with f=g+h, expanding the lowest-f open node and stopping when G is removed for expansion. Record g/f for newly reached nodes, the final path/cost, and check admissibility using actual remaining path costs. Compare with Dijkstra's expansion order. Graph implementation code is not required.6 indicative marks
A directed graph has edges S->A cost2,S->B cost1,A->G cost4,B->C cost2,C->G cost2. Heuristics to G are h(S)=4,h(A)=4,h(B)=3,h(C)=1,h(G)=0. Trace A* with f=g+h, expanding the lowest-f open node and stopping when G is removed for expansion. Record g/f for newly reached nodes, the final path/cost, and check admissibility using actual remaining path costs. Compare with Dijkstra's expansion order. Graph implementation code is not required.
Show indicative guidance
Worked guidance
- The open set after S contains A(2,6),B(1,4), with each pair(g,f). Removing B adds C(3,4); removing C adds G(5,5). A remains open at f6, so G is next and the parent chain yields S-B-C-G. Its edge sum is1+2+2=5, less than S-A-G's6.
- The best costs still to reach G are5 from S,4 from A,4 from B,2 from C,0 from G. Heuristics4,4,3,1,0 never exceed those costs. These particular heuristics are also consistent across each edge, so no reopening issue arises in this example.
- Dijkstra ignores h: after S,B, it selects A at distance2 before C at3, then G at5. Both methods find5 here. A* is not universally faster for every heuristic, and an overestimate cannot be advertised as admissible.
Self-marking points
View marking points
- Start S with g0,f4; expanding S gives A(g2,f6),B(g1,f4).
- Expand B then C(g3,f4), then reach G(g5,f5).
- Expand G before A because5<6; path S-B-C-G costs5.
- True remaining costs S5,A4,B4,C2,G0 are not below their respective heuristics, so h is admissible.
- Dijkstra using g alone expands S,B,A,C,G and also finds cost5.
- A heuristic estimates remaining cost; adding it to g is not the accumulated actual path cost alone.
Examiner tip
Indicative distinct points, not an official Cambridge mark allocation. State bounds, assumptions and intermediate states; practical teacher review remains required.