38
Exploiting Structure in Symmetry Detection for CNF Paul T. Darga, Mark H. Paul T. Darga, Mark H. Liffiton, Liffiton, Karem A. Sakallah, and Igor L. Karem A. Sakallah, and Igor L. Markov Markov The University of Michigan The University of Michigan

Exploiting Structure in Symmetry Detection for CNF

  • Upload
    bianca

  • View
    30

  • Download
    0

Embed Size (px)

DESCRIPTION

Exploiting Structure in Symmetry Detection for CNF. Paul T. Darga, Mark H. Liffiton, Karem A. Sakallah, and Igor L. Markov The University of Michigan. Structure in SAT. Human-designed artifacts possess considerable structure Manifested in instances of Boolean satisfiability (SAT) Symmetry - PowerPoint PPT Presentation

Citation preview

Page 1: Exploiting Structure in Symmetry Detection for CNF

Exploiting Structure in Symmetry Detection for CNF

Exploiting Structure in Symmetry Detection for CNF

Paul T. Darga, Mark H. Liffiton,Paul T. Darga, Mark H. Liffiton,

Karem A. Sakallah, and Igor L. Karem A. Sakallah, and Igor L. MarkovMarkov

The University of MichiganThe University of Michigan

Page 2: Exploiting Structure in Symmetry Detection for CNF

Structure in SATStructure in SAT

Human-designed artifacts possess Human-designed artifacts possess considerable structureconsiderable structure– Manifested in instances of Boolean satisfiability Manifested in instances of Boolean satisfiability

(SAT)(SAT) SymmetrySymmetry

– Some rearrangement of the components of the Some rearrangement of the components of the design that preserves its structuredesign that preserves its structure

SparsitySparsity– Most design elements are directly related to Most design elements are directly related to

only a few other elements in the whole designonly a few other elements in the whole design We can exploit this structure to speed up SAT We can exploit this structure to speed up SAT

solving!solving!

Page 3: Exploiting Structure in Symmetry Detection for CNF

