Foundations of Constraint Processing More on Constraint Consistency 1 Foundations of Constraint Processing CSCE421/821, Spring 2011 www.cse.unl.edu/~choueiry/S11-421-821/

Slides:



Advertisements
Similar presentations
Non-Binary Constraint Satisfaction Toby Walsh Cork Constraint Computation Center.
Advertisements

Foundations of Constraint Processing Temporal Constraints Networks 1Topic Foundations of Constraint Processing CSCE421/821, Spring
1 Finite Constraint Domains. 2 u Constraint satisfaction problems (CSP) u A backtracking solver u Node and arc consistency u Bounds consistency u Generalized.
ICS-271:Notes 5: 1 Lecture 5: Constraint Satisfaction Problems ICS 271 Fall 2008.
Artificial Intelligence Constraint satisfaction problems Fall 2008 professor: Luigi Ceccaroni.
Wednesday, January 29, 2003CSCE Spring 2003 B.Y. Choueiry Constraint Consistency Chapter 3.
Constraint Optimization Presentation by Nathan Stender Chapter 13 of Constraint Processing by Rina Dechter 3/25/20131Constraint Optimization.
Non-binary constraints Toby Walsh Dept of CS University of York England.
Foundations of Constraint Processing, Spring 2008 April 16, 2008 Tree-Structured CSPs1 Foundations of Constraint Processing CSCE421/821, Spring 2008:
A First Practical Algorithm for High Levels of Relational Consistency Shant Karakashian, Robert Woodward, Christopher Reeson, Berthe Y. Choueiry & Christian.
Foundations of Constraint Processing, Fall 2005 October 21, 2005CSPs and Relational DBs1 Foundations of Constraint Processing CSCE421/821, Fall 2005:
4 Feb 2004CS Constraint Satisfaction1 Constraint Satisfaction Problems Chapter 5 Section 1 – 3.
Foundations of Constraint Processing, Fall 2005 Sep 22, 2005Consistency: Properties & Algorithms 1 Foundations of Constraint Processing CSCE421/821, Fall.
Anagh Lal Monday, April 14, Chapter 9 – Tree Decomposition Methods Anagh Lal CSCE Advanced Constraint Processing.
An Approximation of Generalized Arc-Consistency for Temporal CSPs Lin Xu and Berthe Y. Choueiry Constraint Systems Laboratory Department of Computer Science.
1 Advanced consistency methods Chapter 8 ICS-275 Spring 2007.
Foundations of Constraint Processing, Fall 2005 November 16, 2005nFCi1 Foundations of Constraint Processing CSCE421/821, Fall 2005:
 i may require adding new constraints, except for… o i =1  domain filtering o i =   constraint filtering Robert Woodward & Berthe Y. Choueiry Constraint.
