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

Slides:



Advertisements
Similar presentations
NP-Hard Nattee Niparnan.
Advertisements

Department of Computer Science & Engineering
Saucy3: Fast Symmetry Discovery in Graphs Hadi Katebi Karem A. Sakallah Igor L. Markov The University of Michigan.
The Theory of NP-Completeness
1 NP-Complete Problems. 2 We discuss some hard problems:  how hard? (computational complexity)  what makes them hard?  any solutions? Definitions 
© The McGraw-Hill Companies, Inc., Chapter 8 The Theory of NP-Completeness.
© 2002 Fadi A. Aloul, University of Michigan PBS: A Pseudo-Boolean Solver and Optimizer Fadi A. Aloul, Arathi Ramani, Igor L. Markov, Karem A. Sakallah.
ECE 667 Synthesis & Verification - SAT 1 ECE 667 ECE 667 Synthesis and Verification of Digital Systems Boolean SAT CNF Representation Slides adopted (with.
CSC5160 Topics in Algorithms Tutorial 2 Introduction to NP-Complete Problems Feb Jerry Le
Faster SAT and Smaller BDDs via Common Function Structure Fadi A. Aloul, Igor L. Markov, Karem A. Sakallah University of Michigan.
1 Polynomial Church-Turing thesis A decision problem can be solved in polynomial time by using a reasonable sequential model of computation if and only.
DAC Solving Difficult SAT Instances In The Presence of Symmetry Fadi A. Aloul, Arathi Ramani Igor L. Markov and Karem A. Sakallah University of Michigan.
Analysis of Algorithms CS 477/677
Exploiting Structure in Symmetry Detection for CNF Paul T. Darga, Mark H. Liffiton, Karem A. Sakallah, and Igor L. Markov The University of Michigan.
Technion 1 (Yet another) decision procedure for Equality Logic Ofer Strichman and Orly Meir Technion.
A Compressed Breadth-First Search for Satisfiability DoRon B. Motter and Igor L. Markov University of Michigan, Ann Arbor.
1 CSE 417: Algorithms and Computational Complexity Winter 2001 Lecture 24 Instructor: Paul Beame.
CSE 421 Algorithms Richard Anderson Lecture 27 NP Completeness.
On Proof Systems Behind Efficient SAT Solvers DoRon B. Motter and Igor L. Markov University of Michigan, Ann Arbor.
Shatter: Efficient Symmetry- Breaking for Boolean Satisfiability Fadi A. Aloul Igor L. Markov, Karem A. Sakallah The University of Michigan.
ENGG3190 Logic Synthesis “Boolean Satisfiability” Winter 2014 S. Areibi School of Engineering University of Guelph.
Hardness Results for Problems
The Theory of NP-Completeness 1. What is NP-completeness? Consider the circuit satisfiability problem Difficult to answer the decision problem in polynomial.
Binary Decision Diagrams (BDDs)
1 The Theory of NP-Completeness 2012/11/6 P: the class of problems which can be solved by a deterministic polynomial algorithm. NP : the class of decision.
1 Algebraic Structure in Almost-Symmetries Igor Markov, Univ. of Michigan Presented by Ian Gent, St. Andrews.
Using Symmetry to Solve Difficult Logic Puzzles Igor Markov University of Michigan, EECS.
Nattee Niparnan. Easy & Hard Problem What is “difficulty” of problem? Difficult for computer scientist to derive algorithm for the problem? Difficult.
Boolean Satisfiability and SAT Solvers
Lecture 22 More NPC problems
NP Complexity By Mussie Araya. What is NP Complexity? Formal Definition: NP is the set of decision problems solvable in polynomial time by a non- deterministic.
Techniques for Proving NP-Completeness Show that a special case of the problem you are interested in is NP- complete. For example: The problem of finding.
Daniel Kroening and Ofer Strichman 1 Decision Procedures An Algorithmic Point of View BDDs.
1 The Theory of NP-Completeness 2 Cook ’ s Theorem (1971) Prof. Cook Toronto U. Receiving Turing Award (1982) Discussing difficult problems: worst case.
NP-Complete Problems. Running Time v.s. Input Size Concern with problems whose complexity may be described by exponential functions. Tractable problems.
NP-COMPLETE PROBLEMS. Admin  Two more assignments…  No office hours on tomorrow.
Daniel Kroening and Ofer Strichman 1 Decision Procedures An Algorithmic Point of View BDDs.
NP-Complete problems.
Implicit Hitting Set Problems Richard M. Karp Erick Moreno Centeno DIMACS 20 th Anniversary.
CSE 589 Part V One of the symptoms of an approaching nervous breakdown is the belief that one’s work is terribly important. Bertrand Russell.
NPC.
NP Completeness Piyush Kumar. Today Reductions Proving Lower Bounds revisited Decision and Optimization Problems SAT and 3-SAT P Vs NP Dealing with NP-Complete.
Logical Agents Chapter 7. Outline Knowledge-based agents Propositional (Boolean) logic Equivalence, validity, satisfiability Inference rules and theorem.
Faster Symmetry Discovery using Sparsity of Symmetries Paul T. Darga Karem A. Sakallah Igor L. Markov The University of Michigan.
10.3 Reformulation The Lex-Leader Method Shant Karakashian 1.
CSE 421 Algorithms Richard Anderson Lecture 27 NP-Completeness Proofs.
The Theory of NP-Completeness 1. Nondeterministic algorithms A nondeterminstic algorithm consists of phase 1: guessing phase 2: checking If the checking.
COSC 3101A - Design and Analysis of Algorithms 14 NP-Completeness.
1 The Theory of NP-Completeness 2 Review: Finding lower bound by problem transformation Problem X reduces to problem Y (X  Y ) iff X can be solved by.
Computability Examples. Reducibility. NP completeness. Homework: Find other examples of NP complete problems.
TU/e Algorithms (2IL15) – Lecture 10 1 NP-Completeness, II.
NP-Completeness (2) NP-Completeness Graphs 4/13/2018 5:22 AM x x x x x
Inference and search for the propositional satisfiability problem
Richard Anderson Lecture 26 NP-Completeness
Exploiting Structure in Symmetry Detection for CNF
NP-Completeness (2) NP-Completeness Graphs 7/23/ :02 PM x x x x
NP-Completeness (2) NP-Completeness Graphs 7/23/ :02 PM x x x x
NP-Completeness Proofs
Richard Anderson Lecture 26 NP-Completeness
(xy)(yz)(xz)(zy)
Logic Synthesis CNF Satisfiability.
NP-Completeness Yin Tat Lee
Where Can We Draw The Line?
NP-Completeness (2) NP-Completeness Graphs 11/23/2018 2:12 PM x x x x
Richard Anderson Lecture 25 NP-Completeness
NP-Completeness Yin Tat Lee
Instructor: Aaron Roth
NP-Completeness (2) NP-Completeness Graphs 7/9/2019 6:12 AM x x x x x
Complexity Theory: Foundations
Presentation transcript:

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

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

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

Symmetries and Permutations not a symmetry 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” Cycles must be disjoint symmetry

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) (12) (123)

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

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

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

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

