41

Levels of Consistency Node Consistency (NC) Arc-consistency (AC) Path Consistency (PC) Generalised arc-consistency (GAC) Bounds consistency Inverse Path

Embed Size (px)

Citation preview

Page 1: Levels of Consistency Node Consistency (NC) Arc-consistency (AC) Path Consistency (PC) Generalised arc-consistency (GAC) Bounds consistency Inverse Path
Page 2: Levels of Consistency Node Consistency (NC) Arc-consistency (AC) Path Consistency (PC) Generalised arc-consistency (GAC) Bounds consistency Inverse Path

Levels of Consistency

Page 3: Levels of Consistency Node Consistency (NC) Arc-consistency (AC) Path Consistency (PC) Generalised arc-consistency (GAC) Bounds consistency Inverse Path

Levels of Consistency

• Node Consistency (NC)• Arc-consistency (AC)• Path Consistency (PC)• Generalised arc-consistency (GAC)• Bounds consistency• Inverse Path Consistency (IPC aka PIC)• Singleton Arc-consistency (SAC)• … and others

Page 4: Levels of Consistency Node Consistency (NC) Arc-consistency (AC) Path Consistency (PC) Generalised arc-consistency (GAC) Bounds consistency Inverse Path

Node Consistency

Page 5: Levels of Consistency Node Consistency (NC) Arc-consistency (AC) Path Consistency (PC) Generalised arc-consistency (GAC) Bounds consistency Inverse Path

Node Consistency (NC)

aka 1-consistency

