Presentation is loading. Please wait.

Presentation is loading. Please wait.

DAC 20021 Solving Difficult SAT Instances In The Presence of Symmetry Fadi A. Aloul, Arathi Ramani Igor L. Markov and Karem A. Sakallah University of Michigan.

Similar presentations


Presentation on theme: "DAC 20021 Solving Difficult SAT Instances In The Presence of Symmetry Fadi A. Aloul, Arathi Ramani Igor L. Markov and Karem A. Sakallah University of Michigan."— Presentation transcript:

1 DAC 20021 Solving Difficult SAT Instances In The Presence of Symmetry Fadi A. Aloul, Arathi Ramani Igor L. Markov and Karem A. Sakallah University of Michigan

2 DAC 20022 Highlights of Our Work No new SAT solvers are proposed We improve performance of existing complete SAT solvers by preprocessing Evaluate on carefully chosen SAT benchmarks ignore easy benchmarks only worry about benchmarks with symmetries (but the symmetries may not be given!) show applicability to chip layout (200x speed-ups) and derive new hard SAT benchmarks show asymptotic improvements

3 DAC 20023 Outline Symmetries and permutations Compact representations of symmetries Computational group theory Symmetries of CNF instances Detection via Graph Automorphism Syntactic versus semantic symmetries Using symmetries to speed up search Opportunistic symmetry detection Empirical results

4 DAC 20024 Symmetries and Permutations not a symm et ry Symmetries of the triangle: 1  2, 2  3, 3  1 (123) 1  3, 3  2, 2  1 (132) 1  2, 2  1, 3  3 (12) 1  1, 2  3, 3  2 (23) 1  3, 3  1, 2  2 (13) 1  1, 2  2, 3  3 “do nothing” Permutations can have multiple (disjoint) cycles symmetry 1 2 3

5 DAC 20025 Symmetries and Permutations (2) apply (123) and then again (123): get (132) apply (123) and then (12) : get (23) all non-trivial symmetries are products of (123) and (12) - “generators” (123) 1 2 3 3 2 1 2 1 3 2 1 3 (12) (123)

6 DAC 20026 Symmetries and Permutations (3) Idea: represent symmetries of an object by permutations that preserve the object Composition of symmetries is modeled by composition of permutations Composition is associative Every symmetry has an inverse The do-nothing symmetry is the identity This enables applications of group theory

7 DAC 20027 Compact Representations Represent the group of all symmetries Do not list individual symmetries List generating permutations (generators) Elementary group theory proves: If redundant generators are avoided, A group with N elements can be represented by at most log 2 (N) generators Guaranteed exponential compression

8 DAC 20028 Compact Representations (2) Sometimes can do better than log 2 (N) E.g., consider the group S k of all k! permutations of 1..k Can be generated by (12) and (123..k) Or by (12), (23), (34),…, (k-1 k) To use this guaranteed compression, we need algorithms in terms of permutation generators

9 DAC 20029 Computational Group Theory Algorithms for group manipulation in terms of generators are well known Published by Sims, Knuth, Babai and others Especially efficient for permutation groups High-quality implementations available The GAP package – free, open-source (GAP=“Groups, Algebra, Programming”) The MAGMA package – commercial

10 DAC 200210 Finding Symmetries of Graphs Symmetry (automorphism) of a graph Permutation of vertices that maps edges to edges Additional constraints Vertex colors (labels): integers Every vertex must map into a vertex of same color Computational Graph Automorphism Find generators of a graph’s group of symmetries GraphAuto  NP, and is believed to  P and  NPC Linear average-case runtime (but that’s irrelevant!) Algorithms implemented in GAP(GRAPE(NAUTY)) 1 2 1 2 AB DC

11 DAC 200211 Symmetries of CNF Formulae Permutations of variables that map clauses to clauses E.g., symmetries of (a+b+c)(d+e+f) include (ab), (abc) as well as (ad)(be)(cf) Considering single swaps only is not enough Ditto for variable negations (a  a’) and compositions with permutations E.g., symmetries of (a+b+c)(d+e’+f’) include (de’) as well as (ad)(be’)(cf’)

12 DAC 200212 CNF formula  colored graph Linear time and space Find graph’s [colored] symmetries Worst-case exponential time Interpret graph symmetries found as symmetries of the CNF formula Permutational symmetries Phase-shift symmetries Reduction to Graph Automorphism

