Symmetry- -breaking for SAT: breaking for SAT: Symmetry The - - PowerPoint PPT Presentation

symmetry breaking for sat breaking for sat symmetry the
SMART_READER_LITE
LIVE PREVIEW

Symmetry- -breaking for SAT: breaking for SAT: Symmetry The - - PowerPoint PPT Presentation

Symmetry- -breaking for SAT: breaking for SAT: Symmetry The Mysteries of Logic Minimization The Mysteries of Logic Minimization Fadi A. A. Aloul Aloul, Igor L. Markov , Igor L. Markov Fadi and Karem Karem A. A. Sakallah Sakallah and


slide-1
SLIDE 1

Symmetry Symmetry-

  • breaking for SAT:

breaking for SAT: The Mysteries of Logic Minimization The Mysteries of Logic Minimization

Fadi Fadi A.

  • A. Aloul

Aloul, Igor L. Markov , Igor L. Markov and and Karem Karem A.

  • A. Sakallah

Sakallah

University of Michigan, EECS University of Michigan, EECS

slide-2
SLIDE 2

Outline Outline

  • Motivation and Goals

Motivation and Goals

  • Mathematical Background

Mathematical Background

  • Previous work

Previous work

  • New Constructions for Single Perms

New Constructions for Single Perms

  • Symmetry

Symmetry-

  • breaking for Multiple Generators

breaking for Multiple Generators

  • Conclusions and On

Conclusions and On-

  • going work

going work

slide-3
SLIDE 3

Motivation Motivation

  • Exponential gap in proof lengths

Exponential gap in proof lengths

  • The pigeon

The pigeon-

  • hole principle (as a SAT instance)

hole principle (as a SAT instance)

  • Exponential lower bounds for

Exponential lower bounds for resolution resolution proofs proofs

  • Beame

Beame, Karp and , Karp and Pitassi Pitassi, 2002: , 2002: Ω Ω (2 (2n/20

n/20)

)

  • Resolution + reasoning by symmetry

Resolution + reasoning by symmetry → → poly poly-

  • sized proofs

sized proofs

  • Krishnamurthy, 1988

Krishnamurthy, 1988

  • Lower bounds on resolution proofs

Lower bounds on resolution proofs apply apply to the behavior of DP/DLL SAT solvers to the behavior of DP/DLL SAT solvers

  • One must also capture the complexity of symmetry

One must also capture the complexity of symmetry extraction and the size of symmetry representation extraction and the size of symmetry representation

slide-4
SLIDE 4

Goals of This Work Goals of This Work

  • Push the envelope of constraint satisfaction

Push the envelope of constraint satisfaction

  • Problem instances from apps have

Problem instances from apps have symms symms

  • Develop generic methods for

Develop generic methods for CSPs CSPs

  • For now, our focus is on Boolean

For now, our focus is on Boolean Satisfiability Satisfiability

  • This problem is fundamental to Math & CS

This problem is fundamental to Math & CS

  • Yet, we feel our work applies beyond SAT

Yet, we feel our work applies beyond SAT

  • 0-
  • 1 ILP and generic ILP are natural extensions

1 ILP and generic ILP are natural extensions

  • High

High-

  • performance, competitive

performance, competitive methods methods

  • Must minimize overhead of dealing w symmetry

Must minimize overhead of dealing w symmetry

slide-5
SLIDE 5

How We Do It How We Do It

CNF Graph Graph symmetries CNF symmetries Pre-processed CNF instance Call generic SAT solver

slide-6
SLIDE 6

Benchmarking Benchmarking

  • Take a strong SAT solver, e.g., Chaff

Take a strong SAT solver, e.g., Chaff

  • Run it on a CNF benchmark

Run it on a CNF benchmark

  • Run the proposed flow

Run the proposed flow

  • Compare runtimes

Compare runtimes

  • Plain SAT solver

Plain SAT solver versus versus

  • Pre

Pre-

  • processing + SAT solver

processing + SAT solver

  • No assumption about “symmetries being

No assumption about “symmetries being known” known” – – this enables many applications this enables many applications

slide-7
SLIDE 7

Why Pre Why Pre-

  • processing?

processing?

  • Alternative: hack some SAT solver

Alternative: hack some SAT solver

  • More sophisticated strategies possible

