Constraint satisfaction problem