26 April 2013Lecture 5: Constraint Propagation and Consistency Enforcement1 Constraint Propagation and Consistency Enforcement Jorge Cruz DI/FCT/UNL April.

Slides:



Advertisements
Similar presentations
Constraint Satisfaction Problems
Advertisements

Non-Binary Constraint Satisfaction Toby Walsh Cork Constraint Computation Center.
Constraint Satisfaction Problems Russell and Norvig: Chapter
Interactive Configuration
1 Constraint Satisfaction Problems A Quick Overview (based on AIMA book slides)
This lecture topic (two lectures) Chapter 6.1 – 6.4, except 6.3.3
1 Finite Constraint Domains. 2 u Constraint satisfaction problems (CSP) u A backtracking solver u Node and arc consistency u Bounds consistency u Generalized.
Artificial Intelligence Constraint satisfaction problems Fall 2008 professor: Luigi Ceccaroni.
1 Constraint operations: Simplification, Optimization and Implication.
1 Chapter 2: Simplification, Optimization and Implication Where we learn more fun things we can do with constraints.
Constraint Optimization Presentation by Nathan Stender Chapter 13 of Constraint Processing by Rina Dechter 3/25/20131Constraint Optimization.
Foundations of Constraint Processing More on Constraint Consistency 1 Foundations of Constraint Processing CSCE421/821, Spring
CPSC 322, Lecture 13Slide 1 CSPs: Arc Consistency & Domain Splitting Computer Science cpsc322, Lecture 13 (Textbook Chpt 4.5,4.6) February, 01, 2010.
Foundations of Data-Flow Analysis. Basic Questions Under what circumstances is the iterative algorithm used in the data-flow analysis correct? How precise.
1 Basic abstract interpretation theory. 2 The general idea §a semantics l any definition style, from a denotational definition to a detailed interpreter.
19 April 2013Lecture 4: Associating Narrowing Functions to Constraints1 Associating Narrowing Functions to Constraints Jorge Cruz DI/FCT/UNL April 2013.
1 Refining the Basic Constraint Propagation Algorithm Christian Bessière and Jean-Charles Régin Presented by Sricharan Modali.
Constraint Logic Programming Ryan Kinworthy. Overview Introduction Logic Programming LP as a constraint programming language Constraint Logic Programming.
19 April 2013Lecture 3: Interval Newton Method1 Interval Newton Method Jorge Cruz DI/FCT/UNL April 2013.
Anagh Lal Monday, April 14, Chapter 9 – Tree Decomposition Methods Anagh Lal CSCE Advanced Constraint Processing.
1 Optimisation Although Constraint Logic Programming is somehow focussed in constraint satisfaction (closer to a “logical” view), constraint optimisation.
CPSC 322, Lecture 12Slide 1 CSPs: Search and Arc Consistency Computer Science cpsc322, Lecture 12 (Textbook Chpt ) January, 29, 2010.
 i may require adding new constraints, except for… o i =1  domain filtering o i =   constraint filtering Robert Woodward & Berthe Y. Choueiry Constraint.
