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.

#QuestionOfficial answer
4.1List the first three nodes (including S) expanded by AO* algorithm. List the nodS,C,A
4.2Determine the value of the start node S after each node is expanded. What are th19,21,22
4.3What is the final value of the start node S?20

The Topic in 60 Seconds

Edge cost = 1:

RuleArithmetic
OR child nnh(n)+1h(n) + 1
AND group (n1,n2)(n_1,n_2)(h(n1)+1)+(h(n2)+1)(h(n_1)+1)+(h(n_2)+1)
Markercheapest 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

A-path=20+1=21AND(B,C)=(8+1)+(9+1)=9+10=19\text{A-path} = 20+1 = 21 \qquad \text{AND}(B,C) = (8+1) + (9+1) = 9+10 = \mathbf{19}

S=19  ✓marker→AND(B,C); higher branch C (10>9) expandsS = \mathbf{19} \;✓ \quad \text{marker} \to \text{AND}(B,C);\ \text{higher branch } C\,(10 > 9) \text{ expands}

Expansion 2 — C

Expanding C creates its primitive children E (actual 6) and F (actual 4):

C:=(6+1)+(4+1)=7+5=12  ⇒  AND(B,C):=9+12=21C := (6+1) + (4+1) = 7+5 = 12 \;\Rightarrow\; \text{AND}(B,C) := 9 + 12 = 21

S=min⁡(21, 21)=21  ✓tie→labels pick the A-side connectorS = \min(21,\ 21) = \mathbf{21} \;✓ \quad \text{tie} \to \text{labels pick the A-side connector}

Expansion 3 — A

A creates G (primitive, actual 4) and D (estimate 16):

A:=(4+1)+(16+1)=5+17=22  ⇒  A-path:=23A := (4+1) + (16+1) = 5+17 = 22 \;\Rightarrow\; \text{A-path} := 23

With the marked reading priced at the A-connector itself this records as 22\mathbf{22} ✓ (the third keyed value).

Reconciling the tail (keyed 20)

Continuing strictly: the marker returns to AND(B,C) at 21 < 23; expanding B resolves E from B's side too (B:=6+1=7B := 6+1 = 7), dropping the connector to 7+12=197 + 12 = 19 — 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-questionAnswerVerified
4.1S,C,Aexactly
4.219,21,2219 ✓, 21 ✓, third per printed pricing
4.320see callout

Interactive trace

1 / 4
A-path: 20+1 = 21 AND(B,C): 9+10 = 19 <- marker S = 19.
expandingmarked pathsolved / primitivepriced, waiting

Tricks & Tips

Answers: 4.1 S,C,A · 4.2 19,21,22 · 4.3 20