The fast parallel algorithm for CNF SAT without algebra Carlos Barr´ on-Romero [email protected]

arXiv:1701.04777v1 [cs.DS] 17 Jan 2017

Universidad Aut´ onoma Metropolitana, Unidad Azcapotzalco, M´exico Av. San Pablo No. 180, Col. Reynosa Tamaulipas, C.P. 02200 Ciudad de M´exico, M´exico

Abstract. A novel parallel algorithm for solving the classical Decision Boolean Satisfiability problem with clauses in conjunctive normal form is depicted. My approach for solving SAT is without using algebra or other computational search strategies such as branch and bound, back-forward, tree representation, etc. The method is based on the special class of SAT problems, Simple SAT (SSAT). The algorithm includes parallel execution, object oriented, and short termination as my previous versions but it keep track of the tested unsatisfactory binary values to improve the efficiency and to favor short termination. The resulting algorithm is linear with respect to the number of clauses plus a process data on the partial solutions of the subproblems SSAT of an arbitrary SAT and it is bounded by 2n iterations where n is the number of logical variables. The novelty for the solution of arbitrary SAT problems is a linear algorithm, such its complexity is less or equal than the algorithms of the state of the art for solving SAT. The implication for the class NP is depicted in detail.

Keywords: Logic, SAT, CNF, K-SAT, Complexity algorithm, NP Class, Boolean Algebra, Theory of Computation

1

Introduction

In [1], the chapter 6 depicts Reducibility. This term means the ability to solve a problem by finding and solving simple subproblems. This idea is used here between the Decision Boolean Satisfiability (SAT) and the simple Decision Boolean Satisfiability Problem, that I named Simple SAT (SSAT). The problem is for determining when a CNF formula ϕ ∈ L(SAT)or ∈ / L(SAT), where L(SAT)= {ϕ | ϕ is satisfiable a CNF logical formula } or equivalently, there is a witness w in {0, 1}n such that ϕ(w) = 1 where n is the ϕ’s number of logical variables. The main characteristic of SAT is that its clauses use n or less variables, repeated and any order, but the main characteristic of SSAT is that all its logical clauses have the same number of logical variables. The selection of the Conjunctive normal form (CNF) version of SAT is justified for the logical equivalence and the huge literature. Talking about SAT is immediately related to NP Class of computational problems and its algorithms [10,13,14,11,12,9,7,6,8]. Classical SAT problems are depicted as CNF (k,n)-satisfiability or (k,n)-SAT, where the number of variables of the problem is n but each clause have only k variables. By example, with n = 7 an instance of the (3,7)-SAT is (x2 ∨ x4 ∨ x6 ) ∧ (x0 ∨ x1 ∨ x2 ) ∧ (x1 ∨ x3 ∨ x4 ).

The algorithm depicted here address any type of CNF SAT, it means that the clauses are in CNF with any number of the n given logical variables. By example, with n = 8, an arbitrary instance of SAT is (x4 ∨ x5 ∨ x7 ) ∧(x2 ∨ x4 ) ∧ (x0 ∨ x1 ∨ x2 ) ∧ (x1 ∨ x3 ∨ x4 ∨ x5 ). Moreover, this paper focuses in my special parallel algorithm for solving any type of SAT without algebra, the previous results are in [4,2]. The notation and conventions for SAT are well know: A boolean variable only takes the values: 0 (false) or 1 (true). The logical operators are not: x; and: ∧, and or: ∨. Hereafter, Σ = {0, 1} is the corresponding binary alphabet. A binary string , x ∈ Σ n is mapped to its corresponding binary number in [0, 2n − 1] and reciprocally. Moreover, to the binary xn−1 ∨ xn−2 . . . x1 ∨ x0 corresponds  0 if xi , string b=bn−1 bn−2 . . . b1 b0 where bi = 1 otherwise. Briefly, the main results in [4,3,2] are: 1. The search space of the solutions (satisfiable logical values) of the SAT and SSAT is Σ n . 2. A SSAT with n logical variables, and m clauses , it is solved in O(1). The comparison of m versus 2n is a sufficient condition to state the answer (yes or no) without any process and without any witness.

