Sep 4, 2006 ------------- - Review of homework #1 problems - a new type of search: constraint satisfaction search - map-coloring - cryptarithmetic problems - 8-queens - Sudoku - (All) CSPs have - Variables - Domains - Constraints - can summarize in the form of constraint graph - Whats the big deal? - must merely have to satisfy constraints => typically no notion of optimality - goal test is not a black box => goal test can be decomposed - CSPs hence have a nice structure - that can be exploited in search algorithms - General framework of CSP - Variables: V_1, V_2, ... , V_n - Domains: D_1, D_2, ..., D_n - value of V_i belongs to D_i - Constraints: which are relations R_ij - allowable combinations of values for V_i and V_j - Formulate CSP for both examples - 4-queens - V_i: column id of queen in the i-th row - D_i = {1,2,3,4} - Relations are such that - no two queens in same row (default by encoding) - no two queens in same column (V_i <> V_j) - no two queens in same diagonal (|i-j| <> |V_i - V_j|) - easy to do for map coloring - Types of constraints - unary => variable cannot take certain value - binary => examples from n-queens - n-ary => example from cryptarithmetic - Can always - "simplify" out domains so that unary constraints not needed - convert n-ary to binary => hence, we focus on primarily binary constraints - Relationships to database systems - if you are in CS4604, you will encounter same ideas under "relationships"