Presentation is loading. Please wait.

Presentation is loading. Please wait.

CS460 Fall 2013 Lecture 4 Constraint Satisfaction Problems.

Similar presentations


Presentation on theme: "CS460 Fall 2013 Lecture 4 Constraint Satisfaction Problems."— Presentation transcript:

1 CS460 Fall 2013 Lecture 4 Constraint Satisfaction Problems

2 CSP formulation Simplicity of domain Number of variables Simplicity of constraints

3 Constraint graph Unary constraints Binary constraints N-ary constraints

4 CSP Examples N queens Map coloring Cryptarithmetic Sudoku Missionaries and Cannibals? Waltz 3-D shape recognizer Boolean n-satisfiability problem Time tabling Hardware configuration Layouts

5 CSP Complexity NP hard Exponential

6 CSP and Search DFS, uninformed Why is search approach inefficient? Backtracking search – Fail early

7

8 Backtracking design Variable order Failure on violation Domain value assignment order Filtering Exploit graph structure …

9 Filtering: forward checking Filter out choices from domains Backtrack when choices run out

10 Constraint propagation Enforcing arc consistency “arc” belongs to constraint propagation, not to constraint graph as such Consistency: For every value in the tail X, there is some Y in the head which can be assigned without violating a constraint Intuitively, there will be no backtracking generated due to that particular pair of nodes Use arc consistency to filter out values from domain “delete from the tail” Any time a variable domain shrinks, all its neighbors pointing to it have to be re-tested Visit all the arcs over and over again till every arc is simultaneously consistent Backtracking, but less intense Compare to A* search (precomputing heuristic)

11

12 Arc consistency: limitations Does not detect all failures, only a subclass of them Part of overall backtracking search Arc consistency has to be enforced after every assignment in a backtracking search

13 Variable ordering Pick variable with min remaining values Fail early (at top of search tree)

14 Value ordering Least constraining value

15 Handling bigger problems 1000 queens

16 K-consistency Generalized arc consistency Tail is now k-1 consistent subset of nodes. Head is the remaining node. Strong k-consistency: all lower-orders are also consistent Lots of pre-computation – Analogy to A* search

17 Problem structure Exploit shape of graph Tree structure – No loops Cutset conditioning

18 Local Search


Download ppt "CS460 Fall 2013 Lecture 4 Constraint Satisfaction Problems."

Similar presentations


Ads by Google