0% found this document useful (0 votes)
8 views

Is ASSM

Uploaded by

perfectzink
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
8 views

Is ASSM

Uploaded by

perfectzink
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 6

Constraint Satisfaction Problems (CSPs)

Standard search problem:


state is a "black box“ – any data structure that supports
successor function, heuristic function, and goal test

CSP:
state is defined by variables Xi with values from domain Di
goal test is a set of constraints specifying allowable
combinations of values for subsets of variables
Varieties of constraints
Unary constraints involve a single variable,
e.g., SA ≠ green

Binary constraints involve pairs of variables,


e.g., SA ≠ WA

Higher-order constraints involve 3 or more


variables,
e.g., cryptarithmetic column constraints
Constraint satisfaction problem
 A CSP is defined by
 a set of variables
 a domain of possible values for each variable
 a set of constraints between variables

 An assignment that does not violate any constraints is called a


consistent or legal CONSISTENT assignment.

 A complete assignment is one in which every variable is


mentioned.

 A solution to a CSP is
 A complete assignment that satisfies all the constraints
Varieties of CSPs
 Discrete variables
 finite domains:
 n variables, domain size d  O(dn) complete assignments
 e.g., Boolean CSPs, incl. Boolean satisfiability (NP-complete)
 infinite domains:
 integers, strings, etc.
 e.g., job scheduling, variables are start/end days for each job
 need a constraint language, e.g., StartJob1 + 5 ≤ StartJob3

 Continuous variables
 e.g., start/end times for Hubble Space Telescope observations
 linear constraints solvable in polynomial time by linear
programming
Improving backtracking efficiency
General-purpose heuristics can give huge gains in
speed:

Which variable should be assigned next?


In what order should its values be tried?
Can we detect inevitable failure early?
Example: Map-Coloring

 Variables WA, NT, Q, NSW, V, SA, T


 Domains Di = {red, green, blue}
 Constraints: adjacent regions must have different
colors
 e.g., WA ≠ NT

You might also like