1 / 40

Non-binary constraints Dual & Hidden Variable Encodings

REFORMULATION. Non-binary constraints Dual & Hidden Variable Encodings. REFORMULATION. From non-binary to binary. Binary decomposable constraints. aka network decomposable. allDiff(x,y,z) x ≠ y, x ≠ z, y ≠ z monotone(x,y,z) x < y, y < z even(x + y +z) no way.

arlene
Download Presentation

Non-binary constraints Dual & Hidden Variable Encodings

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. REFORMULATION Non-binary constraints Dual & Hidden Variable Encodings

  2. REFORMULATION From non-binary to binary

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

  4. Dual Variable Encoding

  5. 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)

  6. Consider the two constraints C1 and C2 • C1: even(x + y) • C2: odd(y+z) • x,y,z in {0,1} VC1: (<0,0>,<1,1>) R21: (<0,0,1>,<1,1,0>) VC2: (<0,1>,<1,0>) Dual Variables C1 = <*A>  C2 = <A,*>

  7. Consider the two constraints C1 and C2 • C1: even(x + y) • C2: odd(y+z) • x,y,z in {0,1} VC1: (<0,0>,<1,1>) R21: (<0,0,1>,<1,1,0>) VC2: (<0,1>,<1,0>) Dual Variables match on y C1 = <*A>  C2 = <A,*>

  8. Consider the two constraints C1 and C2 • C1: even(x + y) • C2: odd(y+z) • x,y,z in {0,1} VC1: (<0,0>,<1,1>) R21: (<0,0,1>,<1,1,0>) VC2: (<0,1>,<1,0>) Dual Variables match on y C1 = <*A>  C2 = <A,*>

  9. Dual Variables Another example Due to Stergiou & Walsh

  10. Dual Variables x2 x1 x3 x6 x4 x5 The hypergraph

  11. Hyper Graph Hidden Variable Encoding Dual Variable

  12. Dual Variables x2 x1 x3 x6 x4 x5 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

  13. Dual Variables R21 & R33 VC4 (0,0,0) (0,1,1) (1,0,1) VC1 (0,0,1) (0,1,0) (1,0,0) R33 R22 & R33 R11 VC2 (0,0,1) (1,0,0) (1,1,1) VC3 (0,1,0) (1,0,0) (1,1,0) (1,1,1) R31 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

  14. 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)

  15. Hidden Variable Encoding

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

  17. W x y z 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 {<0,0,1>,<0,1,0>,<0,1,1>,<1,0,0>,<1,0,1>,<1,1,0>} W is in {<0,0,1>,<0,1,0>,<0,1,1>,<1,0,0>,<1,0,1>,<1,1,0>} Cxw: W = <1,*,*>  x = 1 Cyw: Y = <*,1,*>  y = 1 Czw: W = <*,*,1>  z = 1

  18. Hidden Variables VC4 (0,0,0) (0,1,1) (1,0,1) VC1 (0,0,1) (0,1,0) (1,0,0) r24 r64 r11 r54 r21 r61 v1 v2 v3 v4 v5 v6 r63 r12 r32 r53 r43 r42 VC2 (0,0,1) (1,0,0) (1,1,1) VC3 (0,1,0) (1,0,0) (1,1,0) (1,1,1) 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

  19. Upside Downside Variables have domains O(mk) Higher level of consistency (GAC)

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

  21. 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

  22. Make a crossword puzzle

  23. An example 1 2 3 4 5 6 7 4 Given the above grid and a dictionary, fill it. Then go get the clues (not my problem)

  24. Original, non-binary, Encoding 1 2 3 4 5 6 A variable for each square Domain of each variable is {a .. z} 7 4 • 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

  25. The Dual Encoding 1 2 3 4 5 6 7 1A 4D 4 4A 2D Variables 1A 1 across 4D 4 down 2D 2 down 4A 4 across 7D 7 down 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 7D

  26. The Dual Encoding 1 2 3 4 5 6 7 1A 4D 4 4A 2D 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 7D Binary Constraints

More Related