Ryan Kinworthy 2/26/20031 Chapter 7- Local Search part 1 Ryan Kinworthy CSCE Advanced Constraint Processing.
Constraint Satisfaction Problems
12 April 2013Lecture 2: Intervals, Interval Arithmetic and Interval Functions1 Intervals, Interval Arithmetic and Interval Functions Jorge Cruz DI/FCT/UNL.
1 On the Integration of Constraint Propagation and Local Search Pedro Barahona Department of Computer Science Faculty of Science and Technology New University.
Jean-Charles REGIN Michel RUEHER ILOG Sophia Antipolis Université de Nice – Sophia Antipolis A global constraint combining.
12 April 2013Lecture 1: Interval Constraints Overview1 Interval Constraints Overview Jorge Cruz DI/FCT/UNL April 2013.
M. HardojoFriday, February 14, 2003 Directional Consistency Dechter, Chapter 4 1.Section 4.4: Width vs. Local Consistency Width-1 problems: DAC Width-2.
Data Flow Analysis Compiler Design Nov. 8, 2005.
Branch and Bound Algorithm for Solving Integer Linear Programming
Chapter 5 Outline Formal definition of CSP CSP Examples
From Constraints to Finite Automata to Filtering Algorithms Mats Carlsson, SICS Nicolas Beldiceanu, EMN
©2003/04 Alessandro Bogliolo Background Information theory Probability theory Algorithms.
Constraint Satisfaction Problems
1 Constraint Programming: An Introduction Adapted by Cristian OLIVA from Peter Stuckey (1998) Ho Chi Minh City.
Slide 1 CSPs: Arc Consistency & Domain Splitting Jim Little UBC CS 322 – Search 7 October 1, 2014 Textbook §
CP Summer School Modelling for Constraint Programming Barbara Smith 1.Definitions, Viewpoints, Constraints 2.Implied Constraints, Optimization,
Relaxation and Hybrid constraint processing Different relaxation techniques Some popular hybrid techniques.
1 2. Independence and Bernoulli Trials Independence: Events A and B are independent if It is easy to show that A, B independent implies are all independent.
Computation of Limit Cycles for Uncertain Nonlinear Fractional-order Systems using Interval Constraint Propagation P. S. V. Nataraj & Rambabu Kalla Systems.
Constraint Satisfaction Problems (CSPs) CPSC 322 – CSP 1 Poole & Mackworth textbook: Sections § Lecturer: Alan Mackworth September 28, 2012.
Hande ÇAKIN IES 503 TERM PROJECT CONSTRAINT SATISFACTION PROBLEMS.
Artificial Intelligence CS482, CS682, MW 1 – 2:15, SEM 201, MS 227 Prerequisites: 302, 365 Instructor: Sushil Louis,
Chapter 5: Constraint Satisfaction ICS 171 Fall 2006.
A Logic of Partially Satisfied Constraints Nic Wilson Cork Constraint Computation Centre Computer Science, UCC.
1 Constraint Reasoning for Differential Models Jorge Cruz CENTRIA - Centre for Artificial Intelligence DI/FCT/UNL June 2009.
I T & S A e r o s p a c eD e f e n c e Integration of a Multicriteria Decision Model in Constraint Programming F. Le Huédé M. Grabisch C. Labreuche P.
Review Test1. Robotics & Future Technology Future of Intelligent Systems / Ray Kurzweil futurist Ray Kurzweil / A Long Bet A Long Bet / Robot Soccer.
Chapter 2) CSP solving-An overview Overview of CSP solving techniques: problem reduction, search and solution synthesis Analyses of the characteristics.
Constraint Propagation influenced by Dr. Rina Dechter, “Constraint Processing”
Optimization in Engineering Design 1 Introduction to Non-Linear Optimization.
Common Intersection of Half-Planes in R 2 2 PROBLEM (Common Intersection of half- planes in R 2 ) Given n half-planes H 1, H 2,..., H n in R 2 compute.
1 Chapter 5 Branch-and-bound Framework and Its Applications.
Applied Discrete Mathematics Week 2: Functions and Sequences
CSPs: Search and Arc Consistency Computer Science cpsc322, Lecture 12
Computer Science cpsc322, Lecture 13
Consistency Methods for Temporal Reasoning
CSPs: Search and Arc Consistency Computer Science cpsc322, Lecture 12
Empirical Comparison of Preprocessing and Lookahead Techniques for Binary Constraint Satisfaction Problems Zheying Jane Yang & Berthe Y. Choueiry Constraint.
CSPs: Search and Arc Consistency Computer Science cpsc322, Lecture 12
Computer Science cpsc322, Lecture 13
Polyhedron Here, we derive a representation of polyhedron and see the properties of the generators. We also see how to identify the generators. The results.
Chap 3. The simplex method
Objective of This Course
Polyhedron Here, we derive a representation of polyhedron and see the properties of the generators. We also see how to identify the generators. The results.
Advanced consistency methods Chapter 8
Multidisciplinary Optimization
Presentation transcript:

26 April 2013Lecture 5: Constraint Propagation and Consistency Enforcement1 Constraint Propagation and Consistency Enforcement Jorge Cruz DI/FCT/UNL April 2013

Lecture 5: Constraint Propagation and Consistency Enforcement2 Constraint Propagation and Consistency Enforcement Fixed-Points of Narrowing Functions Narrowing Functions and their Properties Constraint Propagation Contraction Obtained by Applying a Narrowing Function Constraint Propagation Algorithm and its Properties Consistency Enforcement Box-Consistency Hull-Consistency Arc-Consistency and Interval-Consistency Local Consistency and Higher Order Consistencies 26 April 2013

Lecture 5: Constraint Propagation and Consistency Enforcement3 Constraint Propagation The propagation process is a successive reduction of variables domains by successive application of narrowing functions associated with the constraints of the CCSP The properties of the propagation algorithm are derived from the properties of the narrowing functions used for pruning the domains Narrowing Functions and their Properties A narrowing function must be able to narrow the domains (contractance) without loosing solutions (correctness) 26 April 2013

