Solving Difficult SAT Instances Using Greedy Clique Decomposition Pavel Surynek Faculty of Mathematics and Physics Charles University, Prague Czech Republic
What is it about ? (outline) Solving difficult SAT instances difficult for today’s SAT solvers Consistency technique formula interpreted as a graph searching for structures in the graph - complete sub-graphs (cliques) simplification or decision of the input formula Comparison with state-of-the-art SAT solving systems Pavel Surynek, SARA 2007
Difficult SAT instances Difficult instances for today’s SAT solving systems impossible to (heuristically) guess the solution heuristics do not succeed ►► search Typical example: unsatisfiable SAT instances encoding Dirichlet’s box principle (Pigeon-hole principle) Valuations of variables = certificate (small witness for satisfiability) Unsatisfiability - no (small) witness Pavel Surynek, SARA 2007
Our approach Input - Boolean formula in CNF Interpret as a graph of conflicts vertices = literals edges = conflicts between literals example: x and ¬x are in conflict (cannot be satisfied both) Apply consistency Singleton arc-consistency ►► new conflicts Consistency based on conflict graph Output - equivalent (simpler) formula or the answer “unsatisfiable“ Pavel Surynek, SARA 2007
Details of the consistency Make the graph of conflicts denser apply singleton arc consistency discover hidden conflicts between literals denser conflict graph = better for the subsequent step (Greedily) find cliques in conflict graph at most one literal from a clique can be satisfied contribution of literal x...c(x) = number of clauses containing x contribution of clique C...c(C) = max xC c(x) ∑ Ccliques c(C)<number of clauses Pavel Surynek, SARA 2007 All the cliques together do not contribute enough to satisfy the input formula ►► the input formula is unsatisfiable
Clique consistency Generalization of “∑ Ccliques c(C)<#clauses” Choose a sub-formula B = subset of clauses contribution of literal x to sub-formula B......c(x,B)=number of clauses of B containing x contribution of clique C to sub-formula B......c(C,B) = max xC c(x,B) when ∑ Ccliques c(C,B)<number of clauses in B ►► B is unsatisfiable ⇒ input formula is unsatisfiable Singleton approach...literal x inconsistent ∑ Ccliques ∌ x c(C,B)<(#clauses of B)-c(x,B) Pavel Surynek, SARA 2007
Inconsistency (basic case - not singleton): “∑ Ccliques c(C,B)<#clauses in B” example:clique C 1 ={a,b,c} clique C 2 ={p,q,r} ({a,b,c} are pair-wise conflicting {p,q,r} are pair-wise conflicting) sub-formula B = (a v p) & (b v q) & (c v r) c(C 1,B)=1; c(C 2,B)=1 ∑ Ccliques c(C,B) = 2; #clauses in B = 3 The original formula has no satisfying valuation. Clique consistency (example) Pavel Surynek, SARA 2007
How does it look like (1) „Insert 7 pigeons into 6 holes“ Pavel Surynek, SARA 2007
How does it look like (2) After inferring new conflicts - SAC Pavel Surynek, SARA 2007
How does it look like (3) After enforcing clique consistency: UNSAT Pavel Surynek, SARA 2007
Complexity Construction of graph of conflicts polynomial Singleton arc-consistency polynomial (however, too time consuming for large real-life problems) Clique consistency with respect to a single sub-formula polynomial Problem: clique consistency with respect to multiple sub-formulas (we cannot try all the sub-formulas) Pavel Surynek, SARA 2007
Tested SAT solving systems MiniSAT zChaff HaifaSAT selection criterion: source code available Testing instances (by Fadi Aloul) Pigeon Hole Principle Urquhart (resists resolution) Field Programmable Gate Array Competitive comparison Pavel Surynek, SARA 2007 winners in SAT Competition 2005 and SAT Race 2006
Experimental results Pavel Surynek, SARA 2007 Instance Decision (seconds) Speedup ratio w.r.t. MiniSAT Speedup ratio w.r.t zChaff Speedup ratio w.r.t HaifaSAT chnl10_ > chnl10_ > chnl10_ > chnl11_120.70> > urq3_ N/A urq4_5> N/A urq5_5> N/A urq6_5> N/A hole hole > hole110.20> > hole120.30> > fpga10_ > fpga10_ > fpga10_ > fpga10_151.39> > Opteron 1600 MHz, Mandriva Linux 10.1
Examine “∑ Ccliques c(C,B)<#clauses in B” much information may be lost in the expression ∑ Ccliques c(C,B) example:clique C 1 ={a,b} clique C 2 ={p,q} clique C 3 ={x,y} sub-formula B = (a v p) & (a v q) & (b v p) & x & y c(C 1,B)=2; c(C 2,B)=2; c(C 3,B)=1 ∑ Ccliques c(C,B) = 5; #clauses in B = 5 c(C 1,B)+c(C 2,B) ≤ 3 (c(C 1,B)+c(C 2,B))+c(C 3,B)=3+1=4 Future improvements Pavel Surynek, SARA 2007
Summary and conclusion Processing of SAT instance using clique consistency formula interpreted as a graph of conflicts greedy detection of cliques inference of new conflicts output: equivalent formula or decision Experiments speed-up in order of magnitudes compared to state-of-the-art SAT solvers (on difficult problems) Pavel Surynek, SARA 2007