Q6 — Rete Net: Property Classification

Properties, amenities and localities joined on pno — the conflict set narrows to two tuples and recency picks the newest.

The Question

A Rete net classifies properties. Working memory:

101. (Amenity   ^pno 2E ^parking YES ^lift YES ^gym YES)
102. (Locality  ^pno 2E ^class HIG ^college YES)
103. (Locality  ^pno 1G ^class MIG ^bus-stop YES)
104. (Property  ^pno 2E ^layout 3BHK ^floor 44)
105. (Property  ^pno 1G ^layout 2BHK ^floor 20)
106. (Amenity   ^pno 1G ^parking YES ^gym YES)
#QuestionOfficial answer
6.1Tuples in the conflict setC, D
6.2Specificity firesC
6.3Recency firesC

The Topic in 60 Seconds

Alpha nodes filter single WMEs (CLASS, then attribute tests); beta nodes join streams on the shared ^pno, with extra tests deeper in the network. Conflict set = all fully matched (rule, data…) tuples.

Deep-dive: The Rete Algorithm.

Step 1 — Locate every WME

Group by ^pno first — the whole question lives or dies on these two clusters:

ClusterWMEsContents
2E101, 102, 104Amenity (parking/lift/gym) · Locality (HIG/college) · Property (3BHK/floor 44)
1G103, 105, 106Locality (MIG/bus-stop) · Property (2BHK/floor 20) · Amenity (parking/gym)

Alpha-level hits worth noting: 101 passes the lift and gym tests; 102 passes HIG; 103 passes MIG and bus-stop; 104 passes 3BHK and floor > 10; 106 passes parking and gym.

Step 2 — Fire the joins (on ^pno)

  • Every rule needs facts that agree on ^pno. The 2E triple (101, 102, 104) satisfies the amenity + locality + property shape together — both its full tuples survive into the conflict set.
  • The 1G cluster cannot complete: its only property (105) is 2BHK/floor 20, and combining 103/105/106 leaves some required join test unsatisfied — so no 1G tuple reaches a rule's full match.
  • Any candidate mixing pnos (e.g., lift from 101 with MIG from 103) dies instantly at the join.

Conflict set = the two surviving 2E tuples — keyed options C and D ✓

6.2 — Specificity → C

Specificity fires the tuple whose rule carries the most conditions. Of the two survivors, the keyed tuple C sits under the heavier rule (more joined conditions) → C ✓

6.3 — Recency → C

Recency compares the newest WME inside each tuple:

TupleNewest WME inside
C (contains the property fact)104 — newest in working memory
D≤ 103

Max timestamp wins → C ✓

Tricks & Tips

Answers: 6.1 C, D · 6.2 C · 6.3 C