Lecture 5: Constraint Propagation and Consistency Enforcement4 Constraint Propagation Monotonicity and Idempotency are additional properties common to most of the narrowing functions used in interval constraints Narrowing Functions and their Properties 26 April 2013

Lecture 5: Constraint Propagation and Consistency Enforcement5 Constraint Propagation An important concept related with the narrowing functions is the notion of a fixed point Fixed-Points of Narrowing Functions The union of all fixed ‑ points of a monotonic narrowing function within A is a fixed ‑ point which is the greatest fixed ‑ point within A 26 April 2013

Lecture 5: Constraint Propagation and Consistency Enforcement6 Constraint Propagation The contraction resulting from applying a monotonic narrowing function to A is limited by the greatest fixed ‑ point within A: Contraction Obtained by Applying a Narrowing Function No value combination included in the greatest fixed ‑ point may be discarded in the contraction If the monotonic narrowing function is idempotent, the result of the contraction is precisely the greatest fixed-point within A 26 April 2013

Lecture 5: Constraint Propagation and Consistency Enforcement7 Constraint Propagation The propagation algorithm applies successively each narrowing function until a fixed-point is attained: Constraint Propagation Algorithm and its Properties The algorithm is an adaptation of the original propagation algorithm AC3 used for solving CSPs with finite domains 26 April 2013

Lecture 5: Constraint Propagation and Consistency Enforcement8 Constraint Propagation From the properties of the narrowing functions it is possible to prove that the propagation algorithm terminates and is correct Constraint Propagation Algorithm and its Properties If all the narrowing functions are monotonic then it is confluent (the result is independent from the selection criteria) and computes the greatest common fixed ‑ point included in the initial domains The selection criterion is irrelevant for the pruning obtained but it may be very important for the efficiency of the propagation 26 April 2013

Lecture 5: Constraint Propagation and Consistency Enforcement9 Consistency Enforcement The fixed-points of the narrowing functions associated with a constraint characterize a local property enforced on its variables Such property is called local consistency: depends only on the narrowing functions associated with one constraint (local) defines the value combinations that are not pruned by them (consistent) Local consistency is a partial consistency: imposing it on a CCSP is not sufficient to remove all inconsistent value combinations among its variables Stronger higher order consistency requirements may then be imposed establishing global properties over the variable domains 26 April 2013

Lecture 5: Constraint Propagation and Consistency Enforcement10 Consistency Enforcement A constraint is said to be arc-consistent wrt a set of value combinations iff, within this set, for each value of each variable there is a value combination that satisfy the constraint: Arc-Consistency and Interval-Consistency Local consistencies used for solving CCSPs are approximations of arc ‑ consistency, developed for solving CSPs with finite domains 26 April 2013

Lecture 5: Constraint Propagation and Consistency Enforcement11 Consistency Enforcement Example B is not arc-consistent (ex: if x 1 =0.25 there is no value for x 2 to satisfy c) x 2 x 1 x 1 = 0 x 1 =x  x 1  (B ) = {0}  [0.5,1.0]  x 2  (B) = [ ] c  x 1  (x 2 -x 1 ) = 0 P= (X,D,C) = (<x 1,x 2 >,D 1  D 2,{c}) D 1 =[-1..3] D 2 =[ ] B =<[ ],[ ]>  = { <x 1,x 2 >  D |x 1  (x 2 -x 1 ) = 0 } c= (<x 1,x 2 >,  ) B B= A=  A is arc-consistent (  x 1  (A)=A[x 1 ] and  x 2  (A)=A[x 2 ]) 26 April 2013

Lecture 5: Constraint Propagation and Consistency Enforcement12 Consistency Enforcement A constraint is interval-consistent wrt a set of value combinations iff for each canonical F ‑ interval representing a variable sub- domain there is a value combination satisfying the constraint Arc-Consistency and Interval-Consistency In continuous domains, arc-consistency cannot be obtained in general due to machine limitations for representing real numbers The best approximation of arc-consistency wrt a set of real valued combinations is the set approximation of each variable domain 26 April 2013

