TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

The Boolean Satisfiability Problem and SAT Solvers

58 pointsby amirouchealmost 8 years ago

7 comments

sjg007almost 8 years ago
I&#x27;ve alway been interested in this problem. I feel like information theory, Bayesian analysis including Markov chain monte carlo could give you some insight into the distribution of truth values for a satisfiable configuration especially around the phase transition. You can covert 3-SAT into a Bayesian network but exact inference is still NP complete. There should be some higher order information in a graph of the k-SAT problem... But many of the algorithms here are still NPC (e.g. finding a clique).. So then you discover tree width (tree decomposition) as an approximation (also in Bayesian networks) and find out that it is quite useful but still doesn&#x27;t quite help. It makes faster SAT solvers but we haven&#x27;t found anything invariant yet.<p>Anyway I still enjoy thinking about the problem, my random ideas have taken on more structure based on diving into the different subjects and trying to use them on this problem. I find it fascinating that you can take something simple like these linear circuits and it turns out that they are not simple at all and that they scale through the different disciplines.
PhilWrightalmost 8 years ago
I&#x27;m a little doubtful about the quality of the article. In the first section it says...<p>&quot;A problem is NP-complete if it belongs to the set (or “class” if you prefer) of the hardest problems in NP - hardest in the sense that every problem ever exists in NP can be reduced to them. (Thus being able to solve a NP-complete problem is equivalent to being able to solve every problem in NP).&quot;<p>100% wrong. All problems in NP cannot be reduced to NP-Complete. All problems in NP-Complete can be converted between each other. I didn&#x27;t bother reading the rest of the article, if this basic information is so wrong the rest probably is as well.
评论 #14512558 未加载
评论 #14512523 未加载
评论 #14513678 未加载
opportunealmost 8 years ago
&quot;At the moment the most efficient algorithm (for integers larger than 100 digits) we can implement into pre-existing computers{3} has a sub-exponential running time. But we can’t say for certainty that the it is not in P.&quot;<p>Author needs to fix this typo. Additionally, I think this is sloppy reasoning and will confuse readers. Sub-exponential algorithms include polynomial algorithms, so saying that &quot;X is subexponential but we can&#x27;t prove it is not in P&quot; is not as precise as &quot;Algorithm X is subexponential but at best superpolynomial, which is not to say that problem Y cannot be in P in general&quot;.
评论 #14510114 未加载
zmonxalmost 8 years ago
Thank you for sharing! A great reference for SAT solving is: Donald Knuth, <i>The Art of Computer Programming</i>, Volume 4, Fascicle 6: Satisfiability.<p>SAT is also an opportunity to point to an important family of data structures called <i>Binary Decision Diagrams</i>, abbreviated as BDDs, and their variants. Using BDDs, you can solve many interesting tasks that would be infeasible with most other known methods.<p>Of particular relevance are ordered and reduced BDDs, sometimes abbreviated as ROBDDS, or also simply BDDs if it is clear from the context that they are ordered and reduced. A second very important variant are zero-suppressed BDDs, abbreviated as ZDDs.<p>More information is available from:<p><a href="https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Binary_decision_diagram" rel="nofollow">https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Binary_decision_diagram</a><p>and especially in:<p>Donald Knuth, <i>The Art of Computer Programming</i>, Volume 4, Fascicle 1: Bitwise tricks &amp; techniques; Binary Decision Diagrams, of which a fascicle is available online:<p><a href="http:&#x2F;&#x2F;www-cs-faculty.stanford.edu&#x2F;~knuth&#x2F;fasc1b.ps.gz" rel="nofollow">http:&#x2F;&#x2F;www-cs-faculty.stanford.edu&#x2F;~knuth&#x2F;fasc1b.ps.gz</a><p>One application of BDDs is found in the constraint solvers for Boolean tasks that ship with some Prolog systems. For example, consider the SAT formula from the article:<p><pre><code> a∧(a∨x∨y)∧(¬a∨¬b)∧(c∨b)∧(d∨¬b) </code></pre> With SICStus Prolog and its CLP(B) library, we can express this task by posting the following query:<p><pre><code> ?- sat(A*(A + X + Y)*(~A + ~B)*(C+B)*(D + ~B)). </code></pre> In response, the system answers with:<p><pre><code> A = C, C = 1, B = 0, sat(X=:=X), sat(Y=:=Y), sat(D=:=D). </code></pre> This is an example of a SAT solver that is <i>complete</i>, which is an important classification that is also explained in the article. In this concrete case, the Prolog system&#x27;s answer means that A and C must <i>definitely</i> be 1, and B must <i>definitely</i> be 0, to make the formula satisfiable at all.<p>In this concrete case, the other variables (X, Y and D) may each be assigned any of the two truth values: They have no influence on the formula&#x27;s satisfiability!<p>Using the predicate labeling&#x2F;1, you can <i>generate</i> all satisfying assignments on backtracking. In this concrete case, they are:<p><pre><code> ?- sat(A*(A + X + Y)*(~A + ~B)*(C+B)*(D + ~B)), labeling([X,Y,D]). A = C, C = 1, X = Y, Y = B, B = D, D = 0 ; A = C, C = D, D = 1, X = Y, Y = B, B = 0 ; A = Y, Y = C, C = 1, X = B, B = D, D = 0 ; A = Y, Y = C, C = D, D = 1, X = B, B = 0 ; A = X, X = C, C = 1, Y = B, B = D, D = 0 ; A = X, X = C, C = D, D = 1, Y = B, B = 0 ; A = X, X = Y, Y = C, C = 1, B = D, D = 0 ; A = X, X = Y, Y = C, C = D, D = 1, B = 0.</code></pre>
threepipeproblmalmost 8 years ago
For small n: <a href="http:&#x2F;&#x2F;www.kevinalbrecht.com&#x2F;code&#x2F;joy-mirror&#x2F;jp-trutab.html" rel="nofollow">http:&#x2F;&#x2F;www.kevinalbrecht.com&#x2F;code&#x2F;joy-mirror&#x2F;jp-trutab.html</a>
andrewflnralmost 8 years ago
A P-complete programming language seems like an interesting concept in cases where you want to allow programmability but guarantee that running programs from idiots or hostile actors doesn&#x27;t take too long. Is there any work in using Horn clauses as a sort of P-complete programming language, maybe a bit like Prolog? Or are there nicer P-complete problems that get the same effect?
评论 #14510744 未加载
gfredtechalmost 8 years ago
NP-hard problems are quite interesting.
评论 #14512343 未加载