on algorithms for decomposable constraints kostas stergiou ian gent, patrick prosser, toby walsh...
TRANSCRIPT
![Page 1: On Algorithms for Decomposable Constraints Kostas Stergiou Ian Gent, Patrick Prosser, Toby Walsh A.P.E.S. Research Group](https://reader036.vdocuments.mx/reader036/viewer/2022082422/56649ed55503460f94be5b3b/html5/thumbnails/1.jpg)
On Algorithms for Decomposable Constraints
On Algorithms for Decomposable Constraints
Kostas StergiouKostas Stergiou Ian Gent, Patrick Prosser, Toby WalshIan Gent, Patrick Prosser, Toby Walsh
AA..PP..EE..SS.. Research Group Research Group
![Page 2: On Algorithms for Decomposable Constraints Kostas Stergiou Ian Gent, Patrick Prosser, Toby Walsh A.P.E.S. Research Group](https://reader036.vdocuments.mx/reader036/viewer/2022082422/56649ed55503460f94be5b3b/html5/thumbnails/2.jpg)
Decomposable non-binary constraints
Decomposable non-binary constraints
they can be represented by they can be represented by binary constraints on the same binary constraints on the same set of variablesset of variables
some decomposable constraintssome decomposable constraints all-different -> binary “not-equals” all-different -> binary “not-equals”
constraintsconstraints monotonicity -> binary ordering monotonicity -> binary ordering
constraintsconstraints
All-different(v0,...,v7)All-different(v0,...,v7)
![Page 3: On Algorithms for Decomposable Constraints Kostas Stergiou Ian Gent, Patrick Prosser, Toby Walsh A.P.E.S. Research Group](https://reader036.vdocuments.mx/reader036/viewer/2022082422/56649ed55503460f94be5b3b/html5/thumbnails/3.jpg)
Forward CheckingForward Checking
• forward checking (FC)forward checking (FC)• remove fromremove from future variable future variabless the the
values that arevalues that are inconsistent with inconsistent with the the current instantiationcurrent instantiation
• generalized FCgeneralized FC• various definitions of FC for non-various definitions of FC for non-
binary constraints (nFC0-nFC5) see binary constraints (nFC0-nFC5) see Bessiere et. al., CP’99Bessiere et. al., CP’99
• each generalization achieves a each generalization achieves a different level of consistency between different level of consistency between past and future variablespast and future variables
11
11,2,2
0,0,11,2,2
current variablecurrent variable
future variablefuture variable
future variablefuture variable
![Page 4: On Algorithms for Decomposable Constraints Kostas Stergiou Ian Gent, Patrick Prosser, Toby Walsh A.P.E.S. Research Group](https://reader036.vdocuments.mx/reader036/viewer/2022082422/56649ed55503460f94be5b3b/html5/thumbnails/4.jpg)
Forward Checking on Decomposable Constraints
Forward Checking on Decomposable Constraints
• FC > nFC0 in visited nodesFC > nFC0 in visited nodes• the difference can be exponentialthe difference can be exponential
• nFC1 > FC in visited nodesnFC1 > FC in visited nodes• the difference can be exponentialthe difference can be exponential
• nFC1 ~ FC ~ nFC0 in nFC1 ~ FC ~ nFC0 in consistency checksconsistency checks
• but there can be the same but there can be the same exponential differences exponential differences
nFC5 nFC5 nFC2nFC2 nFC1 FC nFC0 nFC1 FC nFC0
nFC4nFC4
nFC3nFC3
![Page 5: On Algorithms for Decomposable Constraints Kostas Stergiou Ian Gent, Patrick Prosser, Toby Walsh A.P.E.S. Research Group](https://reader036.vdocuments.mx/reader036/viewer/2022082422/56649ed55503460f94be5b3b/html5/thumbnails/5.jpg)
Arc consistencyArc consistency
• ArcArc consistency (AC)consistency (AC)• remove fromremove from a a variable variable the values that the values that
areare in incompatiblecompatible with with all values of the all values of the other variable in a binary constraintother variable in a binary constraint
• GGeneralized ACeneralized AC• remove fromremove from a a variable variable the values that the values that
areare in incompatiblecompatible with with all n-tuples of all n-tuples of the other variables in a n-ary constraintthe other variables in a n-ary constraint
• Maintaing AC (GAC) is the Maintaing AC (GAC) is the most popular complete search most popular complete search algorithmalgorithm
11
11,2,2
0,0,11,,22
![Page 6: On Algorithms for Decomposable Constraints Kostas Stergiou Ian Gent, Patrick Prosser, Toby Walsh A.P.E.S. Research Group](https://reader036.vdocuments.mx/reader036/viewer/2022082422/56649ed55503460f94be5b3b/html5/thumbnails/6.jpg)
The complexity of arc consistencyThe complexity of arc consistency
• The complexity of AC on The complexity of AC on ee “not-equal” constaints with “not-equal” constaints with dd domain size is domain size is O(O(ee)) • the previous bound was the previous bound was O(O(eded))• each edge is processed at most onceeach edge is processed at most once• process is done in constant timeprocess is done in constant time
• This generalizes to all This generalizes to all antifunctionalantifunctional constraints constraints• each value in a variable is unsupported by at most one value of each value in a variable is unsupported by at most one value of
the other variable in the constraintthe other variable in the constraint
• All-different constraint on All-different constraint on kk variables variables• AC -> O(kAC -> O(k22) ) GAC -> O(kGAC -> O(k22dd22))
![Page 7: On Algorithms for Decomposable Constraints Kostas Stergiou Ian Gent, Patrick Prosser, Toby Walsh A.P.E.S. Research Group](https://reader036.vdocuments.mx/reader036/viewer/2022082422/56649ed55503460f94be5b3b/html5/thumbnails/7.jpg)
GAC on Decomposable ConstraintsGAC on Decomposable Constraints
• GAC stronger than AGAC stronger than AC C on on binary decompositionbinary decomposition• Exponential differences in Exponential differences in
node visits between MAC - node visits between MAC - MGACMGAC
• GAC incomparable toGAC incomparable to• strong path consistency (PC)strong path consistency (PC)• restricted PC (RPC)restricted PC (RPC)• singleton AC (SAC)singleton AC (SAC)• path inverse consistency (PIC)path inverse consistency (PIC)• neighbourhood inverse consistency neighbourhood inverse consistency
(NIC)(NIC) strong PC SAC PIC RPC ACstrong PC SAC PIC RPC AC
GACGAC
NICNIC
binary not-equalsbinary not-equals are are AC ACternary all-differentternary all-different is is not GAC not GAC
![Page 8: On Algorithms for Decomposable Constraints Kostas Stergiou Ian Gent, Patrick Prosser, Toby Walsh A.P.E.S. Research Group](https://reader036.vdocuments.mx/reader036/viewer/2022082422/56649ed55503460f94be5b3b/html5/thumbnails/8.jpg)
Singleton arc consistencySingleton arc consistency
• Singleton aSingleton arcrc consistencyconsistency ((SSAC)AC)• remove a value remove a value aa of variable of variable xx if if
the instantiation the instantiation xx aa results in a results in a problem that is not ACproblem that is not AC
• SAC is stronger than ACSAC is stronger than AC
• SingletonSingleton GGACAC (SGAC) (SGAC)• SAC for non-binary constraintsSAC for non-binary constraints• SGAC is stronger than GACSGAC is stronger than GAC
0,1,20,1,2
0,10,1
0,10,1
0,10,1
0,10,1
SAC removes 0 from SAC removes 0 from xx
xx
xx 00
![Page 9: On Algorithms for Decomposable Constraints Kostas Stergiou Ian Gent, Patrick Prosser, Toby Walsh A.P.E.S. Research Group](https://reader036.vdocuments.mx/reader036/viewer/2022082422/56649ed55503460f94be5b3b/html5/thumbnails/9.jpg)
SGAC on decomposable constraintsSGAC on decomposable constraints
• SSGAC stronger than GAC stronger than SSAAC, PIC, C, PIC, RPC RPC on binary decompositionon binary decomposition
• SSGAC incomparable tGAC incomparable to strongo strong PCPC, NIC, NIC
• SGAC is useful for preprocessingSGAC is useful for preprocessing• Expensive to maintain during Expensive to maintain during
searchsearch
strong PC SAC PIC RPC ACstrong PC SAC PIC RPC AC
SSGACGAC
NICNIC
![Page 10: On Algorithms for Decomposable Constraints Kostas Stergiou Ian Gent, Patrick Prosser, Toby Walsh A.P.E.S. Research Group](https://reader036.vdocuments.mx/reader036/viewer/2022082422/56649ed55503460f94be5b3b/html5/thumbnails/10.jpg)
ConclusionsConclusions
• Generalizations of FCGeneralizations of FC, AC and SAC, AC and SAC can achieve can achieve high levels of consistencyhigh levels of consistency
• The complexity of AC on antifunctional constraints The complexity of AC on antifunctional constraints is O(is O(ee))
• Non-binary representations offer considerable Non-binary representations offer considerable advantages over binary onesadvantages over binary ones• decompositions can significantly reduce the level of decompositions can significantly reduce the level of
consistencyconsistency
• Representation of problems can have large effect on Representation of problems can have large effect on efficiency of searchefficiency of search