Lecture 5: Constraint Propagation and Consistency Enforcement13 Consistency Enforcement Example B is not interval-consistent (if x 1  [0.250,0.251] there is no x 2 satisfying c) x 2 x 1 x 1 = 0 x 1 =x  x 1  (B ) = {0}  [0.5,1.0]  x 2  (B) = [ ] c  x 1  (x 2 -x 1 ) = 0 P= (X,D,C) = (<x 1,x 2 >,D 1  D 2,{c}) D 1 =[-1..3] D 2 =[ ] B =<[ ],[ ]>  = { <x 1,x 2 >  D |x 1  (x 2 -x 1 ) = 0 } c= (<x 1,x 2 >,  ) B B= A=  A is interval-consistent (S apx (  x 1  (A))=A[x 1 ] and S apx (  x 2  (A))=A[x 2 ]) 26 April 2013

Lecture 5: Constraint Propagation and Consistency Enforcement14 Consistency Enforcement In practice, the enforcement of interval-consistency can be applied only to small problems: the number of non ‑ contiguous F-intervals may grow exponentially, requiring an unreasonably number of computations for each narrowing function. Arc-Consistency and Interval-Consistency Interval-consistency can only be enforced on primitive constraints where the set approximation of the projection function can be obtained using extended interval arithmetic Structures (not F-intervals) must be considered for representing each variable domain as a non-compact set of real values The approximations of arc ‑ consistency most widely used in continuous domains assume the convexity of the variable domains, in order to represent them by single F-intervals 26 April 2013

Lecture 5: Constraint Propagation and Consistency Enforcement15 Consistency Enforcement Hull-Consistency Hull-consistency (or 2B-consistency) requires the satisfaction of the arc-consistency property only at the bounds of the F-intervals that represent the variable domains A constraint is said to be hull-consistent wrt an F-box iff, for each bound of the F ‑ interval representing the domain of a variable there is a value combination satisfying the constraint: 26 April 2013

Lecture 5: Constraint Propagation and Consistency Enforcement16 Consistency Enforcement Example B is not hull-consistent (if x 1  [-0.5,-0.499] there is no x 2 satisfying c) x 2 x 1 x 1 = 0 x 1 =x  x 1  (B ) = {0}  [0.5,1.0]  x 2  (B) = [ ] c  x 1  (x 2 -x 1 ) = 0 P= (X,D,C) = (<x 1,x 2 >,D 1  D 2,{c}) D 1 =[-1..3] D 2 =[ ] B =<[ ],[ ]>  = { <x 1,x 2 >  D |x 1  (x 2 -x 1 ) = 0 } c= (<x 1,x 2 >,  ) B B= A= A is hull-consistent (I hull (  x 1  (A))=A[x 1 ] and I hull (  x 2  (A))=A[x 2 ]) 26 April 2013

Lecture 5: Constraint Propagation and Consistency Enforcement17 Consistency Enforcement Hull-Consistency Hull-consistency can only be enforced on primitive constraints where the hull approximation of the projection function can be obtained using extended interval arithmetic and union hull operations to avoid multiple disjoint F-intervals The major drawback of any decomposition approach is the worsening of the dependency problem: the satisfaction of a local property on each constraint does not imply the existence of value combinations satisfying simultaneously all of them Hull-consistency enforcement is particularly ineffective if the original constraints contain multiple occurrences of variables 26 April 2013

Lecture 5: Constraint Propagation and Consistency Enforcement18 Consistency Enforcement Box-Consistency The drawbacks of the decomposition approach motivated the constraint Newton method, which can be applied directly to complex constraints A constraint is said to be box-consistent wrt an F-box iff, for each bound of the F ‑ interval representing the domain of a variable there is a box (bound+other F-intervals) that satisfies the interval projection condition: 26 April 2013

Lecture 5: Constraint Propagation and Consistency Enforcement19 Consistency Enforcement Example B is not box-consistent (0  [ ‑ 0.5, ‑ 0.499]  ([0.5,1.5]-[ ‑ 0.5, ‑ 0.499])=[-1,-0.498]) x 2 x 1 x 1 = 0 x 1 =x  x 1  (B ) = {0}  [0.5,1.0]  x 2  (B) = [ ] c  x 1  (x 2 -x 1 ) = 0 P= (X,D,C) = (<x 1,x 2 >,D 1  D 2,{c}) D 1 =[-1..3] D 2 =[ ] B =<[ ],[ ]>  = { <x 1,x 2 >  D |x 1  (x 2 -x 1 ) = 0 } c= (<x 1,x 2 >,  ) B B= A= A is box-consistent: 0  [ ]  ([ ]-[ ]) and 0  [ ]  ([ ]-[ ]) 0  [0..1.5]  ([ ]-[0..1.5]) and 0  [0..1.5]  ([ ]-[0..1.5]) 26 April 2013

