Q5 — Rete Net: Vehicle Classification
Limit 8 makes a Minivan, hp 900 with limit 2 a Luxury-Car — and Truck's three conditions win specificity.
The Question
A Rete net classifies vehicles (Luxury-Car, Minivan, Truck). Working memory:
101. (Cargo ^vin A1 ^bed flat)
102. (Passenger ^vin A1 ^limit 2)
103. (Passenger ^vin B2 ^limit 8)
104. (Passenger ^vin C3 ^limit 2)
105. (Power ^vin A1 ^hp 400)
106. (Power ^vin B2 ^hp 250)
107. (Power ^vin C3 ^hp 900)
108. (Wheel ^vin B2 ^tyre regular)
109. (Wheel ^vin C3 ^tyre regular)
| # | Question | Official answer |
|---|---|---|
| 5.1 | Tuples in the conflict set (A: Luxury-Car,104,107 · B: Minivan,103,106 · C: Truck,101,102,105 · D: Minivan,103,106,108) | A, B, C |
| 5.2 | Specificity fires | C |
| 5.3 | Recency fires | A |
The Topic in 60 Seconds
Alpha nodes filter single WMEs; beta nodes join on the shared ^vin. Conflict set = all full tuples. Specificity = most conditions; Recency = newest max-timestamp.
Deep-dive: The Rete Algorithm.
The Rete Net (from the figure)
Rules: Luxury-Car = Passenger limit 2 + Power hp ≥ 700 · Minivan = limit 8 + hp ≤ 300 · Truck = Cargo bed + Passenger limit 2 + Power hp ≤ 500 (same ^vin throughout).
Step 1 — Locate every WME
| WME | Facts | Alpha node |
|---|---|---|
| 101 | Cargo, A1, flat | A14 |
| 102 | Passenger, A1, limit 2 | A7 |
| 103 | Passenger, B2, limit 8 | A8 |
| 104 | Passenger, C3, limit 2 | A7 |
| 105 | Power, A1, hp 400 | A13 (≤ 500) |
| 106 | Power, B2, hp 250 | A11 (≤ 300) |
| 107 | Power, C3, hp 900 | A9 (≥ 700) |
(108, 109 are Wheel WMEs — no CLASS = Wheel node in this net, they stay unused.)
Step 2 — Fire the joins (on ^vin)
- Luxury-Car (limit-2 ⋈ hp≥700): limit-2
102: A1,104: C3; hp≥700107: C3→ vin C3 ✓ → (Luxury-Car, 104, 107) ✓ - Minivan (limit-8 ⋈ hp≤300): limit-8
103: B2; hp≤300106: B2→ vin B2 ✓ → (Minivan, 103, 106) ✓ - Truck (bed ⋈ limit-2 ⋈ hp≤500): bed
101: A1; limit-2102: A1; hp≤500105: A1→ vin A1 ✓ → (Truck, 101, 102, 105) ✓
Conflict set = options A, B, C ✓ (D is invalid — Minivan has no Wheel condition, so 108 can't be in its tuple.)
Interactive trace of the beta net — each step fires one join on a shared ^vin:
5.2 — Specificity → C
Count conditions: Luxury-Car = 2, Minivan = 2, Truck = 3 (bed + limit-2 + hp ≤ 500). Most conditions → (Truck, 101, 102, 105) → option C ✓
5.3 — Recency → A
Max timestamp per tuple: Luxury-Car → 107; Minivan → 106; Truck → 105. Newest wins → (Luxury-Car, 104, 107) → option A ✓
hp 250 passes hp ≤ 300 (Minivan) but fails hp ≤ 500? No — 250 ≤ 500 too, but B2 has no bed, so only the Minivan join catches it. Always test the JOIN (same vin), not each alpha in isolation.
Tricks & Tips
Answers: 5.1 A, B, C · 5.2 C · 5.3 A