SlideShare a Scribd company logo
Boolean satisfiability - Are we asking the wrong question?
Arijit Gupta
Introduction

Satisfiability probability and runtime

Boolean satisfiability lies at the very heart of the famous
P vs NP problem. It was the first problem shown to be
NP-complete, i.e. it lies in the complexity class NP (a
solution of it can be checked in time polynomial in the
input size) and every other NP-problem can be reduced
to it in polynomial time. This was a a milestone as many
other problems could be shown to be NP-complete by
reducing SAT to them.[6] Also, it is a very thoroughly
studied problem because it is highly relevant in areas
as diverse as circuit design, operations research[3] and
software verification[4].

For 2-SAT, 3-SAT and 4-SAT, we plotted the clause density α against the probability P
that a random formula is satisfiable. For 3-SAT, we additionally plotted α against the
runtime (measured as the number of recursive calls) of the DPLL algorithm. We implemented this in Python using the scipy and matplotlib packages. DPLL (from its inventors, Davis-Putnam-Logemann-Loveland) is based on determinate simplification of the
whole Boolean formula as well as indeterminate "guessing" of variable assignments and
backtracking when necessary. So it is essentially a search algorithm.[3] Due to limited
computing facilities, we only considered a relatively small number of variables and only
100 (50 for 4-SAT) instances of a Boolean formula with fixed density. In particular, the
curves are really much smoother and monotone.[2] The DP (Davis-Putnam) algorithm
was the precursor to DPLL and, while also utilising trivial simplification steps, does
not deploy search but rather logical resolution, so it is fully determinate. However, it is
considerably slower than DPLL.

(Random) k-SAT
Consider Boolean variables x1 , x2 , · · · , xn and a formula
of the form


m

k

lij 


i=1

We observe that 2-SAT has a discontinuous "phase transition" at α = 1, which has been
proved rigorously.[1] More interesting is 3-SAT, which seems to have a discontinuous
phase transition at α ≈ 4.2. This more involved conjecture has not been proved yet.[1]
Comparing the runtime of DPLL with the probability that 3-SAT is satisfiable, we see
that the runtime peaks around the critical value of α. So do the instances that lie
around α make 3-SAT "hard" and intractable? This is indeed the case (and note that
we can observe the same qualitative behaviour for every other k-SAT problem where
k ≥ 3[7]).

j=1

where the lij are literals of the form xij or xij . This is a kSAT Boolean formula. We call the expression in parentheses a clause and note that the formula evaluates to
true iff all of its clauses are true. For example,
(x1 ∨ x3 ) ∧ (x2 ∨ x3 ) ∧ (x2 ∨ x3 )
is a satisfiable 3-variable instance of 2-SAT as we can set
x1 and x2 to true, x3 to false. In general, we are interested in the question whether there exists an assignment
of true/false values to the variables such that the whole
Boolean formula is true.
A particularly interesting ensemble of k-SAT problems
is random k-SAT. An instance is generated by first fixing
the number of variables n and the number of clauses m
and setting α = m . Then for each clause, pick k out
n
of the n variables at random (without replacement) and
negate each one with probability 0.5. It turns out that
2-SAT is in P, i.e. it can be solved in time polynomial in
the input size n, where we require that m is polynomial
in n. On the other hand, k-SAT is NP-complete for all
k ≥ 3.[5][6]

References
[1]

A.Zweig et al. What makes a phase transition? Analysis of the random satisfiability problem. Physica A
389 1501-1511, 2010.

[2]

E.Lee, J.Roychowdhury, S.Seshia. Fundamental Algorithms for System Modeling, Analysis, and Optimization. embedded.eecs.berkeley.edu/eecsx44/fall2011/lectures/SATsolving.pdf, retrieved 15.06.2013.

[5]

J.Sethna. Statistical Mechanics: Entropy, Order Parameters and Complexity. Oxford University Press, 2006.

[6]

S.Wernicke. Introduction to Theoretical Computer Science. Udacity.com, retrieved 15.06.2013.

[7]

S. Kirkpatrick, B. Selman. Critical behavior in the satisfiability of random boolean formulae. Science
264:1297-1301, 1994.

