This paper was converted on www.awesomepapers.org from LaTeX by an anonymous user.
Want to know more? Visit the Converter page.

On Salum’s Algorithm for X3SAT

Arian Nadjimzadah
Department of Computer Science
University of Rochester
Rochester, NY 14627, USA
Supported in part by NSF grant CCF-2006496.
   David E. Narváez
Department of Computer Science
University of Rochester
Rochester, NY 14627, USA
Supported in part by NSF grant CCF-2030859 to the Computing Research Association for the CIFellows Project.
(April 6, 2021)
Abstract

This is a commentary on, and critique of, Latif Salum’s paper titled “Tractability of One-in-three 3SAT: P=NP\mbox{\rm P}=\mbox{\rm NP}.” Salum purports to give a polynomial-time algorithm that solves the NP-complete problem X3SAT, thereby claiming P=NP\mbox{\rm P}=\mbox{\rm NP}. The algorithm, in short, fixes the polarity of a variable, carries out simplifications over the resulting formula to decide whether to keep the value assigned or flip the polarity, and repeats with the remaining variables. One thing this algorithm does not do is backtrack. We give an illustrative counterexample showing why the lack of backtracking makes this algorithm flawed.

1 Introduction

We give a short commentary on Latif Salum’s attempt at proving P=NP\mbox{\rm P}=\mbox{\rm NP} in “Tractability of One-in-three 3SAT: P=NP\mbox{\rm P}=\mbox{\rm NP}” [Sal20], showing exactly where the argument breaks down. We first define the one-in-three 3SAT problem, also known as X3SAT, and its equivalence with Salum’s nonstandard formulation.

The X3SAT problem takes a 3CNF formula (a conjunction of disjunctions, each having at most 3 literals) as input. A 3CNF formula ϕ\phi is a yes instance of X3SAT if and only if there exists an assignment that sets exactly one of the literals in every clause in ϕ\phi to true. X3SAT is known to be NP-complete.

Salum’s paper introduces X3SAT formulas (not to be confused with the X3SAT problem) of the form ϕ=ψφ\phi=\psi\land\varphi, where ψ\psi, called the minterm, is a conjunction of literals, and φ\varphi is a conjunction of X3SAT clauses of the form (abc)(a\odot b\odot c).111Salum calls the \odot symbol the “exactly-1 disjunction” which suggests it is an operator. Nevertheless, as an operator the semantics would be flawed as it is neither binary nor ternary. Instead, we use it in this critique as a purely notational element, which is essentially the role this symbol actually plays in Salum’s paper. An assignment of the variables in an X3SAT clause satisfies the clause if and only if it sets exactly one of the literals aa, bb, or cc to true. This holds similarly in the case of only two literals in (ab)(a\odot b). The minterm ψ\psi is meant to hold a partial assignment of the literals in the formula and it is omitted when it is empty. An X3SAT formula ϕ\phi is satisfiable if and only if there exists an assignment that makes ψ\psi true and satisfies every clause in φ\varphi.

It is easy to see that X3SAT formulas with empty minterms are equivalent to 3CNF formulas (by simply replacing the \odot notational element with \lor), and a satisfying assignment for an X3SAT formula with an empty minterm is also a witness for the equivalent 3CNF being a yes instance of X3SAT. Thus a polynomial-time algorithm to determine the satisfiability of X3SAT formulas would yield a polynomial-time algorithm for X3SAT, thereby proving P=NP\mbox{\rm P}=\mbox{\rm NP}. Salum claims to provide such an algorithm.

Salum’s algorithm [Sal20] processes each variable in a given formula ϕ\phi in turn, chooses a polarity, and simplifies the formula resulting from the chosen value. If a conflict is detected, the algorithm chooses the opposite polarity. We provide a more detailed summary in Section 2. The fatal flaw in the algorithm is that decisions are not recorded to be later revised when a conflict is found. We provide a counterexample exploiting this flaw in Section 3. We conclude in Section 4.