3. An instance of SSAT is not satisfiable when it has m = 2n different clauses. This special instances of SSAT are named blocked boards. 4. A clause is translated to a binary number b then b is for sure an unsatisfactory binary number for SSAT. The main change with respect to the previous version is the cooperation of the two main routines (deterministic search and random search) to use an exclusive memory to keep track of the failure candidates. The candidates come from translated clauses to binary numbers (if a clause is not of size n, randomly it is completed to have n binary values) or others sources of already tested binary numbers like the candidates of the random search. It is only needed to keep track of the failures (the binary numbers do not satisfy SAT) because any successful binary number stops process, i.e, it means that the given SAT is true with it. The changes in the previous algorithms of [4,2] are designed for cooperation and minimum interaction sharing the exclusive memory for keeping the unsatisfactory tested candidates. Also, the minimum interaction does not alter the previous design of the two main routines, it is an error to include a loop for looking viable candidates. This can cause an overhead of iterations when the number of satisfactory binary numbers is small.

2

Properties of SAT

This section depicts the main propositions used to build the parallel algorithm. Proposition 1. Any disjunctive clause over the variables (xn−1 , . . . , x0 ) corresponds a binary number b = bn−1 bn . . . b0 . Then 1. x ∧ x ≡ 0 where x is the complement of x. 2. b ∧ b ≡ 0 where b and b correspond to the translation of x and x. 3. x(b) ≡ 0 and x(b) ≡ 0 where the values of the boolean variables correspond to the bits of b and b. Proof. Without loss of generality, x = xn−1 ∨ xn−2 ∨ . . . ∨ x0 the translation of b and x = xn−1 ∨ xn−2 ∨ . . . ∨ x0 the translation of b. Then x ∧ x = (xn−1 ∨ xn−2 ∨ . . . ∨ x0 ) ∧ (xn−1 ∨ xn−2 ∨ . . . ∨ x0 ) ≡ (xn−1 ∧ xn−1 ) ∨ (xn−2 ∧ xn−2 ) ∨ . . . ∨ (x0 ∧ x0 ) ≡ 0. The translation of the SAT’s clauses allow to define a table of binary numbers or a board. The following boards have not a satisfactory assignation in Σ and Σ 2 :

x0 1 0

Fig. 1. SAT as an electronic circuit

The article is organized as follow. Section 2 depicts a selected set of properties and propositions for the parallel algorithm for solving SAT (more details are in [4,3,2]). The next section 3 depicts the components, design’s considerations and the parallel algorithm. Section 4 contains a complex analysis of of parallel algorithm. The next section 5and the subsection 5.1 depict theoretical results about complexity and the consequence for solving an extreme SAT and for the NP class. Finally, the last section depicts the conclusions and the future work.

x1 0 1 0 1

x0 0 1 1 0

These are examples of blocked boards. It is clear by the previous proposition, that the corresponding SAT ϕ1 = (x0 ) ∧ (x0 ) and ϕ2 = (x1 ∨ x0 ) ∧ (x1 ∨ x0 ) ∧ (x1 ∨ x0 ) ∧ (x1 ∨ x0 ) have not a solution because each binary number has its binary complement. A brief justification for not using algebra and getting efficiency in solving SAT is depicted in the following propositions. To use algebra drives to more operations, that they are not necessary for the resolution of SAT. Proposition 2. Let F be a logical formula and v is logical variable, which it is not in F . Then (F ) ≡

(F ∨ v) ∧ (F ∨ v)

Proof. The results follows from the algebraic laws of distribution and factorization (F ) ≡ (F ∧ (v ∨ v)) .

Moreover, the previous proposition states an logical reciprocal equivalence transformation between SAT and y SSAT. By example, let ϕ3 be a SAT(4, 2),

ϕ3 =