Foundations of Constraint Processing Evaluation to BT Search 1 Foundations of Constraint Processing CSCE421/821, Spring
Ryan Kinworthy 2/26/20031 Chapter 7- Local Search part 1 Ryan Kinworthy CSCE Advanced Constraint Processing.
Foundations of Constraint Processing, Fall 2004 Oct 5, 2004Consistency: Properties & Algorithms 1 Foundations of Constraint Processing CSCE421/821, Fall.
Foundations of Constraint Processing, Fall 2005 Sep 20, 2005BT: A Theoretical Evaluation1 Foundations of Constraint Processing CSCE421/821, Fall 2005:
Jean-Charles REGIN Michel RUEHER ILOG Sophia Antipolis Université de Nice – Sophia Antipolis A global constraint combining.
1 Consistency algorithms Chapter 3. Spring 2007 ICS 275A - Constraint Networks 2 Consistency methods Approximation of inference: Arc, path and i-consistecy.
M. HardojoFriday, February 14, 2003 Directional Consistency Dechter, Chapter 4 1.Section 4.4: Width vs. Local Consistency Width-1 problems: DAC Width-2.
Constraint Systems Laboratory March 26, 2007Reeson–Undergraduate Thesis1 Using Constraint Processing to Model, Solve, and Support Interactive Solving of.
A game of logic where the player must assign the numbers 1..9 to cells on a 9x9 grid. The placement of the numbers must be such that every number must.
26 April 2013Lecture 5: Constraint Propagation and Consistency Enforcement1 Constraint Propagation and Consistency Enforcement Jorge Cruz DI/FCT/UNL April.
Constraint Satisfaction Problems
1 Constraint Programming: An Introduction Adapted by Cristian OLIVA from Peter Stuckey (1998) Ho Chi Minh City.
CP Summer School Modelling for Constraint Programming Barbara Smith 1.Definitions, Viewpoints, Constraints 2.Implied Constraints, Optimization,
Constraint Satisfaction Problems (CSPs) CPSC 322 – CSP 1 Poole & Mackworth textbook: Sections § Lecturer: Alan Mackworth September 28, 2012.
On Algorithms for Decomposable Constraints Kostas Stergiou Ian Gent, Patrick Prosser, Toby Walsh A.P.E.S. Research Group.
Artificial Intelligence CS482, CS682, MW 1 – 2:15, SEM 201, MS 227 Prerequisites: 302, 365 Instructor: Sushil Louis,
Problem Solving with Constraints Lookahead Schemas 1 Foundations of Constraint Processing CSCE496/896, Fall
Chapter 5: Constraint Satisfaction ICS 171 Fall 2006.
1 Directional consistency Chapter 4 ICS-275 Spring 2009 ICS Constraint Networks.
Constraint Systems Laboratory R.J. Woodward 1, S. Karakashian 1, B.Y. Choueiry 1 & C. Bessiere 2 1 Constraint Systems Laboratory, University of Nebraska-Lincoln.
CHAPTER 5 SECTION 1 – 3 4 Feb 2004 CS Constraint Satisfaction 1 Constraint Satisfaction Problems.
Foundations of Constraint Processing, Fall 2004 October 3, 2004Interchangeability in CSPs1 Foundations of Constraint Processing CSCE421/821, Fall 2004:
Foundations of Constraint Processing, Spring 2009 Structure-Based Methods: An Introduction 1 Foundations of Constraint Processing CSCE421/821, Spring 2009.
Eliminating non- binary constraints Toby Walsh Cork Constraint Computation Center.
Foundations of Constraint Processing, Spring 2009 February 20, 2009 Basic Consistency Methods 1 Foundations of Constraint Processing CSCE421/821, Spring.
Problem Solving with Constraints CSPs and Relational DBs1 Problem Solving with Constraints CSCE496/896, Fall
Structure-Based Methods Foundations of Constraint Processing
Consistency Methods for Temporal Reasoning
A First Practical Algorithm for High Levels of Relational Consistency
Empirical Comparison of Preprocessing and Lookahead Techniques for Binary Constraint Satisfaction Problems Zheying Jane Yang & Berthe Y. Choueiry Constraint.
Structure-Based Methods Foundations of Constraint Processing
Constraints and Search
CSPs and Relational DBs
Path Consistency & Global Consistency Properties
Foundations of Constraint Processing
More on Constraint Consistency
Structure-Based Methods Foundations of Constraint Processing
Problem Solving with Constraints
Intelligent Backtracking Algorithms: A Theoretical Evaluation
Foundations of Constraint Processing All questions to Piazza
More on Constraint Consistency
Advanced consistency methods Chapter 8
Problem Solving With Constraints
Foundations of Constraint Processing All questions to Piazza
Problem Solving with Constraints
Problem Solving with Constraints
Revisiting Neighborhood Inverse Consistency on Binary CSPs
Revisiting Neighborhood Inverse Consistency on Binary CSPs
An Introduction Structure-Based Methods
Structure-Based Methods Foundations of Constraint Processing
Consistency algorithms
Presentation transcript:

Foundations of Constraint Processing More on Constraint Consistency 1 Foundations of Constraint Processing CSCE421/821, Spring All questions: Berthe Y. Choueiry (Shu-we-ri) Avery Hall, Room 360 Tel: +1(402) More on Constraint Consistency Properties & Algorithms

Foundations of Constraint Processing More on Constraint Consistency Outline 1.Global properties 2.Local properties –Binary CSPs Dechter Sections 3.1, 3.2, 3.3, 3.4 –Non-Binary CSPs Dechter Sections 3.5.1, Effects of Consistency Algorithms –Domain filtering –Constraint filtering –Constraint synthesis 4.Beyond finite, crisp CSPs –Continuous domains Dechter Sections –Weighted CSPs 2

Foundations of Constraint Processing More on Constraint Consistency Global Consistency Properties Minimality & Decomposability –Originally defined for binary CSPs –Easily extendable to non-binary CSPs Minimality Dechter Definition 2.6 –Every constraint is as tight as it can be –Minimality  n-consistency –In DB, the relations are said to “join completely” Decomposability –Every consistent partial solution can be terminated backtrack free –Decomposability ≡ strong n-consistency 3

Foundations of Constraint Processing More on Constraint Consistency Outline 1.Global properties 2.Local properties –Binary CSPs –Non-Binary CSPs 3.Effects –Domain filtering –Constraint filtering –Constraint synthesis 4.Beyond finite, crisp CSPs –Continuous domains –Weighted CSPs 4

Foundations of Constraint Processing More on Constraint Consistency Local Properties: Binary CSPs Classical ones –Arc, path, i, strong i, (i,j)-consistency More recently –Singleton Arc Consistency –Inverse Consistency –Neighborhood Inverse Consistency –(Conservative) Dual consistency Special Constraints 5

Foundations of Constraint Processing More on Constraint Consistency Classical Local Consistency: Properties Arc consistency –Every vvp can be extended to a partial solution of length 2 Path consistency –Every partial solution of length 2 can be extended to a partial solution of length 3 i-consistency –Every partial solution of length (i-1) can be extended to a partial solution of length i (i,j)-consistency –Every partial solution of length i can be extended to a partial solution of length i+j 6

Foundations of Constraint Processing More on Constraint Consistency Classical Local Consistency: Algorithms Arc consistency: –AC-1, 2, 3, …, 7, AC-2001, AC-*, … –Effect: domain filtering –Complexity: in n 2 Path consistency –PC-1, 2, 3, …, 8, PC2001, PPC, … –Effect: adds binary constraints, modifies the width of network –Complexity: in n 3 i-consistency –Dechter Figure 3.14 & 3.15 –Effect: adds constraints of arity i-1, modifies the arity of network –Complexity: in n i 7

Foundations of Constraint Processing More on Constraint Consistency Local Properties: Binary CSPs Classical ones –Arc, path, i, strong i, (i,j)-consistency More recently –Singleton Arc Consistency –Inverse Consistency –Neighborhood Inverse Consistency –(Conservative) Dual consistency Special Constraints 8

Foundations of Constraint Processing More on Constraint Consistency Singleton Arc Consistency (SAC) Property: The CSP is AC for every vvp (Sketchy) Algorithm Repeat until no change occurs Repeat for each variable Repeat for each value in domain Assign this value to this variable. If the CSP is AC, keep the value. Otherwise, remove it. Effect: domain filtering Note –Proposed by Debruyne & Bessière, IJCAI 97 –Quite expensive, but can be quite effective 9

Foundations of Constraint Processing More on Constraint Consistency Inverse Consistency Path Inverse Consistency (PIC) –Equivalent to (1,2)-consistency Inverse m-consistency –Equivalent to (1,m)-consistency Neighborhood Inverse Consistency (NIC) –Every vvp participates in a solution in the CSP induced by its neighborhood 10

