chapter5

# chapter5 - Constraint Satisfaction Problems CHAPTER 5...

This preview shows pages 1–13. Sign up to view the full content.

CHAPTER 5 HASSAN KHOSRAVI SPRING2011 Constraint Satisfaction Problems

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
Outline CSP examples Backtracking search for CSPs Problem structure and problem decomposition Local search for CSPs
Constraint satisfaction problems (CSPs) CSP: state is defined by variables X i with values from domain D i goal test is a set of constraints specifying allowable combinations of values for subsets of variables Allows useful general-purpose algorithms with more power than standard search algorithms

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
Example: Map-Coloring
CSPs (continued) An assignment is complete when every variable is mentioned. A solution to a CSP is a complete assignment that satisfies all constraints. Some CSPs require a solution that maximizes an objective function . Examples of Applications: Airline schedules Cryptography Computer vision -> image interpretation Scheduling your MS or PhD thesis exam

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
Example: Map-Coloring contd.
Constraint graph Binary CSP: each constraint relates at most two variables Constraint graph: nodes are variables, arcs show constraints General-purpose CSP algorithms use the graph structure to speed up search. E.g., Tasmania is an independent subproblem!

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
Varieties of constraints Unary constraints involve a single variable, e.g., SA 6= green Binary constraints involve pairs of variables, e.g., SA <> WA Higher-order constraints involve 3 or more variables Preferences (soft constraints), e.g., red is better than green often representable by a cost for each variable assignment constrained optimization problems
c a d e b Consider the constraint graph on the right. The domain for every variable is [1,2,3,4]. There are 2 unary constraints: - variable “a” cannot take values 3 and 4. - variable “b” cannot take value 4. There are 8 binary constraints stating that variables connected by an edge cannot have the same value. Problem

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
Example: 4-Queens Problem 1 3 2 4 3 2 4 1 X1 { 1 ,2,3,4} X3 {1,2,3,4} X4 {1,2,3,4} X2 {1,2,3,4}
Standard search formulation (incremental) Let’s start with the straightforward, dumb approach, then fix it States are defined by the values assigned so far Initial state: the empty assignment, { } Successor function: assign a value to an unassigned variablethat does not conflict with current assignment. fail if no legal assignments (not fixable!) Goal test: the current assignment is complete This is the same for all CSPs!

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
Standard search formulation (incremental) Can we use breadth first search? Branching factor at top level? nd any of the d values can be assigned to any variable Next level? (n-1)d
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

### Page1 / 67

chapter5 - Constraint Satisfaction Problems CHAPTER 5...

This preview shows document pages 1 - 13. Sign up to view the full document.

View Full Document
Ask a homework question - tutors are online