∨ x0 ) (x3 ∨ x2 ∧ (x2 ∨ x1 ∨ x0 ).

Using the previous proposition, ϕ3 is equivalent to a ϕ4 of type SSAT(4, 4), where:

Set of logical variables N {} ↔0 {x0 } ↔1= {x1 } ↔2= .. .. .. . . . {x1 , x0 } {x2 , x0 } .. . X

(x3 ∧ (x3 ϕ4 = ∧ (x3 ∧ (x3

∨ x2 ∨ x2 ∨x2 ∨x2

∨ ∨ ∨ ∨

x1 x1 x1 x1

∨ x0 ) ∨ x0 ) ∨ x0 ) ∨ x0 ).

n 0 n 0



+1

 P1 ↔ k1 = k=0 nk P1 ↔ k2 = k=0 nk + 1 .. .. . . Pn−1  ↔ 2n − 1 = k=0 nk

The function IdSS : 2X → [0, 2n − 1] is estimated by the following algorithm to get a bijection between the set of variables and its identification number:

Algorithm 1 Unique identification of SSAT by its variables Input: x = {xk , . . . , x1 , x0 }: set of variables indexed in [0, n] and in descending order. Output: ix: integer value; By inspection, ϕ3 ’s satisfactory assignation only // identification number in [0, 2n − 1] for the indices need that x3 = 1 and x1 = 1 (its other variables in the set x. do not care). On the other hand, varphi4 ’s satisfac- Memory: base: integer; v, t: (k+1)-ism array structory assignations are {1010, 1011, 1110, 1111}. These ture of indices as number where its digits are in nusatisfactory assignations correspond to the variables merical base n, i.e., its digits are {n−1, n−2, . . . , 1, 0} with x3 = 1 y x1 = 1. This toy example depicts that by doing algebraic ix = 0; procedures it is necessary to apply the laws of factor- k = |x|; // | · | cardinality of a set. ization and distribution after finding matching be- if (k == 0) then output: “ix”; tween clauses and variables, but in order to find return; matching between clauses and variables it is necessary to sort or to use searching matching procedures to de- end if termine the matching between clauses and variables base = 0; for j = 0, k − 1 do under an appropriated data structures. A review of base = base + nj ; the state of the art for the algorithms for SAT, de · // · binomial or Newton coefficient picts that they use expensive strategies, by example, branch and bound, backtracking, sorting and match- end for ing, etc. It means more operations than a simple read- concatenate v = {vk , . . . , v0 }; // array of size k + 1 as number for the indices in ing of the clauses as they appear in the problem. descending order while (indices(x) < (indices(v)) do. t = v; while (1) do 3 Algorithms for SAT t = incrementa(t, 1); // increase by one the t’s indices as a number in the numerical base n if indices(t) are different and in descending order then For any set of n logical variables X = break {xn−1 , . . . , x1 , x0 }, there is a bijection between any // t is a valid set of different descent subset x ⊂ X and an unique identification number. //ordering indices This bijective function is similar to the given in [1], end if Prop. 4.

Both are equivalent, and they have the same satisfactory assignations, but it is not necessary to use algebra for solving them, it is only necessary to review their clauses.

end while; v = t; ix = ix + 1; end while // this loop end when the index set x is founded output: “base + ix”; return;

Algorithm 2 Updated candidate Input: (c: binary number in Σ n ) Output: (None). Memory: P c : pile of binary numbers; Exclusive memory: n cand:= 2n : integer; cand stat[0, 2n−1] := 1: array of boolean; // 1: viable, 0: failure for satisfying ϕ if (cand sta[c] == 0) then return; end if push(c, P C); while not empty (P c) do exclusive updated on c := pop( P c ); cand sta[c] := 0; n cand := n cand - 1; exclusive updated off if (n cand == 0) then output: “The algorithm 2 confirms ϕ ∈L(SAT)after / reviewing the research space Σ n .”; stop all; end if end while return

Algorithm 3 Status candidate Input: (c: binary number in Σ n ) Output: (status: boolean value). Exclusive memory: n cand:= 2n : integer; cand stat[0, 2n−1] = 1: array of boolean; return (cand sta[c]);

Algorithm 4 NumberΣ Input: (IdSS: set of integer values, for the identification of the logical variables, k: set of binary values of each variable of IdSS) Output: (kΣ : array binary value in Σ n ). memory: i : integer; for i:= n − 1 downto 0 do if (i ∈ IdSS ) then kΣ [i] := value in k of the variable i; else kΣ [i] := random selection from {0, 1}; end if end for return kΣ ;

Algorithm 5 Updated SSAT Input: (SSAT: List of objects, rw: clause). Output: SSAT: Updated list of objects for each SSAT with identification IdSS(r). Each SSAT(IdSS(r)) updates its S : list of the solutions, where S[0 : 2n−1 ]: is an array as a doble chained list of integer , previous, next : integer; Memory: ct := 0 : integer; k, k aux: integer; f irst := 0: integer; last = 2n − 1: integer; if ( SSAT(IdSS(rw)) not exist) then build object SSAT(IdSS(rw)) end if with SSAT(IdSS(rw)) k := clause to binary (rw); k aux := k; if (size(k) < ϕ.n) then k aux := numberΣ (set of variables(rw), k); end if if (ϕ(k aux) == 1) then output: “The algorithm 5 confirms ϕ ∈L(SAT), k aux is a satisfactory assignation.”; stop all; else Updated candidate(k aux); end if // k of size n is not a satisfactory number for ϕ. // See proposition 1. if (size(k) == ϕ.n) Updated candidate(k); end if if (S[k].previous 6= −1) or (S[k].next 6= −1) then S[S[k].previous].next := S[k].next;

S[S[k].next].previous = S[k].previous; if (k == f irst) then f irst := S[k].next; end if if (k = last) then last := S[k].previous; end if S[k].next := −1; S[k].previous := −1; ct := ct + 1; end if if (ct = 2n ) then output: “ The algorithm 5 confirms ϕ ∈L(SAT) / SSAT(IdSS(rw)) is a blocked board.”; stop all; end if end with return

Algorithm 6 Solve ϕ ∈L(SAT). input: n, ϕ =SAT(n, ·). output: Message and if there is a solution the witness x, such that ϕ(x) = 1. Memory: r: set of variables de X; SSAT=null: List de objets SSAT. while not(eof clauses(ϕ)); r = ϕ.read clause; algorithm.5 Updated SSAT( SSAT,r). end while; with list SSAT // ×θ cross product and natural joint estimate Θ = ×θ with all SSAT(IdSS(r)); if Θ = ∅ then output: “The algorithm 6 confirms ϕ ∈L(SAT). / The SSAT(IdSS(r)) are incompatible.” stop all; otherwise output: “The algorithm 6 confirms ϕ ∈L(SAT). s is a satisfactory assignation, s ∈ Θ. The SSAT(IdSS(r)) are compatible. stop all; end with end if

Algorithm 7 Test ϕ(·) // It evaluates and updates failure candidates. Input: c: integer value in Σ n . Output: none. if (Cand stat(c) == 1) then if (ϕ(c) == 1) then output: “The algorithms 7 and 8 confirm ϕ ∈L(SAT). c is a satisfactory assignation.”; stop all; else Updated candidate(c); end if end if return The next algorithm is a modified version of the algorithm 4 in [5]. The selected candidates are unique and randomly selected from Σ n interpreted as the interval of natural numbers [0, 2n − 1]. Algorithm 8 Solve ϕ ∈L(SAT)by a random search of [0, 2n − 1]. Input: n, ϕ =SAT(n, ·). Output: Message and if there is a solution, the witness s (s ∈ [0, 2n − 1]), such that ϕ(s) = 1. Memory: T [0 : 2n−1 − 1]=[0 : 2n − 1]: integer; M i=2n − 1: integer; rdm, a: integer. for i:=0 to 2n−1 − 2 if T [i] = i then // random selection rdm ∈ [i + 1, 2n−1 − 1]; rdm = floor(rand() (M i − i + 1.5)) + (i + 1); // rand() return a random number in (0,1); // floor(x) integer less than x a = T [rdm]; T [rdm] = T [i]; T [i] = a; end if rdm = 0T [i]; // Concatenation for 0 and T [i] parallel execution test(rmd) by algorithm 7; test(rmd) by algorithm 7; end parallel execution end for rdm = 0T [2n−1 − 1]; // Concatenation for 0 and T [2n−1 − 1] parallel execution test(rmd) by algorithm 7; test(rmd) by algorithm 7;

end parallel execution output: “The algorithm 8 confirms ϕ ∈L(SAT) /

after exploring all binary numbers in Σ n .”; stop all;

The upper limit for the iterations of previous algorithm is 2n−1 , but the number of tested candidates n remains 2n . It is 22 = 2n−1 by parallel execution by two independent processors of the algorithm 7. It is possible to get down the number of iterations by using four independent processor, then number of iterations is 2n−2 . The simultaneous candidates for testing are 00x, 01x and its complement 11x and 10x where x ∈ [0, 2n−2 − 1]. In general with 2p independent processors the upper limit of iterations is 2n−p but it is not as good as it sounds, when n ≫ 0 is a big number and the 2p processors is small, the time of the iterations for testing the candidates diminishes a little because 2n−p ≈ 2n . Nowadays, it is very expensive a supercomputer with 2p independent processors.

Fig. 2. Behavior of the function P(s, k) where s is the number of satisfactory assignations and k is the number of trials

When the number of clauses is a small number m, the probability for finding a satisfactory assignaThe algorithms 6 and 8 have short termination tion is high, because it means that there are around n when a satisfactory assignation or a blocked board 2 −m candidates not blocked by the m clauses. Howare found, no matters if the number of clauses is huge ever, this is not the case for an extreme SAT with one or none satisfactory assignation. Figure 2 depicts this or the clauses are in disorder and repeated. behavior. The probability function with respect to the number of s satisfactory assignations and k failed trials is Algorithm 9 Parallel algorithm for SAT Input: CNF formula ϕ with at most n variables. s Output: Message if ϕ ∈L(SAT)or not. . P(s, k) = n 2 −k Therefore, for finding a unique solution after testing k random different failed candidates decays in exponential way: 1 . −k

parallel execution algorithm 6(n, ϕ); algorithm 8(n, ϕ); end parallel execution

There are two main ideas for keeping efficient the algorithm 8: 1) a random search using a permutation of the research space [0, 2n − 1], and 2) the permutation is computed at the same time of the trials. More The exponential divisor 2n causes a rapidly decay information in [5,4,2]. as it depicted in fig. 2 where k = 2n − 2, k = 500, 000 The algorithm 6 behaves as one pass compiler over and k = 1. When n ≫ 0 is a big number, only after the reading of the clauses as they are. It does not testing a huge number k = 2n − 2 of the different need more operations in order to pull apart the binary candidates the probability grows to 0.5. Meanwhile, number of the complement of the clause’s translation for a reasonable number k ≪ 2n of the different can- to a binary number from the research space of each didates, the probability remains insignificant, i.e., SSAT, this allows to detect if a SSAT is a blocked board for short termination. Otherwise, when it finishes to read the clauses of the given formula ϕ, it has 1 P(1, k) ≈ n ≈ 0. all the satisfactory assignations for each SSAT of ϕ. 2 P(1, k) =

