Global Constraints Toby Walsh National ICT Australia and University of New South Wales www.cse.unsw.edu.au/~tw.

Slides:



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

Non-binary Constraints Toby Walsh
From Handbook of Temporal Reasoning in Artificial Intelligence By Jan Chomicki & David Toman Temporal Databases Presented by Leila Jalali CS224 presentation.
Global Constraints Toby Walsh National ICT Australia and University of New South Wales
Global Constraints Toby Walsh National ICT Australia and University of New South Wales
Global Constraints Toby Walsh National ICT Australia and University of New South Wales
Global Constraints Toby Walsh National ICT Australia and University of New South Wales
Global Constraints Toby Walsh National ICT Australia and University of New South Wales
Global Constraints Toby Walsh NICTA and University of New South Wales
Global Constraints Toby Walsh National ICT Australia and University of New South Wales
SE-292 High Performance Computing Memory Hierarchy R. Govindarajan
Global Constraints Toby Walsh National ICT Australia and University of New South Wales
Global Constraints Toby Walsh National ICT Australia and University of New South Wales
School on Optimization, Le Croisic, 23-24, March, Hybrid Constraint Solving in ECLiPSe: Framework and Applications Farid AJILI, IC-Parc, Imperial.
1 Finite Constraint Domains. 2 u Constraint satisfaction problems (CSP) u A backtracking solver u Node and arc consistency u Bounds consistency u Generalized.
Probabilistic Skyline Operator over Sliding Windows Wenjie Zhang University of New South Wales & NICTA, Australia Joint work: Xuemin Lin, Ying Zhang, Wei.
Justification-based TMSs (JTMS) JTMS utilizes 3 types of nodes, where each node is associated with an assertion: 1.Premises. Their justifications (provided.
© Imperial College London Eplex: Harnessing Mathematical Programming Solvers for Constraint Logic Programming Kish Shen and Joachim Schimpf IC-Parc.
Database Management Systems, R. Ramakrishnan and J. Gehrke1 The Relational Model Chapter 3.
Constraint Programming for Compiler Optimization March 2006.
Constraint Optimization Presentation by Nathan Stender Chapter 13 of Constraint Processing by Rina Dechter 3/25/20131Constraint Optimization.
Of 27 lecture 7: owl - introduction. of 27 ece 627, winter ‘132 OWL a glimpse OWL – Web Ontology Language describes classes, properties and relations.
1 Introduction to Computability Theory Lecture15: Reductions Prof. Amos Israeli.
1 Introduction to Computability Theory Lecture12: Reductions Prof. Amos Israeli.
1 Refining the Basic Constraint Propagation Algorithm Christian Bessière and Jean-Charles Régin Presented by Sricharan Modali.
An Approximation of Generalized Arc-Consistency for Temporal CSPs Lin Xu and Berthe Y. Choueiry Constraint Systems Laboratory Department of Computer Science.
Jean-Charles REGIN Michel RUEHER ILOG Sophia Antipolis Université de Nice – Sophia Antipolis A global constraint combining.
1 Relational Model. 2 Relational Database: Definitions  Relational database: a set of relations  Relation: made up of 2 parts: – Instance : a table,
Branch and Bound Algorithm for Solving Integer Linear Programming
26 April 2013Lecture 5: Constraint Propagation and Consistency Enforcement1 Constraint Propagation and Consistency Enforcement Jorge Cruz DI/FCT/UNL April.
Global Constraints for Lexicographic Orderings Alan Frisch, Ian Miguel (University of York) Brahim Hnich, Toby Walsh (4C) Zeynep Kiziltan (Uppsala University)
From Constraints to Finite Automata to Filtering Algorithms Mats Carlsson, SICS Nicolas Beldiceanu, EMN
Non-binary constraints Toby Walsh Cork Constraint Computation Center
Slide 1 CSPs: Arc Consistency & Domain Splitting Jim Little UBC CS 322 – Search 7 October 1, 2014 Textbook §
The Relational Model. Review Why use a DBMS? OS provides RAM and disk.
CP Summer School Modelling for Constraint Programming Barbara Smith 1.Definitions, Viewpoints, Constraints 2.Implied Constraints, Optimization,
Symmetry Breaking Ordering Constraints Zeynep Kiziltan Department of Information Science Uppsala University, Sweden A progress.
Topology aggregation and Multi-constraint QoS routing Presented by Almas Ansari.
Constraint Satisfaction Problems (CSPs) CPSC 322 – CSP 1 Poole & Mackworth textbook: Sections § Lecturer: Alan Mackworth September 28, 2012.
FALL 2004CENG 351 File Structures and Data Management1 Relational Model Chapter 3.
Keyword Searching and Browsing in Databases using BANKS Seoyoung Ahn Mar 3, 2005 The University of Texas at Arlington.
Computer Science CPSC 322 Lecture 13 Arc Consistency (4.5, 4.6 ) Slide 1.
Embedding Constraint Satisfaction using Parallel Soft-Core Processors on FPGAs Prasad Subramanian, Brandon Eames, Department of Electrical Engineering,
The AllDifferent Constraint: Efficiency Measures Ian P. Gent, Ian Miguel, Peter Nightingale.
Artificial Intelligence CS482, CS682, MW 1 – 2:15, SEM 201, MS 227 Prerequisites: 302, 365 Instructor: Sushil Louis,
CSE314 Database Systems Lecture 3 The Relational Data Model and Relational Database Constraints Doç. Dr. Mehmet Göktürk src: Elmasri & Navanthe 6E Pearson.
Constraints and Search Toby Walsh Cork Constraint Computation Centre (4C) Logic & AR Summer School, 2002.
Arc consistency AC5, AC2001, MAC. AC5 A generic arc-consistency algorithm and its specializations AIJ 57 (2-3) October 1992 P. Van Hentenryck, Y. Deville,
1 First order theories (Chapter 1, Sections 1.4 – 1.5) From the slides for the book “Decision procedures” by D.Kroening and O.Strichman.
Put a different number in each circle (1 to 8) such that adjacent circles cannot take consecutive numbers.
Introduction to Information Retrieval Introduction to Information Retrieval CS276 Information Retrieval and Web Search Chris Manning and Pandu Nayak Efficient.
Eliminating non- binary constraints Toby Walsh Cork Constraint Computation Center.
1 CS122A: Introduction to Data Management Lecture #4 (E-R  Relational Translation) Instructor: Chen Li.
Computer Science and Engineering Jianye Yang 1, Ying Zhang 2, Wenjie Zhang 1, Xuemin Lin 1 Influence based Cost Optimization on User Preference 1 The University.
Lecture 7: Constrained Conditional Models
Constraint Programming
Computer Science cpsc322, Lecture 13
Consistency Methods for Temporal Reasoning
Advanced Artificial Intelligence
Spatio-temporal Pattern Queries
Computer Science cpsc322, Lecture 13
Constraints and Search
More on Constraint Consistency
Introduction to Artificial Intelligence Lecture 9: Two-Player Games I
Constraints and Search
Constraint satisfaction problems
Chen Li Information and Computer Science
Domain Splitting CPSC 322 – CSP 4 Textbook §4.6 February 4, 2011.
PrePeak+ = PrePeak + ‘How Much’
Constraint satisfaction problems
Presentation transcript:

Global Constraints Toby Walsh National ICT Australia and University of New South Wales

Course outline ● Introduction ● All Different ● Lex ordering ● Value precedence ● Complexity ● GAC-Schema ● Soft Global Constraints ● Global Grammar Constraints ● Roots Constraint ● Range Constraint ● Slide Constraint ● Global Constraints on Sets

GAC Schema ● Not all global constraints have nice semantics we can exploit to devise an efficient propagator ● Consider product configuration – Compatibility constraints on hardware components – Only certain combinations of components work together – Compatibility may not be a simple pairwise relationship ● Video cards supported function of motherboard, CPU, clock speed, O/S..

GAC Schema 5-ary global constraint: –Compatible(motherboard345,intelCPU,2GHz,1GBRam,8 0GBdrive) –Compatible(motherboard346,intelCPU,3GHz,2GBRam,1 00GBdrive) –Compatible(motherboard346,amdCPU,2GHz,2GBRam,1 00GBdrive) –…

Crossword puzzle Word([X1,X2,X3,X4]) Word([X2,X15,X17]) … No simple way to decide acceptable words other than to put them in a table

GAC schema ● Generic propagator – Enforces GAC on global constraint given by ● Set of allowed tuples OR ● Set of disallowed tuples OR ● Predicate answering if a constraint is satisfied or not ●.. – Sometimes called the “table” constraint (e.g. user supplies table of acceptable values)

GAC-Schema ● Bessiere and Regin, IJCAI’97 ● You just have to say how to compute a solution. ● Works incrementally (notion of support) – Keeps supports found to save re-finding them – Exploits multi-directionality ● If we find support for X=a and this contains Y=b ● Then we automatically have a support for Y=b

GAC-Schema ● Idea: tuple = solution of the constraint support = valid tuple - while the tuple remains: do nothing - if the tuple is no longer possible, then search for a new support for the values it contains ● a solution (support) can be computed by any algorithm

Example ● X(C)={x1,x2,x3} D(xi)={a,b} ● T(C)={(a,a,a),(a,b,b),(b,b,a),(b,b,b)}

Example ● X(C)={x1,x2,x3} D(xi)={a,b} ● T(C)={(a,a,a),(a,b,b),(b,b,a),(b,b,b)} ● Support for (x1,a): (a,a,a) is computed and (a,a,a) is added to S(x2,a) and S(x3,a), (x1,a) in (a,a,a) is marked as supported.

Example ● X(C)={x1,x2,x3} D(xi)={a,b} ● T(C)={(a,a,a),(a,b,b),(b,b,a),(b,b,b)} ● Support for (x1,a): (a,a,a) is computed and (a,a,a) is added to S(x2,a) and S(x3,a), (x1,a) in (a,a,a) is marked as supported. ● Support for (x2,a): (a,a,a) is in S(x2,a) it is valid, therefore it is a support. (Multidirectionnality). No need to compute a solution

Example ● X(C)={x1,x2,x3} D(xi)={a,b} ● T(C)={(a,a,a),(a,b,b),(b,b,a),(b,b,b)} ● Support for (x1,a): (a,a,a) is computed and (a,a,a) is added to S(x2,a) and S(x3,a), (x1,a) in (a,a,a) is marked as supported. ● Value a is removed from x1, then all the tuples in S(x1,a) are no longer valid: (a,a,a) for instance. The validity of the values supported by this tuple must be reconsidered.

Example ● X(C)={x1,x2,x3} D(xi)={a,b} ● T(C)={(a,a,a),(a,b,b),(b,b,a),(b,b,b)} ● Support for (x1,a): (a,a,a) is computed and (a,a,a) is added to S(x2,a) and S(x3,a), (x1,a) in (a,a,a) is marked as supported. ● Support for (x1,b): (b,b,a) is computed, and updated...

GAC-Schema: complexity ● In worst case, GAC schema enforces GAC in – O(d^k) time and – O(k^2d) space ● Hence, k cannot be too large! – ILOG Solver limits it to 3 or so – Recall want local consistency to be O(d^2) or less – Hence all this work on specialized propagators that exploit the constraint semantics to be faster than O(d^k) for k>3

Exploiting constraint semantics ● Speed-up the search for a support

Exploiting constraint semantics ● Speed-up the search for a support ● x < y, D(x)=[ ], D(y)=[ ] – support for (x,9000) – immediate any value greater than 9000 in D(y)

Semantics of a constraint ● Design of an ad-hoc filtering algorithm: x < y : ● Two invariants (a)max(x) = max(y) -1 (b)min(y) = min(x) +1

Exploiting constraint semantics ● Design of an ad-hoc filtering algorithm: x < y : ● Two invariants (a)max(x) = max(y) -1 (b)min(y) = min(x) +1 ● Triggering of the filtering algorithm: no possible pruning of D(x) while max(y) is not modified no possible pruning of D(y) while min(x) is not modified

Building constraint propagators ● When to wake constraint? – Only want this to happen when it is likely to prune ● When any domain changes? ● When upper bound changes? ● … ● When is a constraint no longer useful? – If a constraint is logically entailed, it can no longer prune – Never want it to wake up – Set flag and ignore till backtrack out of this point

Building constraint propagators ● How to avoid re-doing work? – When constraint re-awakes, how do we re-build all the data structures it needs – Remember the network flow for the GCC constraint or the Hall intervals in the AllDifferent constraint – Remember the pointers used in the LEX constraint to avoid re-traversing the vectors

Conclusions ● GAC Schema is a generic propagator for global constraints – Useful when constraints lacks any special semantics we can exploit – Time complexity is O(d^k) in general where k is the constraint arity – Only useful than for relatively small k – Useful nevertheless for product configuration and other real world domans