SP22 Bse 009 Ai CSP Task 2
SP22 Bse 009 Ai CSP Task 2
CSP:
1. Variable:
The variable in this scenario represents the geographical regions of Pakistan. Each region is assigned a
variable name such as {“A”, "B" "C," "D," "E "F "G," “H” and "I"}
2. Domain:
Each variable can be assigned one of three colors
Domain = {Red, Green, Blue}
3. Constraint:
Page |2
The constraint is that no two regions can have the same color. This ensures that each region is uniquely
identified by its assigned color, maintaining clarity and distinction on the map.
Constraint Graph: I H
C D
F
B E
Cut set:
Variable I is adjacent to variables D, C, H, G, and E.
So removing I will relax the constraints for its adjacent variables.
For each adjacent variable to I, the constraint will no longer include I. Solve the modified CSP without
variable I, considering the adjusted constraints.
D H
C
G
A B E
Page |3
Tree Decomposition:
The tree decomposition represents a valid decomposition of the problem into smaller subproblems, which can
be solved independently. It ensures that the constraints between variables are preserved while simplifying the
problem structure.