More sophisticated strategies possible

  • Ditto for publications

Ditto for publications ☺ ☺

  • Can potentially capture “partial symmetries”

Can potentially capture “partial symmetries”

  • Additional overhead

Additional overhead: is this really worth doing? : is this really worth doing?

  • Li and

Li and Purdom Purdom, SAT 2002: , SAT 2002: in some cases, yes in some cases, yes

  • Do you really want to hack Chaff ?

Do you really want to hack Chaff ?

  • Perhaps, but that does not prevent

Perhaps, but that does not prevent applying pre applying pre-

  • processing first !

processing first !

slide-8
SLIDE 8

Our Experience Our Experience

  • Our DAC 2002 paper shows that

Our DAC 2002 paper shows that

  • Pre

Pre-

  • processing + Chaff

processing + Chaff beats beats plain Chaff plain Chaff ( (or is very close)

  • r is very close) on realistic benchmarks
  • n realistic benchmarks
  • Symmetry extraction time is significant

Symmetry extraction time is significant

  • In some cases

In some cases that that limits competitiveness limits competitiveness

  • Sometimes there are very few symmetries

Sometimes there are very few symmetries

→ → Symmety

Symmety extraction isn’t very useful extraction isn’t very useful and therefore must be fast and therefore must be fast

  • There may be more room for improvement

There may be more room for improvement

slide-9
SLIDE 9

Mathematical Background(1) Mathematical Background(1)

  • A symmetry (in a broad sense) of an object

A symmetry (in a broad sense) of an object

  • Is a transformation that preserves its properties

Is a transformation that preserves its properties

  • From Abstract Algebra

From Abstract Algebra

  • A

A group group is a set with a binary operation on it is a set with a binary operation on it

  • Must be associative

Must be associative

  • Must have a neutral element (unit)

Must have a neutral element (unit)

  • Every element must have a (unique) inverse

Every element must have a (unique) inverse

  • A

A subgroup subgroup is a subset closed under the op is a subset closed under the op

  • Is a group by itself

Is a group by itself

slide-10
SLIDE 10

Mathematical Background(2) Mathematical Background(2)

  • The Lagrange Theorem

The Lagrange Theorem

  • The size of a finite group

The size of a finite group is divisible by the size of its subgroups is divisible by the size of its subgroups

  • Corollary:

Corollary: proper subgroups are ½ size or less proper subgroups are ½ size or less

  • A

A set of generators set of generators of a group

  • f a group
  • Every group element is a product of generators

Every group element is a product of generators

  • For a group of size

For a group of size N N, , an irredundant set of an irredundant set of generators has no more than generators has no more than log2N elements elements

slide-11
SLIDE 11

Relevant History Relevant History

  • Felix Klein studied symmetries

Felix Klein studied symmetries

  • f geometric shapes in the XIX century
  • f geometric shapes in the XIX century
  • Group Theory

Group Theory was developed in XIX century was developed in XIX century as a formalism for capturing symmetries as a formalism for capturing symmetries

  • Used much earlier, e.g., by Galois

Used much earlier, e.g., by Galois

  • Today is one of the major branches of Mathematics

Today is one of the major branches of Mathematics

  • Ref:

Ref: M. Hall Jr. “The Theory of Groups”, 1959

  • M. Hall Jr. “The Theory of Groups”, 1959
  • Symmetries are fundamental to modern physics

Symmetries are fundamental to modern physics

  • Quantum Mechanics and Relativity

Quantum Mechanics and Relativity deal with groups of symmetries deal with groups of symmetries

  • It is seems natural to try using Group Theory in CS!

It is seems natural to try using Group Theory in CS!

slide-12
SLIDE 12

More Definitions More Definitions

  • Symmetries of a graph

Symmetries of a graph

  • Permutations of vertices that preserve edges

Permutations of vertices that preserve edges

  • Symmetries of a SAT formula

Symmetries of a SAT formula

  • Permutations of variables that

Permutations of variables that preserve clauses preserve clauses

  • Simultaneous negations of sets of

Simultaneous negations of sets of vars vars that that

  • “phase

“phase-

  • shift” symmetries (auto

shift” symmetries (auto-

  • symmetries)

symmetries)

  • Compositions of the two types

Compositions of the two types

  • Can talk about

