1 / 20

Consistency & Propagation with Multiset Constraints

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.

sherri
Download Presentation

Consistency & Propagation with Multiset Constraints

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


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

  2. 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

  3. 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}}

  4. 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}}

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

  6. 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]

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

  8. 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}

  9. 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

  10. 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”

  11. 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)

  12. 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

  13. 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), …

  14. 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]

  15. 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

  16. 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)

  17. 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

  18. 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, …

  19. 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

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

More Related