Australia Map Coloring
- Color each region using either
red
,green
, orblue
. - No adjacent region can have the same color.
Formulate the Problem X, D, C
According to the definition of CSP. We can define variables to be the regions:
The domain of each variable is the set .
The constraints require neighboring regions to have distinct colors. There are 9 constraints:
Here we are using abbreviations; is a shortcut for <(SA,WA), >, where can be fully enumerated as
Constraint Graph
The CSP can be visualized as a constraint graph, as shown at the beginning of this page.
- The nodes of the graph correspond to variables of the problem.
- An edge connects any two variables that participate in a constraint.