constraint satisfaction modeling and reformulation with
play

Constraint Satisfaction: Modeling and Reformulation with Modeling - PowerPoint PPT Presentation

Constraint Satisfaction: Modeling and Reformulation with Modeling and Reformulation with Application to Geospatial Reasoning Berthe Y. Choueiry Constraint Systems Laboratory y y Department of Computer Science & Engineering University of


  1. Constraint Satisfaction: Modeling and Reformulation with Modeling and Reformulation with Application to Geospatial Reasoning Berthe Y. Choueiry Constraint Systems Laboratory y y Department of Computer Science & Engineering University of Nebraska-Lincoln Joint work with Ken Bayer Martin Michalowski and Craig A Knoblock Joint work with Ken Bayer, Martin Michalowski and Craig A. Knoblock Supported by NSF CAREER Award #0133568 and AFOSR grants FA9550-04-1-0105 and FA9550-07-1-0416 Constraint Systems Laboratory 10/16/2007 Math Colloquium 1

  2. Outline I. Background – Constraint Satisfaction Problem (CSP): definition propagation Constraint Satisfaction Problem (CSP): definition, propagation algorithms, search – Reformulation II. II Building Identification Problem Building Identification Problem [Michalowski & Knoblock, 05] [Mi h l ki & K bl k 05] – Constraint model – Custom solver III. Reformulation techniques – Query reformulation, domain reformulation, constraint relaxation symmetry detection relaxation, symmetry detection – Application to CSP, BID & evaluation on real-world BID data • Conclusions & future work Constraint Systems Laboratory 10/16/2007 Math Colloquium 2

  3. Constraint Satisfaction Problem (CSP) V 1 V 2 • Given P = ( V, D, C ) {c, d, e, f} {d} – V : set of variables V 4 V 3 {a, b, d} {a, b, c} – D : set of their domains – C : set of constraints (relations) restricting the acceptable combination of values for variables – Solution is a consistent assignment of values to variables • Query : find 1 solution, all solutions, etc. fi d 1 l i ll l i Q • Deciding satisfiability is NP -complete in general Constraint Systems Laboratory 10/16/2007 Math Colloquium 3

  4. Examples • Industrial applications: scheduling, resource allocation, product configuration, etc. p g • AI: Logic inference, temporal reasoning, NLP, etc. • Puzzles: Sudoku & Minesweeper • Puzzles: Sudoku & Minesweeper Constraint Systems Laboratory 10/16/2007 Math Colloquium 4

  5. Sudoku as a CSP • Each cell is a variable with the domain {1,2,…,9} • Two models: Binary, 810 AllDiff binary constraints Non binary 27 AllDiff constraints of arity 9 Non-binary, 27 AllDiff constraints of arity 9 Constraint Systems Laboratory 10/16/2007 Math Colloquium 5

  6. Minesweeper as a CSP • Variables are the cells • Domains are {0,1} (i.e., safe or mined) • One constraint for each cell with a number (arity 1...8) Exactly two mines: 0000011 0000101 0000110, etc. Exactly three mines: 0000111 0000111 0001101 0001110, etc. Constraint Systems Laboratory 10/16/2007 Math Colloquium 6

  7. Solving CSPs 1. Constraint propagation L Look-ahead: k h d propagate while searching 2. Search 3. Islands of tractability 3 Islands of tractability – Special constraint types (e.g., linear inequalities) – Special graph structures (e.g., bounded width) Special graph str ct res ( b d d idth) Constraint Systems Laboratory 10/16/2007 Math Colloquium 7

  8. Constraint propagation • Removes from the problem values (or combinations of values) that are inconsistent combinations of values) that are inconsistent with the constraints < 2,4,6,9 , , , 3,5,7 , , < < < < < 5,6,7,8 3,5,7 1,6,11 > = = < < 1,2,10 8,9,11 • Does not eliminate any solution Constraint Systems Laboratory 10/16/2007 Math Colloquium 8

  9. Consistency algorithms: examples • Arc Consistency (AC) • Generalized AC (GAC) GAC on AllDiff [Régin, 94] • Arcs that do not appear in any matching that saturates the variables correspond to variable- value pairs that cannot c 1 1 appear in any c 2 2 solution l ti c 3 3 c 4 • GAC on AllDiff 4 c 5 5 is poly time c 6 6 c 7 7 c 8 8 c 9 9 Constraint Systems Laboratory 10/16/2007 Math Colloquium 9

  10. Levels of consistency • Properties & algorithms for achieving them – In general, efficient (polynomial time) – Applicable to arbitrary constraints – Dedicated to specific constraint types • Basis for Constraint Programming (e.g., AllDiff) • Examples on the Sudoku Solver – sudoku.unl.edu/Solver [with Reeson, 07] – Conjecture: SGAC solves every 9x9 well- formed Sudoku Constraint Systems Laboratory 10/16/2007 Math Colloquium 10

  11. Search 1. Backtrack search – Constructive – Constructive Past variables Past variables – Complete (in theory) and sound – Note: • Variable ordering (backdoor) Future Filter values • Look-ahead variables 2. Iterative repair (i.e., local search) – Repairs a complete but inconsistent assignment of p p g values to variables by doing local repairs – In general, neither sound nor complete Constraint Systems Laboratory 10/16/2007 Math Colloquium 11

  12. Abstraction & Reformulation Original problem Reformulated problem Reformulation technique q • Original formulation Original formulation • Reformulated formulation Reformulated formulation • Original query • Reformulated query The reformulation may be an approximation The reformulation may be an approximation Original space Reformulated space Φ (S l ti Φ (Solutions( P o )) ( P )) Solutions( P o ) Solutions( P r ) Constraint Systems Laboratory 10/16/2007 Math Colloquium 12

  13. Outline • Background • BID: CSP model & custom solver • Reformulation techniques q • Conclusions & future work Constraint Systems Laboratory 10/16/2007 Math Colloquium 13

  14. Issue: finding Ken’s house Google Maps Yahoo Maps Actual location Microsoft Live Local (as of November 2006) Constraint Systems Laboratory 10/16/2007 Math Colloquium 14

  15. Building Identification (BID) problem • Layout: streets and buildings S1 S2 B2 B2 B1 B3 B4 = Building S3 = Corner building B6 B6 B7 B7 B10 B10 Si = Street B5 B8 B9 • Phone book Ph b k – Complete/incomplete S1#1, S1#4, S1#8, S2#7, S2#8, S3#1, – Assumption: all addresses in p S3#2, S3#3, S3#15, phone book correspond to a … building in the layout Constraint Systems Laboratory 10/16/2007 Math Colloquium 15

  16. Basic (address numbering) rules • No two buildings can have the same address • Ordering Ordering – Numbers increase/decrease along a street • Parity – Numbers on a given side of a street are odd/even Parity Parit Ordering B1 B3 Odd < < < < B1 B1 B2 B2 B3 B3 Even B2 B4 Constraint Systems Laboratory 10/16/2007 Math Colloquium 16

  17. Additional information Landmarks Landmarks Gridlines Gridlines 1600 Pennsylvania Avenue S1 #138 S1 #208 B1 B2 B1 B1 B2 B2 S1 Constraint Systems Laboratory 10/16/2007 Math Colloquium 17

  18. Query 1. Given an address, what buildings could it be? 2. Given a building, what addresses could it have? 2. Given a building, what addresses could it have? = Building B ildi = Corner building S1 S2 S1#1,S1#4, B2 S1#8,S2#7, Si = Street S2#8,S3#1, S2#8 S3#1 B1 B1 B3 B3 B4 B4 S3#2,S3#3, S3 S3#15 S1#1, B6 B7 B10 S3#1, , B5 B8 S3#15 B9 Constraint Systems Laboratory 10/16/2007 Math Colloquium 18

  19. CSP model IncreasingEast S2 S2 • B1 B2 B1c • S1 • OddOnNorth • B2 B1 • Optional: grid constraints B5 B3 B4 Constraint Systems Laboratory 10/16/2007 Math Colloquium 19

  20. Example constraint network Variable Ordering Constraint O Phone book Constraint Phone-book Constraint P B2-corner S1 S2 B1-corner B2 O O O IncreasingEast B1 B3 B4 P S3 S3 B3 P B6 B7 B10 B1 IncreasingNorth B5 B8 B2 B9 OddOnNorthSide O O O O S1#1 S1#4 S1#1,S1#4, B4 B4 B5 B5 B6 B6 = Building O S1#8,S2#7, = Corner building S2#8,S3#1, S3#2,S3#3, O B8 Si = Street B7 S3#15 B6-corner B9 OddOnEastSide O P B4-corner B8-corner Constraint Systems Laboratory 10/16/2007 Math Colloquium 20

  21. Special configurations 1. Orientations vary per street (e.g., Belgrade) 2. Non-corner building on two streets 3. Corner building on more than two streets g → All gracefully handled by the model Constraint Systems Laboratory 10/16/2007 Math Colloquium 21

  22. Custom solver • Backtrack search • Forward checking (nFC3) Forward checking (nFC3) • Conflict-directed backtracking Orientation & • Domains implemented as corner variables intervals (box consistency) • Variable ordering Building 1 Orientation variables 1. Orientation variables Filter values variables 2. Corner variables 3. Building variables • Backdoor variables B kd i bl – Orientation + corner variables Constraint Systems Laboratory 10/16/2007 Math Colloquium 22

  23. Backdoor variables • We instantiate only orientation & corner variables variables B3 B7 B3 B7 B1 B2 B4 B6 B8 B11 B1 B2 B4 B6 B8 B11 B5 B9 B5 B9 B10 B10 • We guarantee solvability without instantiating building variables Constraint Systems Laboratory 10/16/2007 Math Colloquium 23

Recommend


More recommend