100 likes | 221 Views
Constraint Satisfaction Problems/Programming ZUI 2012/2013. Consistency checking in CSP. until now – passive checking whether the constraints are satisfied Where? When? Remember the scheme of the algorithm?. Consistency checking in CSP.
E N D
Constraint Satisfaction Problems/Programming ZUI 2012/2013
Consistency checking in CSP • until now – passive checking whether the constraints are satisfied • Where? When? Remember the scheme of the algorithm?
Consistency checking in CSP • until now – passive checking whether the constraints are satisfied • Where? When? Remember the scheme of the algorithm?
Binary CSP • unified structure of CSP instances • all constraints are binary • can we formalize all CSP problems with binary variables? • constraints can be represented as a graph • nodes – variables • edges – constraints between variables
Consistency • nodes • edges / arcs
Consistency • nodes • unary constraints are reflected in the domain of the variable • every value in the domain satisfies all unary constraints • edges / arcs • directed vi → vj • for every x from vi domain there exists a value y from vjdomain that satisfies all constraints between vi and vj
Arc Consistency • make each edge in the graph of constraints consistent • do we have some guarantees? • What algorithm can we use? • AC-1 • AC-2 • AC-3 • …
Example • scheduling requests to hotel rooms • list of requests (# of people, from, to) • set of rooms (# of beds) • heuristics? • MRV, LCV, …
Example (2) • crosswords, sudoku, … • representation? • heuristics?