Q8 — CSP: Arc Consistency, Path Consistency, Solution

A = 3 has no support on R_AC — not arc consistent; pruning it cascades to a unique solution 2,6,8.

The Question

CSP over A, B, C (processed in that order), DA=DB=DC={1,…,9}D_A = D_B = D_C = \{1, \dots, 9\}:

RAB={(2,6),(3,5)}RAC={(2,7),(2,8)}RBC={(4,7),(5,7),(6,8)}R_{AB} = \{(2,6), (3,5)\} \qquad R_{AC} = \{(2,7), (2,8)\} \qquad R_{BC} = \{(4,7), (5,7), (6,8)\}

#QuestionOfficial answer
8.1Is the CSP arc consistent?B — No
8.2After making it arc consistent: path consistent?A — path consistent
8.3Solution (A,B,C)2,6,8

The Topic in 60 Seconds

  • Arc consistent: every domain value has a support in each neighbour.
  • Path consistent: every allowed pair has a middle value compatible with both.
  • Making a CSP arc consistent can cascade — one pruning orphans another value.

Deep-dive: Arc Consistency, Forward Checking.

The matching diagram

8.1 — Arc consistent? → No

Check every value on the diagram:

ValueSupports
A = 2B = 6 ✓, C = 7, 8 ✓
A = 3B = 5 ✓, C = ? — (3,c)∉RAC(3, c) \notin R_{AC} for any c!
B = 5A = 3 ✓, C = 7 ✓
B = 6A = 2 ✓, C = 8 ✓
C = 7A = 2 ✓, B = 5 ✓
C = 8A = 2 ✓, B = 6 ✓

A = 3 has no support on R_AC → not arc consistent → B ✓

8.2 — After arc consistency: path consistent? → A (path consistent)

Revise (AC-3 style):

  1. A=3A = 3 pruned (no C support) → DA={2}D_A = \{2\}.
  2. Cascade: B=5B = 5's support was A=3A = 3 — gone! → DB={6}D_B = \{6\}.
  3. C=7C = 7's support via RBCR_{BC} was B=5B = 5 — gone! → DC={8}D_C = \{8\}.

Result: DA={2}D_A = \{2\}, DB={6}D_B = \{6\}, DC={8}D_C = \{8\} — every arc trivially consistent.

Path consistency: with singletons everywhere, the only pair is (2,8)(2, 8) on A–C; the middle B=6B = 6 satisfies (2,6)∈RAB(2, 6) \in R_{AB} ✓ and (6,8)∈RBC(6, 8) \in R_{BC} ✓ → path consistent → A ✓

8.3 — Solution → 2,6,8

The cascade above leaves exactly one assignment:

A=2,B=6,C=8A = 2,\quad B = 6,\quad C = 8

Verify: (2,6)∈RAB(2,6) \in R_{AB} ✓, (2,8)∈RAC(2,8) \in R_{AC} ✓, (6,8)∈RBC(6,8) \in R_{BC} ✓ → 2,6,8 ✓

Tricks & Tips

Interactive AC-3 cascade — watch the domains collapse:

1 / 5
Supports: A=2 → B:6 ✓ C:7,8 ✓ · A=3 → B:5 ✓ but C: ? — no c with (3,c) ∈ R_AC! B=5 → A:3 ✓ C:7 ✓ · B=6 → A:2 ✓ C:8 ✓ C=7 → A:2 ✓ B:5 ✓ · C=8 → A:2 ✓ B:6 ✓ A = 3 has no support on R_AC → NOT arc consistent → 8.1 = B.
value being tested / prunedstill in playfinal unique solution

Tricks & Tips

QuizWhy does B = 5 get pruned during arc consistency?

Answers: 8.1 B (No) · 8.2 A (path consistent) · 8.3 2,6,8