2 Summary of the Algorithm

Salum’s paper [Sal20] introduces much notation to define four functions that ultimately comprise the algorithm. These functions can be easily stated in plain English and through the use of standard Boolean formula satisfiability (SAT) terminology. Instead of reintroducing Salum’s notation, we provide in Appendix A line-by-line reinterpretations of the four key functions of the proposed algorithm, but using standard SAT terminology.

Recall, from standard SAT terminology and the description of the DPLL [DLL62, DP60] family of algorithms, that a decision, during a solving process, corresponds to assigning an arbitrary truth value to a variable. The decision is then propagated through the formula, i.e., the formula is simplified over the assignment made. During this process, the truth values of some of the other variables are set as consequences of the decision made. The literals thus set are typically called implied literals. A solving process will typically simplify the formula iteratively until no further simplification can be achieved, at which point it will pick another variable to decide on and repeat. A decision should be recorded because the arbitrary nature of the assignment implies that it might be wrong, and the solving process would need to undo the decision and its consequences. Doing so is typically referred to as backtracking. Backtracking is triggered when the current decisions have led to a situation where a variable must be set to both true and false, a situation typically referred to as a conflict.

Salum’s functions resemble many of the components of a typical DPLL algorithm, extended of course to the context of X3SAT. 𝚁𝚎𝚍𝚞𝚌𝚎(ϕs,rj)\mathtt{Reduce}(\phi_{s},r_{j}) (Algorithm A.1) propagates the decision rjr_{j} over the formula ϕs\phi_{s} and performs some simplifications. 𝚂𝚌𝚘𝚙𝚎(rj,ϕs)\mathtt{Scope}(r_{j},\phi_{s}) (Algorithm A.2) iteratively calls 𝚁𝚎𝚍𝚞𝚌𝚎\mathtt{Reduce} to propagate a single decision and all of its implied literals. Both 𝚁𝚎𝚍𝚞𝚌𝚎\mathtt{Reduce} and 𝚂𝚌𝚘𝚙𝚎\mathtt{Scope} return NULL when a conflict is detected. 𝚂𝚌𝚊𝚗(ϕ𝚜)\mathtt{Scan(\phi_{s})} (Algorithm A.3), which is the entry point of Salum’s algorithm, performs some simplifications, then decides on a variable that is still unassigned in the simplified formula, and calls 𝚂𝚌𝚘𝚙𝚎\mathtt{Scope} on this decision. If 𝚂𝚌𝚘𝚙𝚎\mathtt{Scope} detects a conflict due to this decision, 𝚂𝚌𝚊𝚗\mathtt{Scan} calls 𝚁𝚎𝚖𝚘𝚟𝚎\mathtt{Remove} (Algorithm A.4) to assign the literal to the opposite polarity. 𝚁𝚎𝚖𝚘𝚟𝚎(rj,ϕs)\mathtt{Remove}(r_{j},\phi_{s}) calls 𝚁𝚎𝚍𝚞𝚌𝚎(ϕs,rj¯)\mathtt{Reduce}(\phi_{s},\overline{r_{j}}) but this time, if a conflict is detected, it returns UNSAT. If no conflict is detected, 𝚁𝚎𝚖𝚘𝚟𝚎(rj,ϕs)\mathtt{Remove}(r_{j},\phi_{s}) simplifies the current formula over the assignment rj¯\overline{r_{j}} and calls 𝚂𝚌𝚊𝚗(ϕs+1)\mathtt{Scan}(\phi_{s+1}) over the resulting formula ϕs+1\phi_{s+1}.

Our analysis reveals that the proposed algorithm is missing one key component of DPLL algorithms: it does not backtrack. Without backtracking, it is usually easy to show that a solving algorithm is incorrect by providing a formula and an ordering of the literals that trigger a bad decision. We do that in Section 3.

3 Illustrative Counterexample

We provide a counterexample that “tricks” Scope, namely,