A toy model for 3-SAT[1]
Approximate the average number of solutions of a 3-SAT problem as < s >= 2n f m ,
0.875 + 0.009 ∗ α
if α < 3.8
where f ∼ Normal(µ, 0.0585 ∗ α) with µ =
unless µ < 0 [µ > 1], when we set µ to 0 [1].
0.875 + 0.170 ∗ α
if α ≥ 3.8
We then say that a particular 3-SAT formula is unsatisfiable iff < s >< 1. The intuition behind this model is that from the total
1
of 2n possible assignments, each newly added clause removes about 8 of the remaining solutions. This model exhibits the same
qualitative behaviour as the real 3-SAT problem and also yields a non-negligible gap between the values of α. Note that the average
number of solutions does not display any phase transition at all and that the probability of satisfiability can be fitted by a lognormal
distribution. The toy model is evidence for the claim that 3-SAT does not display a real phase transition, but only a trivial threshold
phenomenon, induced by a mere statistical event. So Zweig et al. propose that instead of examining an existence parameter (is there a
satisfying assignment to x1 , · · · , xn ?), investigating the quantitative parameter of the number of solutions of a particular 3-SAT instance
is much more appropriate and natural. Their provocation consists in claiming that the difference between the existence of exactly 0 or
1 solutions on the one hand and exactly 10 or 11 solutions on the other hand is of the same quality!

Rescaled average number of solutions, following a simple exponential
law closely.[1]

The SAT Association. SAT Basics. gauss.ececs.edu/SAT/articles/sat.pdf, retrieved 15.06.2013.

[4]

Zweig et al. argue that k-SAT does not display a genuine phase transition, where a parameter of the system, independent of the
problem definition, changes. So at α ≈ 4.2, the probability that the formula is satisfiable rapidly drops from 1 to 0, but no other
essential feature changes! After considering the related problem of the total number of satisfying assignments, the average of which
is 1 at α ≈ 5.2, we can ask where this discrepancy between the different values of α derives from.[1]

M.Mézard, A. Montanari. Information, Physics and Computation. Oxford University Press, 2009.

[3]

Really a phase transition?

Satisfiability in the toy model.[1]

Conclusions
k-SAT’s non-trivial nature explains in part why the fastest algorithms that approximate the probability of a random k-SAT formula of fixed m, n to be satisfiable are in fact
numerical. Finally, albeit concerning computational complexity in nature, this problem relates very smoothly to statistical physics, which is why some of the most efficient SAT
solvers nowadays use methods invented by scientists working in statistical mechanics.[1] We also observe that the usage of the notion of a "phase transition" is currently very
blurry and should be clarified because it is not at all clear that the threshold in 3-SAT is not mainly induced by the law of large numbers.[1]

More Related Content

What's hot

Optimality conditions for Equality Constrained Optimization Problems
Optimality conditions for Equality Constrained Optimization ProblemsOptimality conditions for Equality Constrained Optimization Problems
Optimality conditions for Equality Constrained Optimization Problems
inventionjournals
 
Mit2 25 f13_the_buckingham
Mit2 25 f13_the_buckinghamMit2 25 f13_the_buckingham
Mit2 25 f13_the_buckingham
Thim Mengly(ម៉េងលី,孟李)
 
Local Model Checking Algorithm Based on Mu-calculus with Partial Orders
Local Model Checking Algorithm Based on Mu-calculus with Partial OrdersLocal Model Checking Algorithm Based on Mu-calculus with Partial Orders
Local Model Checking Algorithm Based on Mu-calculus with Partial Orders
TELKOMNIKA JOURNAL
 
Analysis of single server fixed batch service queueing system under multiple ...
Analysis of single server fixed batch service queueing system under multiple ...Analysis of single server fixed batch service queueing system under multiple ...
Analysis of single server fixed batch service queueing system under multiple ...
Alexander Decker
 
P, NP, NP-Complete, and NP-Hard
P, NP, NP-Complete, and NP-HardP, NP, NP-Complete, and NP-Hard
P, NP, NP-Complete, and NP-Hard
Animesh Chaturvedi
 
Daa notes 3
Daa notes 3Daa notes 3
Daa notes 3
smruti sarangi
 
Algorithm Design and Complexity - Course 1&2
Algorithm Design and Complexity - Course 1&2Algorithm Design and Complexity - Course 1&2
Algorithm Design and Complexity - Course 1&2
Traian Rebedea
 
Time series analysis, modeling and applications
Time series analysis, modeling and applicationsTime series analysis, modeling and applications
Time series analysis, modeling and applications
Springer
 
