Consistency & Propagation with Multiset Constraints Toby Walsh 4C, UCC & Uppsala.

Slides:



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

Non-binary Constraints Toby Walsh
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
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
Interactive Configuration
Introduction. IC-Parc2 ECLiPSe Components Constraint Logic Programming system, consisting of  A runtime core Data-driven computation, backtracking, garbage.
1 Finite Constraint Domains. 2 u Constraint satisfaction problems (CSP) u A backtracking solver u Node and arc consistency u Bounds consistency u Generalized.
Non-binary constraints: modelling Toby Walsh Cork Constraint Computation Center.
Constraint Optimization Presentation by Nathan Stender Chapter 13 of Constraint Processing by Rina Dechter 3/25/20131Constraint Optimization.
Parallel Scheduling of Complex DAGs under Uncertainty Grzegorz Malewicz.
Non-binary constraints Toby Walsh Dept of CS University of York England.
Discrete Structures & Algorithms More Counting. + + ( ) + ( ) = ? Counting II: Recurring Problems and Correspondences.
Chapter 7 Relations : the second time around
Transforming and Refining Abstract Constraint Specifications Alan Frisch, Brahim Hnich*, Ian Miguel, Barbara Smith, and Toby Walsh *Cork Constraint Computation.
1 Basic abstract interpretation theory. 2 The general idea §a semantics l any definition style, from a denotational definition to a detailed interpreter.
Counting II: Recurring Problems And Correspondences Great Theoretical Ideas In Computer Science Steven RudichCS Spring 2004 Lecture 10Feb 12, 2004Carnegie.
CGRASS A System for Transforming Constraint Satisfaction Problems Alan Frisch, Ian Miguel AI Group University of York Toby Walsh 4C.
Discrete Mathematics Lecture 4 Harper Langston New York University.
From last time: reaching definitions For each use of a variable, determine what assignments could have set the value being read from the variable Information.
Jean-Charles REGIN Michel RUEHER ILOG Sophia Antipolis Université de Nice – Sophia Antipolis A global constraint combining.
Data Flow Analysis Compiler Design October 5, 2004 These slides live on the Web. I obtained them from Jeff Foster and he said that he obtained.
Data Flow Analysis Compiler Design Nov. 8, 2005.
Soft constraints. Classical (hard) Constraints Variables {X 1,…,X n }=X Variables {X 1,…,X n }=X Domains {D(X 1 ),…,D(X n )}=D Domains {D(X 1 ),…,D(X.
Two Set-Constraints For Modeling and Efficiency Willem-Jan van HoeveAshish Sabharwal Carnegie Mellon Univ.Cornell Univ. ModRef workshop at CP-07 Sept 23,
CGRASS A System for Transforming Constraint Satisfaction Problems Alan Frisch, Ian Miguel (York) Toby Walsh (Cork)
Chapter 5 Outline Formal definition of CSP CSP Examples
Global Constraints for Lexicographic Orderings Alan Frisch, Ian Miguel (University of York) Brahim Hnich, Toby Walsh (4C) Zeynep Kiziltan (Uppsala University)
CSC 8310 Programming Languages Meeting 2 September 2/3, 2014.
From Constraints to Finite Automata to Filtering Algorithms Mats Carlsson, SICS Nicolas Beldiceanu, EMN
©2003/04 Alessandro Bogliolo Background Information theory Probability theory Algorithms.
1 Constraint Programming: An Introduction Adapted by Cristian OLIVA from Peter Stuckey (1998) Ho Chi Minh City.
Abstract Interpretation (Cousot, Cousot 1977) also known as Data-Flow Analysis.
Solving fixpoint equations
CP Summer School Modelling for Constraint Programming Barbara Smith 1.Definitions, Viewpoints, Constraints 2.Implied Constraints, Optimization,
A Z Approach in Validating ORA-SS Data Models Scott Uk-Jin Lee Jing Sun Gillian Dobbie Yuan Fang Li.
Symmetry Breaking Ordering Constraints Zeynep Kiziltan Department of Information Science Uppsala University, Sweden A progress.
Introduction to Job Shop Scheduling Problem Qianjun Xu Oct. 30, 2001.
On Algorithms for Decomposable Constraints Kostas Stergiou Ian Gent, Patrick Prosser, Toby Walsh A.P.E.S. Research Group.
Discrete Mathematics for Computer Science. + + ( ) + ( ) = ? Counting II: Recurring Problems and Correspondences Chapter 9 slides 1-54.
Chapter 5: Constraint Satisfaction ICS 171 Fall 2006.
CP Summer School Modelling for Constraint Programming Barbara Smith 4. Combining Viewpoints, Modelling Advice.
© Kenneth C. Louden, Chapter 11 - Functional Programming, Part III: Theory Programming Languages: Principles and Practice, 2nd Ed. Kenneth C. Louden.
A Logic of Partially Satisfied Constraints Nic Wilson Cork Constraint Computation Centre Computer Science, UCC.
Chapter 5 Constraint Satisfaction Problems
1 Mean Field and Variational Methods finishing off Graphical Models – Carlos Guestrin Carnegie Mellon University November 5 th, 2008 Readings: K&F:
Constraints and Search Toby Walsh Cork Constraint Computation Centre (4C) Logic & AR Summer School, 2002.
1 Chapter 3: Finite Constraint Domains Where we meet the simplest and yet most difficult constraints, and some clever and not so clever ways to solve them.
Implicit Hitting Set Problems Richard M. Karp Erick Moreno Centeno DIMACS 20 th Anniversary.
CP Summer School Modelling for Constraint Programming Barbara Smith 3. Symmetry, Viewpoints.
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,
Counting II: Recurring Problems And Correspondences Great Theoretical Ideas In Computer Science John LaffertyCS Fall 2005 Lecture 7Sept 20, 2005Carnegie.
Eliminating non- binary constraints Toby Walsh Cork Constraint Computation Center.
Infinite sets We say that a set A is infinite if a proper subset B exists of A such that there is a bijection It is easy to see that no set with a finite.
Constraint Programming
Constraint Satisfaction
ICS 353: Design and Analysis of Algorithms
Mixture of Mutually Exciting Processes for Viral Diffusion
Constraints and Search
Unification Algorithm ChuChen
Data Flow Analysis Compiler Design
Lecture 20: Dataflow Analysis Frameworks 11 Mar 02
Chapter 3: Finite Constraint Domains
Readings: K&F: 5.1, 5.2, 5.3, 5.4, 5.5, 5.6, 5.7 Markov networks, Factor graphs, and an unified view Start approximate inference If we are lucky… Graphical.
Background material.
Counting II: Recurring Problems And Correspondences
Presentation transcript:

Consistency & Propagation with Multiset Constraints Toby Walsh 4C, UCC & Uppsala

Outline Multiset vars vars which take a multiset (or bag) of values Representing multiset vars Consistency of multiset vars Global constraints over multiset vars Conclusions

Multiset variables Assigned a multiset or bag of values Useful in design & configuration E.g. template design (prob002 in CSPLib) Multiset of labels on each printing template: {{tuna, tuna, tuna, chicken, liver, liver}}

Multiset variables Assigned a multiset or bag of values Useful in design & configuration E.g. ILOG’s Configurator Multiset of components in home cinema system: {{plasma screen, DVD, amplifier, speaker, speaker, speaker, speaker, woofer}}

Representing multiset vars Naïve, explicit representation Finite domain of all possible multisets BUT exponential More compact (but less expressive) Bounds Occurrences Fixed cardinality

Bounds representation Upper and lower bounds on multiset Lower bound = must contain Upper bound = can contain E.g lb is {{DVD, speaker, speaker}} ub is {{DVD, plasma, TV, satellite dish, amplifier, speaker, speaker, speaker, speaker, woofer}} Similar bounds representation used for set vars in [Gervet 97]

Occurrence representation Integer variable representing #occurrences of each value E.g. DVD = {1}, Plasma={0,1}, Speaker={2,3,4}, Woofer={0,1}, …

Fixed cardinality representation For multisets with fixed (or bounded) cardinality Finite-domain variable for each element in the multiset Introduce “don’t care” value if needed E.g. M1=M2=M3= … = {Video, DVD, plasma, TV, speaker, woofer, satellite}

Expressivity Disjunctive choice cannot be fully expressed E.g. none of the 3 can represent just: {{0,0,0}} or {{1,1,1}} Nested multisets are also problematic Especially for occurrence representation

Consistency Central notion in CP How do we define it for multiset vars? Also for mixed constraints containing multiset, set and/or integer vars? Slogan of the local Beamish brewery: “Consistency in a world gone mad”

Consistency Set of solutions for a var in a constraint C Sol(Xi) = {di | C(d1,..,dn)} C is bounds consistent iff Sol(Xi) ≠ {} For each (multi)set var lub(Xi)=  di, glb(Xi)=  di where di  Sol(Xi) For each integer var lub(Xi)=max(di), glb(Xi)=min(di) where di  Sol(Xi)

Bounds consistency Representation doesn’t matter BC on bounds representation is equivalent to usual notion of BC on occurrence Existence of BC domains If problem has solution, there exist unique lub and glb that makes constraints BC

Multiset constraints Simple predicates X  Y, X  Y, X=Y, X  Y, |X|=N, occ(N,X)=M, … Arguments can be multiset or set expressions Var, ground multiset or set X  Y, X  Y, X-Y, … Global constraints disjoint(X1,..,Xn), partition(X1,…,Xn,X), …

Normal form Multiset constraints can be put in simple normal form Each constraint is at most ternary E.g. (X  Y)  Z  W is transformed to S=X  Y, T=S  Z, T  W Propagation algorithms therefore only need deal with a limited class of constraints Similar to normal form used with sets vars in [Gervet 97]

Normal form Normalization hurts propagation BC on arbitrary set of constraints is strictly stronger than BC on normalized form But not always BC on normalized form is equivalent if there are no repeated variables

Global constraints Important aspect of (finite-domain) CP Identify common patterns Efficient and effective propagators Decomposition usually hurts E.g. all-different = clique of not-equals GAC(all-different) > AC(not-equals)

Global multiset constraints Decomposition does not always hurt BC(disjoint(X1,..,Xn) = BC(Xi  Xj={}) BC(partition(X1,..,Xn,X)=BC(Xi  Xj={}) & BC(Xi ..  Xn = X) But can on other global constraints non-empty partition distinct(X1,..,Xn) iff Xi ≠ Xj for all i<j

Future directions Multiset OPL Extend OPL to support set and multiset vars Compile down into OPL using occurrence or fixed cardinality representations (or both) Global constraint propagators distinct, non-empty partition, …

What do you take home? Representing multiset vars Bounds, occurrence and fixed cardinality Consistency of multiset vars Containing multiset, set and integer vars Global constraints over multiset vars Decomposition does not always hurt

What’s the bigger picture? Why stop with multisets? Strings [Golden & Pang, CP03] Fri Sequences Trees … Why should CP have only fixed variable types? Abstract variable types