2n

The final step of the algorithm 6 is to execute with the satisfactory assignations of each SSAT a cross theta joint operation ×θ. This operation is similar to the cross product and natural theta joint in the relational databases. The definition of ×θ with two set of logical variables r and r′ , and with their satisfactory assignations SSAT(·).S is: SSAT(IdSS(r)) × θ SSAT(IdSS(r′ )) = 1. if r ∩ r′ = ∅ then SSAT(IdSS(r)).S × SSAT(IdSS(r′ )).S. 2. if r ∩ r′ 6= ∅ and there are common values between SSAT(IdSS(r)).S and SSAT(IdSS(r′ )).S for variables in r ∩ r′ then SSAT(IdSS(r)).S θr∩r′ SSAT(IdSS(r′ )).S 3. if r ∩ r′ 6= ∅ and there are not common values between SSAT(IdSS(r)).S y SSAT(IdSS(r′ )).S for the variables in r ∩ r′ then ∅. For 1) y 2) SSAT(IdSS(r) and SSAT(IdSS(r′ ) are compatible. For 3) they are incompatible, i.e., there is not a satisfactory assignation for both. An example of 1) is ϕ5 =SAT(4, 5) with (x3 ∨ x2 ) ∧ (x3 ∨ x2 ) ∧ (x3 ∨ x2 ) ∧ (x1 ∨ x0 ) ∧ (x1 ∨ x0 ). It has a SSAT(2, 3) for its first three clauses with solutions x3 = 1, x2 = 1. It has a SSAT(2, 2) from its two last clauses with solutions {(x1 , x0 ) | (0, 1) ∨ (1, 0)}. Then the satisfactory assignation for ϕ5 are {(1, 1)} × {(0, 1) , (1, 0)} = {(x3 , x2 , x1 , x0 ) | (1, 1, 0, 1) ∨ (1, 1, 1, 0)}. An example of 2) is ϕ6 =SAT(4, 5) = (x3 ∨ x2 ) ∧ (x3 ∨ x2 ) ∧ (x3 ∨ x2 ) ∧ (x2 ∨ x1 ∨ x0 ) ∧ (x2 ∨ x1 ∨ x0 ). It has a SSAT(2, 3) from its three first clauses with solutions {(x3 , x2 ) | (0, 0)}. It has a SSAT(3, 2) from its last two clauses with solutions {(x2 , x1 , x0 ) | (1, 0, 0)∨ (1, 0, 1) ∨ (1, 1, 0) ∨ (1, 1, 1) ∨ (0, 0, 0) ∨ (0, 1, 1)}. Then ϕ6 ∈L(SAT), because there are satisfactory assignations for the common value 0 of the common variable x2 . The satisfactory assignation for ϕ6 are {(x3 , x2 , x1 , x0 ) | (0, 0, 0, 0) ∨ (0, 0, 1, 1)}. An example of 3) is ϕ7 =SAT(4, 7) = (x3 ∨ x2 ) ∧ (x3 ∨ x2 ) ∧ (x3 ∨ x2 ) ∧ (x2 ∨ x1 ∨ x0 ) ∧ (x2 ∨ x1 ∨ x0 ) ∧ (x2 ∨x1 ∨x0 )∧(x2 ∨x1 ∨x0 ). It has a SSAT(2, 3) from its three first clauses with solutions {(x3 , x2 ) | (0, 0)}. It has a SSAT(3, 4) from its last four clauses with solutions {(x2 , x1 , x0 ) | (1, 0, 0) ∨ (1, 0, 1) ∨ (1, 1, 0) ∨ (1, 1, 1)}. Then ϕ7 ∈L(SAT), / because there are not satisfactory assignations to build with the common variable x2 .