Steven Duplij - Generalized duality, Hamiltonian formalism and new brackets
Steven Duplij - Generalized duality, Hamiltonian formalism and new bracketsSteven Duplij - Generalized duality, Hamiltonian formalism and new brackets
Steven Duplij - Generalized duality, Hamiltonian formalism and new brackets
Steven Duplij (Stepan Douplii)
 
International Journal of Engineering Research and Development (IJERD)
International Journal of Engineering Research and Development (IJERD)International Journal of Engineering Research and Development (IJERD)
International Journal of Engineering Research and Development (IJERD)
IJERD Editor
 
Csit77406
Csit77406Csit77406
Csit77406
csandit
 
Theory of linear programming
Theory of linear programmingTheory of linear programming
Theory of linear programming
Tarun Gehlot
 
ThinkBayes: Chapter 9 two_dimensions
ThinkBayes: Chapter 9 two_dimensionsThinkBayes: Chapter 9 two_dimensions
ThinkBayes: Chapter 9 two_dimensions
Jungkyu Lee
 
Quick sort
Quick sortQuick sort
Quick sort
AreenGaur
 
Icitam2019 2020 book_chapter
Icitam2019 2020 book_chapterIcitam2019 2020 book_chapter
Icitam2019 2020 book_chapter
Ban Bang
 
Trialdraftsppformat dimen test1
Trialdraftsppformat dimen   test1Trialdraftsppformat dimen   test1
Trialdraftsppformat dimen test1
foxtrot jp R
 
Resource theory of asymmetric distinguishability
Resource theory of asymmetric distinguishabilityResource theory of asymmetric distinguishability
Resource theory of asymmetric distinguishability
Mark Wilde
 
Thr russian doll search
Thr russian doll searchThr russian doll search
Satisfaction And Its Application To Ai Planning
Satisfaction And Its Application To Ai PlanningSatisfaction And Its Application To Ai Planning
Satisfaction And Its Application To Ai Planning
ahmad bassiouny
 
Modeling biased tracers at the field level
Modeling biased tracers at the field levelModeling biased tracers at the field level
Modeling biased tracers at the field level
Marcel Schmittfull
 

What's hot (20)

Optimality conditions for Equality Constrained Optimization Problems
Optimality conditions for Equality Constrained Optimization ProblemsOptimality conditions for Equality Constrained Optimization Problems
Optimality conditions for Equality Constrained Optimization Problems
 
Mit2 25 f13_the_buckingham
Mit2 25 f13_the_buckinghamMit2 25 f13_the_buckingham
Mit2 25 f13_the_buckingham
 
Local Model Checking Algorithm Based on Mu-calculus with Partial Orders
Local Model Checking Algorithm Based on Mu-calculus with Partial OrdersLocal Model Checking Algorithm Based on Mu-calculus with Partial Orders
Local Model Checking Algorithm Based on Mu-calculus with Partial Orders
 
Analysis of single server fixed batch service queueing system under multiple ...
Analysis of single server fixed batch service queueing system under multiple ...Analysis of single server fixed batch service queueing system under multiple ...
Analysis of single server fixed batch service queueing system under multiple ...
 
P, NP, NP-Complete, and NP-Hard
P, NP, NP-Complete, and NP-HardP, NP, NP-Complete, and NP-Hard
P, NP, NP-Complete, and NP-Hard
 
Daa notes 3
Daa notes 3Daa notes 3
Daa notes 3
 
Algorithm Design and Complexity - Course 1&2
Algorithm Design and Complexity - Course 1&2Algorithm Design and Complexity - Course 1&2
Algorithm Design and Complexity - Course 1&2
 
Time series analysis, modeling and applications
Time series analysis, modeling and applicationsTime series analysis, modeling and applications
Time series analysis, modeling and applications
 
Steven Duplij - Generalized duality, Hamiltonian formalism and new brackets
Steven Duplij - Generalized duality, Hamiltonian formalism and new bracketsSteven Duplij - Generalized duality, Hamiltonian formalism and new brackets
Steven Duplij - Generalized duality, Hamiltonian formalism and new brackets
 
International Journal of Engineering Research and Development (IJERD)
International Journal of Engineering Research and Development (IJERD)International Journal of Engineering Research and Development (IJERD)
International Journal of Engineering Research and Development (IJERD)
 
Csit77406
Csit77406Csit77406
Csit77406
 
