<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>http://debianws.lexgopc.com/wiki143/index.php?action=history&amp;feed=atom&amp;title=Maximum_satisfiability_problem</id>
	<title>Maximum satisfiability problem - Revision history</title>
	<link rel="self" type="application/atom+xml" href="http://debianws.lexgopc.com/wiki143/index.php?action=history&amp;feed=atom&amp;title=Maximum_satisfiability_problem"/>
	<link rel="alternate" type="text/html" href="http://debianws.lexgopc.com/wiki143/index.php?title=Maximum_satisfiability_problem&amp;action=history"/>
	<updated>2026-05-05T21:02:40Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.43.1</generator>
	<entry>
		<id>http://debianws.lexgopc.com/wiki143/index.php?title=Maximum_satisfiability_problem&amp;diff=2249414&amp;oldid=prev</id>
		<title>imported&gt;Whoever10: clarified that MAX-SAT is NP-hard as a decision problem. it&#039;s said in the same sentence that it&#039;s OptP-complete, while OptP and NP belong to different contexts</title>
		<link rel="alternate" type="text/html" href="http://debianws.lexgopc.com/wiki143/index.php?title=Maximum_satisfiability_problem&amp;diff=2249414&amp;oldid=prev"/>
		<updated>2024-12-29T02:36:39Z</updated>

		<summary type="html">&lt;p&gt;clarified that MAX-SAT is NP-hard as a decision problem. it&amp;#039;s said in the same sentence that it&amp;#039;s OptP-complete, while OptP and NP belong to different contexts&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;{{Short description|Problem in computational complexity theory}}&lt;br /&gt;