4

Complex analysis of the parallel algorithm

There are two basic properties of the model of computation of the nowadays computers: 1) the concept of discrete states, and 2) the manipulation of its memory. Figure 1 depicts a SAT as an electronic circuit of and or gates where the lines are the logical variables. I assume that the evaluation of ϕ is without a computer program, it is a given electronic circuit as a closed box that it works when the signals of the values of the logical variables in its lines are given. The electrons travel into the lines at the speed of light and there is an small time required by the gates for an stable output. Therefore the time cost for evaluating ϕ is a small constant. It is like a city that turns on its lights when the dark comes. There are wonderful videos of cities turn on their lights. On the other hand, for analyzing the clauses of ϕ it is necessary states and memory to keep the status and information of the reviewing or reading ϕ’a clauses. A deterministic automate is not enough for this task, because it is necessary to store and retrieve data about the reviewing process. Therefore an appropriate computational model is a Turing machine. Proposition 3. Let ϕ =SAT(n, ·) a CNF formula with n variables (n ≫ 0) and with a huge unknown number of clauses (≫ 2n ). Then the algoritmo 9 determines if ϕ ∈ L(SAT)or not (when ϕ ∈ L(SAT), it provides a witness, i.e., a satisfactory assignation) with complexity O(|ϕ| + | × θ|) y O(2n−1 ). Proof. Under an appropriate parallel Turing machine or an appropriate finite states parallel computer model (it is assumed enough time and infinity memory), the algorithm 9 executes in parallel the algorithms 6 and 8. These algorithms runs independently in parallel with they coopere sharing the failed candidates, which are tracking by the algorithm 2. There is not a dead lock caused by the exclusive memory of algorithm 2 because the update of number of candidates and the status do not interfere other process. This algorithm only stops everything when there is not solution. The algorithm 6 calls the algorithm 5 for each clause of ϕ and the called algorithm updates the corresponding possible satisfactory assignations of each SSAT(IdSS(r), ·). Two short termination cases are important while the clauses are reading, the detection: 1) of a SSAT(IdSS(r), ·) which it is a blocked board, this causes to stop everything, ϕ ∈L(SAT), / 2) a successful candidate x is founded, then everything stops, ϕ ∈L(SAT)and x is the satisfactory assignation. Also, the failed candidates are sent to the algorithm 2.