Finding Symmetries of Graphs A 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 Given a graph Find generators of its 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)) AB DC

Symmetries of CNF Formulae Permutations of variables that map clauses to clauses E.g., (a+b+c)(d+e+f) has one non-trivial symmetry (ad)(be)(cf) Considering single swaps only is not enough Phase changes, e.g., a  a’, and compositions with permutations E.g., (a+b+c)(d+e’+f’) has one non-trivial symmetry (ad)(be’)(cf’)

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

A B B A Clauses: A ( ), B ( ), C (-2 + 3) CC 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

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)

Speeding up SAT Search Search space may have symmetries May have regions that map 1:1 This makes search redundant 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

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 Every permutation  group of clauses (a “symmetry-breaking” predicate) Use only generators of semantic symmetries

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

Details: Individial Cycles 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 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?

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

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

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)

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

FPGA Routing Benchmarks a b c d e f g h

Global Routing Benchmarks S EE E S SS E E S tracks Construct difficult grid-routing instances by “randomized flooding” Then convert to CNF

Empirical Results - Chaff

Instance Plain Time -SymmetriesSpeedup S/U#V#CLChaffoutFindingNumber#generatorsSearchTotalSearch sec% ofcycles Time only grout3.3-01S % E grout3.3-03S % E grout3.3-04S % E grout3.3-08S % E grout3.3-10S % E chnl10x11U % E+28all chnl10x12U % E+30all chnl10x15U % E+37all chnl11x12U % E+32all chnl11x13U % E+35all chnl11x20U % E+52all

Empirical Results - Chaff Instance Plain Time -SymmetriesSpeedup S/U#V#CLChaffoutFindingNumber#generatorsSearchTotalSearch sec% ofcycles Time only fpga10_8S % E+71all fpga10_9S % E+77all fpga12_11S % E+77all fpga12_12S % E+77all fpga12_8S % E+77all fpga12_9S % E+77all fpga13_9S % E+77all fpga13_10S % E+77all fpga13_12S % E+77all

Empirical Results - Chaff Instance PlainTime-SymmetriesSpeedup S/U#V#CLChaffoutFindingNumber#generatorsSearchTotSearch sec% ofcycleTime only 2dlx_ca_mcU % E pipeU % E pipe_1_oooU % E pipe_2_oooU % E pipeU % E dlx_ca_mcU % E pipeU % E pipe_1_oooU % E pipe_2_oooU % E pipeU % E pipeU % E pipeU % E

Empirical Results - Chaff

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

Fast Symmetry Detection A ( ) B ( ) C ( ) D ( ) C D B A C D B A

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