In [[computational complexity theory]], the &amp;#039;&amp;#039;&amp;#039;maximum satisfiability problem&amp;#039;&amp;#039;&amp;#039; (&amp;#039;&amp;#039;&amp;#039;MAX-SAT&amp;#039;&amp;#039;&amp;#039;) is the problem of determining the maximum number of clauses, of a given [[Propositional formula|Boolean]] formula in [[conjunctive normal form]], that can be made true by an assignment of truth values to the variables of the formula. It is a generalization of the [[Boolean satisfiability problem]], which asks whether there exists a truth assignment that makes all clauses true.&lt;br /&gt;
&lt;br /&gt;
==Example==&lt;br /&gt;
The conjunctive normal form formula&lt;br /&gt;
:&amp;lt;math&amp;gt; (x_0\lor x_1)\land(x_0\lor\lnot x_1)\land(\lnot x_0\lor x_1)\land(\lnot x_0\lor\lnot x_1)&amp;lt;/math&amp;gt;&lt;br /&gt;
is not satisfiable: no matter which truth values are assigned to its two variables, at least one of its four clauses will be false.&lt;br /&gt;
However, it is possible to assign truth values in such a way as to make three out of four clauses true; indeed, every truth assignment will do this.&lt;br /&gt;
Therefore, if this formula is given as an instance of the MAX-SAT problem, the solution to the problem is the number three.&lt;br /&gt;
&lt;br /&gt;
==Hardness==&lt;br /&gt;
The MAX-SAT problem is OptP-complete,&amp;lt;ref&amp;gt;{{Cite journal|author = M. Krentel|title = The complexity of optimization problems| journal = Journal of Computer and System Sciences|volume = 36|pages=490–509|year=1988| issue=3 | doi=10.1016/0022-0000(88)90039-6 | hdl=1813/6559 |hdl-access=free}}&amp;lt;/ref&amp;gt; and thus [[NP-hard]] (as a decision problem), since its solution easily leads to the solution of the [[boolean satisfiability problem]], which is [[NP-complete]].&lt;br /&gt;
&lt;br /&gt;
It is also difficult to find an [[approximation algorithm|approximate]] solution of the problem, that satisfies a number of clauses within a guaranteed [[approximation ratio]] of the optimal solution. More precisely, the problem is [[APX]]-complete, and thus does not admit a [[polynomial-time approximation scheme]] unless P = NP.&amp;lt;ref&amp;gt;Mark Krentel. [https://www.sciencedirect.com/science/article/pii/0022000088900396/pdf?md5=6fa18c741f2eb2d204433ebf681c0c70&amp;amp;pid=1-s2.0-0022000088900396-main.pdf The Complexity of Optimization Problems]. Proc. of STOC &amp;#039;86. 1986.&amp;lt;/ref&amp;gt;&amp;lt;ref&amp;gt;Christos Papadimitriou. Computational Complexity. Addison-Wesley, 1994.&amp;lt;/ref&amp;gt;&amp;lt;ref&amp;gt;Cohen, Cooper, Jeavons. [https://www.researchgate.net/profile/Martin_Cooper3/publication/221632891_Lecture_Notes_in_Computer_Science/links/02e7e5343108bf0ed3000000/Lecture-Notes-in-Computer-Science.pdf A complete characterization of complexity for boolean constraint optimization problems]. CP 2004.&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Weighted MAX-SAT ==&lt;br /&gt;
More generally, one can define a weighted version of MAX-SAT as follows: given a conjunctive normal form formula with non-negative weights assigned to each clause, find truth values for its variables that maximize the combined weight of the satisfied clauses. The MAX-SAT problem is an instance of Weighted MAX-SAT where all weights are 1.{{sfn|Vazirani|2001|p=131}}&amp;lt;ref&amp;gt;{{Cite journal|last1=Borchers|first1=Brian|last2=Furman|first2=Judith|date=1998-12-01|title=A Two-Phase Exact Algorithm for MAX-SAT and Weighted MAX-SAT Problems|journal=Journal of Combinatorial Optimization|language=en|volume=2|issue=4|pages=299–306|doi=10.1023/A:1009725216438|s2cid=6736614|issn=1382-6905}}&amp;lt;/ref&amp;gt;&amp;lt;ref&amp;gt;{{Cite book|url=https://books.google.com/books?id=_GOVQRL50kcC&amp;amp;dq=weighted+max+sat&amp;amp;pg=PA393|title=Satisfiability Problem: Theory and Applications : DIMACS Workshop, March 11-13, 1996|last1=Du|first1=Dingzhu|last2=Gu|first2=Jun|last3=Pardalos|first3=Panos M.|date=1997-01-01|publisher=American Mathematical Soc.|isbn=9780821870808|language=en|pages=393}}&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Approximation algorithms ===&lt;br /&gt;
&amp;lt;!-- Given a conjunctive normal form formula {{var|F}} with variables {{var|x}}&amp;lt;sub&amp;gt;1&amp;lt;/sub&amp;gt;, {{var|x}}&amp;lt;sub&amp;gt;2&amp;lt;/sub&amp;gt;, ..., {{var|x}}&amp;lt;sub&amp;gt;n&amp;lt;/sub&amp;gt;, --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== 1/2-approximation ====&lt;br /&gt;
&lt;br /&gt;
Randomly assigning each variable to be true with probability 1/2 gives an [[Expected value|expected]] [[Approximation algorithm#Performance guarantees|2-approximation]]. More precisely, if each clause has at least {{var|k}} variables, then this yields a (1 − 2&amp;lt;sup&amp;gt;−{{var|k}}&amp;lt;/sup&amp;gt;)-approximation.{{sfn|Vazirani|2001|loc=Lemma 16.2}} This algorithm can be [[Randomized algorithm#Derandomization|derandomized]] using the [[method of conditional probabilities]].{{sfn|Vazirani|2001|loc=Section 16.2}}&lt;br /&gt;
&lt;br /&gt;
==== (1-1/{{var|e}})-approximation ====&lt;br /&gt;
&lt;br /&gt;
MAX-SAT can also be expressed using an [[integer linear program]] (ILP). Fix a conjunctive normal form formula {{var|F}} with variables {{var|x}}&amp;lt;sub&amp;gt;1&amp;lt;/sub&amp;gt;, {{var|x}}&amp;lt;sub&amp;gt;2&amp;lt;/sub&amp;gt;, ..., {{var|x}}&amp;lt;sub&amp;gt;n&amp;lt;/sub&amp;gt;, and let {{var|C}} denote the clauses of {{var|F}}. For each clause {{var|c}} in {{var|C}}, let {{var|S}}&amp;lt;sup&amp;gt;+&amp;lt;/sup&amp;gt;&amp;lt;sub&amp;gt;{{var|c}}&amp;lt;/sub&amp;gt; and {{var|S}}&amp;lt;sup&amp;gt;−&amp;lt;/sup&amp;gt;&amp;lt;sub&amp;gt;{{var|c}}&amp;lt;/sub&amp;gt; denote the sets of variables which are not negated in {{var|c}}, and those that are negated in {{var|c}}, respectively. The variables {{var|y}}&amp;lt;sub&amp;gt;{{var|x}}&amp;lt;/sub&amp;gt; of the ILP will correspond to the variables of the formula {{var|F}}, whereas the variables {{var|z}}&amp;lt;sub&amp;gt;{{var|c}}&amp;lt;/sub&amp;gt; will correspond to the clauses. The ILP is as follows: &lt;br /&gt;
{|&lt;br /&gt;
| maximize&lt;br /&gt;
| &amp;lt;math&amp;gt;\sum_{c \in C} w_c\cdot z_c&amp;lt;/math&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
| (maximize the weight of the satisfied clauses)&lt;br /&gt;
|-&lt;br /&gt;
| subject to&lt;br /&gt;
| &amp;lt;math&amp;gt;z_c\leq\sum_{x\in S_c^+} y_x+\sum_{x\in S_c^-} (1-y_x)&amp;lt;/math&amp;gt;&lt;br /&gt;
| for all &amp;lt;math&amp;gt;c\in C&amp;lt;/math&amp;gt;&lt;br /&gt;
| (clause is true [[If and only if|iff]] it has a true, non-negated variable or a false, negated one)&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
| &amp;lt;math&amp;gt;z_c \in \{0,1\}&amp;lt;/math&amp;gt;&lt;br /&gt;
| for all &amp;lt;math&amp;gt;c\in C&amp;lt;/math&amp;gt;.&lt;br /&gt;
| (every clause is either satisfied or not)&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
| &amp;lt;math&amp;gt;y_x \in \{0,1\}&amp;lt;/math&amp;gt;&lt;br /&gt;
| for all &amp;lt;math&amp;gt;x\in F&amp;lt;/math&amp;gt;.&lt;br /&gt;
| (every variable is either true or false)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The above program can be [[Linear programming relaxation|relaxed]] to the following linear program {{var|L}}:&lt;br /&gt;
&lt;br /&gt;
{|&lt;br /&gt;
| maximize&lt;br /&gt;
| &amp;lt;math&amp;gt;\sum_{c \in C} w_c\cdot z_c&amp;lt;/math&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
| (maximize the weight of the satisfied clauses)&lt;br /&gt;
|-&lt;br /&gt;
| subject to&lt;br /&gt;
| &amp;lt;math&amp;gt;z_c\leq\sum_{x\in S_c^+} y_x+\sum_{x\in S_c^-} (1-y_x)&amp;lt;/math&amp;gt;&lt;br /&gt;
| for all &amp;lt;math&amp;gt;c\in C&amp;lt;/math&amp;gt;&lt;br /&gt;
| (clause is true [[If and only if|iff]] it has a true, non-negated variable or a false, negated one)&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
| &amp;lt;math&amp;gt;0\leq z_c \leq 1&amp;lt;/math&amp;gt;&lt;br /&gt;
| for all &amp;lt;math&amp;gt;c\in C&amp;lt;/math&amp;gt;.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
| &amp;lt;math&amp;gt;0\leq y_x\leq 1&amp;lt;/math&amp;gt;&lt;br /&gt;
| for all &amp;lt;math&amp;gt;x\in F&amp;lt;/math&amp;gt;.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The following algorithm using that relaxation is an expected (1-1/[[E (mathematical constant)|e]])-approximation:{{sfn|Vazirani|2001|p=136}}&lt;br /&gt;
# Solve the linear program {{var|L}} and obtain a solution {{var|O}}&lt;br /&gt;
# Set variable {{var|x}} to be true with probability {{var|y}}&amp;lt;sub&amp;gt;{{var|x}}&amp;lt;/sub&amp;gt; where {{var|y}}&amp;lt;sub&amp;gt;{{var|x}}&amp;lt;/sub&amp;gt; is the value given in {{var|O}}.&lt;br /&gt;
&lt;br /&gt;
This algorithm can also be derandomized using the method of conditional probabilities.&lt;br /&gt;
&lt;br /&gt;
==== 3/4-approximation ====&lt;br /&gt;
&lt;br /&gt;
The 1/2-approximation algorithm does better when clauses are large whereas the (1-1/{{var|e}})-approximation  does better when clauses are small. They can be combined as follows:&lt;br /&gt;
# Run the (derandomized) 1/2-approximation algorithm to get a truth assignment {{var|X}}.&lt;br /&gt;
# Run the (derandomized) (1-1/e)-approximation to get a truth assignment {{var|Y}}.&lt;br /&gt;
# Output whichever of {{var|X}} or {{var|Y}} maximizes the weight of the satisfied clauses.&lt;br /&gt;
&lt;br /&gt;
This is a deterministic factor (3/4)-approximation.{{sfn|Vazirani|2001|loc=Theorem 16.9}}&lt;br /&gt;
&lt;br /&gt;
===== Example =====&lt;br /&gt;
&lt;br /&gt;
On the formula&lt;br /&gt;
:&amp;lt;math display=&amp;quot;block&amp;quot;&amp;gt;F=\underbrace{(x\lor y)}_{\text{weight }1}\land \underbrace{(x\lor\lnot y)}_{\text{weight }1}\land\underbrace{(\lnot x\lor z)}_{\text{weight }2+\epsilon}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where &amp;lt;math&amp;gt;\epsilon &amp;gt;0&amp;lt;/math&amp;gt;, the (1-1/{{var|e}})-approximation will set each variable to True with probability 1/2, and so will behave identically to the 1/2-approximation. Assuming that the assignment of {{var|x}} is chosen first during derandomization, the derandomized algorithms will pick a solution with total weight &amp;lt;math&amp;gt;3+\epsilon&amp;lt;/math&amp;gt;, whereas the optimal solution has weight &amp;lt;math&amp;gt;4+\epsilon&amp;lt;/math&amp;gt;.{{sfn|Vazirani|2001|loc=Example 16.11}}&lt;br /&gt;
&lt;br /&gt;
==== State of the art ====&lt;br /&gt;
&lt;br /&gt;
The state-of-the-art algorithm is due to Avidor, Berkovitch and Zwick,&amp;lt;ref&amp;gt;{{cite book | last1=Avidor | first1=Adi | last2=Berkovitch | first2=Ido | last3=Zwick | first3=Uri | title=Approximation and Online Algorithms | chapter=Improved Approximation Algorithms for MAX NAE-SAT and MAX SAT | publisher=Springer Berlin Heidelberg | publication-place=Berlin, Heidelberg | volume=3879 | date=2006 | isbn=978-3-540-32207-8 | doi=10.1007/11671411_3 | pages=27–40}}&amp;lt;/ref&amp;gt;&amp;lt;ref name=&amp;quot;t481&amp;quot;&amp;gt;{{cite journal | last1=Makarychev | first1=Konstantin | last2=Makarychev | first2=Yury | title=Approximation Algorithms for CSPs | journal=Drops-Idn/V2/Document/10.4230/Dfu.vol7.15301.287 | date=2017 | issn=1868-8977 | doi=10.4230/DFU.VOL7.15301.287 | page=39 pages, 753340 bytes| doi-access=free }}&amp;lt;/ref&amp;gt; and its approximation ratio is 0.7968. They also give another algorithm whose approximation ratio is conjectured to be 0.8353.&lt;br /&gt;
&lt;br /&gt;
==Solvers==&lt;br /&gt;
Many exact solvers for MAX-SAT have been developed during recent years, and many of them were presented in the well-known conference on the boolean satisfiability problem and related problems, the SAT Conference. In 2006 the SAT Conference hosted the first &amp;#039;&amp;#039;&amp;#039;MAX-SAT evaluation&amp;#039;&amp;#039;&amp;#039; comparing performance of practical solvers for MAX-SAT, as it has done in the past for the [[0-1 integer programming|pseudo-boolean satisfiability]] problem and the [[quantified boolean formula]] problem.&lt;br /&gt;
Because of its NP-hardness, large-size MAX-SAT instances cannot in general be solved exactly, and one must often resort to [[approximation algorithm]]s&lt;br /&gt;
and [[Metaheuristic|heuristics]]&amp;lt;ref&amp;gt;{{cite book | chapter-url=https://link.springer.com/chapter/10.1007/978-1-4613-0303-9_2 | doi=10.1007/978-1-4613-0303-9_2 | chapter=Approximate Algorithms and Heuristics for MAX-SAT | title=Handbook of Combinatorial Optimization | date=1998 | last1=Battiti | first1=Roberto | last2=Protasi | first2=Marco | pages=77–148 | isbn=978-1-4613-7987-4 }}&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
There are several solvers submitted to the last Max-SAT Evaluations:&lt;br /&gt;
* [[Branch and Bound]] based: Clone, MaxSatz (based on [[Satz (SAT solver)|Satz]]), IncMaxSatz, IUT_MaxSatz, WBO, GIDSHSat.&lt;br /&gt;
* Satisfiability based: SAT4J, QMaxSat.&lt;br /&gt;
* Unsatisfiability based: msuncore, WPM1, PM2.&lt;br /&gt;
&lt;br /&gt;
==Special cases==&lt;br /&gt;
MAX-SAT is one of the optimization extensions of the [[boolean satisfiability problem]], which is the problem of determining whether the variables of a given [[Propositional formula|Boolean]] formula can be assigned in such a way as to make the formula evaluate to TRUE. If the clauses are restricted to have at most 2 literals, as in [[2-satisfiability]], we get the [[MAX-2SAT]] problem. If they are restricted to at most 3 literals per clause, as in [[3-satisfiability]], we get the [[MAX-3SAT]] problem.&lt;br /&gt;
&lt;br /&gt;
==Related problems==&lt;br /&gt;
There are many problems related to the satisfiability of conjunctive normal form Boolean formulas.&lt;br /&gt;
&lt;br /&gt;
* [[Decision problem]]s:&lt;br /&gt;
** [[2-satisfiability|2SAT]]&lt;br /&gt;
** [[Boolean satisfiability problem|3SAT]]&lt;br /&gt;
* Optimization problems, where the goal is to maximize the number of clauses satisfied:&lt;br /&gt;
** MAX-SAT, and the corresponded weighted version [[#Weighted MAX-SAT|Weighted MAX-SAT]]&lt;br /&gt;
** MAX-{{var|k}}SAT, where each clause has exactly {{var|k}} variables:&lt;br /&gt;
*** [[2-satisfiability#Maximum-2-satisfiability|MAX-2SAT]]&lt;br /&gt;
*** [[MAX-3SAT]]&lt;br /&gt;
*** [[MAXEkSAT]]&lt;br /&gt;
** The partial maximum satisfiability problem (PMAX-SAT) asks for the maximum number of clauses which can be satisfied by any assignment of a given subset of clauses. The rest of the clauses must be satisfied.&lt;br /&gt;
** The soft satisfiability problem (soft-SAT), given a set of SAT problems, asks for the maximum number of those problems which can be satisfied by any assignment.&amp;lt;ref&amp;gt;Josep Argelich and Felip Manyà. [https://doi.org/10.1007%2Fs10732-006-7234-9 Exact Max-SAT solvers for over-constrained problems]. In Journal of Heuristics 12(4) pp. 375-392. Springer, 2006.&amp;lt;/ref&amp;gt;&lt;br /&gt;
** The minimum satisfiability problem.&lt;br /&gt;
* The MAX-SAT problem can be extended to the case where the variables of the [[constraint satisfaction problem]] belong to the set of reals. The problem amounts to finding the smallest &amp;#039;&amp;#039;q&amp;#039;&amp;#039; such that the &amp;#039;&amp;#039;q&amp;#039;&amp;#039;-[[relaxed intersection]] of the constraints is not empty.&amp;lt;ref&amp;gt;{{cite journal|last1=Jaulin|first1=L.|last2=Walter|first2=E.| title=Guaranteed robust nonlinear minimax estimation| journal=IEEE Transactions on Automatic Control|year=2002|volume=47|issue=11|pages=1857–1864|doi=10.1109/TAC.2002.804479| url=http://www.ensta-bretagne.fr/jaulin/paper_qminimax.pdf}}&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
* [[Boolean satisfiability problem|Boolean Satisfiability Problem]]&lt;br /&gt;
* [[Constraint satisfaction]]&lt;br /&gt;
* [[Satisfiability modulo theories]]&lt;br /&gt;
&lt;br /&gt;
== External links ==&lt;br /&gt;
* http://www.satisfiability.org/&lt;br /&gt;
* https://web.archive.org/web/20060324162911/http://www.iiia.csic.es/~maxsat06/&lt;br /&gt;
* http://www.maxsat.udl.cat&lt;br /&gt;
* [http://www.nlsde.buaa.edu.cn/~kexu/benchmarks/max-sat-benchmarks.htm Weighted Max-2-SAT Benchmarks with Hidden Optimum Solutions]&lt;br /&gt;
* [http://www.cs.tau.ac.il/~azar/Methods-Class6.pdf Lecture Notes on MAX-SAT Approximation]&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&amp;lt;references /&amp;gt;&lt;br /&gt;
* {{Citation| last = Vazirani | first = Vijay V.&lt;br /&gt;
 | author-link = Vijay Vazirani&lt;br /&gt;
 | title = Approximation Algorithms&lt;br /&gt;
 | year = 2001&lt;br /&gt;
 | publisher = Springer-Verlag&lt;br /&gt;
 | isbn = 978-3-540-65367-7&lt;br /&gt;
 | url = https://doc.lagout.org/science/0_Computer%20Science/2_Algorithms/Approximation%20Algorithms%20%5bVazirani%202010-12-01%5d.pdf&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
[[Category:Logic in computer science]]&lt;br /&gt;
[[Category:Combinatorial optimization]]&lt;br /&gt;
[[Category:Satisfiability problems]]&lt;/div&gt;</summary>
		<author><name>imported&gt;Whoever10</name></author>
	</entry>
</feed>