CSP Relations and Arc/Path Consistency
From math definitions to pruning power — compute R_AC from mod constraints, then enforce arc and path consistency like the papers demand
The Simplest Explanation
A binary CSP has variables with domains and relations (allowed tuples) for each constrained pair.
- Relation
R_AC= set of pairs(a,c)that satisfy constraint between A and C - Arc consistent = for every value in every domain, there exists a compatible value in each neighbor's domain
- Path consistent = for every pair of values, there exists a middle value completing the path
Arc consistency prunes domains (values). Path consistency prunes relations (tuples).
Computing Relations from Math Constraints (26T1 Papers)
Domains:
Example 1:
For each , compute , then find matching :
| Allowed | Tuples | |||
|---|---|---|---|---|
| 1 | 2 | 2 | 2 | (2,1) |
| 2 | 4 | 1 | 1 | (1,2) |
| 3 | 6 | 0 | — (0 not in domain!) | none |
| 4 | 8 | 2 | 2 | (2,4) |
So — matches answer A,B,C.
Example 2: (26T1 AN)
| Tuple | |||
|---|---|---|---|
| 1 | 3 | 3 | (3,1) |
| 2 | 2 | 2 | (2,2) |
| 3 | 1 | 1 | (1,3) |
| 4 | 0 | 0 not in domain | none |
— tuples are order!
Crucial: Tuple order matches relation name: tuples are , are .
Arc Consistency
A CSP is arc consistent iff for every arc , every has some with .
Check each : if no supporting , delete from and re-queue neighbors.
Is Our Example Arc-Consistent?
:
- : No support in → Remove 3 from
- : No support → Remove 4
- : No with → Remove 3 from
After pruning, papers answer: Not arc-consistent (No). After making it arc-consistent, re-check path consistency.
Path Consistency
For every pair and every tuple , there must exist such that and .
After arc pruning, 26T1 papers find it IS path consistent. Hence solution exists: e.g., (AN) or (FN).
Constraint Graph
- Nodes = variables, edges = constrained pairs (triangle A-B-C)
- Triangle is cyclic — but path consistency still applies (contrary to distractor "does not apply because cycle").