13 DAC 200213 Reduction to Graph Automorphism Clauses: A (x’ + y + z), B (x + y’ + z’), C (y’ + z) Vertices of two colors: clauses and vars One vertex per clause, two per variable Edges of three types: (i) incidence, (ii) consistency, and (iii) 2-literal clauses 1 2 1 2 AB C x x’ y y’ z z’ Symmetry: (x x’)(y z’)(y’ z) 2 2 2 2

14 DAC 200214 Syntactic and Semantic Symmetries CNF formula versus Boolean function Syntactic symmetries symmetries of representation Semantic symmetries of the object E.g., permutations and negations of variables that preserve the value of the function for all inputs Any syntactic symmetry is also semantic but not vice versa, example: (a)(a’)(a+b)

15 DAC 200215 Speeding up SAT Search Search space may have symmetries May have regions that map 1:1 This makes search redundant (a+d)(b+d)(a+b)(…)…(…) ab’  a’b Ideas for speed-ups Consider equivalence classes under symmetry Pick a representative for each class Search only one representative per class This restricted search is  to original

16 DAC 200216 Symmetry-breaking Predicates To restrict search Add clauses to the original CNF formula (“symmetry-breaking” clauses) They will pick representatives of classes and restrict search Our main task is to find those clauses Use only permutations induced by generators Permutation  group of clauses (a “symmetry-breaking” predicate)

17 DAC 200217 Construction of S.-b. Predicates Earlier work: By Crawford, Ginsberg, Roy and Luks (92,96) Not based on cycle notation for permutations Our construction is more efficient Every cycle considered separately In practice almost all cycles are 2- or 3-cycles  Two types of 2-cycles: (aa’) and (ab)  Symm.-breaking predicates: (a) and (a’+b) resp. For multiple cycles  Procedure to chain symmetry-breaking predicates CGRL

18 DAC 200218 Details: Individial Cycles (1) Use an ordering of all variables (arbitrary) To prevent transitivity violations: (a+b’)(b+c’)(c+a) (the construction by CGRL uses an ordering as well) Symmetry-breaking predicate for cycle (ab): (a  b) aka (a≤b), if a precedes b in the ordering Think of partial variable assignments to b and a  Must choose one from 01 and 10 00 01 10 11 (a’+b)

19 DAC 200219 Details: Individial Cycles (2) S.-b. predicate for cycle (abc) is (a≤b≤c) For 3-var partial assignments, can cycle all 0s to front For longer cycles, still can improve upon CGRL Does ordering affect overall performance? 000 001 010 011 100 101 110 111 (a’+b)(b’+c)

20 DAC 200220 Details: Multiple Cycles(1) Solution space reduction By 2x when (a) is added to break cycle (aa’) Still by 2x if permutation has cycles (aa’) and (bb’) By 4/3x when (a’+b) is added to break cycle (ab) What if a permutation has cycles (ab) and (cd) ? By 2x when (a≤b≤c) is added to break (abc) Suppose you have cycles (aa’) and (uvt) Adding both predicates cuts solution space by 4x Rule of thumb: after breaking a 2-cycle, symmetry-break the square of the permutation Next slide

21 DAC 200221 Details: Multiple Cycles(2) Rule of thumb: after breaking a 3-cycle, symmetry-break the cube of the permutation What if we have both (xy) and (uv) ? Squaring will kill the second cycle, so don’t square! Look at partial assignments for x,y: 00, 01, 10 and 11 For 10 or 01, (x’+y) is all we can do For 00 or 11, can add (u’+v) Adding (x≤y) and (x=y)  (u≤v) cuts the solution space by 8/5x (better than 4/3x) For 3-cycles, add (x=y=z)  (u≤v≤w) or the like For multiple cycles ((x=y=z)&(a=b))  (u≤v), etc

22 DAC 200222 Discussion We detect syntactic symmetries only If more semantic symmetries available, can use them in the same way Symmetry-detection can take long time Sometimes longer than solving SAT In some cases the only symmetry is trivial Symm. detection is often fast in these cases Symmetry-breaking using generators only is not exhaustive (remark by CGRL) But makes symmetry-breaking practical (our result) Pathological cases are uncommon:why?(future work)

23 DAC 200223 Evaluation and Benchmarks Most of DIMACS benchmarks are easy for existing solvers We focus on difficult CNF instances Pigeon-hole-n (PHP-n), Urquhart, etc. Observe that PHP-n can appear in apps EDA layout apps (routing)  symmetry We generate satisfiable and unsatisfiable CNF instances related to PHP-n

24 DAC 200224 FPGA Routing Benchmarks a b c d e f g h 012012