Finally, after reading all ϕ’s clauses, all ϕ’s SSAT(IdSS(r), ·) are updated with the satisfactory assignations for each one. With all the solutions the × θ operation looks for the first satisfactory assignation when the SSAT(IdSS(r), ·) are compatible. Otherwise, if a pair of the SSAT(IdSS(r), ·) are incompatible, then ϕ ∈L(SAT). / The random search algorithm 8 tests a pair of unique random candidates from a permutation of the research space [0, 2n−1 − 1], x = 0T [k] and x). If one of them is a satisfactory assignation by direct evaluation of the function ϕ(·) as en electronic circuit (see figure 1), then everything stops, there is a satisfactory assignation. Otherwise, the failed candidates are sent to the algorithm 2. Finally, this algorithm after verifying that all candidates in [0, 2n − 1] are not solutions, it writes ϕ ∈L(SAT). / The algorithms 2, 6 and 8 execute finite iterations. The first is limited by detecting 2n failed candidates, the second by the ϕ’s number of clauses plus the time of × θ operator, and the third by the size of the dived by two research space [0, 2n−1 − 1] which it is reviewing by two candidates at the same time. Therefore the parallel algorithm 9 finishes at most after 2n iterations plus the time of the × θ operation.

properties are not sufficient for building an efficient algorithm to solve at least one type of NP. It like in mathematics, the class of the rational numbers is not sufficient for solving any geometric problem. By example, an rectangle triangle with sides √ of size 1, it has a diagonal with size 2, which is √not a rational number. The proof for verifying that 2 is not rational, it is by contradiction, assuming it is a rational number. For any SAT problem, it can be solved with the parallel algorithm 9 presented here in a period of time such that two situations will determine its solution in the unique two answers: yes, it exists a set of boolean values for the SAT’ variables such they satisfies SAT, or not, i.e., it does not exist a set of boolean values for the SAT’variables, such they satisfying SAT. One situation is to find a blocked board, i.e., a subproblem SAT with no solution. The second situation is at least a one review of all its clauses. The formar is a sufficient condition for the answer no, even without reviewing all SAT’s clauses. The second is a sufficient condition under our approach because without using algebra, the algorithm 6 executes a Θ-joint operation to build the set of binary numbers, such any of them can be taken to answer yes. The Θ-joint does not need to build all the numbers, just to find For an extrema SAT, n ≫ 0 and with one satone. isfactory assignation or none, it is almost impossible Under such considerations, the algorithm takes a to determine the unique satisfactory assignation in proportional time to the size of the SAT problem in efficient time, but it is worst when there is not sothe worst case, i.e., when no short termination oclution, the probability always is equals to zero (see curs at first, by example, to find a blocked board or figure 2) and it is necessary to verify that none of the a satisfactory assignation. candidates of the 2n candidates of Σ n are satisfactory The size of the SAT problems is related to 2n −ns , assignations. More details in subsection 5.1. Other alternative is the quantum computational model [14,5]. where n is the number of the SAT’s boolean variables, ns is the number of satisfactory binary number for it. Therefore, probability to guess the solution is 2nns 5 Results I called an extreme SAT problem, a SAT problem with n variables, where its clauses uses at most n variables, the clauses could be repeated, and in disAny of the formulations r, 1-SAT o r, 2-SAT o r, r- order, but the most important characteristic is that SAT is solved by the algorithm 9 in linear time with an extreme problem has one or none solution, i.e., one respect to the number of the ϕ’clauses. Therefore its satisfactory binary number or none. It means in the efficiency is less or equal than the state of the art case of one solution that the probability to guess the algorithms for SAT [10,13,14,11]. solution is 21n , and for none solution is 0. Therefore, for m extreme problems SAT, the expected value for finding the solution is almost 0. 5.1 There is not an efficient algorithm for SAT Proposition 4. There is not an efficient algorithm for solving an extreme SAT problem. The class of problem NP shares two main properties: 1) there is an instance and a particular effi- Proof. Let assume that it exists an efficient algorithm cient algorithm to solve such instance; 2) there is an for solving any SAT problem. An extreme SAT problem must be solved by such efficient algorithm for translating between the different types of the NP problems. However, these two algorithm.