Foundations of Constraint Processing More on Constraint Consistency Neighborhood Inverse Consistency (NIC): Algorithm Repeat until no change occurs Repeat for each variable Consider only the neighborhood of the variable Repeat for each value for the variable If the value appears in a complete solution for the neighborhood, then keep it. Otherwise, remove it. Effect: domain filtering Note –Proposed by Freuder & Elfe, AAAI 96 –Very effective, very expensive 11

Foundations of Constraint Processing More on Constraint Consistency Summary: Binary CSPs Arc, path, i-consistency (i,j)-consistency SAC PIC (1,m)-consistency NIC 12

Foundations of Constraint Processing More on Constraint Consistency Local Properties: Binary CSPs Classical ones –Arc, path, i, strong i, (i,j)-consistency More recently –Singleton Arc Consistency –Inverse Consistency –Neighborhood Inverse Consistency –(Conservative) Dual consistency –Conservative Path Consistency Debruyene ICTAI 99 Special Constraints 13

Foundations of Constraint Processing More on Constraint Consistency AC for Special Constraints [Van Hentenryck et al. AIJ 92] Specialized AC algorithms exist for special constraints Functional A constraint C is functional with respect to a domain D iff for all v  D (respectively w  D) there exists at most one w  D (respectively v  D) such that C(v,w) Anti-functional A constraint C is anti-functional with respect to a domain D iff  C is functional with respect to D Monotonic A constraint C is monotonic with respect to a domain D iff there exists a total ordering on D such that, for all v and w  D, C(v,w) holds implies C(v’,w)’ holds for all values all v’ and w’  D such that v’  v and w’  w 14

Foundations of Constraint Processing More on Constraint Consistency Outline 1.Global properties 2.Local properties –Binary CSPs –Non-Binary CSPs 3.Effects of Consistency Algorithms –Domain filtering –Constraint filtering –Constraint synthesis 4.Beyond finite, crisp CSPs –Continuous domains –Weighted CSPs 15

Foundations of Constraint Processing More on Constraint Consistency 16 How about Non-binary CSPs? (Almost) all properties (& algorithms) discussed so far were restricted to binary CSPs Consistency properties for non-binary CSPs are the topic of current research Mainly, properties and algorithms for: 1.Domain filtering techniques (a.k.a. domain reduction, domain propagation) Do not change ‘topology’ of network (width/arity) Do not modify constraints definitions 2.Relational m-consistency [Dechter, Chap 8] Add constraints/change constraint definitions

Foundations of Constraint Processing More on Constraint Consistency Non-Binary CSPs 1.Domain filtering –Generalized Arc Consistency (GAC) Dechter –Singleton Generalized Arc Consistency (SGAC) –maxRPWC, rPIC, RPWC, etc. [Bessiere et al., 08] 2.Relational consistency –(strong) Relational m-consistency Relational Arc-Consistency (R1C) Relational Path-Consistency (R2C) –Relational (i,m)-consistency i = 1, Relational (1,m)-consistency is a domain filtering technique i=1 and m=2, Relational (1,m)-consistency is known as rPIC –Relational (*,m)-consistency (m-wise consistency) 17

Foundations of Constraint Processing More on Constraint Consistency First introduced by [Mohr & Masini, ECAI 88] Every value in the domain of every variable has a support in every constraint in the problem In every constraint, every vvp participates in a consistent tuple (can be extended to all other variables in the scope of the constraint) 18 Generalized Arc-Consistency: Property

Foundations of Constraint Processing More on Constraint Consistency 19 Generalized Arc-Consistency: Algorithm1 (Sketchy) Algorithm –Project the constraint on each of the variables in its scope to tighten the domain of the variable. –As domains are filtered, filter the constraint –Repeat the above until quiescence When constraint is not defined in extension, GAC may be problematic (e.g., NP-hard in TCSP)

