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)
| # | Question | Official answer |
|---|---|---|
| 5.1 | Which of the following rule-data tuples are in the conflict-set? | A,B,C,D |
| 5.2 | If the Inference Engine uses Specificity as the conflict resolution strategy the | C,D |
| 5.3 | If the Inference Engine uses Recency as the conflict resolution strategy then wh | B |
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
| Alpha | Test | Tokens held ( = specimen) |
|---|---|---|
| A1 / A4 | Cap / bind | 204 (A23), 206 (B37) |
| A7 | + surface SMOOTH | 204, 206 |
| A8 | + colour WHITE | 206 (204 is RED) |
| A14 | + colour RED | 204 |
| A2 / A5 | Stalk / bind | 202 (B43), 207 (A23), 208 (K13) |
| A9 | + root BULBOUS | 207 |
| A10 | + br-surface SCALY | 208 |
| A3 / A6 | Mushroom / bind | 201 (B43), 203 (K13), 205 (B37), 209 (A23) |
| A11 | + habitat LEAVES | 203, 205 |
| A12 / A13 | + odour NONE | 203, 205, 209 |
| A15 | + ar-colour ≠ BROWN | empty — neither 203 nor 205 carries ^ar-colour |
| A16 | + sp-colour ≠ GREEN | 209 (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
| Beta | Join | Match? |
|---|---|---|
| B1 | A8 ⋈ A11 on | ✓ → (R1, 206, 205) |
| B2 | A14 ⋈ A9 on | ✓ → (R3, 204, 207) |
| B3 | A15 ⋈ A12 | ✗ A15 empty → R4 dead |
| — | A16 alone → R2 | (R2, 209) |
5.1 — Conflict set
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:
| Tuple | Conditions | Count |
|---|---|---|
| R3 (204, 207) | Cap + SMOOTH + RED + Stalk + BULBOUS | 5 |
| R1 (206, 205) | Cap + WHITE + Mushroom + LEAVES | 4 |
| R2 (209) | Mushroom + odour-NONE + sp≠GREEN | 3 |
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:
| Tuple | Timestamps | List |
|---|---|---|
| R1 | 206, 205 | [206, 205] |
| R2 | 209 | [209] ← newest element overall |
| R3 | 204, 207 | [207, 204] |
Newest-first comparison crowns [209] → the R2 tuple fires — keyed answer B. One fresh WME beats older pairs.
Interactive trace
Tricks & Tips
Answers: 5.1 A,B,C,D · 5.2 C,D · 5.3 B