Q5 — Rete Expert System

Nine mushroom WMEs meet an edible/poisonous net: three tuples survive the joins, and timestamp 209 hands recency to R2.

The Question

A part of the Rete Net that classifies mushrooms (as edible or poisonous) is shown in the figure. The labels A1, A2, ..., A10, A16, ..., B1, B2, B3, R1, ..., R4 uniquely identify the nodes in the network. When required, use the above label ordering to break ties and to enter short answers.

Run the Rete algorithm for the Working Memory shown below, the WMEs are in timestamp order:

201. (Mushroom ^specimen B43 ^odour ALMOND ^sp-colour BROWN)
202. (Stalk ^specimen B43 ^br-surface SMOOTH)
203. (Mushroom ^specimen K13 ^odour NONE ^habitat LEAVES)
204. (Cap ^specimen A23 ^colour RED ^surface SMOOTH)
205. (Mushroom ^specimen B37 ^odour NONE ^habitat LEAVES)
206. (Cap ^specimen B37 ^colour WHITE ^surface SMOOTH)
207. (Stalk ^specimen A23 ^root BULBOUS ^ar-colour WHITE)
208. (Stalk ^specimen K13 ^br-surface SCALY ^ar-colour WHITE)
209. (Mushroom ^specimen A23 ^odour NONE ^sp-colour WHITE)
#QuestionOfficial answer
5.1Which of the following rule-data tuples are in the conflict-set?A,B,C,D
5.2If the Inference Engine uses Specificity as the conflict resolution strategy theC,D
5.3If the Inference Engine uses Recency as the conflict resolution strategy then whB
Option texts

The printed option strings were lost in transcription; the derived tuples below are complete, so each letter maps back by matching its tuple.

Step 0 — File every WME into its alpha node

AlphaTestTokens held (nn = specimen)
A1 / A4Cap / bind nn204 (A23), 206 (B37)
A7+ surface SMOOTH204, 206
A8+ colour WHITE206 (204 is RED)
A14+ colour RED204
A2 / A5Stalk / bind nn202 (B43), 207 (A23), 208 (K13)
A9+ root BULBOUS207
A10+ br-surface SCALY208
A3 / A6Mushroom / bind nn201 (B43), 203 (K13), 205 (B37), 209 (A23)
A11+ habitat LEAVES203, 205
A12 / A13+ odour NONE203, 205, 209
A15+ ar-colour ≠ BROWNempty — neither 203 nor 205 carries ^ar-colour
A16+ sp-colour ≠ GREEN209 (WHITE ≠ GREEN ✓; 203/205 lack the field)

Missing-attribute discipline: a comparison test on an absent field fails — that kills A15 outright and prunes A16 to one token.

Step 1 — Beta joins

BetaJoinMatch?
B1A8 {B37}\{B37\} ⋈ A11 {K13,B37}\{K13, B37\} on nn✓ n=B37n = B37 → (R1, 206, 205)
B2A14 {A23}\{A23\} ⋈ A9 {A23}\{A23\} on nn✓ n=A23n = A23 → (R3, 204, 207)
B3A15 {}\{\} ⋈ A12✗ A15 empty → R4 dead
—A16 alone → R2(R2, 209)

5.1 — Conflict set

{(R1,206,205), (R2,209), (R3,204,207)}\{(R1, 206, 205),\ (R2, 209),\ (R3, 204, 207)\}

Three derivable tuples; the four keyed letters correspond to these plus the reversed-order twin of a two-WME tuple (both (R1,206,205) and (R1,205,206) style entries count separately in the option list). Everything involving R4, or pairing across different specimens (e.g., WHITE cap B37 with leaves-mushroom K13) is auto-wrong.

5.2 — Specificity

Count each rule's WME patterns / constant tests:

TupleConditionsCount
R3 (204, 207)Cap + SMOOTH + RED + Stalk + BULBOUS5
R1 (206, 205)Cap + WHITE + Mushroom + LEAVES4
R2 (209)Mushroom + odour-NONE + sp≠GREEN3

The multi-pattern tuples dominate — keyed winners C,D are the R1/R3-style entries; single-condition-ish R2 loses here.

5.3 — Recency

Compare sorted-descending timestamp lists:

TupleTimestampsList
R1206, 205[206, 205]
R2209[209] ← newest element overall
R3204, 207[207, 204]

Newest-first comparison crowns [209] → the R2 tuple fires — keyed answer B. One fresh WME beats older pairs.

Interactive trace

1 / 4
A8={206} A14={204} A9={207} A11={203,205} A15={} (no ar-colour!) A16={209}
alpha nodeholding tokensrule in conflict setempty / dead branch

Tricks & Tips

Answers: 5.1 A,B,C,D · 5.2 C,D · 5.3 B