Foundations of Constraint Processing More on Constraint Consistency 20 Generalized Arc-Consistency: Algorithm2 Another (Sketchy) Algorithm –Iterate over every combination of a variable and a constraint where it appears (V x, C i ) –For every value for V x, identify a support for this value in C i, where a support is a tuple where all vvps in the tuple are alive –Repeat the above until quiescence Does not filter the constraints Check GAC2001 [Bessière et al., AIJ05] When constraint is not defined in extension, GAC may be problematic (e.g., NP-hard in TCSP)

Foundations of Constraint Processing More on Constraint Consistency SGAC Idea: Similar to SAC (Sketchy) Algorithm Repeat until quiescence For each vvp Assign the vvp; Enforce GAC on the CSP; If CSP is GAC, keep the vvp, else remove it Note –Costly in practice, but polynomial as long as GAC is polynomial –SGAC has been empirically shown to solve every known 9x9 Sudoku puzzle 21

Foundations of Constraint Processing More on Constraint Consistency 22 Relational Consistency Dechter generalizes consistency Dechter properties to non-binary constraints –Relational m-consistency Relational 1-consistency  relational arc-consistency Relational 2-consistency  relational path-consistency –Relational (i,m)-consistency Relational (1,1)consistency  GAC m-wise consistency (Databases) –Relational (*,m)-consistency

Foundations of Constraint Processing More on Constraint Consistency Relational 1-Consistency Dechter Def 8.1 Property –For every constraint C –Let k be the arity of C –Every consistent partial solution of length k-1 –Can be extended to a consistent partial solution of length k (Sketchy) Algorithm Dechter Equation (8.2), (8.3) –For each constraint C, generate all constraints of arity k-1 by Joining C with the domain of each variable x in scope of C and Projecting result on remaining variables (possibly intersecting with existing constraints) Effect: Adds a huge number of new constraints Complexity: polynomial in the largest scope 23

Foundations of Constraint Processing More on Constraint Consistency Relational 2-Consistency Dechter Def 8.2 Property –For every two constraint C 1 and C 2 –Let s = scope(C 1 )  scope(C 2 ) –Every consistent partial solution of length |s| -1 –Can be extended to a consistent partial solution of length |s| (Sketchy) Algorithm Dechter Equation (8.4) –For each constraints C 1 and C 2, generate all constraints of arity |s| -1 by Joining C1, C2, and the domain of a variable (in C1 and C2 ) and Projecting the result on remaining variables Effect: Adds a huge number of new constraints Complexity: polynomial in the largest |s| 24

Foundations of Constraint Processing More on Constraint Consistency Relational m-Consistency Dechter Def 8.3 Property –For every m constraints C 1, C 2,.., C m –Let s =  i  m scope(C i ) –Every consistent partial solution of length |s| -1 –Can be extended to a consistent partial solution of length |s| (Sketchy) Algorithm Dechter Equation (8.5) –For each m constraints, generate all constraints of arity |s| -1 by Joining the m constraints and the domain of a variable (at the intersection of their scopes) and Projecting the result on remaining variables Effect: Adds a huge number of new constraints Complexity: polynomial in the sum of largest 2 scopes 25

Foundations of Constraint Processing More on Constraint Consistency Relational (i,m)-Consistency Dechter Def 8.4 Property –For every m constraints C 1, C 2,.., C m –Let s =  i  m scope(C i ) –Every consistent partial solution of length i –Can be extended to a consistent partial solution of length |s| Algorithm Dechter Fig 8.1 –For each m constraints, generate all constraints of arity i by Joining the m constraints and the domain of a variable (at the intersection of their scopes) and Projecting the result on every combination of i variables Effect: Adds a huge number of new constraints, except for i=1 Complexity: exponential in s (largest union of scope of m constraints) in time and space 26

