Presentation is loading. Please wait.

Presentation is loading. Please wait.

Maximum Density Still Life Symmetries and Lazy Clause Generation Geoffrey Chu, Maria Garcia de la Banda, Chris Mears, Peter J. Stuckey.

Similar presentations


Presentation on theme: "Maximum Density Still Life Symmetries and Lazy Clause Generation Geoffrey Chu, Maria Garcia de la Banda, Chris Mears, Peter J. Stuckey."— Presentation transcript:

1 Maximum Density Still Life Symmetries and Lazy Clause Generation Geoffrey Chu, Maria Garcia de la Banda, Chris Mears, Peter J. Stuckey

2 Symmetries and Lazy Clause Generation Outline Definitions: CSP, symmetries, nogoods Symmetry Breaking During Search (SBDS) Lazy Clause Generation & 1UIP nogoods Can we combine them? -> SBDS-1UIP Experiments

3 CSP and Symmetries Constraint Satisfaction Problem (V, D, C) A set of variables V, a set of domains D, a set of constraints C An assignment is a solution if it satisfies all constraints A symmetry  is a bijective mapping from assignments to assignments which preserves solutions, i.e.,  is a solution iff  (  ) is a solution

4 Nogood A constraint n of form: l 1 /\... /\ l n → false Implied by original problem, i.e. C => n Used as a clausal propagator to reduce search If n-1 literals are true given current domain, then propagates to set last literal false

5 Symmetry Breaking During Search A dynamic symmetry breaking technique Reduce search by preventing solver from exploring nodes that are symmetric to previously explored nodes Can be thought of in terms of symmetric nogoods Suppose decisions d 1, d 2, …, d n lead to failure –Decision nogood: d 1 /\ … /\ d n → false Suppose  is a symmetry –Symmetric nogood:  (d 1 ) /\ … /\  (d n ) → false is also valid

6 Symmetry Breaking During Search (2) x 1 + x 2 + x 3 <= 5, alldiff(x 1, x 2, x 3 ), x i  {1,2,3} Nogood: [x 1 = 1] /\ [x 2 = 2] → false Since all variables are symmetric, we also have: –[x 1 = 1] /\ [x 3 = 2] → false –[x 2 = 1] /\ [x 1 = 2] → false, etc SBDS adds:  (d 1 ) /\ … /\  (d n ) → false as a local constraint Prevents any symmetric partial assignment from being explored

7 1UIP nogood SAT and LCG solvers do not use decision nogoods They use First Unique Implication Point (1UIP) nogood Empirically, 1UIP nogoods found to be much stronger than dec nogoods (in non-symmetric case) Key Idea: use 1UIP nogoods (SBDS-1UIP) instead of decision nogoods (SBDS-DEC) in SBDS

8 Lazy Clause Generation Instrument propagators to explain each propagation e.g. x != y: [x = 3] → [y != 3] e.g. x = 3] → [y >= 3] Explanations form an implication graph When conflict occurs, analyse implication graph Resolve explanation clauses together to derive a new nogood

9 1UIP Nogood Start with conflict clause While more than one literal from the last decision level remain, use resolution to eliminate the last one inferred –Suppose a /\ l 1 /\ … /\ l n → false is current nogood –Want to eliminate a –Get the explanation for a: k 1 /\ … /\ k m → a –Resolve to get: k 1 /\ … /\ k m /\ l 1 /\ … /\ l n → false

10 SBDS-1UIP vs SBDS-DEC SBDS-DEC is a complete method: –Once we have visited some partial assignment d 1,..., d n, any partial assignment containing a symmetric version will be pruned Theorem: SBDS-1UIP also guarantees this, given that the propagation engine p is: –Monotonic, i.e., if D' => D, then p(D') => p(D) –Symmetric, i.e., p(σ(D)) σ(p(D)) Proof: –Let n 1UIP ≡ (l 1 /\... /\ l m → false) be nogood from d 1,..., d n –We have: p(d 1 /\... /\ d n ) => l 1 /\... /\ l m –Suppose D => σ(d 1 ) /\... /\ σ(d n ) –Then p(D) => σ(l 1 ) /\... /\ σ(l m ), so D is pruned by σ(n 1UIP )

11 SBDS-1UIP Example 5-colour this graph (value sym) Already coloured x 1, x 2, x 3, x 4, x 5 Some values knocked out

12 SBDS-1UIP Example (2) Set: x 6 = 1

13 SBDS-1UIP Example (3) Set: x 7 = 2

14 SBDS-* 1UIP nogood: –[x 8 != 1] /\ [x 8 != 4] /\ [x 8 != 5] /\ [x 9 != 1] /\ [x 9 != 4] /\ [x 9 != 5] → [x 7 != 2] Decision nogood: –[x 1 = 1] /\ [x 2 = 2] /\ [x 3 = 3] /\ [x 4 = 4] /\ [x 5 = 5] /\ [x 6 = 1] → [x 7 != 2] SBDS-1UIP uses symmetry 2 ↔ 3 to get: –[x 8 != 1] /\ [x 8 != 4] /\ [x 8 != 5] /\ [x 9 != 1] /\ [x 9 != 4] /\ [x 9 != 5] → [x 7 != 3] Which immediately prunes 3 from x 7 ’s domain. SBDS-DEC cannot do this!

