Sep 10, 2003 ------------- - recap arc consistency - Arc consistency = strong 2-consistency - What is 1-consistency by the way? - remove any violating variable from a domain - Definitions - A graph is K-consistent if: - choose values for any (K-1) variables (that satisfy constraints among them) - choose a Kth variable, then - there exists a value for this variable - A graph is strongly K-consistent if: - it is 1-consistent, - it is 2-consistent, - ... - it is (K-1)-consistent, and - it is K-consistent - An n-node constraint graph - can be made n-consistent - in an aim to "read off" the answer - but sometimes, just k-consistent is enough - for k width of graph, then you need no search/backtracking! - Thus, two ways to solve a CSP - solving a CSP using constraint propagation - can just 'read off' the answer - solving a CSP using search - In general to just 'read off' the answer - need to maintain n-consistency for a graph with n nodes - Sometimes k width of the constraint graph - Computing the width of the constraint graph - first make 'tree-like' decompositions of the graph - for each decomposition - x = size of largest subproblem - y = x -1 - find the minimum y across all decompositions - Rules for making a 'tree-like' decomposition - every variable must appear in at least one of the subproblems - every constraint must appear in at least one of the subproblems - if a variable appears in two subproblems, it must also appear in every subproblem 'along' the two subproblems - Thus far, the two extremes of solving CSPs are - constraint propagation (involves a lot of 'thinking') - backtracking (might involve thrashing) - Third approach - "mix" CP and search - i.e., embed CP in a backtracking algorithm - at each node try to achieve *some* consistency - AND search - How to choose orderings - most constrained variable heuristic - most constraining variable heuristic (useful for first level) - least constraining value heuristic - SAT problems: a favorite type of CSPs - continued in next class