Q10 — RULE BASED EXPERT SYSTEMS

Seven engine-shop WMEs race through the Rete net; five tuples reach the conflict set and R1 out-ranks them all on both specificity and recency.

The Question

A Rete Net for classification of machines is shown in the figure. The labels A1, A2, A3, ..., A10, A11, A12, A13, ..., B1, B2, ..., B5, R1, R2, ..., R8, uniquely identify the nodes in the network. When required, use the given label ordering to break ties and to enter your answers.

Run the Rete algorithm for the Working Memory shown below, where the WMEs are in timestamp order. Assume that WMEs reside at appropriate Alpha nodes, and the Beta nodes point to WMEs residing in Alpha nodes.

101. (Fuel  ^item machine5 ^type diesel)
102. (Fuel  ^item machine2 ^type petrol)
103. (Fuel  ^item machine3)
104. (Power ^item machine4 ^lines 1)
105. (BoM   ^item machine4 ^part armature)
106. (BoM   ^item machine3 ^part armature)
107. (BoM   ^item machine5 ^part crankshaft)

For each WME identify its location (node label) in the Rete Net, and prepare the conflict set for the first cycle, then answer the given subquestions.

#QuestionOfficial answer
10.1Which of the following rule-data tuples are in the conflict-set?A, B, C, D, E
10.2If the Inference Engine uses Specificity as the conflict resolution strategy then identify the rule-data tuples that will be ready to fire. If multiple rule-...R1,101,107 / R1,107,101
10.3If the Inference Engine uses Recency as the conflict resolution strategy then identify the rule-data tuples that will be ready to fire. If multiple rule-data...R1,101,107 / R1,107,101

The Topic in 60 Seconds

Rete runs every WME through two halves:

HalfNodesJob
Alpha netA1…A13single-WME constant tests; each node stores every passing WME
Beta netB1…B5joins two token streams on shared variables (item=⟨x⟩\text{item}=\langle x\rangle)

A production fires a rule-data tuple (R,w1,… )(R, w_1, \dots) when tokens cover all its conditions. Live tuples = conflict set.

Deep-dive: browse the Concepts section for Rule-Based Expert Systems / Rete.

Step 0 — File each WME into its alpha node

WMEPath through the netBinding
101 Fuel, diesel, machine5A1 → A4 (xx=m5) → A7xx = machine5
102 Fuel, petrol, machine2A1 → A4 (xx=m2) → A9xx = machine2
103 Fuel, no type, machine3A1 → A4 only (A7/A9 reject — missing ^type)xx = machine3, goes nowhere
104 Power, lines 1, machine4A3 → A6 (xx=m4) → A11xx = machine4
105 BoM, armature, machine4A2 → A5 (xx=m4) → A12xx = machine4
106 BoM, armature, machine3A2 → A5 (xx=m3) → A12xx = machine3
107 BoM, crankshaft, machine5A2 → A5 (xx=m5) → A8xx = machine5

Empty after all insertions: A10 (turbine-blades), A13 (lines 3) — so R3's join partner exists but mismatches, while R4, R5, R8 can never activate at all this cycle.

Step 1 — Beta joins and rule activations

Beta / RuleJoin testedResult
B1 (A7 ⋈ A8 on xx)A7: {m5}\{m5\} · A8: {m5}\{m5\}match at m5 → (R1, 101, 107)
R2 (A8 alone)single condition(R2, 107)
B2 (A9 ⋈ A8 on xx)A9: {m2}\{m2\} · A8: {m5}\{m5\}no overlap → nothing
B3 (A9 ⋈ A10)A10 emptynothing
R5 (A10 alone)emptynothing
B4 (A11 ⋈ A12 on xx)A11: {m4}\{m4\} · A12: {m4,m3}\{m4, m3\}match at m4 → (R6, 104, 105)
R7 (A12 alone)single condition(R7, 105), (R7, 106)
B5 (A13 ⋈ A12)A13 emptynothing

10.1 — Conflict set → A, B, C, D, E

{(R1,101,107), (R2,107), (R6,104,105), (R7,105), (R7,106)}\{(R1,101,107),\ (R2,107),\ (R6,104,105),\ (R7,105),\ (R7,106)\}

OptionTupleVerdict
AR1,101,107Yes — diesel m5 meets crankshaft m5 in B1
BR2,107Yes — 107 sits in A8
CR6,104,105Yes — lines-1 m4 pairs with armature m4
DR7,105Yes — 105 passes A12
ER7,106Yes — 106 also passes A12
FR3,102,107No — B2 fails: petrol is m2, crankshaft is m5
GR7,105,106No — R7 is single-condition; it never takes two WMEs
HR8,105,106No — B5 needs lines-3, which no WME supplies

10.2 — Specificity → R1,101,107

Count each rule's WME patterns (conditions); most specific wins:

TupleConditions countedSpecificity
R1,101,107Fuel + diesel + BoM + crankshaft4
R6,104,105Power + lines-1 + BoM + armature4 (tie)
R2,107BoM + crankshaft2
R7,105 / R7,106BoM + armature2

Tie between R1 and R6 at 4 conditions → question says break ties by label ordering → R1 < R6, so R1,101,107 fires.

10.3 — Recency → R1,101,107

Compare sorted-descending timestamp lists of each tuple's WMEs:

TupleTimestampsSorted desc
R2,107107[107]
R1,101,107101, 107[107, 101] ← wins
R7,106106[106]
R6,104,105104, 105[105, 104]
R7,105105[105]

Both R1's and R2's newest element is 107; the next comparison favours the tuple with additional (older) supporting WMEs: [107,101]≻[107][107,101] \succ [107] → R1,101,107.

Interactive trace — WMEs flowing through the net

1 / 9
Working memory starts empty. No alpha node holds anything.
alpha nodejust activatedholding tokensrule in conflict set

Tricks & Tips

Answers: 10.1 A, B, C, D, E · 10.2 R1,101,107 / R1,107,101 · 10.3 R1,101,107 / R1,107,101