15 SBDS-1UIP Example (4) Add in nogoods, backtrack, and propagate: [x 8 != 1] /\ [x 8 != 4] /\ [x 8 != 5] /\ [x 9 != 1] /\ [x 9 != 4] /\ [x 9 != 5] → [x 7 != 2] [x 8 != 1] /\ [x 8 != 4] /\ [x 8 != 5] /\ [x 9 != 1] /\ [x 9 != 4] /\ [x 9 != 5] → [x 7 != 3] Conflict again!

16 SBDS-* (2) 1UIP: [x 7 != 4] /\ [x 7 != 5] /\ [x 8 != 4] /\ [x 8 != 5] /\ [x 9 != 4] /\ [x 9 != 5] → [x 6 != 1] DEC: [x 1 = 1] /\ [x 2 = 2] /\ [x 3 = 3] /\ [x 4 = 4] /\ [x 5 = 5] → [x 6 != 1] SBDS-1UIP uses symmetry 1 ↔ 2 and 1 ↔ 3 to get: [x 7 != 4] /\ [x 7 != 5] /\ [x 8 != 4] /\ [x 8 != 5] /\ [x 9 != 4] /\ [x 9 != 5] → [x 6 != 2] [x 7 != 4] /\ [x 7 != 5] /\ [x 8 != 4] /\ [x 8 != 5] /\ [x 9 != 4] /\ [x 9 != 5] → [x 6 != 3] Which immediately prunes 2 and 3 from x 6 ’s domain. SBDS-DEC again cannot do this!

17 Search Tree SBDS-DEC –10 nodes –6 failures SBDS-1UIP –3 nodes –2 failures

18 Other symmetry breaking methods? Can any other method exploit symmetries 1 ↔ 2 and 1 ↔ 3 here? SBDD also uses decision nogoods, so can't Static lex sym break is: min{i | x_i = 1} <... < min(i | x_i = 5}, can't since all 5 values already used, so constraint already satisfied Conditional symmetries can’t since 1 ↔ 2, 1 ↔ 3 are not symmetries of this subproblem (due to x 10 's domain) SBDS-1UIP can because 1UIP nogoods tells us exactly which vars involved in conflict, and 1 ↔ 2 and 1 ↔ 3 hold over x 6, x 7, x 8, x 9

19 Beyond complete?! SBDS-DEC, SBDD, Lex are all complete sym break methods for this example, i.e. for each set of symmetric assignments (an orbit), all but one assignment is pruned How can SBDS-1UIP be stronger?? With SBDS-DEC, SBDD, Lex, solver must visit at least one assignment in each orbit With SBDS-1UIP it does not necessarily have to! –Used failure of x 1 = 1, x 2 = 2, x 3 = 3, x 4 = 4, x 5 = 5, x 6 = 1 to prune x 1 = 1, x 2 = 2, x 3 = 3, x 4 = 4, x 5 = 5, x 6 = 2 –Can correctly perform "cross orbital" pruning –Can wipe out entire orbit without examining any member

20 Experimental Results Concert Hall Problem and the Graph Colouring Problem Both have variable and value symmetries Implemented SBDS in state of the art lazy clause solver Chuffed Show results for no sym break, SBDS-DEC and SBDS- 1UIP on Chuffed

21 Concert Hall SizeNo Sym BreakSBDS-DECSBDS-1UIP TimeFailsTimeFailsTimeFails 20259.86860180.073500.0484 22381.57494620.1712070.07181 24576.914385090.7834260.10275 26483.411899302.2656050.10282 28530.712827973.64105300.681611 30581.3125198019.52484740.27761 32542.493601921.48651570.401522 34timeout103905119.86488371.102636 36timeout122386459.701311421.403156 38timeout102777882.771781701.915053 40timeout1447604102.12194542.966648

22 Graph Colouring Uniform SizeNo Sym BreakSBDS-DECSBDS-1UIP TimeFailsTimeFailsTimeFails 30140.72829740.2630490.0114 32211.43903920.2436770.0117 34213.92727723.53199750.0125 36195.92963586.91238420.0136 38224.029713823.55694800.0155 40250.942332621.07789180.0183

23 Graph Colouring Biased SizeNo Sym BreakSBDS-DECSBDS-1UIP TimeFailsTimeFailsTimeFails 2013.25395510.016390.0127 2211.53639840.027270.0125 2466.601544090.0719920.0135 2674.772772900.1233850.0155 28130.52806490.5864020.0162 30267.648019510.48443850.01101 32331.76007729.98442160.01232 34219.938721310.26474700.20806 36442.670988827.391132520.01317 38382.563140331.631387870.10798 40465.653128524.68918470.02410

24 Conclusion We combined SBDS and LCG Key Idea: use 1UIP nogoods in SBDS instead of decision nogoods SDBS-1UIP is at least as strong as SBDS-DEC Can be strictly stronger on some problems Can exploit types of symmetries that no other general method we are aware of can exploit Future Work: Try other kinds of nogoods in SBDS? What is the theoretical limit of the power of sym break? Completeness is apparently not the limit!

25 Thank you for listening!


Download ppt "Maximum Density Still Life Symmetries and Lazy Clause Generation Geoffrey Chu, Maria Garcia de la Banda, Chris Mears, Peter J. Stuckey."

Similar presentations


Ads by Google