100 likes | 229 Views
On Algorithms for Decomposable Constraints. Kostas Stergiou Ian Gent, Patrick Prosser, Toby Walsh A . P . E . S . Research Group. Decomposable non-binary constraints. they can be represented by binary constraints on the same set of variables some decomposable constraints
E N D
On Algorithms for Decomposable Constraints Kostas Stergiou Ian Gent, Patrick Prosser, Toby Walsh A.P.E.S. Research Group
Decomposable non-binary constraints • they can be represented by binary constraints on the same set of variables • some decomposable constraints • all-different -> binary “not-equals” constraints • monotonicity -> binary ordering constraints All-different(v0,...,v7)
Forward Checking • forward checking (FC) • remove from future variablesthe values that are inconsistent with the current instantiation • generalized FC • various definitions of FC for non-binary constraints (nFC0-nFC5) see Bessiere et. al., CP’99 • each generalization achieves a different level of consistency between past and future variables 1,2 future variable future variable 1 current variable 0,1,2
Forward Checking on Decomposable Constraints • FC > nFC0 in visited nodes • the difference can be exponential • nFC1 > FC in visited nodes • the difference can be exponential • nFC1 ~ FC ~ nFC0 in consistency checks • but there can be the same exponential differences nFC4 nFC5 nFC2 nFC1 FC nFC0 nFC3
Arcconsistency • Arcconsistency (AC) • remove froma variable the values that are incompatible with all values of the other variable in a binary constraint • Generalized AC • remove froma variable the values that are incompatible with all n-tuples of the other variables in a n-ary constraint • Maintaing AC (GAC) is the most popular complete search algorithm 1,2 1 0,1,2
The complexity of arcconsistency • The complexity of AC on e “not-equal” constaints with d domain size is O(e) • the previous bound was O(ed) • each edge is processed at most once • process is done in constant time • This generalizes to all antifunctional constraints • each value in a variable is unsupported by at most one value of the other variable in the constraint • All-different constraint on k variables • AC -> O(k2) GAC -> O(k2d2)
GAC on Decomposable Constraints • GAC stronger than AC on binary decomposition • Exponential differences in node visits between MAC - MGAC • GAC incomparable to • strong path consistency (PC) • restricted PC (RPC) • singleton AC (SAC) • path inverse consistency (PIC) • neighbourhood inverse consistency (NIC) binary not-equals are AC ternary all-different is not GAC GAC strong PC SAC PIC RPC AC NIC
Singleton arcconsistency • Singleton arcconsistency(SAC) • remove a value a of variable x if the instantiation xa results in a problem that is not AC • SAC is stronger than AC • SingletonGAC (SGAC) • SAC for non-binary constraints • SGAC is stronger than GAC 0,1 x 0,1,2 0,1 0,1 x0 0,1 SAC removes 0 from x
SGAC on decomposable constraints • SGAC stronger than SAC, PIC, RPC on binary decomposition • SGAC incomparable to strongPC, NIC • SGAC is useful for preprocessing • Expensive to maintain during search SGAC strong PC SAC PIC RPC AC NIC
Conclusions • Generalizations of FC, AC and SAC can achieve high levels of consistency • The complexity of AC on antifunctional constraints is O(e) • Non-binary representations offer considerable advantages over binary ones • decompositions can significantly reduce the level of consistency • Representation of problems can have large effect on efficiency of search