ϕ=(abc)(bxy)(cxy¯).\phi=(a\odot b\odot c)\land(b\odot x\odot y)\land(c\odot x\odot\bar{y}).

This formula is quite clearly satisfiable, for instance, by the assignment (a,b,c,x,y)=(0,0,1,0,1)(a,b,c,x,y)=(0,0,1,0,1).222As is standard, 1 represents true and 0 represents false. Salum claims in [Sal20, Section 3.1] that if 𝚂𝚌𝚊𝚗(ϕ)\mathtt{Scan}(\phi) does not find a satisfying assignment (in Salum’s words, it is “interrupted”), then ϕ\phi is unsatisfiable, so we run 𝚂𝚌𝚊𝚗(ϕ)\mathtt{Scan}(\phi) and show it does not find a satisfying assignment. The line numbers mentioned in the explanation below correspond to the line numbers of the algorithms in the original paper [Sal20], and not to those of our reinterpretations in Appendix A.

The minterm in ϕ\phi is empty, so we skip to line 4 of 𝚂𝚌𝚊𝚗\mathtt{Scan} to process the literals in turn. Salum claims in [Sal20, Theorem 36] that the order in which the literals are processed is arbitrary. Accordingly, we choose to process aa first, invoking 𝚂𝚌𝚘𝚙𝚎(a,ϕ)\mathtt{Scope}(a,\phi) in line 6. From line 4 of 𝚂𝚌𝚘𝚙𝚎(a,ϕ)\mathtt{Scope}(a,\phi), we call 𝚁𝚎𝚍𝚞𝚌𝚎(ϕ,a)\mathtt{Reduce}(\phi,a). Given that aa was chosen to be true, the first clause in ϕ\phi propagates to the minterm ab¯c¯a\land\bar{b}\land\bar{c}. The second and third clauses contain neither aa nor a¯\bar{a} so they are not touched. Thus at the end of 𝚁𝚎𝚍𝚞𝚌𝚎(ϕ,a)\mathtt{Reduce}(\phi,a), we are left with

ϕ=(ab¯c¯)(bxy)(cxy¯).\phi=(a\land\bar{b}\land\bar{c})\land(b\odot x\odot y)\land(c\odot x\odot\bar{y}).

Back in 𝚂𝚌𝚘𝚙𝚎(a,ϕ)\mathtt{Scope}(a,\phi), line 2 will call 𝚁𝚎𝚍𝚞𝚌𝚎(ϕ,b¯)\mathtt{Reduce}(\phi,\bar{b}) and 𝚁𝚎𝚍𝚞𝚌𝚎(ϕ,c¯)\mathtt{Reduce}(\phi,\bar{c}) in turn. 𝚁𝚎𝚍𝚞𝚌𝚎(ϕ,b¯)\mathtt{Reduce}(\phi,\bar{b}) will first propagate the decision b¯\bar{b}. Since there are no clauses containing b¯\bar{b} it moves on to line 8, where it will delete b¯¯=b\overline{\overline{b}}=b from all clauses containing it. The only such clause is (bxy)(b\odot x\odot y), and by removing bb we obtain (xy)(x\odot y). When we return to line 3 of 𝚂𝚌𝚘𝚙𝚎(a,ϕ)\mathtt{Scope}(a,\phi), the current formula is

ϕ=(ab¯c¯)(xy)(cxy¯).\phi=(a\land\bar{b}\land\bar{c})\land(x\odot y)\land(c\odot x\odot\bar{y}).

Analogously, in 𝚁𝚎𝚍𝚞𝚌𝚎(ϕ,c¯)\mathtt{Reduce}(\phi,\bar{c}) we reduce (cxy¯)(c\odot x\odot\bar{y}) to (xy¯)(x\odot\bar{y}), thus obtaining the formula

ϕ=(ab¯c¯)(xy)(xy¯),\phi=(a\land\bar{b}\land\bar{c})\land(x\odot y)\land(x\odot\bar{y}),