Foundations of Constraint Processing More on Constraint Consistency m-wise consistency Property –For every set of m constraints, –Every tuple in each constraint appears in a consistent solution to the m constraints –That is, each constraint is as tight as it can be for the set of m constraints (Sketchy) Algorithm Repeat until quiescence Join each set of m constraints Project it on each existing constraint to filter the constraint Effect: Filters the constraints, w/o introducing new constraints Note: –Defined in DB: pairwise consistency, relations join completely –Woodward defined R(*,m)C + new algorithms that are linear space, currently under evaluation 27

Foundations of Constraint Processing More on Constraint Consistency Summary: Non-Binary CSPs 1.Domain filtering –Generalized Arc Consistency (GAC) –Singleton Generalized Arc Consistency (SGAC) –maxRPWC, rPIC, RPWC, etc. [Bessiere et al., 08] 2.Relational consistency –(strong) Relational m-consistency Relational Arc-Consistency (R1C) Relational Path-Consistency (R2C) –Relational (i,m)-consistency i = 1, Relational (1,m)-consistency is a domain filtering technique i=1 and m=2, Relational (1,m)-consistency is known as rPIC –Relational (*,m)-consistency (m-wise consistency) 28

Foundations of Constraint Processing More on Constraint Consistency Outline 1.Global properties 2.Local properties –Binary CSPs –Non-Binary CSPs 3.Effects of Consistency Algorithms –Domain filtering –Constraint filtering –Constraint synthesis 4.Beyond finite, crisp CSPs –Continuous domains –Weighted CSPs 29

Foundations of Constraint Processing More on Constraint Consistency Effects of Consistency Algorithms Filter the domains –Old algorithms: AC-*, GAC-*, etc. –New algorithms: maxRPWC, R(1,m)C, etc. Filter the constraints –New algorithms: R(*,m)C Add new constraints to the problem –Old algorithms: PC-2, etc. –i-consistency (i > 2), (i,j)-C, RmC, R(i,m)C –Example: Solving the CSPs by Constraint Synthesis 30

Foundations of Constraint Processing More on Constraint Consistency 31 Solving CSPs by Constraint Synthesis [Freuder 78] From i =2 to i = n, – achieve i -consistency by using ( i -1)-arity constraints to synthesize i -arity constraints, – then use the i -ary constraints to filter constraints of arity i -1, i -2, etc. Process ends –with a unique n-ary constraint –whose tuples are all the solutions to the CSP

Foundations of Constraint Processing More on Constraint Consistency Outline 1.Global properties 2.Local properties –Binary CSPs –Non-Binary CSPs 3.Effects of Consistency Algorithms –Domain filtering –Constraint filtering –Constraint synthesis 4.Beyond finite, crisp CSPs –Continuous domains –Weighted CSPs 32

Foundations of Constraint Processing More on Constraint Consistency 33 Box Consistency (on interval constraints) Domains are (continuous) intervals –Historically also called: continuous CSPs, continuous domains Domains are infinite: –We cannot enumerate consistent values/tuples –[Davis, AIJ 87] (see recommended reading) showed that even AC may be incomplete or not terminate We apply consistency (usually, arc-consistency) on the boundaries of the interval Sometimes, domains are split, so that boundaries can be further filtered

Foundations of Constraint Processing More on Constraint Consistency Weighted CSPs –Tuples have weights in [0,m], m: intolerable cost –Costs are added a  b=min{m,a+b} Soft Arc Consistency (Cooper, de Givry, Schiex, etc.) –VAC: Virtual Arc Consistency –EDAC: Existential Directional Arc Consistency –OSAC: Optimal Soft Arc Consistency 34

Foundations of Constraint Processing More on Constraint Consistency Summary 1.Global properties 2.Local properties –Binary CSPs –Non-Binary CSPs 3.Effects of Consistency Algorithms –Domain filtering –Constraint filtering –Constraint synthesis 4.Beyond finite, crisp CSPs –Continuous domains –Weighted CSPs 35