Two persons are selected, person number one defines the extrema SAT problem with the liberty to decide one or none solution. The second person has a powerful computer with the efficient algorithm. How much time will take to the second person to solve the SAT problem? He has the efficient algorithm, so he has two posibles answers in small time. The assignation of satisfactory values or none for each extreme SAT problems. If the efficient algorithm fails, no matter of the time, it is useless. On the other hand, for the sake of argument, let asume that the second person with its powerful computer and the efficient algorithm gets right the solution of m extreme SAT problems in reasonable time. The value of m is a reasonable big value for human’s perception but m ≪ 2n . There is a contradiction. A sequence of m consecutive success of m extreme SAT means that the first person does not decide freely and arbitrary the extrema SAT problems. The expected value for honestly solving an extrema SAT is almost 0.

be sure that it works under its design’s specification. For the last, I did the experiment of the lottery for an extreme SAT with colleges and students, the persistent persons after weeks of asking me, is this the number? they give up. I offer them one millon dollars as motivation for building their algorithm to defeat me. The consequence of the proposition 4 for the NP class. The algorithms for the different NP problems have not a common or special property for allowing to build an efficient algorithm because if such algorithm exits, it would violate the exponential expected time for solving an extreme SAT by using the translation algorithm between problems. Therefore, it does not exist an efficient or polinomial time algorithm for solving the problems of NP.

6

Conclusions and future work