upon finishing 𝚂𝚌𝚘𝚙𝚎(a,ϕ)\mathtt{Scope}(a,\phi).

At this point the algorithm is already doomed as, having chosen the positive polarity of aa, it has no way to satisfy the remainder of the formula, namely (xy)(xy¯)(x\odot y)\land(x\odot\bar{y}). For completeness, however, we continue with the remainder of the execution.

Having returned to line 6 of 𝚂𝚌𝚊𝚗(ϕ)\mathtt{Scan}(\phi), we now run 𝚂𝚌𝚘𝚙𝚎(a¯,ϕ)\mathtt{Scope}(\bar{a},\phi). Line 5 in 𝚂𝚌𝚘𝚙𝚎(a¯,ϕ)\mathtt{Scope}(\bar{a},\phi) detects the conflict with aa already in the minterm, and returns NULL. Thus 𝚂𝚌𝚊𝚗(ϕ)\mathtt{Scan}(\phi) calls 𝚁𝚎𝚖𝚘𝚟𝚎(a¯,ϕ)\mathtt{Remove}(\bar{a},\phi), which leaves the formula unaffected, as neither aa nor a¯\bar{a} is contained in the remainder of the formula (xy)(xy¯)(x\odot y)\land(x\odot\bar{y}).

The execution returns to line 4 of 𝚂𝚌𝚊𝚗(ϕ)\mathtt{Scan}(\phi), and we process the variable xx next. Now in 𝚂𝚌𝚘𝚙𝚎(x,ϕ)\mathtt{Scope}(x,\phi), we simplify the formula ϕ\phi due to xx being assigned to true, and obtain

ϕ=(ab¯c¯xy¯y),\phi=(a\land\bar{b}\land\bar{c}\land x\land\bar{y}\land y),

which is detected in line 6 of 𝚁𝚎𝚍𝚞𝚌𝚎(ϕ,x)\mathtt{Reduce}(\phi,x) as a conflict. Thus 𝚂𝚌𝚊𝚗(ϕ)\mathtt{Scan}(\phi) calls 𝚁𝚎𝚖𝚘𝚟𝚎(ϕ,x)\mathtt{Remove}(\phi,x) which in turn calls 𝚁𝚎𝚍𝚞𝚌𝚎(ϕ,x¯)\mathtt{Reduce}(\phi,\bar{x}). 𝚁𝚎𝚍𝚞𝚌𝚎\mathtt{Reduce} then detects the conflict yy¯y\land\bar{y} and returns NULL. 𝚁𝚎𝚖𝚘𝚟𝚎(ϕ,x)\mathtt{Remove}(\phi,x) thus concludes that the formula is unsatisfiable. In the next subsection, we provide reasoning for why this counterexample “tricks” Salum’s algorithm.

3.1 Key Issue with the Proposed Algorithm

As mentioned at the end of Section 2, Salum’s algorithm [Sal20] fails to backtrack. Our example exploits this by providing a formula in which, after setting the value of variable aa to true, simplification results in an unsatisfiable formula.

It is certainly the case that picking a different variable might lead to a satisfying assignment using the proposed algorithm. However, requiring a particular ordering of the variables contradicts the claim of monotonicity [Sal20, Theorem 36] and several assertions in the paper stating that the order of the decisions is arbitrary. One could think of several simple ways to fix this, leading to heuristics about how to pick the next literal. We discuss a few, for which it is easy to extend our counterexample:

  • Picking a variable based on how many clauses contain the variable: In this case, we add enough clauses of the form (axiyi)(a\odot x_{i}\odot y_{i}) to make aa the most frequent variable.

  • Reversing the order of the polarities in Line 5 of 𝚂𝚌𝚊𝚗\mathtt{Scan}: In the example in Section 3, we chose to first process the positive literal of aa. The proposed algorithm does not specify the order in which to process ri{xi,xi¯}r_{i}\in\{x_{i},\overline{x_{i}}\}. One could argue that our counterexample would not work had we picked the negative literal first, and that perhaps a fixed order of negative literal, then positive literal, would resolve the issue. In this case, we construct the same formula but with a¯\overline{a} in the place of aa.

  • Picking a variable in reverse lexicographical order: We labeled our variables such that the first (in lexicographical order) variable leads to a bad decision. Suppose one wanted to fix this issue by reversing the order of the variables. Then a simple relabeling still yields a counterexample.