25 DAC 200225 Global Routing Benchmarks S EE E S SS E E S 1 2 3 123 tracks Construct difficult grid-routing instances by “randomized flooding” Then convert to CNF

26 DAC 200226 Empirical Results - Chaff

27 DAC 200227 Empirical Results - Chaff Instance Plain Time -SymmetriesSpeedup S/U#V#CLChaffoutFindingNumber#generatorsSearchTotalSearch sec% ofcycles Time only grout3.3-01S864759219.010%4.798.71E+0910260.673.4828.37 grout3.3-03S960915644.350%8.946.97E+1010290.404.75110.89 grout3.3-04S912835619.360%6.812.61E+1010270.362.7053.79 grout3.3-08S912835621.300%7.143.48E+1010280.672.7331.80 grout3.3-10S10561086228.180%10.653.48E+1010280.852.4533.15 chnl10x11U220112222.170%0.454.20E+28all390.1139.91210.13 chnl10x12U240134481.880%0.616.04E+30all410.12111.63663.00 chnl10x15U3002130657.6125%1.284.50E+37all470.17454.783961.49 chnl11x12U2641476207.370%0.757.31E+32all430.15231.311415.51 chnl11x13U2861742788.3220%1.081.24E+35all450.16633.454792.24 chnl11x20U44042201000100%4.41.89E+52all590.31212.493267.97

28 DAC 200228 Empirical Results - Chaff Instance Plain Time -SymmetriesSpeedup S/U#V#CLChaffoutFindingNumber#generatorsSearchTotalSearch sec% ofcycles Time only fpga10_8S1204487.560%0.636.00E+71all620.0511.15157.56 fpga10_9S1355493.800%0.886.33E+77all680.034.16113.39 fpga12_11S198968694.0050%3.767.18E+77all950.06181.6311377.05 fpga12_12S216112880.200%5.317.44E+77all1040.1314.74616.92 fpga12_8S144560246.7010%1.238.41E+77all720.08188.393103.14 fpga12_9S162684885.0080%1.72.25E+77all790.05504.5616388.89 fpga13_9S176759550.0085%2.572.56E+77all840.06208.818593.75 fpga13_10S1959051000100%4.045.76E+77all930.08242.6012195.12 fpga13_12S23412421000100%6.98.85E+77all1100.08143.2312195.12

29 DAC 200229 Empirical Results - Chaff Instance PlainTime-SymmetriesSpeedup S/U#V#CLChaffoutFindingNumber#generatorsSearchTotSearch sec% ofcycleTime only 2dlx_ca_mcU3250246406.540%38.369.36E+7710666.300.151.04 2pipeU89266952.080%10.742.26E+4510381.560.171.33 2pipe_1_oooU83470262.550%9.378.00E+001031.800.231.41 2pipe_2_oooU92582133.430%11.143.20E+011052.820.251.22 3pipeU24682753336.440%463.577.29E+77108519.650.081.85 2dlx_ca_mcU3250246406.540%3.172.34E+7710645.420.761.21 2pipeU89266952.080%10.472.26E+4510381.300.181.60 2pipe_1_oooU83470262.550%9.028.00E+001031.800.241.41 2pipe_2_oooU92582133.430%11.093.20E+011052.800.251.23 3pipeU24682753336.440%3.631.42E+77107836.200.911.01 4pipeU523780213337.610%9.321.03E+7810142334.000.981.01 5pipeU9471195452325.920%29.423.64E+7810227290.501.021.12

30 DAC 200230 Domain-specific Symmetry-Breaking Predicates We looked at symmetry generators for global routing benchmarks Those symmetries were permutations of routing tracks Symmetry-breaking clauses can be added when converting to CNF Serious speed-up for Chaff in all cases No symmetries left after that

31 DAC 200231 Fast Symmetry Detection 1 2 1 2 AB C x x’ y y’ z z’ Symmetry: (x x’)(y z’)(y’ z) 2 2 2 E 1 2 2 D 2 2 1 2 a b u v

32 DAC 200232 Conclusions Pre-processing speeds up SAT solvers on difficult instances with symmetries Strong empirical results on new and old BMs Improved constructions Reduction to graph automorphism Symmetry-breaking predicates  Cycle-based construction  Using generators only Many important questions not answered Significant on-going work

33 DAC 200233

34 DAC 200234 Empirical Results - Chaff


Download ppt "DAC 20021 Solving Difficult SAT Instances In The Presence of Symmetry Fadi A. Aloul, Arathi Ramani Igor L. Markov and Karem A. Sakallah University of Michigan."

Similar presentations


Ads by Google