Consistency - PowerPoint PPT Presentation

1 / 20
About This Presentation
Title:

Consistency

Description:

Consistency & Propagation with Multiset Constraints Toby Walsh 4C, UCC & Uppsala – PowerPoint PPT presentation

Number of Views:122
Avg rating:3.0/5.0
Slides: 21
Provided by: Tob107
Learn more at: http://www.cse.unsw.edu
Category:

less

Transcript and Presenter's Notes

Title: Consistency


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. ILOGs 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, Plasma0,1, Speaker2,3,4,
    Woofer0,1,

8
Fixed cardinality representation
  • For multisets with fixed (or bounded) cardinality
  • Finite-domain variable for each element in the
    multiset
  • Introduce dont care value if needed
  • E.g. M1M2M3 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 doesnt 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, XY, X?Y, XN, 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
  • SX?Y, TS?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) gt 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 iltj

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
Whats 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
Write a Comment
User Comments (0)
About PowerShow.com