Lecture 5: Constraint Propagation and Consistency Enforcement20 Consistency Enforcement Box-Consistency Although box-consistency is weaker than hull-consistency for the same constraint, the enforcement of box-consistency may achieve better pruning since it may be directly applied to complex constraints For primitive constraints box-consistency and hull-consistency are equivalent (with infinite precision) For complex constraints box-consistency is stronger than hull- consistency applied on the primitive constraints obtained by decomposition 26 April 2013

Lecture 5: Constraint Propagation and Consistency Enforcement21 Consistency Enforcement Generalising the concept of local consistency from a constraint to the set of constraints: a CCSP is locally consistent (interval, hull or box-consistent) wrt a set A of real valued combinations iff all its constraints are locally consistent wrt A Since the propagation algorithm obtains the greatest common fixed-point (of the monotonic narrowing functions) included in the original domains, then applying it to a set A results in the largest subset A’  A for which each constraint is locally consistent. Local Consistency and Higher Order Consistencies 26 April 2013

Lecture 5: Constraint Propagation and Consistency Enforcement22 Consistency Enforcement When only local consistency techniques are applied to non-trivial problems the achieved reduction of the search space is often poor Local Consistency and Higher Order Consistencies c1x12+x22220c1x12+x22220c 2  (x 1  1) 2 +(x 2  1) 2   April 2013

Lecture 5: Constraint Propagation and Consistency Enforcement23 Consistency Enforcement Better pruning of the variable domains may be achieved if, complementary to a local property, some (global) properties are also enforced on the overall constraint set Higher order consistency types used in continuous domains are approximations of strong k ‑ consistency (with k>2) restricted to the bounds of the variable domains: Local Consistency and Higher Order Consistencies A CSP is k ‑ consistent (k  2) iff any consistent instantiation of k-1 variables can be extended by instantiating any of the remaining variables. A CSP is strongly k ‑ consistent if it is i ‑ consistent for all i  k. Strong 2 ‑ consistency corresponds to arc-consistency and hull ‑ consistency is an approximation of strong 2 ‑ consistency restricted to the bounds of the variable domains 26 April 2013

Lecture 5: Constraint Propagation and Consistency Enforcement24 Consistency Enforcement 3B ‑ consistency and Bound-consistency, are generalisations of hull and box ‑ consistency respectively: if the domain of one variable is reduced to one of its bounds then the obtained F-box must contain a sub-box for which the CCSP is locally consistent. Local Consistency and Higher Order Consistencies The following is a generic definition for the consistency types used in continuous domains (local consistency is just a special case with k=2) : 26 April 2013

Lecture 5: Constraint Propagation and Consistency Enforcement25 Consistency Enforcement The algorithms to enforce higher order consistencies interleave constraint propagation with search techniques Local Consistency and Higher Order Consistencies The growth in computational cost of the enforcing algorithm limits the practical applicability of such criteria Function kB-consistency when applied to an F-box B returns: the largest kB-Consistent F ‑ box within B or; the empty set if it is proved that there is no such box. 26 April 2013

Lecture 5: Constraint Propagation and Consistency Enforcement26 Consistency Enforcement Local Consistency and Higher Order Consistencies The main function kB-consistency uses an auxiliary function with the same name but an extra parameter (size) This auxiliary function computes the largest F ‑ box within F ‑ box B with the following property: if the domain of one variable is reduced to its leftmost/rightmost subinterval (with width not exceeding size) then the obtained F-box must contain a sub-box for which the CCSP is (k ‑ 1)B-Consistent Therefore, when size is small enough to force such subintervals to be canonical, the auxiliary function computes the largest kB-Consistent F ‑ box within B 26 April 2013

Lecture 5: Constraint Propagation and Consistency Enforcement27 Consistency Enforcement The auxiliary kB-consistency function calls the propagation algorithm if local consistency is all that is required. Otherwise, all 2n bounds of the n variables must be narrowed (fixed) in a round robin fashion until kB(size)-Consistency is achieved 26 April 2013

Lecture 5: Constraint Propagation and Consistency Enforcement28 Consistency Enforcement 26 April 2013

Lecture 5: Constraint Propagation and Consistency Enforcement29 Consistency Enforcement Local Consistency and Higher Order Consistencies All the consistency criteria used in continuous domains, either local or higher order consistencies, are partial consistencies The adequacy of a partial consistency for a particular CCSP must be evaluated taking into account the trade-off between the pruning it achieves and its execution time It is necessary to be aware that the filtering process is performed within a larger procedure for solving the CCSP and it may be globally advantageous to obtain faster, if less accurate, results 26 April 2013