Theory of linear programming
Theory of linear programmingTheory of linear programming
Theory of linear programming
 
ThinkBayes: Chapter 9 two_dimensions
ThinkBayes: Chapter 9 two_dimensionsThinkBayes: Chapter 9 two_dimensions
ThinkBayes: Chapter 9 two_dimensions
 
Quick sort
Quick sortQuick sort
Quick sort
 
Icitam2019 2020 book_chapter
Icitam2019 2020 book_chapterIcitam2019 2020 book_chapter
Icitam2019 2020 book_chapter
 
Trialdraftsppformat dimen test1
Trialdraftsppformat dimen   test1Trialdraftsppformat dimen   test1
Trialdraftsppformat dimen test1
 
Resource theory of asymmetric distinguishability
Resource theory of asymmetric distinguishabilityResource theory of asymmetric distinguishability
Resource theory of asymmetric distinguishability
 
Thr russian doll search
Thr russian doll searchThr russian doll search
Thr russian doll search
 
Satisfaction And Its Application To Ai Planning
Satisfaction And Its Application To Ai PlanningSatisfaction And Its Application To Ai Planning
Satisfaction And Its Application To Ai Planning
 
Modeling biased tracers at the field level
Modeling biased tracers at the field levelModeling biased tracers at the field level
Modeling biased tracers at the field level
 

Viewers also liked

Trab hist
Trab histTrab hist
Trab hist
Laryssa Carolina
 
Trab hist
Trab histTrab hist
Trab hist
Laryssa Carolina
 
Per to peer
Per to peerPer to peer
Per to peer
Rafael Hernandez
 
Belen chamorro-peppt
Belen chamorro-pepptBelen chamorro-peppt
Belen chamorro-peppt
Belen3Chamorro
 
Trabajo final
Trabajo finalTrabajo final
Trabajo final
Isabel Tique
 
Eli cohen
Eli cohenEli cohen
Eli cohen
Eli Cohen
 
Photos ows global 3
Photos ows global 3Photos ows global 3
Photos ows global 3
Eric Strayer
 
Kuliah agribisnis perunggasan s2
Kuliah agribisnis perunggasan s2Kuliah agribisnis perunggasan s2
Kuliah agribisnis perunggasan s2ismoyowati
 
Trabajo final de expresion oral y escrita
Trabajo final de expresion oral y escrita Trabajo final de expresion oral y escrita
Trabajo final de expresion oral y escrita
angelamesa045
 
Los medicamentoss
Los medicamentossLos medicamentoss
Los medicamentoss
YAD2A
 
el sistema cieculatorio
el sistema cieculatorioel sistema cieculatorio
el sistema cieculatorio
Paticita Flores
 
2996 el+silencio+del+alma1
2996 el+silencio+del+alma12996 el+silencio+del+alma1
2996 el+silencio+del+alma1
Luis Francisco Pacheco Miranda
 
280
280280
Seciones, encabezado pie de pagina.
Seciones, encabezado pie de pagina. Seciones, encabezado pie de pagina.
Seciones, encabezado pie de pagina.
Admr123
 
Amasiato y divorcio entra historia y literatura
Amasiato y divorcio entra historia y literaturaAmasiato y divorcio entra historia y literatura
Amasiato y divorcio entra historia y literatura
Ana Silvia Toruga Brau
 
Despesasdo marquinho
Despesasdo marquinhoDespesasdo marquinho
Despesasdo marquinho
José Luiz Graunna
 
Blogger
BloggerBlogger
Blogger
Mëli Jimenez
 
http://lucrocompc.blogspot.com.br/2014/07/gratis-ganhe-dinheiro-on-line-agn.html
http://lucrocompc.blogspot.com.br/2014/07/gratis-ganhe-dinheiro-on-line-agn.htmlhttp://lucrocompc.blogspot.com.br/2014/07/gratis-ganhe-dinheiro-on-line-agn.html
http://lucrocompc.blogspot.com.br/2014/07/gratis-ganhe-dinheiro-on-line-agn.html
Ivan Oliveira
 
Hobsbawn historia-del-siglo-xx
Hobsbawn historia-del-siglo-xxHobsbawn historia-del-siglo-xx
Hobsbawn historia-del-siglo-xx
reconflictiva
 
Matemática
MatemáticaMatemática
Matemática
Everilda_sena123
 

Viewers also liked (20)

Trab hist
Trab histTrab hist
Trab hist
 
