Lecture 4 - CSPs I
Lecture 4 - CSPs I
Domain - is the set of values that a variable can take. or example, in a scheduling problem, a
variable might represent the time slot for a particular task, and its domain would be the set of
possible time slots.
Constraints - define the relationships between the variables. They specify which combinations
of variable assignments are allowed or disallowed. Constraints can be unary (i.e., involving a
single variable), binary (i.e., involving two variables), or higher-order (involving three or more
variables).
Objective - In some CSPs, there might be an objective function or goal that needs to be
optimized. This could involve finding a solution that minimizes or maximizes some measure of
interest, such as cost, distance, or time.
Solution – Assign a value to each variable such that none of the constraints are broken.
Constraint Satisfaction Problems
Note: Constraints
Explicit constraints in (CSPs) are restrictions or conditions that are directly defined and
provided in the problem statement.
For example: Directly Defined Relationships, Stated Constraints, Constraints on Variable
Assignments, Constraints on Variable Domains, Objective Function Constraints etc..
Implicit constraints in (CSPs) are conditions or limitations that are not explicitly provided in
the problem statement but are inferred from the problem context, domain knowledge, or logical
reasoning.
For example: Domain Restrictions, Feasibility Requirements, Logical Consistency,
Problem-Specific Considerations
Constraint Satisfaction Problems
Domains:
Explicit:
Domains:
Constraints:
Implicit:
Explicit:
Example: Sudoku
Variables:
Each (open) square
Domains:
{1,2,…,9}
Constraints:
Continuous variables
E.g., start/end times for Hubble Telescope observations
Linear constraints solvable in polynomial time by LP methods
Varieties of CSPs
Ordering:
Which variable should be assigned next?
In what order should its values be tried?
NT Q
WA
SA
NSW
V
NT Q
WA
SA
NSW
V
NT Q
WA SA
NSW
V