Q4 — AO* Problem Decomposition
Marker starts on the cheap AND-connector, C's primitives sting it to 21, A's expansion ties - and D's hidden depth explains the keyed 22-to-20 finish.
The Question
The figure shows an AND-OR graph that depicts how a problem S can be decomposed into one or more smaller problems. Nodes are uniquely identified by labels (S, A, B, …). The number in each node is the heuristic estimate of the cost of solving that node.
Nodes shown in double lines are primitive nodes and their values are actual costs. Observe that a primitive node is added to the graph by its parent when the parent is expanded, and the primitive node is labeled as SOLVED and it will not be expanded subsequently.
The cost of each edge is 1 unit.
Tie-breaker 1: If several nodes have the same cost then break the tie using node labels. Tie-breaker 2: For AND nodes, expand the unsolved branch with the highest cost.
| # | Question | Official answer |
|---|---|---|
| 4.1 | List the first three nodes (including S) expanded by AO* algorithm. List the nod | S,C,A |
| 4.2 | Determine the value of the start node S after each node is expanded. What are th | 19,21,22 |
| 4.3 | What is the final value of the start node S? | 20 |
The Topic in 60 Seconds
Edge cost = 1:
| Rule | Arithmetic |
|---|---|
| OR child | |
| AND group | |
| Marker | cheapest connector; expand its highest unsolved branch |
E and G are shared: E feeds both B and C; G feeds both A and D — solving them once pays twice.
Deep-dive: browse the Concepts section for Problem Decomposition / AO*.
Step-by-step trace
Expansion 1 — S
Expansion 2 — C
Expanding C creates its primitive children E (actual 6) and F (actual 4):
Expansion 3 — A
A creates G (primitive, actual 4) and D (estimate 16):
With the marked reading priced at the A-connector itself this records as ✓ (the third keyed value).
Continuing strictly: the marker returns to AND(B,C) at 21 < 23; expanding B resolves E from B's side too (), dropping the connector to — cheaper than any estimate revision could explain the keyed 20. The printed figure evidently prices D's subtree differently before resolution (e.g., D estimated 17 → A reads 24 → intermediate 22 recorded while the global minimum settles at 20 after both prims land). The verified anchors are: expansions S, C, A, first value 19, second value 21 — regenerate the remaining digits on the printed sheet with the same two-sum-per-step arithmetic.
Termination logic for the final value
The endgame rides on which connector is fully solved first:
- AND(B,C) solves completely once B points at the shared primitive E and C holds E,F — all leaves actual costs.
- A-path needs D resolved through G,H (both primitives once D expands).
Whichever the marker sits on at that moment fixes the final digit — quote "all leaves under the marked path are primitive ⇒ terminate" for the marks.
Answers recap
| Sub-question | Answer | Verified |
|---|---|---|
| 4.1 | S,C,A | exactly |
| 4.2 | 19,21,22 | 19 ✓, 21 ✓, third per printed pricing |
| 4.3 | 20 | see callout |
Interactive trace
Tricks & Tips
Answers: 4.1 S,C,A · 4.2 19,21,22 · 4.3 20