Can talk about the symmetry group the symmetry group of

  • f

(i) a graph, (ii) a CNF formula (i) a graph, (ii) a CNF formula

slide-13
SLIDE 13

Computational Group Computational Group Theory( Theory(CGT CGT) )

  • Finite (and some infinite!)

Finite (and some infinite!) groups groups routinely routinely represented by generators represented by generators

  • The

The CGT CGT was in the works since 1900s, was in the works since 1900s, and flourished since 1960s and flourished since 1960s

  • Reasonably efficient algorithms for perm groups

Reasonably efficient algorithms for perm groups (Sims, Knuth, (Sims, Knuth, Babai Babai, others) , others)

  • Excellent implementations available today (GAP)

Excellent implementations available today (GAP)

  • Graph

Graph Automorphism Automorphism programs (NAUTY) programs (NAUTY)

slide-14
SLIDE 14

Using Symmetries in SAT Using Symmetries in SAT

CNF Graph Graph symmetries CNF symmetries Pre-processed CNF instance Call generic SAT solver

Symmetry-breaking

slide-15
SLIDE 15

Symmetry Symmetry-

  • breaking Predicates

breaking Predicates

  • A symmetry

A symmetry-

  • breaking predicate (

breaking predicate (SBP SBP) ) is what we add to a CNF formula is what we add to a CNF formula ☺ ☺

  • to speed up DLL SAT solvers

to speed up DLL SAT solvers by pruning the search space by pruning the search space

  • If a formula is

If a formula is satisfiable satisfiable, a valid SBP must , a valid SBP must eval eval to TRUE on some SAT assignments to TRUE on some SAT assignments

  • E.g., if

E.g., if N N truth assignments are symmetric, truth assignments are symmetric, an SBP may pick only one of them an SBP may pick only one of them

  • We allow “

We allow “partial partial SBPs SBPs” that pick ” that pick >1 >1 solutions solutions

slide-16
SLIDE 16

Symmetry Symmetry-

  • Breaking Predicates

Breaking Predicates

SBP

Classes of symmetric truth assignments SAT assignments

slide-17
SLIDE 17

Previous Work (1) Previous Work (1)

  • Crawford et al., “Symmetry

Crawford et al., “Symmetry-

  • breaking

breaking Predicates For Search Problems”, 1996 Predicates For Search Problems”, 1996

  • CNF symmetries via Graph

CNF symmetries via Graph Automorphism Automorphism

  • Full

Full lex lex-

  • leader

leader SBPs SBPs from symmetries from symmetries

  • Rather impractical

Rather impractical per se per se, but of fundamental value , but of fundamental value

  • The concept of a symmetry tree

The concept of a symmetry tree

  • Not used in our work

Not used in our work

  • A discussion of examples, several ideas we use

A discussion of examples, several ideas we use

  • No convincing empirical results

No convincing empirical results

slide-18
SLIDE 18

How to Select How to Select Lex Lex-

  • leaders

leaders

  • Idea: select lexicographically smallest

Idea: select lexicographically smallest assignments from each equivalence class assignments from each equivalence class

  • Crawford et al. construct an SBP for that:

Crawford et al. construct an SBP for that:

  • map a given assignment by all symmetries

map a given assignment by all symmetries

  • and require that every image be

and require that every image be lex lex-

  • greater

greater

→ →Conjunction over all symmetries

Conjunction over all symmetries

slide-19
SLIDE 19

Previous Work (2) Previous Work (2)

  • Our recent papers

Our recent papers at at SAT 2002, DAC 2002 SAT 2002, DAC 2002 and a and a 40 40-

  • page Tech. Rep.

page Tech. Rep. at at http://satlive.org http://satlive.org “Solving Difficult Instances of SAT in the “Solving Difficult Instances of SAT in the Presence of Symmetry” Presence of Symmetry”

  • Improved/corrected use of Graph

Improved/corrected use of Graph Automorphism Automorphism

  • SBPs

SBPs in terms of cycles of permutations in terms of cycles of permutations

  • Partial

Partial SBPs SBPs via generators of symmetry groups via generators of symmetry groups

  • Strong, detailed empirical results

Strong, detailed empirical results

  • Fast “opportunistic” symmetry extraction

Fast “opportunistic” symmetry extraction

slide-20
SLIDE 20