Trab hist
Trab histTrab hist
Trab hist
 
Per to peer
Per to peerPer to peer
Per to peer
 
Belen chamorro-peppt
Belen chamorro-pepptBelen chamorro-peppt
Belen chamorro-peppt
 
Trabajo final
Trabajo finalTrabajo final
Trabajo final
 
Eli cohen
Eli cohenEli cohen
Eli cohen
 
Photos ows global 3
Photos ows global 3Photos ows global 3
Photos ows global 3
 
Kuliah agribisnis perunggasan s2
Kuliah agribisnis perunggasan s2Kuliah agribisnis perunggasan s2
Kuliah agribisnis perunggasan s2
 
Trabajo final de expresion oral y escrita
Trabajo final de expresion oral y escrita Trabajo final de expresion oral y escrita
Trabajo final de expresion oral y escrita
 
Los medicamentoss
Los medicamentossLos medicamentoss
Los medicamentoss
 
el sistema cieculatorio
el sistema cieculatorioel sistema cieculatorio
el sistema cieculatorio
 
2996 el+silencio+del+alma1
2996 el+silencio+del+alma12996 el+silencio+del+alma1
2996 el+silencio+del+alma1
 
280
280280
280
 
Seciones, encabezado pie de pagina.
Seciones, encabezado pie de pagina. Seciones, encabezado pie de pagina.
Seciones, encabezado pie de pagina.
 
Amasiato y divorcio entra historia y literatura
Amasiato y divorcio entra historia y literaturaAmasiato y divorcio entra historia y literatura
Amasiato y divorcio entra historia y literatura
 
Despesasdo marquinho
Despesasdo marquinhoDespesasdo marquinho
Despesasdo marquinho
 
Blogger
BloggerBlogger
Blogger
 
http://lucrocompc.blogspot.com.br/2014/07/gratis-ganhe-dinheiro-on-line-agn.html
http://lucrocompc.blogspot.com.br/2014/07/gratis-ganhe-dinheiro-on-line-agn.htmlhttp://lucrocompc.blogspot.com.br/2014/07/gratis-ganhe-dinheiro-on-line-agn.html
http://lucrocompc.blogspot.com.br/2014/07/gratis-ganhe-dinheiro-on-line-agn.html
 
Hobsbawn historia-del-siglo-xx
Hobsbawn historia-del-siglo-xxHobsbawn historia-del-siglo-xx
Hobsbawn historia-del-siglo-xx
 
Matemática
MatemáticaMatemática
Matemática
 

Similar to Sat

Quantum algorithm for solving linear systems of equations
 Quantum algorithm for solving linear systems of equations Quantum algorithm for solving linear systems of equations
Quantum algorithm for solving linear systems of equations
XequeMateShannon
 
Lecture 1 maximum likelihood
Lecture 1 maximum likelihoodLecture 1 maximum likelihood
Lecture 1 maximum likelihood
Anant Dashpute
 
Metaheuristic Optimization: Algorithm Analysis and Open Problems
Metaheuristic Optimization: Algorithm Analysis and Open ProblemsMetaheuristic Optimization: Algorithm Analysis and Open Problems
Metaheuristic Optimization: Algorithm Analysis and Open Problems
Xin-She Yang
 
Stochastic Processes Assignment Help
Stochastic Processes Assignment HelpStochastic Processes Assignment Help
Stochastic Processes Assignment Help
Statistics Assignment Help
 
A Probabilistic Attack On NP-Complete Problems
A Probabilistic Attack On NP-Complete ProblemsA Probabilistic Attack On NP-Complete Problems
A Probabilistic Attack On NP-Complete Problems
Brittany Allen
 
A Stochastic Limit Approach To The SAT Problem
A Stochastic Limit Approach To The SAT ProblemA Stochastic Limit Approach To The SAT Problem
A Stochastic Limit Approach To The SAT Problem
Valerie Felton
 
Comparing human solving time with SAT-solving for Sudoku problems
Comparing human solving time with SAT-solving for Sudoku problemsComparing human solving time with SAT-solving for Sudoku problems
Comparing human solving time with SAT-solving for Sudoku problems
TimdeBoer16
 
Modeling the dynamics of molecular concentration during the diffusion procedure
Modeling the dynamics of molecular concentration during the  diffusion procedureModeling the dynamics of molecular concentration during the  diffusion procedure
Modeling the dynamics of molecular concentration during the diffusion procedure
International Journal of Engineering Inventions www.ijeijournal.com
 
