Q5 — Rete Net: Diesel and Petrol Engines

Crankshafts, armatures and line counts — the conflict set has four tuples, and specificity and recency disagree.

The Question

A Rete net classifying engines/motors. Working memory:

101. (Fuel  ^item M59 ^type diesel)
102. (Fuel  ^item M26 ^type petrol)
103. (Fuel  ^item M37)
104. (BoM   ^item M48 ^part armature)
105. (Power ^item M48 ^lines 1)
106. (BoM   ^item M37 ^part armature)
107. (BoM   ^item M15 ^part crankshaft)
#QuestionOfficial answer
5.1Tuples in the conflict set (A: (Diesel-Engine,101,107) · B: (Petrol-Engine,107,102) · C: (Engine,107) · D: (Single-Phase-Motor,105,104) · E: (Motor,104) · F: (Motor,106))C, D, E, F
5.2Specificity firesD
5.3Recency firesC

The Topic in 60 Seconds

Alpha nodes filter single WMEs; beta nodes join on the shared ^item variable. Conflict set = all full tuples. Specificity = most WMEs wins; Recency = highest max-timestamp wins.

Deep-dive: The Rete Algorithm.

The Rete Net (from the figure)

Step 1 — Locate every WME

WMEFactsAlpha node
101Fuel, M59, dieselA7
102Fuel, M26, petrolA9
103Fuel, M37 (no type/part)A4
104BoM, M48, armatureA12
105Power, M48, lines 1A11
106BoM, M37, armatureA12
107BoM, M15, crankshaftA8

Step 2 — Fire the joins (on ^item)

  • R1 Diesel Engine (diesel ⋈ crankshaft): 101 (M59) vs 107 (M15) → no match
  • R2 Engine (crankshaft alone): 107 → (Engine, 107) ✓
  • R3 Petrol Engine (crankshaft ⋈ petrol): petrol is 102:M26, crankshaft is 107:M15 — ^item mismatch → empty
  • R4 Gas Turbine (petrol ⋈ blades): empty
  • R5 Turbine (blades): none → empty
  • R6 Single Phase Motor (lines-1 ⋈ armature): 105 (M48) ⋈ 104 (M48) → (SPM, 105, 104) ✓
  • R7 Motor (armature alone): 104, 106 → (Motor, 104) ✓, (Motor, 106) ✓
  • R8 Three Phase Motor (armature ⋈ lines-3): no lines-3 → empty

Conflict set = (Engine, 107), (SPM, 105, 104), (Motor, 104), (Motor, 106) → options C, D, E, F ✓

Interactive trace of the beta net — every join tested on a shared ^item:

1 / 8
101→diesel · 102→petrol · 104/106→armature · 105→lines-1 · 107→crankshaft 103 Fuel M37 fails every type/part test. No blades WMEs → Gas Turbine and Turbine die immediately.
alpha test (WMEs passing)beta joinrule firedempty / dead branch

5.2 — Specificity → D

WME counts: (Engine,107) = 1; (SPM, 105, 104) = 2; (Motor,·) = 1 each. Most specific → D.

5.3 — Recency → C

Max timestamps: (Engine,107) → 107; (SPM,·) → 105; (Motor,104) → 104; (Motor,106) → 106. Highest → C.

Same flip as the AN paper

Specificity loves the two-condition tuple; recency loves whatever holds the newest fact (107, the crankshaft BoM). When a fresh fact feeds a general rule, the two strategies split — that's the examiner's favourite trick.

Tricks & Tips

Answers: 5.1 C, D, E, F · 5.2 D · 5.3 C