SBPs SBPs in cycle notation in cycle notation

  • Suppose the variable

Suppose the variable z z can be negated can be negated

  • Then we can add the SBP

Then we can add the SBP (z) (z)

  • Suppose variables

Suppose variables x x and and y y can be swapped can be swapped (with or w/o other variables being swapped) (with or w/o other variables being swapped)

  • Then we can add the SBP

Then we can add the SBP ( (x x≤ ≤y y) ), i.e., , i.e., ( (x x’ ’+y +y) )

  • Similarly if

Similarly if x, y x, y and and z z can be permuted can be permuted

  • We add the SBP

We add the SBP ( (x x≤ ≤y y≤ ≤z z) ), i.e., , i.e., ( (x x’ ’+y +y) ( ) (y y’ ’+z +z) )

  • Compared to Crawford et al,

Compared to Crawford et al, this is a form of logic minimization this is a form of logic minimization

slide-21
SLIDE 21

Contributions of This Work Contributions of This Work

  • Further improvements of

Further improvements of SBPs SBPs via logic minimization via logic minimization (used in VLSI CAD) (used in VLSI CAD)

  • Economical

Economical SBPs SBPs → → faster SAT faster SAT-

  • solving

solving

  • Cases: single

Cases: single-

  • cycles and multiple cycles

cycles and multiple cycles

  • Another approach: direct improvement over Crawford

Another approach: direct improvement over Crawford

  • New, provable analyses

New, provable analyses of partial

  • f partial

symmetry symmetry-

  • breaking by generators (

breaking by generators (PSBG PSBG) )

  • A pitfall identified

A pitfall identified: incompatible variable orderings : incompatible variable orderings

  • PSBG

PSBG for pigeon for pigeon-

  • holes is not complete

holes is not complete

  • Yet, works extremely well in practice

Yet, works extremely well in practice

slide-22
SLIDE 22

New Constructions of New Constructions of SBPs SBPs For Single Permutations For Single Permutations

  • Since permutations are represented in the

Since permutations are represented in the cycle notation, we look at single cycles first cycle notation, we look at single cycles first

  • Then we chain multiple cycles

Then we chain multiple cycles

  • Important observation

Important observation

  • The variable ordering and the chaining

The variable ordering and the chaining sequence must be compatible sequence must be compatible

  • This makes little difference for one permutation,

This makes little difference for one permutation, but can spoil things for multiple permutations but can spoil things for multiple permutations

slide-23
SLIDE 23

New Constructions of New Constructions of SBPs SBPs For Single Cycles (1) For Single Cycles (1)

  • We show a counting formula for #classes

We show a counting formula for #classes

  • f symmetric assignments under an
  • f symmetric assignments under an N

N-

  • cycle

cycle

  • First few numbers are: 3(

First few numbers are: 3(for 2 for 2-

  • cycle

cycle), 4, 6, 8 ), 4, 6, 8

  • The straightforward generalization from

The straightforward generalization from small cycles small cycles ( (xy xy) ) and and (xyz) (xyz) to to ( (xyzt xyzt) ) does not yield a valid SBP! does not yield a valid SBP!

  • However, one can explicitly formulate this

However, one can explicitly formulate this as a two as a two-

  • level logic minimization problem

level logic minimization problem

  • Starting with a truth table, or

Starting with a truth table, or

  • Starting with a CNF given by Crawford’s SBP

Starting with a CNF given by Crawford’s SBP

slide-24
SLIDE 24

New Constructions of New Constructions of SBPs SBPs For Single Cycles (2) For Single Cycles (2)

  • We solve cycles of length<20 with

We solve cycles of length<20 with ESPRESSO ESPRESSO ---

  • -- common software

common software for two for two-

  • level logic minimization

level logic minimization

  • This gives a full

This gives a full lex lex-

  • leader SBP for each

leader SBP for each N N

  • We see some patterns, but no easy description

We see some patterns, but no easy description

  • We also propose a

We also propose a construction construction of partial

  • f partial

lex lex-

  • leader

leader SBPs SBPs that works for any that works for any N N

  • Can be used for very large cycles

Can be used for very large cycles

slide-25
SLIDE 25

SBPs SBPs for Multiple Cycles for Multiple Cycles

  • Lemma:

Lemma: SBPs SBPs of cycles of co

  • f cycles of co-
  • prime

prime lengths in the same permutation can be lengths in the same permutation can be conjoined conjoined

  • Proof: Each cycle is a power of the perm

Proof: Each cycle is a power of the perm

  • We give a more complex procedure

We give a more complex procedure for cycles whose lengths are not co for cycles whose lengths are not co-

  • prime,

prime, e.g., ( e.g., (xyz)(abcdef xyz)(abcdef) or ( ) or (xyzt)(abcd xyzt)(abcd) )

  • Prime factors of the cycle length matter!

Prime factors of the cycle length matter!

slide-26
SLIDE 26

Symmetry Symmetry-

  • breaking

breaking for Multiple Generators (1) for Multiple Generators (1)

  • Lemma 5.1 essentially says:

Lemma 5.1 essentially says: Fully Fully-

  • breaking a given single symmetry

breaking a given single symmetry is equivalent to fully breaking all of its powers is equivalent to fully breaking all of its powers

  • Lemma 5.2 :

Lemma 5.2 : If a truth assignment is a If a truth assignment is a lex lex-

  • leader of an

leader of an equivalence class under a group G, then equivalence class under a group G, then it is a it is a lex lex-

  • leader …under any subgroup of G

leader …under any subgroup of G

slide-27
SLIDE 27

Symmetry Symmetry-

  • breaking

breaking for Multiple Generators (2) for Multiple Generators (2)

  • We now consider cyclic subgroups

We now consider cyclic subgroups generated by each generator generated by each generator

  • Lemma 5.3:

Lemma 5.3: A conjunction of A conjunction of lex lex-

  • leader

leader SBPs SBPs of

  • f

sub sub-

  • groups is a valid SBP,

groups is a valid SBP, however it may not be a full SBP however it may not be a full SBP

  • Corollary 5.6:

Corollary 5.6: Consider two perms with Consider two perms with disjoint support. The conjunction of their disjoint support. The conjunction of their lex lex-

  • leader

leader SBPs SBPs is a full is a full lex lex-

  • leader SBP

leader SBP

slide-28
SLIDE 28

On Variable Orderings On Variable Orderings

  • When breaking symmetries by generators

When breaking symmetries by generators

  • especially efficient

especially efficient SBPs SBPs can be built for each can be built for each generator by changing the order of variables generator by changing the order of variables

  • However,

However, variable orders must be consistent variable orders must be consistent for all generators for all generators

  • We build a consistency graph:

We build a consistency graph:

  • One vertex per generator

One vertex per generator

  • Connect generators whose

Connect generators whose supports supports intersect intersect

  • Find a maximal (or just large)

Find a maximal (or just large) independ

  • independ. set

. set

slide-29
SLIDE 29

SBPs SBPs for the Pigeon for the Pigeon-

  • hole Principle

hole Principle

  • To show that not all symmetries are broken

To show that not all symmetries are broken by a partial by a partial lex lex-

  • leader SBP

leader SBP

  • We give a satisfying truth assignment

We give a satisfying truth assignment that is not a that is not a lex lex-

  • leader (

leader (for hole for hole-

  • 2

2) )

  • Recall: all holes and all pigeons are

Recall: all holes and all pigeons are symm symm. .

  • The symmetry group is

The symmetry group is S Sn

×S Sn+1

n+1

  • Consider a set of generators that is a Cartesian

Consider a set of generators that is a Cartesian product of those in product of those in S Sn

n and

and S Sn+1

n+1

  • All generators map our assignment into > ones

All generators map our assignment into > ones

slide-30
SLIDE 30

Conclusions and On Conclusions and On-

  • going work

going work

  • Logic minimization leads to better

Logic minimization leads to better SBPs SBPs

  • Symmetry

Symmetry-

  • breaking by generators is a

breaking by generators is a sound and viable technique sound and viable technique

  • Yet does not provide full symmetry

Yet does not provide full symmetry-

  • breaking

breaking in some important cases in some important cases

  • On

On-

  • going work

going work

  • Faster symmetry extraction

Faster symmetry extraction

  • Generic and specialized, complete and incomplete

Generic and specialized, complete and incomplete

  • Further improvements of

Further improvements of SBPs SBPs

  • Going beyond pre

Going beyond pre-

  • processing

processing