This discussion suggests that the fundamental issue of the proposed algorithm is likely not addressable by simple fixes. In essence, simply propagating each decision is not enough to preclude the need for backtracking. That is, the algorithm can only ever backtrack a single step by flipping the polarity of the literal just chosen. The only obvious way to remedy this is to allow for proper backtracking, which in principle will make the algorithm correct, but potentially at the enormous cost of exponential worst-case running time.

4 Conclusions

We have studied Latif Salum’s paper titled “Tractability of One-in-three 3SAT: P=NP\mbox{\rm P}=\mbox{\rm NP}” [Sal20]. We showed that this algorithm is flawed by providing a counterexample: an X3SAT formula that is satisfiable, but for which the algorithm returns UNSAT. Thus Salum’s proposed algorithm does not settle the long-standing question of P vs. NP. In fact, an algorithm as straightforward as the one proposed will very likely fail to show P=NP\mbox{\rm P}=\mbox{\rm NP}.

Acknowledgments

We thank Michael C. Chavrimootoo, Lane A. Hemaspaandra, and Mandar Juvekar for their helpful feedback on an earlier version of our critique. Any remaining errors are the responsibility of the authors.

References

  • [DLL62] M. Davis, G. Logemann, and D. Loveland. A machine program for theorem-proving. Communications of the ACM, pages 394–397, July 1962.
  • [DP60] M. Davis and H. Putnam. A computing procedure for quantification theory. Journal of the ACM, 7(3):201–215, 1960.
  • [Sal20] Latif Salum. Tractability of one-in-three 3SAT: P = NP. Technical Report arXiv:2012.06304v1 [cs.CC], Computing Research Repository, arXiv.org/corr/, December 2020. Version 1.

Appendix A Algorithms

The algorithms in this appendix do not replace those in the original paper [Sal20], but are instead meant to help the reader quickly grasp the nature of the algorithms therein. In particular, in Section 3, when we refer to line numbers, we refer to those of the algorithms in the original paper. Our reinterpretations use standard SAT terminology, but we mix in some of Salum’s notation when appropriate in order to provide an easy way for the reader to map the original expositions of the algorithms to our reinterpretations.