The main results are 1) the linear complexity of the algorithm 9 and 2) its consequence for solving the With colleagues and students, I proposed an al- NP problems. There are open problems r, s-SAT as ternative argumentation. A lottery company defines by example the conjecture 2.5 in [11]. But nevertheits winner ticket by an extreme SAT. When the ex- less, under the assumptions of enough memory and treme SAT problems has a unique solution, no one time any arbitrary formulation of SAT can be solved complies. The winner ticket satisfies to every body by the algorithm 9. because, the verification is done in efficient time, and It is viable to extend the algorithm 9 for including there is a witness, the winner. But, when the extreme formulation of SAT using the logical operators ⇒, ⇔, SAT problem does not have not solution. There is not CNF, DNF, and nested parenthesis. More details are a winner. Then it is difficult to accept, because with in [5,4,3]. n is a big number, who has the time to verify that none of the 2n tickets satisfies as a binary number the extrema SAT problem. The responsibility falls in the References honest and liability of the lottery company. Other aspect, it is the linearity of the algorithm 1. C. Barr´on-Romero. The Complexity of the NP-Class. arXiv, http://arxiv.org/abs/1006.2218, 2010. with respect to the number of SAT’s clauses. Of 2. C. Barr´ on-Romero. Un algoritmo num´erico para course it is linear but no person or computer can anproblemas de satisfacci´ on booleana sin ´ algebra. swer SAT without reviewing the SAT’s clauses. On In Memoria VIII Congreso Internacional de Comthe other hand, how can build an extrema SAT probputaci´ on y Telecomunicaciones(COMTEL 2016), 21 lem if the number of its clauses is exponential and al 23 de septiembre de 2016, Lima, Per´ u, pages 31– around or greater than 2n . Well, here I have three 38, 2016. positions: 1) it is an hypothesis, a theoretical valid 3. C. Barr´on-Romero. Decision boolean satisfiability problem without algebra. ArXiv e-prints, assumption; 2) the advances in the research of nanhttp://arxiv.org/abs/1605.07503, April, 2016. otechnology, atomic cluster and crystal structures, 4. C. Barr´ o n-Romero. Lower bound for the complexity and the nanoelectronic will soon provide electronic of the boolean satisfiability problem. ArXiv e-prints, circuits capable and complex as an extreme SAT, and http://arxiv.org/abs/1602.06867, February, 2016. 3) It is possible to realize a practical experiment us5. C. Barr´ on-Romero. Classical and Quantum Algoing the logical equivalence between CNF and DNF rithms for the Boolean Satisfiability Problem. ArXiv (Disjunctive normal form). An extreme CNF SAT is e-prints, http://arxiv.org/abs/1510.02682, October, the ∅ or the binary number as a DNF clause, by ex2015. ample if the unique solution is 001, then DNF clause 6. S. Cook. THE P VERSUS NP PROBLEM. is (x2 ∧ x1 ∧ x0 ). For the second, a circuit will work, http://www.claymath.org/sites/default/files/ pvsnp.pdf, 2000. but the reviewing all its clauses is the only way to

7. L. Fortnow. The Status of the P Versus NP Problem. Commun. ACM, 52(9):78–86, Sept. 2009. 8. D. Gutfreund, R. Shaltiel, and A. Ta-Shma. If NP Languages Are Hard on the Worst-Case, Then It is Easy to Find Their Hard Instances. Comput. Complex., 16(4):412–441, Dec. 2007. 9. G. J Woeginger. The P-versus-NP page. http://www.win.tue.nl/∼gwoegi/P-versus-NP.htm. 10. P. Pudl´ ak. Mathematical Foundations of Computer Science 1998: 23rd International Symposium, MFCS’98 Brno, Czech Republic, August 24–28, 1998 Proceedings, chapter Satisfiability — Algorithms and Logic, pages 129–141. Springer Berlin Heidelberg, Berlin, Heidelberg, 1998. 11. C. A. Tovey. A simplified np-complete satisfiability problem. Discrete Applied Mathematics, 8(1):85 – 89,

1984. 12. G. J. Woeginger. Exact algorithms for np-hard problems: A survey. Combinatorial Optimization - Eureka, You Shrink!, LNCS, pages 185–207, 2003. 13. L. Zhang, C. F. Madigan, M. H. Moskewicz, and S. Malik. Efficient conflict driven learning in a boolean satisfiability solver. In Proceedings of the 2001 IEEE/ACM International Conference on Computer-aided Design, ICCAD ’01, pages 279–285, Piscataway, NJ, USA, 2001. IEEE Press. 14. L. Zhang and S. Malik. Computer Aided Verification: 14th International Conference, CAV 2002 Copenhagen, Denmark, July 27–31, 2002 Proceedings, chapter The Quest for Efficient Boolean Satisfiability Solvers, pages 17–36. Springer Berlin Heidelberg, Berlin, Heidelberg, 2002.