On the dynamics of distillation processes
On the dynamics of distillation processesOn the dynamics of distillation processes
On the dynamics of distillation processes
Josemar Pereira da Silva
 
Project Paper
Project PaperProject Paper
Project Paper
Brian Whetter
 
fb69b412-97cb-4e8d-8a28-574c09557d35-160618025920
fb69b412-97cb-4e8d-8a28-574c09557d35-160618025920fb69b412-97cb-4e8d-8a28-574c09557d35-160618025920
fb69b412-97cb-4e8d-8a28-574c09557d35-160618025920
Karl Rudeen
 
Novel analysis of transition probabilities in randomized k sat algorithm
Novel analysis of transition probabilities in randomized k sat algorithmNovel analysis of transition probabilities in randomized k sat algorithm
Novel analysis of transition probabilities in randomized k sat algorithm
ijfcstjournal
 
Design and analysis of ra sort
Design and analysis of ra sortDesign and analysis of ra sort
Design and analysis of ra sort
ijfcstjournal
 
intro
introintro
International Journal of Engineering Research and Development
International Journal of Engineering Research and DevelopmentInternational Journal of Engineering Research and Development
International Journal of Engineering Research and Development
IJERD Editor
 
System overflow blocking-transients-for-queues-with-batch-arrivals-using-a-fa...
System overflow blocking-transients-for-queues-with-batch-arrivals-using-a-fa...System overflow blocking-transients-for-queues-with-batch-arrivals-using-a-fa...
System overflow blocking-transients-for-queues-with-batch-arrivals-using-a-fa...
Cemal Ardil
 
PhysRevE.89.042911
PhysRevE.89.042911PhysRevE.89.042911
PhysRevE.89.042911
chetan.nichkawde
 
Numerical Study of Some Iterative Methods for Solving Nonlinear Equations
Numerical Study of Some Iterative Methods for Solving Nonlinear EquationsNumerical Study of Some Iterative Methods for Solving Nonlinear Equations
Numerical Study of Some Iterative Methods for Solving Nonlinear Equations
inventionjournals
 
Dec 14 - R2
Dec 14 - R2Dec 14 - R2
A Load-Balanced Parallelization of AKS Algorithm
A Load-Balanced Parallelization of AKS AlgorithmA Load-Balanced Parallelization of AKS Algorithm
A Load-Balanced Parallelization of AKS Algorithm
TELKOMNIKA JOURNAL
 

Similar to Sat (20)

Quantum algorithm for solving linear systems of equations
 Quantum algorithm for solving linear systems of equations Quantum algorithm for solving linear systems of equations
Quantum algorithm for solving linear systems of equations
 
Lecture 1 maximum likelihood
Lecture 1 maximum likelihoodLecture 1 maximum likelihood
Lecture 1 maximum likelihood
 
Metaheuristic Optimization: Algorithm Analysis and Open Problems
Metaheuristic Optimization: Algorithm Analysis and Open ProblemsMetaheuristic Optimization: Algorithm Analysis and Open Problems
Metaheuristic Optimization: Algorithm Analysis and Open Problems
 
Stochastic Processes Assignment Help
Stochastic Processes Assignment HelpStochastic Processes Assignment Help
Stochastic Processes Assignment Help
 
A Probabilistic Attack On NP-Complete Problems
A Probabilistic Attack On NP-Complete ProblemsA Probabilistic Attack On NP-Complete Problems
A Probabilistic Attack On NP-Complete Problems
 
A Stochastic Limit Approach To The SAT Problem
A Stochastic Limit Approach To The SAT ProblemA Stochastic Limit Approach To The SAT Problem
A Stochastic Limit Approach To The SAT Problem
 
Comparing human solving time with SAT-solving for Sudoku problems
Comparing human solving time with SAT-solving for Sudoku problemsComparing human solving time with SAT-solving for Sudoku problems
Comparing human solving time with SAT-solving for Sudoku problems
 
Modeling the dynamics of molecular concentration during the diffusion procedure
Modeling the dynamics of molecular concentration during the  diffusion procedureModeling the dynamics of molecular concentration during the  diffusion procedure
Modeling the dynamics of molecular concentration during the diffusion procedure
 
On the dynamics of distillation processes
On the dynamics of distillation processesOn the dynamics of distillation processes
On the dynamics of distillation processes
 
