On Salum’s Algorithm for X3SAT
Abstract
This is a commentary on, and critique of, Latif Salum’s paper titled “Tractability of One-in-three 3SAT: .” Salum purports to give a polynomial-time algorithm that solves the NP-complete problem X3SAT, thereby claiming . 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 in “Tractability of One-in-three 3SAT: ” [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 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 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 , where , called the minterm, is a conjunction of literals, and is a conjunction of X3SAT clauses of the form .111Salum calls the 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 , , or to true. This holds similarly in the case of only two literals in . The minterm is meant to hold a partial assignment of the literals in the formula and it is omitted when it is empty. An X3SAT formula is satisfiable if and only if there exists an assignment that makes true and satisfies every clause in .
It is easy to see that X3SAT formulas with empty minterms are equivalent to 3CNF formulas (by simply replacing the notational element with ), 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 . Salum claims to provide such an algorithm.
Salum’s algorithm [Sal20] processes each variable in a given formula 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. (Algorithm A.1) propagates the decision over the formula and performs some simplifications. (Algorithm A.2) iteratively calls to propagate a single decision and all of its implied literals. Both and return NULL when a conflict is detected. (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 on this decision. If detects a conflict due to this decision, calls (Algorithm A.4) to assign the literal to the opposite polarity. calls but this time, if a conflict is detected, it returns UNSAT. If no conflict is detected, simplifies the current formula over the assignment and calls over the resulting formula .
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,
This formula is quite clearly satisfiable, for instance, by the assignment .222As is standard, 1 represents true and 0 represents false. Salum claims in [Sal20, Section 3.1] that if does not find a satisfying assignment (in Salum’s words, it is “interrupted”), then is unsatisfiable, so we run 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 is empty, so we skip to line 4 of 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 first, invoking in line 6. From line 4 of , we call . Given that was chosen to be true, the first clause in propagates to the minterm . The second and third clauses contain neither nor so they are not touched. Thus at the end of , we are left with
Back in , line 2 will call and in turn. will first propagate the decision . Since there are no clauses containing it moves on to line 8, where it will delete from all clauses containing it. The only such clause is , and by removing we obtain . When we return to line 3 of , the current formula is
Analogously, in we reduce to , thus obtaining the formula
upon finishing .
At this point the algorithm is already doomed as, having chosen the positive polarity of , it has no way to satisfy the remainder of the formula, namely . For completeness, however, we continue with the remainder of the execution.
Having returned to line 6 of , we now run . Line 5 in detects the conflict with already in the minterm, and returns NULL. Thus calls , which leaves the formula unaffected, as neither nor is contained in the remainder of the formula .
The execution returns to line 4 of , and we process the variable next. Now in , we simplify the formula due to being assigned to true, and obtain
which is detected in line 6 of as a conflict. Thus calls which in turn calls . then detects the conflict and returns NULL. 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 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 to make the most frequent variable.
-
•
Reversing the order of the polarities in Line 5 of : In the example in Section 3, we chose to first process the positive literal of . The proposed algorithm does not specify the order in which to process . 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 in the place of .
-
•
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: ” [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 .
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.