input: X3SAT formula ϕs\phi_{s} and literal rjr_{j}
output: Partial assignment ψs~\tilde{\psi_{s}} and a simplified formula ϕrj¯\phi^{\prime\overline{r_{j}}}
1 begin
2      for every clause CkC_{k} that contains rjr_{j} do
3           Add the propagation of rjr_{j} in CkC_{k} to ψs~\tilde{\psi_{s}}, i.e., add the literals {rj}{ri¯riCkrirj}\{r_{j}\}\cup\{\overline{r_{i}}\,\mid\>r_{i}\in C_{k}\land r_{i}\neq r_{j}\}
4           if a conflict is detected then
5                return NULL
6                end if
7               
8                end for
9               for every clause CkC_{k} where rj¯\overline{r_{j}} appears do
10                     Delete rj¯\overline{r_{j}} from CkC_{k}
11                     if CkC_{k} turns into a unit clause then
12                          Add the unique literal in CkC_{k} to ψs~\tilde{\psi_{s}}, remove CkC_{k} from the formula ϕrj¯\phi^{\prime\overline{r_{j}}}
13                         
14                          end if
15                         if conflict is detected then
16                               return NULL
17                               end if
18                              
19                               end for
20                              
21                               end
22                              
Algorithm A.1 𝚁𝚎𝚍𝚞𝚌𝚎(ϕs,rj)\mathtt{Reduce}(\phi_{s},r_{j})
input: Literal rjr_{j} and X3SAT formula ϕs\phi_{s}
output: Partial assignment ψ(rj)\psi(r_{j}) and simplified formula ϕs(rj)\phi^{\prime}_{s}(r_{j})
1 begin
2      Initialize ψ(rj){rj}\psi(r_{j})\leftarrow\{r_{j}\}, ϕs(rj)ϕs\phi^{\prime}_{s}(r_{j})\leftarrow\phi_{s}
3      for all unprocessed literals rer_{e} in the current partial assignment do
4           if a conflict is detected in 𝚁𝚎𝚍𝚞𝚌𝚎(ϕs(rj),re)\mathtt{Reduce}(\phi^{\prime}_{s}(r_{j}),r_{e}) then
5                return NULL
6                end if
7               Add the partial assignment from the 𝚁𝚎𝚍𝚞𝚌𝚎\mathtt{Reduce} call to the current assignment ψ(rj)\psi(r_{j})
8                if a conflict is detected then
9                     return NULL
10                     end if
11                    Replace the current simplified formula ϕs(rj)\phi^{\prime}_{s}(r_{j}) with the one obtained from 𝚁𝚎𝚍𝚞𝚌𝚎\mathtt{Reduce}
12                     Mark rer_{e} as processed
13                    
14                     end for
15                    
16                     end
17                    
Algorithm A.2 𝚂𝚌𝚘𝚙𝚎(rj,ϕs)\mathtt{Scope}(r_{j},\phi_{s})
input: An X3SAT formula φs\varphi_{s}
output: Partial assignment ψ^\hat{\psi} and simplified function ϕ^\hat{\phi}
1 begin
2      for every literal rir_{i} still in ϕ\phi such that ri¯\overline{r_{i}} is in the current partial assignment do
3           𝚁𝚎𝚖𝚘𝚟𝚎(ri,ϕs)\mathtt{Remove}(r_{i},\phi_{s})
4          
5           end for
6          for every literal xix_{i} still in the formula do
7                for every polarity ri{xi,xi¯}r_{i}\in\{x_{i},\overline{x_{i}}\} do
8                     if 𝚂𝚌𝚘𝚙𝚎(ri,ϕs)\mathtt{Scope}(r_{i},\phi_{s}) detects a conflict then
9                          𝚁𝚎𝚖𝚘𝚟𝚎(ri,ϕs)\mathtt{Remove}(r_{i},\phi_{s})
10                         
11                          end if
12                         
13                          end for
14                         
15                          end for
16                         
17                          end
18                         
Algorithm A.3 𝚂𝚌𝚊𝚗(φs)\mathtt{Scan}(\varphi_{s})
input: Literal rjr_{j} and X3SAT formula ϕs\phi_{s}
1 begin
2      if 𝚁𝚎𝚍𝚞𝚌𝚎(ϕs,rj¯)\mathtt{Reduce}(\phi_{s},\overline{r_{j}}) detects a conflict then
3           return UNSAT
4           end if
5          Update the current partial assignment with the information from 𝚁𝚎𝚍𝚞𝚌𝚎\mathtt{Reduce}
6           if a conflict is detected then
7                return UNSAT
8                end if
9               Remove rjr_{j} from the list of literals in the formula, add it to the list of literals in the partial assignment
10                The new formula ϕs+1\phi_{s+1} is calculated by simplifying ϕs\phi_{s} over rj¯\overline{r_{j}}
11                𝚂𝚌𝚊𝚗(ϕs+1)\mathtt{Scan}(\phi_{s+1})
12               
13                end
14               
Algorithm A.4 𝚁𝚎𝚖𝚘𝚟𝚎(rj,ϕs)\mathtt{Remove}(r_{j},\phi_{s})