Presentation is loading. Please wait.

Presentation is loading. Please wait.

Non-binary constraints Dual & Hidden Variable Encodings REFORMULATION.

Similar presentations


Presentation on theme: "Non-binary constraints Dual & Hidden Variable Encodings REFORMULATION."— Presentation transcript:

1

2 Non-binary constraints Dual & Hidden Variable Encodings REFORMULATION

3 From non-binary to binary REFORMULATION

4 Binary decomposable constraints allDiff(x,y,z) x ≠ y, x ≠ z, y ≠ z monotone(x,y,z) x < y, y < z even(x + y +z) no way aka network decomposable

5 Dual Variable Encoding

6

7

8 Dual Variables Consider the two constraints C1 and C2 C1: even(x + y) C2: odd(y+z) x,y,z in {0,1} introduce variables VC1 and VC2 domain of VC1 is set of allowed tuples for x and y in constraint C1 domain of VC2 is set of allowed tuples for y and z in constraint C2 introduce a constraint relation R21 where domain of R21 is allowed tuples between VC1 and VC2 position 2 in tuples in VC1 (agrees in y) position 1 in tuples in VC2 (agrees in y)

9 Dual Variables Consider the two constraints C1 and C2 C1: even(x + y) C2: odd(y+z) x,y,z in {0,1} VC1: (, ) VC2: (, ) R21: (, ) C1 =  C2 =

10 Dual Variables Consider the two constraints C1 and C2 C1: even(x + y) C2: odd(y+z) x,y,z in {0,1} VC1: (, ) VC2: (, ) R21: (, ) C1 =  C2 = match on y

11 Dual Variables Consider the two constraints C1 and C2 C1: even(x + y) C2: odd(y+z) x,y,z in {0,1} VC1: (, ) VC2: (, ) R21: (, ) C1 =  C2 = match on y

12 Dual VariablesAnother example Due to Stergiou & Walsh

13 Dual Variables x1 x6 x2 x5 x4 x3 The hypergraph

14 Hidden Variable Encoding Dual Variable Hyper Graph

15 Dual Variables x1 x6 x2 x5 x4 x3 Have a C variable for each constraint, with domain the set of allowed tuples Have constraints Rij between those C variables that share variables in the original model to ensure compatible pairs of tuples in positions i and j

16 Dual Variables Have a C variable for each constraint, with domain the set of allowed tuples Have constraints Rij between those C variables that share variables in the original model to ensure compatible pairs of tuples in positions i and j respectively VC4 (0,0,0) (0,1,1) (1,0,1) VC1 (0,0,1) (0,1,0) (1,0,0) VC2 (0,0,1) (1,0,0) (1,1,1) VC3 (0,1,0) (1,0,0) (1,1,0) (1,1,1) R11 R33 R21 & R33 R31 R22 & R33

17 Dual Variables (you could) Try this u,v,w,x, y, and z, in {0,1} C1: oddSum(x,y,z) C2: notSame(u,v,w) C3: evenSum(w,x,y)

18 Hidden Variable Encoding

19

20

21

22 Hidden Variable Introduces dual variables as before (representing allowed tuples for constraints) Additional “hidden” variables binary constraints from the dual to original variables

23 Hidden Variables Introduce an additional hidden variable, and use the originals Add k binary constraints from originals to hidden variable Example x,y,z in {0,1} notSame(x,y,z) Allowed tuples are {,,,,, } W is in {,,,,, } W x y z Cxw: W =  x = 1 Cyw: Y =  y = 1 Czw: W =  z = 1

24 Hidden Variables Have a C variable for each constraint, with domain the set of allowed tuples (as before) Have constraints rij between variable vi and dual variable VCJ to ensure Compatibility between dual and original variables VC4 (0,0,0) (0,1,1) (1,0,1) VC1 (0,0,1) (0,1,0) (1,0,0) VC2 (0,0,1) (1,0,0) (1,1,1) VC3 (0,1,0) (1,0,0) (1,1,0) (1,1,1) v1v2v3v4v6v5 r11 r12 r21 r24 r32 r42 r43 r53 r54 r61 r63 r64

25 Upside Variables have domains O(m k ) Downside Higher level of consistency (GAC)

26 Hidden variable encoding AC on hidden variable encoding is equivalent to GAC on original problem

27 Dual variable encoding AC on dual encoding is stronger than GAC on original encoding AC on dual encoding is stronger than AC on hidden variable encoding

28 Make a crossword puzzle

29

30 1 23456 4 7 An example Given the above grid and a dictionary, fill it. Then go get the clues (not my problem)

31 1 23456 4 7 Original, non-binary, Encoding A variable for each square Domain of each variable is {a.. z} Constraints are k-ary For example, 1-across is set of 6-tuples 2-down is set of 7 tuples Tuples on 1-across and 2-down must be consistent

32 Variables 1A 1 across 4D 4 down 2D 2 down 4A 4 across 7D 7 down 1 23456 4 7 1A4D 2D 7D 4A The Dual Encoding Domains 1A: any 6 letter word 4A: any 8 letter word 4D: any 5 letter word 2D: any 7 letter word 7D: any 3 letter word

33 1 23456 4 7 1A4D 2D 7D 4A 1A-4D: 4th of 1A equals 1st of 4D 1A-2D: 2nd of 1A equals 1st of 2D 2D-4A: 4th of 2D equals 2nd of4D 4D-4A: 4th of 4A equals 4th of 4D 4A-7D: 7th of 4A equals 2nd of 7D Binary Constraints The Dual Encoding

34

35

36

37

38

39

40


Download ppt "Non-binary constraints Dual & Hidden Variable Encodings REFORMULATION."

Similar presentations


Ads by Google