Project Paper
Project PaperProject Paper
Project Paper
 
fb69b412-97cb-4e8d-8a28-574c09557d35-160618025920
fb69b412-97cb-4e8d-8a28-574c09557d35-160618025920fb69b412-97cb-4e8d-8a28-574c09557d35-160618025920
fb69b412-97cb-4e8d-8a28-574c09557d35-160618025920
 
Novel analysis of transition probabilities in randomized k sat algorithm
Novel analysis of transition probabilities in randomized k sat algorithmNovel analysis of transition probabilities in randomized k sat algorithm
Novel analysis of transition probabilities in randomized k sat algorithm
 
Design and analysis of ra sort
Design and analysis of ra sortDesign and analysis of ra sort
Design and analysis of ra sort
 
intro
introintro
intro
 
International Journal of Engineering Research and Development
International Journal of Engineering Research and DevelopmentInternational Journal of Engineering Research and Development
International Journal of Engineering Research and Development
 
System overflow blocking-transients-for-queues-with-batch-arrivals-using-a-fa...
System overflow blocking-transients-for-queues-with-batch-arrivals-using-a-fa...System overflow blocking-transients-for-queues-with-batch-arrivals-using-a-fa...
System overflow blocking-transients-for-queues-with-batch-arrivals-using-a-fa...
 
PhysRevE.89.042911
PhysRevE.89.042911PhysRevE.89.042911
PhysRevE.89.042911
 
Numerical Study of Some Iterative Methods for Solving Nonlinear Equations
Numerical Study of Some Iterative Methods for Solving Nonlinear EquationsNumerical Study of Some Iterative Methods for Solving Nonlinear Equations
Numerical Study of Some Iterative Methods for Solving Nonlinear Equations
 
Dec 14 - R2
Dec 14 - R2Dec 14 - R2
Dec 14 - R2
 
A Load-Balanced Parallelization of AKS Algorithm
A Load-Balanced Parallelization of AKS AlgorithmA Load-Balanced Parallelization of AKS Algorithm
A Load-Balanced Parallelization of AKS Algorithm
 