Example:

}9..1{

10

}30..1{

x

x

x

Page 6: Levels of Consistency Node Consistency (NC) Arc-consistency (AC) Path Consistency (PC) Generalised arc-consistency (GAC) Bounds consistency Inverse Path

Arc-consistency

Page 7: Levels of Consistency Node Consistency (NC) Arc-consistency (AC) Path Consistency (PC) Generalised arc-consistency (GAC) Bounds consistency Inverse Path

A constraint Cij is arc consistent if

• for every value x in Di there exists a value y in Dj that supports x• i.e. if v[i] = x and v[j] = y then Cij holds• note: we are assuming Cij is a binary constraint

A csp (V,D.C) is arc consistent if

• every constraint is arc consistent

)],([:)( ,, yxCDyDxCAC jijiji

)]([:),,( ,, jiji CACCCCDVAC

Arc-consistency (AC) aka 2-consistency

)( 2edO

Page 8: Levels of Consistency Node Consistency (NC) Arc-consistency (AC) Path Consistency (PC) Generalised arc-consistency (GAC) Bounds consistency Inverse Path

Arc-consistency

AC appears to be the best level of consistency to maintain (MAC)

There is no proof of this

However, there is a body of evidence

For non-trivial problems MAC beats FC beats BT

Page 9: Levels of Consistency Node Consistency (NC) Arc-consistency (AC) Path Consistency (PC) Generalised arc-consistency (GAC) Bounds consistency Inverse Path

Path Consistency

Page 10: Levels of Consistency Node Consistency (NC) Arc-consistency (AC) Path Consistency (PC) Generalised arc-consistency (GAC) Bounds consistency Inverse Path

Path-consistency (aka 3-consistency)

Vi

Vj

Vk

There might be no constraint CikTherefore 3-consistency may create it!

)],(),(),([:),,(3 zyCzxCyxCDyDzDxkjiCon jkikijjki

It may create nogood tuples {(i/x,k/z),…}Therefore increases size of model/problem.May result in more constraints to check!

)( 23dnO

M. Singh, TAI-95

)],,(3[,,:),,(3 kjiConkjiCDVCon

Page 11: Levels of Consistency Node Consistency (NC) Arc-consistency (AC) Path Consistency (PC) Generalised arc-consistency (GAC) Bounds consistency Inverse Path

Path-consistency (aka 3-consistency)

)],(),(),([:),,(3 zyCzxCyxCDyDzDxkjiCon jkikijjki

)],,(3[,,:),,(3 kjiConkjiCDVCon

for x in Dido for z in Dk do supported := false for y in Dj while ¬supported do supported := Cij(x,y) & Cik(x,z) & Cjk(y,z) if ¬supported then post(¬Cik(x,z))

Page 12: Levels of Consistency Node Consistency (NC) Arc-consistency (AC) Path Consistency (PC) Generalised arc-consistency (GAC) Bounds consistency Inverse Path

See AR33 notes section 7.3

Page 13: Levels of Consistency Node Consistency (NC) Arc-consistency (AC) Path Consistency (PC) Generalised arc-consistency (GAC) Bounds consistency Inverse Path

k-consistency

Page 14: Levels of Consistency Node Consistency (NC) Arc-consistency (AC) Path Consistency (PC) Generalised arc-consistency (GAC) Bounds consistency Inverse Path

Also k-consistency AR33 section 7.4

Page 15: Levels of Consistency Node Consistency (NC) Arc-consistency (AC) Path Consistency (PC) Generalised arc-consistency (GAC) Bounds consistency Inverse Path

Generalised arc-consistency

Page 16: Levels of Consistency Node Consistency (NC) Arc-consistency (AC) Path Consistency (PC) Generalised arc-consistency (GAC) Bounds consistency Inverse Path

Generalised arc-consistency (GAC) AR33 section 7.5

Page 17: Levels of Consistency Node Consistency (NC) Arc-consistency (AC) Path Consistency (PC) Generalised arc-consistency (GAC) Bounds consistency Inverse Path

Generalised arc-consistency (GAC) AR33 section 7.5

Page 18: Levels of Consistency Node Consistency (NC) Arc-consistency (AC) Path Consistency (PC) Generalised arc-consistency (GAC) Bounds consistency Inverse Path

Generalised arc-consistency (GAC)

GAC is meaningful only wrt n-ary constraints(in a sense)

From Gent, Miguel & Nightingale

Page 19: Levels of Consistency Node Consistency (NC) Arc-consistency (AC) Path Consistency (PC) Generalised arc-consistency (GAC) Bounds consistency Inverse Path

Generalised arc-consistency (GAC) Alan Frisch (York)

Page 20: Levels of Consistency Node Consistency (NC) Arc-consistency (AC) Path Consistency (PC) Generalised arc-consistency (GAC) Bounds consistency Inverse Path

Generalised arc-consistency (GAC) Alan Frisch (York)

Page 21: Levels of Consistency Node Consistency (NC) Arc-consistency (AC) Path Consistency (PC) Generalised arc-consistency (GAC) Bounds consistency Inverse Path

Bounds Consistency

Page 22: Levels of Consistency Node Consistency (NC) Arc-consistency (AC) Path Consistency (PC) Generalised arc-consistency (GAC) Bounds consistency Inverse Path

Bounds Consistency Alan Frisch (York)

Page 23: Levels of Consistency Node Consistency (NC) Arc-consistency (AC) Path Consistency (PC) Generalised arc-consistency (GAC) Bounds consistency Inverse Path

Bounds Consistency Alan Frisch (York)

Page 24: Levels of Consistency Node Consistency (NC) Arc-consistency (AC) Path Consistency (PC) Generalised arc-consistency (GAC) Bounds consistency Inverse Path

Inverse Path Consistency

(aka Path Inverse Consistency)

Page 25: Levels of Consistency Node Consistency (NC) Arc-consistency (AC) Path Consistency (PC) Generalised arc-consistency (GAC) Bounds consistency Inverse Path

Path Inverse Consistency (PIC aka IPC) Debruyne & Bessiere

)],(),(),([:),,(3 zyCzxCyxCDzDyDxkjiConInv jkikijkji

)],,(3[,,:),,(3 kjiConInvkjiCDVConInv

Note: similar to PC but deletes values rather than adds tuples!

)],(),(),([:),,(3 zyCzxCyxCDyDzDxkjiCon jkikijjki

Page 26: Levels of Consistency Node Consistency (NC) Arc-consistency (AC) Path Consistency (PC) Generalised arc-consistency (GAC) Bounds consistency Inverse Path

Path Inverse Consistency (PIC aka IPC) Debruyne & Bessiere

)],(),(),([:),,(3 zyCzxCyxCDzDyDxkjiConInv jkikijkji

)],,(3[,,:),,(3 kjiConInvkjiCDVConInv

Note: similar to PC but deletes values rather than adds tuples!

for x in Dido supported := false for y in Dj while ¬supported do for z in Dk while ¬supported do supported := Cij(x,y) & Cik(x,z) & Cjk(y,z) if ¬supported then Di := Di \ {x}

Page 27: Levels of Consistency Node Consistency (NC) Arc-consistency (AC) Path Consistency (PC) Generalised arc-consistency (GAC) Bounds consistency Inverse Path

Singleton arc-consistency

Page 28: Levels of Consistency Node Consistency (NC) Arc-consistency (AC) Path Consistency (PC) Generalised arc-consistency (GAC) Bounds consistency Inverse Path

Singleton arc-consistency (SAC)

i.e. we can take any variable, assign it a value from its domain andthen make the problem arc-consistent and all variables havenon-empty domains

Page 29: Levels of Consistency Node Consistency (NC) Arc-consistency (AC) Path Consistency (PC) Generalised arc-consistency (GAC) Bounds consistency Inverse Path

The basic and least efficient algorithm for SAC (from Bartak’s FLAIRS04 paper)

The SAC1 algorithm

Page 30: Levels of Consistency Node Consistency (NC) Arc-consistency (AC) Path Consistency (PC) Generalised arc-consistency (GAC) Bounds consistency Inverse Path
Page 31: Levels of Consistency Node Consistency (NC) Arc-consistency (AC) Path Consistency (PC) Generalised arc-consistency (GAC) Bounds consistency Inverse Path
Page 32: Levels of Consistency Node Consistency (NC) Arc-consistency (AC) Path Consistency (PC) Generalised arc-consistency (GAC) Bounds consistency Inverse Path
Page 33: Levels of Consistency Node Consistency (NC) Arc-consistency (AC) Path Consistency (PC) Generalised arc-consistency (GAC) Bounds consistency Inverse Path
Page 34: Levels of Consistency Node Consistency (NC) Arc-consistency (AC) Path Consistency (PC) Generalised arc-consistency (GAC) Bounds consistency Inverse Path
Page 35: Levels of Consistency Node Consistency (NC) Arc-consistency (AC) Path Consistency (PC) Generalised arc-consistency (GAC) Bounds consistency Inverse Path
Page 36: Levels of Consistency Node Consistency (NC) Arc-consistency (AC) Path Consistency (PC) Generalised arc-consistency (GAC) Bounds consistency Inverse Path
Page 37: Levels of Consistency Node Consistency (NC) Arc-consistency (AC) Path Consistency (PC) Generalised arc-consistency (GAC) Bounds consistency Inverse Path

complexities

Page 38: Levels of Consistency Node Consistency (NC) Arc-consistency (AC) Path Consistency (PC) Generalised arc-consistency (GAC) Bounds consistency Inverse Path
Page 39: Levels of Consistency Node Consistency (NC) Arc-consistency (AC) Path Consistency (PC) Generalised arc-consistency (GAC) Bounds consistency Inverse Path

General notes• we can have “inverse” consistency for any k• we can have neighbourhood inverse consistency• we can have singleton k-consistency

In our model and CP toolkit we may have “mixed consistency”

• some variables/constraints only forward checked• some variables in binary constraints AC• some variable in n-ary constraints GAC• variables NC

This is not a problem, so long as we are sure that when we instantiate a variable it is consistentWith respect to the past variables

We can also maintain these levels of consistencyduring search

Page 40: Levels of Consistency Node Consistency (NC) Arc-consistency (AC) Path Consistency (PC) Generalised arc-consistency (GAC) Bounds consistency Inverse Path

Conclusion

There are MANY different levels of consistency

This is an ACTIVE area of research

Page 41: Levels of Consistency Node Consistency (NC) Arc-consistency (AC) Path Consistency (PC) Generalised arc-consistency (GAC) Bounds consistency Inverse Path