= (a'+b+c)(a+b'+c')(b'+c)(a')

Symmetry BreakingSymmetry Breaking

Shatter (Aloul et. al)Shatter (Aloul et. al)– Converts CNF formula to a colored undirected Converts CNF formula to a colored undirected

graph (Crawford)graph (Crawford)– Uses Uses nautynauty (McKay), a graph symmetry detection (McKay), a graph symmetry detection

tool, to find the symmetries present in the graphtool, to find the symmetries present in the graph– Converts the symmetries back into additional Converts the symmetries back into additional

symmetry-breaking predicatessymmetry-breaking predicates (SBPs) (SBPs)– Appends the SBPs to the original formulaAppends the SBPs to the original formula– The resulting formula is often much faster to solveThe resulting formula is often much faster to solve

= (a'+b+c)(a+b'+c')(b'+c)

(a'+b+c)(a+b'+c')(b'+c)

(a'+b+c)(a+b'+c')(b'+c)

(a,a')(b,c')(b',c)

Page 4: Exploiting Structure in Symmetry Detection for CNF

Symmetry BreakingSymmetry Breaking

On all but the synthetic Urquhart instances, On all but the synthetic Urquhart instances, symmetry detection with symmetry detection with nautynauty dominates dominates the run time of the Shatter flowthe run time of the Shatter flow

Further improvements must come from Further improvements must come from improved symmetry detectionimproved symmetry detection

74.674.631.5131.518.018.0123.5023.502pipe2pipe82.682.613.8413.842.412.4111.4311.43XORXOR99.499.426.0326.030.170.1725.8625.86ChnlRouteChnlRoute93.993.93.453.450.210.213.243.24FPGARouteFPGARoute88.488.443.8443.845.085.0838.7638.76GRouteGRoute39.439.41.931.931.171.170.760.76UrqUrq84.484.40.450.450.070.070.380.38Hole-nHole-n

% Sym% SymTotalTotalSearchSearchSymSymBenchmarkBenchmark

Page 5: Exploiting Structure in Symmetry Detection for CNF

OutlineOutline

Graph constructionGraph construction nauty nauty : "No Automorphisms, Yes?": "No Automorphisms, Yes?"

– Problem descriptionProblem description– Partition refinementPartition refinement– The search treeThe search tree

saucy saucy : a new symmetry detection tool: a new symmetry detection tool– Algorithmic improvements exploiting structureAlgorithmic improvements exploiting structure– Experimental results: Experimental results: saucysaucy run time run time

insignificant compared to SAT solverinsignificant compared to SAT solver Conclusions and future workConclusions and future work

Page 6: Exploiting Structure in Symmetry Detection for CNF

Graph Construction for CNFGraph Construction for CNF

Two vertices and one Two vertices and one edge for each variable edge for each variable

One vertex for each One vertex for each clauseclause

One edge for each One edge for each literal in each clauseliteral in each clause

Color literals and Color literals and clauses differentlyclauses differently

b'b'

cc

CC33

c'c'

CC22

bb

CC11

aa

a'a'

= C= C11CC22CC33 = (a'+b+c)(a+b'+c')(b'+c) = (a'+b+c)(a+b'+c')(b'+c)

Page 7: Exploiting Structure in Symmetry Detection for CNF

GG = G = G

cc

b'b'

CC33

bb

CC11

c'c'

CC22

a'a'

aa

Symmetry Detection ProblemSymmetry Detection Problem

What precisely is a symmetry of a graph G?What precisely is a symmetry of a graph G?– A symmetry is a permutation A symmetry is a permutation of the labels of the labels

assigned to vertices of G such that Gassigned to vertices of G such that G = G = G– The set of all symmetries is denoted Aut(G)The set of all symmetries is denoted Aut(G)

b'b'

cc

CC33

c'c'

CC22

bb

CC11

aa

a'a'

= (a,a')(b,c')(b',c)(C1,C2)

aa

bb

CC33

b'b'

CC22

a'a'

CC11

c'c'

cc

= (a,b',c')(a',b,c)

GG G G

Page 8: Exploiting Structure in Symmetry Detection for CNF

Symmetry Detection ProblemSymmetry Detection Problem

Problem: there are n! possible Problem: there are n! possible labelings!labelings!– Can we prune the search Can we prune the search

space?space?

(1,2,4)(1,2,4)(1,2,4,3)(1,2,4,3)(1,2,3,4)(1,2,3,4)(1,2,3)(1,2,3)(1,2)(3,4)(1,2)(3,4)(1,2)(1,2)

24312431

24132413

23412341

23142314

21432143

21342134

(2,4)(2,4)(2,4,3)(2,4,3)(2,3,4)(2,3,4)(2,3)(2,3)(3,4)(3,4)

14321432

14231423

13421342

13241324

12431243

12341234

(1,4)(2,3)(1,4)(2,3)43214321(1,3,2,4)(1,3,2,4)34213421(1,4,2,3)(1,4,2,3)43124312(1,3)(2,4)(1,3)(2,4)34123412(1,4)(1,4)42314231(1,3,4)(1,3,4)32413241(1,4,3)(1,4,3)42134213(1,3)(1,3)32143214(1,4,2)(1,4,2)41324132(1,3,4,2)(1,3,4,2)31423142(1,4,3,2)(1,4,3,2)41234123(1,3,2)(1,3,2)31243124

33

11

44

22

Page 9: Exploiting Structure in Symmetry Detection for CNF

Partition RefinementPartition Refinement

We can rule out many candidate labelingsWe can rule out many candidate labelings– Distinguish vertices that cannot possibly be Distinguish vertices that cannot possibly be

mapped into each other by any symmetrymapped into each other by any symmetry– Fast distinguishing method: degreeFast distinguishing method: degree

3355

44

66 77

11

22

00 Select a color in the graphSelect a color in the graph Compute the number of Compute the number of

connections every vertex has connections every vertex has to that colorto that color

Distinguish vertices within Distinguish vertices within colors based on that countcolors based on that count

Repeat until coloring stabilizesRepeat until coloring stabilizes Refinement distinguished all Refinement distinguished all

vertices! This graph has no vertices! This graph has no symmetry besides the symmetry besides the identity.identity.

1 1

3

3

4 4

2

2

0 0

1 1

0

0

00

0 0

1

1

0

1

0 1

0 0

0

0

0 0

0

1

1 0

Page 10: Exploiting Structure in Symmetry Detection for CNF

Partition RefinementPartition Refinement

In a stable coloring:In a stable coloring:– vertices in different colors vertices in different colors definitely cannotdefinitely cannot map map

into each other in some symmetry of the graphinto each other in some symmetry of the graph– vertices in the same color vertices in the same color may may map into each map into each

other (i.e. refinement is only an approximation)other (i.e. refinement is only an approximation)

b'b'

cc

CC33

c'c'

CC22

bb

CC11

aa

a'a'

11

22 33

7766

44 55

Page 11: Exploiting Structure in Symmetry Detection for CNF

Select a non-singleton color T (for target) and generate Select a non-singleton color T (for target) and generate |T| colorings, each with one element of T artificially |T| colorings, each with one element of T artificially distinguished from the remainder of Tdistinguished from the remainder of T

Discrete colorings (leaf nodes) yield likely symmetriesDiscrete colorings (leaf nodes) yield likely symmetries

Out of 6! = 720 possible Out of 6! = 720 possible labelings, partition labelings, partition refinement pruned away refinement pruned away all but the six all but the six symmetries of the graphsymmetries of the graph

1 = (2,4)(3,5)2 = (0,3)(1,2) 3 = (0,3,5)(1,2,4)

The Search TreeThe Search Tree

22

00

44

11

33 55

00 11 22 33 44 55

00 33 55 11 22 44

00 33 55 44 22 1100 33 55 22 44 11

00 33 55 11 22 44

00 33 55 22 44 1133 00 55 11 22 44

33 00 55 11 44 2255 00 33 11 22 44

55 00 33 11 22 44

00 55 33 22 44 1100 55 33 22 44 11

= 035421= 035421

=0 =

33 00 55 44 11 2233 00 55 11 44 22

33 55 00 11 44 2233 55 00 11 44 22

55 00 33 22 11 4455 00 33 11 22 44

55 33 00 11 22 4455 33 00 11 22 44

4 = (0,5,3)(1,4,2) 5 = (0,5)(1,4)

0 = 1 = (2,4)(3,5)2 = (0,3)(1,2)3 = (0,3,5)(1,2,4)4 = (0,5,3)(1,4,2)5 = (0,5)(1,4)

Page 12: Exploiting Structure in Symmetry Detection for CNF

Pruning Using GeneratorsPruning Using Generators

Too many symmetries: |Aut(G)| is O(n!)Too many symmetries: |Aut(G)| is O(n!) Group theory provides the answer: Group theory provides the answer: generatorsgenerators

– Irredundant set H Irredundant set H Aut(G) implicitly represents Aut(G) implicitly representsentire set of symmetriesentire set of symmetries

– Exponential compression: |H| Exponential compression: |H| log log22|Aut(G)||Aut(G)| We prune away subtrees guaranteed to yield We prune away subtrees guaranteed to yield

symmetries that we can already generate with symmetries that we can already generate with previously discovered symmetriespreviously discovered symmetries

Page 13: Exploiting Structure in Symmetry Detection for CNF

saucy : Exploiting Structuresaucy : Exploiting Structure

nautynauty works very well on small graphs (and works very well on small graphs (and thus small formulas) but fails to scalethus small formulas) but fails to scale– Takes considerably longer than the SAT solver Takes considerably longer than the SAT solver

after adding SBPs to the CNF formulaafter adding SBPs to the CNF formula– Runs out of memory on formulas with Runs out of memory on formulas with

corresponding graphs having >50,000 verticescorresponding graphs having >50,000 vertices saucy saucy improvement #1: sparse improvement #1: sparse

representationrepresentation saucysaucy improvement #2: use knowledge of improvement #2: use knowledge of

graph constructiongraph construction– Clause vertices only connected to their literalsClause vertices only connected to their literals– Never connected to each otherNever connected to each other

Page 14: Exploiting Structure in Symmetry Detection for CNF

0 0

0 0

0

0

0

0

0

0

0

0

1 1 1 1

1

1

1

11

1

1

1 0 0

0 0

saucy : Algorithmic Improvementssaucy : Algorithmic Improvements

Positive

Negative

Clauses

nautynauty : :– Iterate over all colorsIterate over all colors– For each vertex, count For each vertex, count

connections to refining connections to refining color, and sortcolor, and sort

saucysaucy improvement #3: improvement #3:– Determine directly Determine directly

connected colorsconnected colors– For each vertex, count For each vertex, count

connections to refining connections to refining color, and sortcolor, and sort

saucysaucy improvement #4: improvement #4:– For each vertex in For each vertex in

refining color, count refining color, count connectionsconnections

– For every color For every color touched, sort the touched, sort the countscounts

Page 15: Exploiting Structure in Symmetry Detection for CNF

saucy : Asymptotic Performancesaucy : Asymptotic Performance Partition refinementPartition refinement

– nautynauty implementation: O(n implementation: O(n33))– saucysaucy improvement #4: O(n improvement #4: O(n22 log n) log n)

Search tree sizeSearch tree size– Worst case: exponentialWorst case: exponential– No “bad leaves”: O(nNo “bad leaves”: O(n33))– In practice: O(n)In practice: O(n)

Complete algorithmComplete algorithm– Worst case: exponentialWorst case: exponential– No “bad leaves”: O(nNo “bad leaves”: O(n55 log n) log n)– Much lower in practiceMuch lower in practice

Page 16: Exploiting Structure in Symmetry Detection for CNF

saucy : Empirical Performancesaucy : Empirical Performance

Inst.Inst. nn zChaffzChaff nautynauty % % SymSym

saucysaucy % Sym% Sym

s4-4-3-s4-4-3-11

1035103544

218.53218.53 88.7488.74 28.928.9 0.110.11 0.050.05

s4-4-3-s4-4-3-22

99749974 877.59877.59 79.6779.67 8.38.3 0.100.10 0.010.01

s4-4-3-s4-4-3-33

99709970 884.78884.78 75.9875.98 7.97.9 0.090.09 0.010.01

s4-4-3-s4-4-3-44

1071107144

464.46464.46 155.31155.31 25.125.1 0.140.14 0.030.03

s4-4-3-s4-4-3-55

1107110722

134.09134.09 101.63101.63 43.143.1 0.110.11 0.080.08

s4-4-3-s4-4-3-66

96209620 13.2413.24 76.4876.48 85.285.2 0.100.10 0.750.75

s4-4-3-s4-4-3-77

1036103622

18.2718.27 78.9678.96 81.281.2 0.100.10 0.540.54

s4-4-3-s4-4-3-88

66086608 0.680.68 28.4228.42 97.797.7 0.060.06 8.118.11

2pipe2pipe 35753575 0.130.13 2.932.93 95.895.8 0.020.02 13.3313.333pipe3pipe 10041004

886.446.44 57.5357.53 89.989.9 0.130.13 1.981.98

4pipe4pipe 2154215477

153.50153.50 523.64523.64 77.377.3 0.490.49 0.320.32

5pipe5pipe 3874387466

122.85122.85 3144.83144.855

96.296.2 1.651.65 1.331.33

Page 17: Exploiting Structure in Symmetry Detection for CNF

saucy : Empirical Performancesaucy : Empirical Performance

0.01

0.1

1

10

100

1000

10000

100 1000 10000 100000

Vertices

Tim

e (s

)

nautynauty #4saucy #1saucy #2saucy #3saucy #4

Page 18: Exploiting Structure in Symmetry Detection for CNF

Conclusions and Future WorkConclusions and Future Work

CNF formulas from EDA applications exhibit CNF formulas from EDA applications exhibit considerable structure (symmetry and sparsity)considerable structure (symmetry and sparsity)

saucysaucy, a new implementation of the , a new implementation of the nautynauty symmetry-detection systemsymmetry-detection system– Exploits structure to improve symmetry Exploits structure to improve symmetry

detection performance by several orders of detection performance by several orders of magnitudemagnitude

– Symmetry-detection time insignificant compared Symmetry-detection time insignificant compared to SAT solverto SAT solver

Future workFuture work– Apply Apply saucy saucy to more sparse domains which may to more sparse domains which may

benefit from symmetry detectionbenefit from symmetry detection– Find other applications of partition refinement—Find other applications of partition refinement—

a surprisingly general framework for a surprisingly general framework for distinguishing objects in a finite domaindistinguishing objects in a finite domain

Page 19: Exploiting Structure in Symmetry Detection for CNF
Page 20: Exploiting Structure in Symmetry Detection for CNF

saucy : Exploiting Structuresaucy : Exploiting Structure

Graphs from typical CNF formulas possess a Graphs from typical CNF formulas possess a particular structureparticular structure– By construction, clauses are never connected By construction, clauses are never connected

to other clausesto other clauses– Thus, when refining the partition with a color of Thus, when refining the partition with a color of

clauses, we can ignore all colors containing clauses, we can ignore all colors containing clauses, since we know that the connection clauses, since we know that the connection count for every vertex will be zerocount for every vertex will be zero

Such graphs are also very sparseSuch graphs are also very sparse– Few literals are connected to most clausesFew literals are connected to most clauses– Few clauses are connected to most literalsFew clauses are connected to most literals– Thus, we aggressively avoid work by Thus, we aggressively avoid work by

maintaining data structures (like adjacency maintaining data structures (like adjacency lists) which explicitly direct the search and lists) which explicitly direct the search and refinement proceduresrefinement procedures

Page 21: Exploiting Structure in Symmetry Detection for CNF

saucy : Exploiting Structuresaucy : Exploiting Structure

1

1

1

1

1

1

1 1 1

1 1 1

Page 22: Exploiting Structure in Symmetry Detection for CNF

saucy example: Hole-3saucy example: Hole-3

Page 23: Exploiting Structure in Symmetry Detection for CNF

saucy : Exploiting Structuresaucy : Exploiting Structure

We can generalize this idea of avoiding We can generalize this idea of avoiding obviously disconnected colorsobviously disconnected colors

saucysaucy improvement #3 improvement #3– Iterate over a color's adjacency lists to Iterate over a color's adjacency lists to

determine connected colorsdetermine connected colors– Compute connection counts only for those Compute connection counts only for those

colorscolors

Page 24: Exploiting Structure in Symmetry Detection for CNF

0 0

0 0

0

0

0

0

0

0

0

0

0 0

0 0

1 1 1 1

1

1

1

11

1

1

1

saucy example: Hole-3saucy example: Hole-3

nautynauty : :– Iterate over all colorsIterate over all colors– For each vertex, count For each vertex, count

connections to refining connections to refining color, and sortcolor, and sort

saucysaucy improvement #3: improvement #3:– Determine directly Determine directly

connected colorsconnected colors– For each vertex, count For each vertex, count

connections to refining connections to refining color, and sortcolor, and sort

saucysaucy improvement #4: improvement #4:– For each vertex in For each vertex in

refining color, count refining color, count connectionsconnections

– For every color For every color touched, sort the touched, sort the countscounts

Positive

Negative

Clauses

Page 25: Exploiting Structure in Symmetry Detection for CNF

saucy : Exploiting Structuresaucy : Exploiting Structure

nautynauty works very well on small graphs (and thus small works very well on small graphs (and thus small formulas) but fails to scaleformulas) but fails to scale– Takes considerably longer than the SAT solver after adding Takes considerably longer than the SAT solver after adding

SBPsSBPs– Runs out of memory on formulas with corresponding graphs Runs out of memory on formulas with corresponding graphs

having >50,000 verticeshaving >50,000 vertices saucy saucy improvement #1: sparse representationimprovement #1: sparse representation

– Input graph is represented in adjacency-list formatInput graph is represented in adjacency-list format

0.01

1

100

10000

100 1000 10000 100000

Vertices

Tim

e (

s)

nauty

saucy

Page 26: Exploiting Structure in Symmetry Detection for CNF

saucy : Exploiting Structuresaucy : Exploiting Structure

Graphs from CNF formulas possess a particular Graphs from CNF formulas possess a particular structurestructure– Clause vertices only connected to their literalsClause vertices only connected to their literals– Never connected to each otherNever connected to each other

saucysaucy improvement #2: ignore colors containing improvement #2: ignore colors containing clauses when refining with clausesclauses when refining with clauses– We know that the connection count for every vertex will We know that the connection count for every vertex will

be zerobe zero

0.01

1

100

10000

100 1000 10000 100000

nauty

saucy

Page 27: Exploiting Structure in Symmetry Detection for CNF

GG = G = G cc

b'b'

CC33

bb

CC11

c'c'

CC22

a'a'

aa

aa

bb

CC33

b'b'

CC22

a'a'

CC11

c'c'

cc

GG G G

Symmetry Detection ProblemSymmetry Detection Problem

What precisely is a symmetry of a graph G?What precisely is a symmetry of a graph G?– A symmetry is a permutation A symmetry is a permutation of the labels of the labels

assigned to vertices of G such that Gassigned to vertices of G such that G = G = G– The set of all symmetries is denoted Aut(G)The set of all symmetries is denoted Aut(G)

b'b'

cc

CC33

c'c'

CC22

bb

CC11

aa

a'a'

= (a,a')(b,c')(b',c)(C1,C2) = (a,c',b')(a',c,b)

Page 28: Exploiting Structure in Symmetry Detection for CNF

The Search TreeThe Search Tree

We have a stable ordered partition We have a stable ordered partition of the of the vertices of the graph. How can we extract vertices of the graph. How can we extract Aut(G)?Aut(G)?

Recall the naïve approach: we need labelings Recall the naïve approach: we need labelings (i.e. discrete colorings)(i.e. discrete colorings)

We select a non-singleton color T (for target) We select a non-singleton color T (for target) and generate |T| colorings, each with one and generate |T| colorings, each with one element of T individualized "in front of" the element of T individualized "in front of" the remainder of Tremainder of T– Partitions the set of all discrete colorings Partitions the set of all discrete colorings

descendant from descendant from We can then recursively apply partition We can then recursively apply partition

refinement to further prune the search space!refinement to further prune the search space! Fix the first discrete coloring found as Fix the first discrete coloring found as ; the ; the

remaining discrete colorings yield likely remaining discrete colorings yield likely candidates for Aut(G)candidates for Aut(G)

Page 29: Exploiting Structure in Symmetry Detection for CNF

1 = (2,4)(3,5)2 = (0,3)(1,2) 3 = (0,3,5)(1,2,4)

The Search TreeThe Search Tree

22

00

44

11

33 55

00 11 22 33 44 55

00 33 55 11 22 44

00 33 55 44 22 11

00 33 55 22 44 11

00 33 55 11 22 44

00 33 55 22 44 11

33 00 55 11 22 44

33 00 55 11 44 22

55 00 33 11 22 44

55 00 33 11 22 44

00 55 33 22 44 11

00 55 33 22 44 11

= 035421= 035421

=0 =

33 00 55 44 11 22

33 00 55 11 44 22

33 55 00 11 44 22

33 55 00 11 44 22

55 00 33 22 11 44

55 00 33 11 22 44

55 33 00 11 22 44

55 33 00 11 22 44

4 = (0,5,3)(1,4,2) 5 = (0,5)(1,4)

Out of 6! = 720 possible labelings, partition refinement Out of 6! = 720 possible labelings, partition refinement pruned away 714, leaving the six symmetries of the graphpruned away 714, leaving the six symmetries of the graph

Discrete colorings do not necessarily yield symmetriesDiscrete colorings do not necessarily yield symmetries– Refinement is only an approximationRefinement is only an approximation– Only occurs on highly regular graphs, which are uncommon Only occurs on highly regular graphs, which are uncommon

in EDA applicationsin EDA applications

Page 30: Exploiting Structure in Symmetry Detection for CNF

saucy : Empirical Performancesaucy : Empirical Performance

InstanceInstance VerticesVertices nautynauty saucy #4saucy #4 SpeedupSpeedup zChaffzChaff w/SBPsw/SBPs

UrqUrq 299299 0.020.02 0.010.01 2.002.00 1.731.73 0.020.02

HoleHole 301301 0.0250.025 0.010.01 2.502.50 523.39523.39 0.020.02

XorXor 464464 0.060.06 0.010.01 6.006.00 timeouttimeout 1.751.75

FpgaFpga 671671 0.18250.1825 0.01250.0125 14.6014.60 timeouttimeout 0.030.03

s4-4-3-1s4-4-3-1 1035410354 88.7488.74 0.110.11 806.73806.73 441.18441.18 218.53218.53

s4-4-3-2s4-4-3-2 99749974 79.6779.67 0.10.1 796.70796.70 204.29204.29 877.59877.59

s4-4-3-3s4-4-3-3 99709970 75.9875.98 0.090.09 844.22844.22 timeouttimeout 884.78884.78

s4-4-3-4s4-4-3-4 1071410714 155.31155.31 0.140.14 1109.361109.36 timeouttimeout 464.46464.46

s4-4-3-5s4-4-3-5 1107211072 101.63101.63 0.110.11 923.91923.91 timeouttimeout 134.09134.09

s4-4-3-6s4-4-3-6 96209620 76.4876.48 0.10.1 764.80764.80 679.13679.13 13.2413.24

s4-4-3-7s4-4-3-7 1036210362 78.9678.96 0.10.1 789.60789.60 831.01831.01 18.2718.27

s4-4-3-8s4-4-3-8 66086608 28.4228.42 0.060.06 473.67473.67 123.82123.82 0.680.68

s4-4-3-9s4-4-3-9 1292012920 209.52209.52 0.170.17 1232.471232.47 75.2175.21 timeouttimeout

2pipe2pipe 35753575 2.932.93 0.020.02 146.50146.50 0.180.18 0.130.13

3pipe3pipe 1004810048 57.5357.53 0.130.13 442.54442.54 3.203.20 6.446.44

4pipe4pipe 2154721547 523.64523.64 0.490.49 1068.651068.65 228.82228.82 153.50153.50

5pipe5pipe 3874638746 3144.853144.85 1.651.65 1905.971905.97 347.92347.92 122.85122.85

Page 31: Exploiting Structure in Symmetry Detection for CNF

Inst.Inst. nn zChaffzChaff SBPsSBPs nautynauty %Sym%Sym saucysaucy %Sym%SymUrqUrq 299299 1.731.73 0.020.02 0.020.02 50.0%50.0% 0.010.01 33.3%33.3%HoleHole 301301 523.3523.3

990.020.02 0.0250.025 55.6%55.6% 0.010.01 33.3%33.3%

XorXor 464464 timeotimeoutut

1.751.75 0.060.06 3.3%3.3% 0.010.01 0.6%0.6%

FpgFpgaa

671671 timeotimeoutut

0.030.03 0.1820.18255

85.9%85.9% 0.0120.01255

Page 32: Exploiting Structure in Symmetry Detection for CNF

saucy : Empirical Performancesaucy : Empirical Performance

Inst.Inst. nn zChaffzChaff nautynauty % % SymSym

saucysaucy % Sym% Sym

s4-4-3-s4-4-3-11

1035103544

218.53218.53 88.7488.74 28.928.9 0.110.11 0.050.05

s4-4-3-s4-4-3-22

99749974 877.59877.59 79.6779.67 8.38.3 0.100.10 0.010.01

s4-4-3-s4-4-3-33

99709970 884.78884.78 75.9875.98 7.97.9 0.090.09 0.010.01

s4-4-3-s4-4-3-44

1071107144

464.46464.46 155.31155.31 25.125.1 0.140.14 0.030.03

s4-4-3-s4-4-3-55

1107110722

134.09134.09 101.63101.63 43.143.1 0.110.11 0.080.08

s4-4-3-s4-4-3-66

96209620 13.2413.24 76.4876.48 85.285.2 0.100.10 0.750.75

s4-4-3-s4-4-3-77

1036103622

18.2718.27 78.9678.96 81.281.2 0.100.10 0.540.54

s4-4-3-s4-4-3-88

66086608 0.680.68 28.4228.42 97.797.7 0.060.06 8.118.11

2pipe2pipe 35753575 0.130.13 2.932.93 95.895.8 0.020.02 13.3313.333pipe3pipe 10041004

886.446.44 57.5357.53 89.989.9 0.130.13 1.981.98

4pipe4pipe 2154215477

153.50153.50 523.64523.64 77.377.3 0.490.49 0.320.32

5pipe5pipe 3874387466

122.85122.85 3144.83144.855

96.296.2 1.651.65 1.331.33

Page 33: Exploiting Structure in Symmetry Detection for CNF

saucy : Empirical Performancesaucy : Empirical Performance

Inst.Inst. nn zChaffzChaff nautynauty % Sym% Sym saucysaucy % % SymSym

2pipe2pipe 35753575 0.130.13 2.932.93 95.895.8 0.020.02 13.313.33pipe3pipe 10041004

886.446.44 57.5357.53 89.989.9 0.130.13 1.981.98

4pipe4pipe 2154215477

153.50153.50 523.64523.64 77.377.3 0.490.49 0.320.32

5pipe5pipe 3874387466

122.85122.85 3144.83144.855

96.296.2 1.651.65 1.331.33

Page 34: Exploiting Structure in Symmetry Detection for CNF

saucy : Runtime Performancesaucy : Runtime Performance

Speedup is roughly linear Speedup is roughly linear in the number of verticesin the number of vertices

Primarily due to efficient Primarily due to efficient use of sparsity within the use of sparsity within the partition refinement partition refinement procedureprocedure– Search tree maintenance Search tree maintenance

has relatively low has relatively low overheadoverhead

We ran We ran saucysaucy and and nautynauty on the complement graphson the complement graphs– Isomorphic search trees!Isomorphic search trees!– Isolate performance Isolate performance

difference in refinementdifference in refinement Slowdown is roughly linear, Slowdown is roughly linear,

which is expected given which is expected given difference in representationdifference in representation

Page 35: Exploiting Structure in Symmetry Detection for CNF

Ordered PartitionsOrdered Partitions

The partition refinement algorithm based on The partition refinement algorithm based on degree operates independently of the labeling degree operates independently of the labeling of the graphof the graph

To guarantee identical partition To guarantee identical partition representations for isomorphic graphs, we representations for isomorphic graphs, we impose an ordering on the colors in the impose an ordering on the colors in the partitionpartition– When a color is split, the new colors are When a color is split, the new colors are

assigned in sorted order of degree with the assigned in sorted order of degree with the refining colorrefining color

– Refining colors are chosen based on position Refining colors are chosen based on position within the partition ordering, not based on labelwithin the partition ordering, not based on label

The search algorithm absolutely the The search algorithm absolutely the refinement procedure to be labeling-refinement procedure to be labeling-independent!independent!

Page 36: Exploiting Structure in Symmetry Detection for CNF

Partition RefinementPartition Refinement

In a stable coloring:In a stable coloring:– vertices in different colors vertices in different colors definitely cannotdefinitely cannot map map

into each other in some symmetry of the graphinto each other in some symmetry of the graph– vertices in the same color vertices in the same color may may map into each map into each

other (i.e. refinement is only an approximation)other (i.e. refinement is only an approximation)

b'b'

cc

CC33

c'c'

CC22

bb

CC11

aa

a'a'

11

22 33

7766

44 55

Refinement can't distinguish any Refinement can't distinguish any vertices (all have degree two)vertices (all have degree two)– Vertices in the triangle and Vertices in the triangle and

square cannot map into each square cannot map into each otherother

– Fortunately, this rarely happens Fortunately, this rarely happens with EDA instanceswith EDA instances

An exact, polynomial time An exact, polynomial time partition refinement algorithm partition refinement algorithm would prove that the graph would prove that the graph isomorphism problem is in Pisomorphism problem is in P

Page 37: Exploiting Structure in Symmetry Detection for CNF

Additional Pruning MethodsAdditional Pruning Methods

Enumerating all symmetries is not an optionEnumerating all symmetries is not an option– |Aut(G)| is O(n!)|Aut(G)| is O(n!)– Many EDA-related instances possess Many EDA-related instances possess

exponentially many symmetriesexponentially many symmetries Group theory provides the answer: Group theory provides the answer: generatorsgenerators

– Find a set H Find a set H Aut(G) that implicitly represents Aut(G) that implicitly represents the entire set of symmetriesthe entire set of symmetries

– Every element of Aut(G) is a product Every element of Aut(G) is a product (composition) of integer powers of elements of (composition) of integer powers of elements of HH

– Exponential compression: |H| Exponential compression: |H| log log22|Aut(G)||Aut(G)| We prune away subtrees guaranteed to yield We prune away subtrees guaranteed to yield

symmetries that we can already generate with symmetries that we can already generate with previously discovered symmetriespreviously discovered symmetries

Page 38: Exploiting Structure in Symmetry Detection for CNF

Symmetry BreakingSymmetry Breaking

On all but the synthetic Urquhart instances, On all but the synthetic Urquhart instances, symmetry detection with symmetry detection with nautynauty dominates dominates the run time of the Shatter flowthe run time of the Shatter flow

Further improvements must come from Further improvements must come from improved symmetry detectionimproved symmetry detection

BenchmarkBenchmark SymSym SearchSearch TotalTotal % Sym% SymHole-nHole-n 0.380.38 0.070.07 0.450.45 84.484.4UrqUrq 0.760.76 1.171.17 1.931.93 39.439.4GRouteGRoute 38.7638.76 5.085.08 43.8443.84 88.488.4FPGARouteFPGARoute 3.243.24 0.210.21 3.453.45 93.993.9ChnlRouteChnlRoute 25.8625.86 0.170.17 26.0326.03 99.499.4XORXOR 11.4311.43 2.412.41 13.8413.84 82.682.62pipe2pipe 23.5023.50 8.018.01 31.5131.51 74.674.6