Q6 — Rete Net: Property Classification

Lift/3BHK/MIG and lift/gym/3BHK joins on pno — three tuples make the conflict set and specificity hands it to R2's six tests.

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 ^mall YES ^bus-stop YES)
103. (Locality  ^pno 1G ^class MIG ^bus-stop YES)
104. (Property  ^pno 2E ^layout 3BHK ^floor 44)
105. (Property  ^pno 1G ^layout 1BHK ^floor 1)
106. (Amenity   ^pno 1G ^parking YES ^heating YES)
#QuestionOfficial answer
6.1Tuples in the conflict set (A: R1,103,105,106 · B: R2,101,102,104 · C: R3,101,103,106 · D: R4,103,105)A, B, D
6.2Specificity firesB
6.3Recency firesA

The Topic in 60 Seconds

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

Deep-dive: The Rete Algorithm.

Step 1 — Locate every WME

Split WM by ^pno first — tuples never cross clusters:

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

Alpha-level notes: heating (WME 106) has no alpha node — the WME still sits in the parking leaf; floor 44 passes the floor > 10 test, floor 1 does not.

Step 2 — Test each option tuple at its beta joins

OptionTupleJoin checkVerdict
A(R1, 103, 105, 106)all ^pno = 1G: MIG (103) ⋈ 1BHK (105) ⋈ parking-amenity (106) ✓in
B(R2, 101, 102, 104)all ^pno = 2E: lift+gym (101) ⋈ 3BHK (104) ⋈ HIG+mall+bus-stop (102) ✓in
C(R3, 101, 103, 106)101 lives at 2E but 103/106 at 1G — mixed cluster, no shared ^pno joinout
D(R4, 103, 105)all ^pno = 1G: MIG+bus-stop (103) ⋈ 1BHK (105) ✓in

Conflict set = options A, B, D ✓

6.2 — Specificity → B

Count conditions (= WMEs bound in the tuple): R2's rule fires through six joined tests (lift, gym, 3BHK, HIG, mall, bus-stop); R1 carries three; R4 carries three. Most specific wins → B ✓

6.3 — Recency → A

Newest WME inside each surviving tuple:

TupleMax timestamp
A (R1, 103, 105, 106)106 ← newest in WM
B (R2, 101, 102, 104)104
D (R4, 103, 105)105

Highest timestamp wins → A ✓

Tricks & Tips

Answers: 6.1 A, B, D · 6.2 B · 6.3 A