Sat

  • 1. Boolean satisfiability - Are we asking the wrong question? Arijit Gupta Introduction Satisfiability probability and runtime Boolean satisfiability lies at the very heart of the famous P vs NP problem. It was the first problem shown to be NP-complete, i.e. it lies in the complexity class NP (a solution of it can be checked in time polynomial in the input size) and every other NP-problem can be reduced to it in polynomial time. This was a a milestone as many other problems could be shown to be NP-complete by reducing SAT to them.[6] Also, it is a very thoroughly studied problem because it is highly relevant in areas as diverse as circuit design, operations research[3] and software verification[4]. For 2-SAT, 3-SAT and 4-SAT, we plotted the clause density α against the probability P that a random formula is satisfiable. For 3-SAT, we additionally plotted α against the runtime (measured as the number of recursive calls) of the DPLL algorithm. We implemented this in Python using the scipy and matplotlib packages. DPLL (from its inventors, Davis-Putnam-Logemann-Loveland) is based on determinate simplification of the whole Boolean formula as well as indeterminate "guessing" of variable assignments and backtracking when necessary. So it is essentially a search algorithm.[3] Due to limited computing facilities, we only considered a relatively small number of variables and only 100 (50 for 4-SAT) instances of a Boolean formula with fixed density. In particular, the curves are really much smoother and monotone.[2] The DP (Davis-Putnam) algorithm was the precursor to DPLL and, while also utilising trivial simplification steps, does not deploy search but rather logical resolution, so it is fully determinate. However, it is considerably slower than DPLL. (Random) k-SAT Consider Boolean variables x1 , x2 , · · · , xn and a formula of the form   m k lij   i=1 We observe that 2-SAT has a discontinuous "phase transition" at α = 1, which has been proved rigorously.[1] More interesting is 3-SAT, which seems to have a discontinuous phase transition at α ≈ 4.2. This more involved conjecture has not been proved yet.[1] Comparing the runtime of DPLL with the probability that 3-SAT is satisfiable, we see that the runtime peaks around the critical value of α. So do the instances that lie around α make 3-SAT "hard" and intractable? This is indeed the case (and note that we can observe the same qualitative behaviour for every other k-SAT problem where k ≥ 3[7]). j=1 where the lij are literals of the form xij or xij . This is a kSAT Boolean formula. We call the expression in parentheses a clause and note that the formula evaluates to true iff all of its clauses are true. For example, (x1 ∨ x3 ) ∧ (x2 ∨ x3 ) ∧ (x2 ∨ x3 ) is a satisfiable 3-variable instance of 2-SAT as we can set x1 and x2 to true, x3 to false. In general, we are interested in the question whether there exists an assignment of true/false values to the variables such that the whole Boolean formula is true. A particularly interesting ensemble of k-SAT problems is random k-SAT. An instance is generated by first fixing the number of variables n and the number of clauses m and setting α = m . Then for each clause, pick k out n of the n variables at random (without replacement) and negate each one with probability 0.5. It turns out that 2-SAT is in P, i.e. it can be solved in time polynomial in the input size n, where we require that m is polynomial in n. On the other hand, k-SAT is NP-complete for all k ≥ 3.[5][6] References [1] A.Zweig et al. What makes a phase transition? Analysis of the random satisfiability problem. Physica A 389 1501-1511, 2010. [2] E.Lee, J.Roychowdhury, S.Seshia. Fundamental Algorithms for System Modeling, Analysis, and Optimization. embedded.eecs.berkeley.edu/eecsx44/fall2011/lectures/SATsolving.pdf, retrieved 15.06.2013. [5] J.Sethna. Statistical Mechanics: Entropy, Order Parameters and Complexity. Oxford University Press, 2006. [6] S.Wernicke. Introduction to Theoretical Computer Science. Udacity.com, retrieved 15.06.2013. [7] S. Kirkpatrick, B. Selman. Critical behavior in the satisfiability of random boolean formulae. Science 264:1297-1301, 1994. A toy model for 3-SAT[1] Approximate the average number of solutions of a 3-SAT problem as < s >= 2n f m , 0.875 + 0.009 ∗ α if α < 3.8 where f ∼ Normal(µ, 0.0585 ∗ α) with µ = unless µ < 0 [µ > 1], when we set µ to 0 [1]. 0.875 + 0.170 ∗ α if α ≥ 3.8 We then say that a particular 3-SAT formula is unsatisfiable iff < s >< 1. The intuition behind this model is that from the total 1 of 2n possible assignments, each newly added clause removes about 8 of the remaining solutions. This model exhibits the same qualitative behaviour as the real 3-SAT problem and also yields a non-negligible gap between the values of α. Note that the average number of solutions does not display any phase transition at all and that the probability of satisfiability can be fitted by a lognormal distribution. The toy model is evidence for the claim that 3-SAT does not display a real phase transition, but only a trivial threshold phenomenon, induced by a mere statistical event. So Zweig et al. propose that instead of examining an existence parameter (is there a satisfying assignment to x1 , · · · , xn ?), investigating the quantitative parameter of the number of solutions of a particular 3-SAT instance is much more appropriate and natural. Their provocation consists in claiming that the difference between the existence of exactly 0 or 1 solutions on the one hand and exactly 10 or 11 solutions on the other hand is of the same quality! Rescaled average number of solutions, following a simple exponential law closely.[1] The SAT Association. SAT Basics. gauss.ececs.edu/SAT/articles/sat.pdf, retrieved 15.06.2013. [4] Zweig et al. argue that k-SAT does not display a genuine phase transition, where a parameter of the system, independent of the problem definition, changes. So at α ≈ 4.2, the probability that the formula is satisfiable rapidly drops from 1 to 0, but no other essential feature changes! After considering the related problem of the total number of satisfying assignments, the average of which is 1 at α ≈ 5.2, we can ask where this discrepancy between the different values of α derives from.[1] M.Mézard, A. Montanari. Information, Physics and Computation. Oxford University Press, 2009. [3] Really a phase transition? Satisfiability in the toy model.[1] Conclusions k-SAT’s non-trivial nature explains in part why the fastest algorithms that approximate the probability of a random k-SAT formula of fixed m, n to be satisfiable are in fact numerical. Finally, albeit concerning computational complexity in nature, this problem relates very smoothly to statistical physics, which is why some of the most efficient SAT solvers nowadays use methods invented by scientists working in statistical mechanics.[1] We also observe that the usage of the notion of a "phase transition" is currently very blurry and should be clarified because it is not at all clear that the threshold in 3-SAT is not mainly induced by the law of large numbers.[1]