ebook img

The fast parallel algorithm for CNF SAT without algebra and its implications for the NP Class PDF

0.29 MB·
Save to my drive
Quick download
Download
Most books are stored in the elastic cloud where traffic is expensive. For this reason, we have a limit on daily download.

Preview The fast parallel algorithm for CNF SAT without algebra and its implications for the NP Class

The fast parallel algorithm for CNF SAT without algebra and its implications for the NP Class Carlos Barro´n-Romero [email protected] Universidad Auto´noma Metropolitana, UnidadAzcapotzalco, M´exico Av.San Pablo No. 180, Col. Reynosa Tamaulipas, C.P. 02200 Ciudad deM´exico, M´exico 7 1 0 2 Abstract. A novel modified numerical parallel algorithm for solving the classical Decision Boolean b Satisfiability problem with clauses in conjunctive normal form is depicted. The approach for solving e SAT is without using algebra or other computational search strategies such as branch and bound, F back-forward, tree representation, etc. The method is based on the special class of problems, Simple Decision Boolean Satisfiability problem. The design of themain algorithm includesparallel execution, 2 object oriented, and short termination as my previous versions but it keep track of the parallel tested 2 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 S of the Simple Decision Boolean Satisfiability problems and it is bounded by 2n iterations where n is D the number of logical variables. The novelty for the solution is a linear algorithm, such its complexity . islessorequalthanthealgorithmsofthestateoftheart.Theimplication fortheclassNPisdepicted s c in detail. [ 3 Keywords: Theory of Computation, Logic, SAT, CNF, K-SAT, Complexity algorithm, NP Class v 7 1 Introduction ϕ(w) 1 where n is the ϕ’s number of logical vari- 7 ≡ 7 ables. The main characteristic of SAT is that all its 4 clausesuse norless variables,butSSATs clausesuse The modeling for solving the Decision Boolean Sat- 0 n variables. The clauses of SAT and SSAT can have isfiability problem (SAT) is based in Reducibility . 1 repeatedandanyorder,i.e.,thevariablescouldbein (see [Bar10], the chapter 6). This term means the 0 clauses far away. abilitytosolveaproblembyfindingandsolvingsim- 7 1 ple subproblems. The algorithm of this work results The selection of the Conjunctive normal form : from applying simple Decision Boolean Satisfiability (CNF) version of SAT is justified for the log- v i Problems for solving any SAT. ical equivalence and the huge literature. Talk- X The notation and conventions for SAT are well ing about SAT is immediately related to NP r know: A boolean variable only takes the values: 0 Class of computational problems and its al- a (false) or 1 (true). The logical operators are not: x; gorithms [Pud98,ZMMM01,ZM02,Tov84,Woe03], and: , and or: . Hereafter, Σ = 0,1 is the cor- [JW,For09,Coo00,GSTS07]. ∧ ∨ { } responding binary alphabet and X is the set of log- Classical SAT problems are depicted as CNF ical variables xn−1,...,x0 . A binary string , w { } ∈ (k,n)-satisfiability or (k,n)-SAT, where the number Σn is mapped to its corresponding binary number of variables of the problem is n but each clause have in [0,2n 1] and reciprocally. Moreover, a normal − onlyk variables.Byexample,withn=7aninstance conjunctiveformclausexn−1 xn−2...x1 x0 corre- bspio=nd(cid:26)s01tootthhifeerxbwii,insaer.yAstlsroin,gbb==∨bbnn−−11bbnn−−22......∨bb11bb00wwhheerree (oxf1tTh∨ehxe(33a,∨7lg)x-o4Sr)Ai.tThmisd(xep2i∨ctexd4∨hexr6e)s∧ol(vxe0s∨anxy1∨tyxp2e)o∧f bi are the digits of b. CNF SAT, it means that the clauses are in CNF The problem is for determining when a CNF for- with any number of the n given logical variables. mula ϕ L(SAT)or / L(SAT), where L(SAT)= By example, with n = 8, an arbitrary instance of ∈ ∈ ϕ ϕ is satisfiable a CNF logicalformula or equiv- SAT is (x4 x5 x7) (x2 x4) (x0 x1 x2) { | } ∨ ∨ ∧ ∨ ∧ ∨ ∨ ∧ alently, there is a witness w in 0,1 n such that (x1 x3 x4 x5). { } ∨ ∨ ∨ Moreover, this paper focuses in my special par- allel algorithm for solving any type of SAT without algebra, the previous results are in [Bar16c,Bar16a]. Briefly, the main results in [Bar16c,Bar16b], [Bar16a] are: 1. The searchspace of the solutions (satisfiable log- ical values) of the SAT and SSAT is Σn. Fig.1. SATas an electronic circuit 2. A SSAT with n logical variables, and m clauses , it is solved in O(1). The comparison of m ver- sus2n isasufficientconditiontostatetheanswer (yes or no) without any process and without any The article is organized as follow. Section 2 de- witness. picts a selected set ofproperties and propositions for 3. AninstanceofSSATisnotsatisfiablewhenithas the parallel algorithm for solving SAT (more details m = 2n different clauses. This special instances are in [Bar16c,Bar16b,Bar16a]). The next section 3 of SSAT are named blockedboards.By example, depicts the components, design’s considerations and in Σ and Σ2: the parallel algorithm. Section 4 contains the com- putational and complex analysis of the parallel al- x1 x0 gorithm. The next section 5and the subsection 5.1 x0 0 0 depict theoretical results about complexity and the 1 1 1 consequenceoftheparallelalgorithmforsolvingSAT 0 0 1 and its consequences over the NP class. Finally, the 1 0 last section depicts the conclusions and the future work. 4. A clause is translated to a binary number b then b is for sure an unsatisfactory binary number. 2 Properties of SAT 5. The algorithms based in SSAT for solving SAT arecomputablesandtheydonotrequirecomplex computational procedures as sorting, matching, This section depicts the main propositions used back and forward, or algebra. to build the parallel algorithm. Proposition 1. Any CNF clause x over the vari- The main changes with respect to the previous ables (xn−1, ..., x0) corresponds a binary number b version are: = bn−1bn ... b0. Then x(b) 1 and x(b) 0 where ≡ ≡ b is the translation of the clause x, the values of the boolean variables correspond to the binary digits of b Cooperation The two algorithms of deterministic and b search 5 and random search 7 shares with a new algorithm2thetrackingofthefailurecandidates, Proof. Without loss of generality, x = xn−1∨xn−2∨ which it also searches sequentially a satisfactory ...∨x1∨x0, b = 10...01 is the translation of x, and b = 01...10 is the complement binary number of b. assignation. Then x(b)=1 0... 0 1 1 1... 1 1 1, Intensive parallel The random search algorithm 7 ∨ ∨ ∨ ≡ ∨ ∨ ∨ ≡ and x(b)=0 1... 1 0 0 0... 0 0. cantest2pcandidatesinparallelwithalgorithm6 ∨ ∨ ∨ ≡ ∨ ∨ ≡ in 2p independent processors. ThetranslationoftheSSAT’sclausesallowtode- fine a table of binary numbers or a board. The fol- lowing boards with 2n different clauses have not a The changes in the previous algorithms of satisfactory assignation in Σ and Σ2: [Bar16c,Bar16a] are designed for keeping the com- putability and efficiency besides the cooperation for x1 x0 keepingtrackingtheunsatisfactorytestedcandidates. x0 0 0 Also,theminimuminteractiondoesnotalterthepre- 1 1 1 viousdesignforshortterminationornomorethan2n 0 0 1 iterations. 1 0 These are examples of blocked boards. It is clear branchand bound, backtracking,sorting and match- by the previous proposition, that the corresponding ing, etc. It means more operations than reading of SSAT are ϕ1 = (x0) (x0) and ϕ2 = (x1 x0) the clausesasthey appearinaproblem.Theparallel ∧ ∨ ∧ (x1 x0) (x1 x0) (x1 x0) have not a solution algorithmexecutesadeterministicsearchalgorithm5 ∨ ∧ ∨ ∧ ∨ because each binary number has its binary comple- that need to read the clauses s they are plus a data ment. process Θ. × A brief justification for not using algebra and getting efficiency for solving SAT is depicted in the 3 Algorithms for SAT following proposition. Doing algebra or branch and bound or tree searchcause more operations anditer- ations than reading the SAT’s clauses. Thereisabijectionbetweenx X andanunique ⊂ Proposition 2. Let F be a logical formula and v is identification number. This bijective function is sim- logical variable, which it is not in F. Then ilar to the given in [Bar10], Prop. 4. (F v) Set of logical (F) ∨ variables N ≡ (F v) ∧ ∨ 0 Pdirsotorifb.uTtihoenraensdultfsacftoolrloizwastiofrnom(Ft)he≡a(lFge∧bra(vic∨lavw))s.of {{x{x..}10}} ↔↔↔.. ..21==(cid:0)(cid:0)nn00(cid:1)(cid:1)+1 . . . Moreover,thepreviouspropositionstatesalogical raencdipSrSocAaTl.eBquyiveaxlaemncpelet,rlaentsϕfo3rmbeataioSnAbTe(t4w,e2e)n, SAT {{xx12,,xx00}} ↔↔kk12 ==P1k1k==00(cid:0)nnkk(cid:1)+1 .. .. .. P (cid:0) (cid:1) . . . ϕ3 = (x3 ∨(xx22 x1 ∨xx00)). X ↔2n−1= kn=−01 nk ∧ ∨ ∨ P (cid:0) (cid:1) ThefunctionIdSS :2X [0,2n 1]isestimated Using the previous proposition, ϕ3 is equivalent → − bythe followingalgorithmto geta bijectionbetween to a ϕ4 of type SSAT(4,4), where: a subset ofvariables of X and its identificationnum- (x3 x2 x1 x0) ber. ∨ ∨ ∨ (x3 x2 x1 x0) ϕ4 = ∧ ∨ ∨ ∨ ∧(x3 ∨x2 ∨ x1 ∨ x0) Algorithm 1 Unique identification of SSAT by its (x3 x2 x1 x0). ∧ ∨ ∨ ∨ variables Both are equivalent, and they have the same sat- Input: x = xk,...,x1,x0 : set of variables indexed { } in [0,n] and in descending order. isfactory assignations, but it is not necessary to use Output: ix: integer value; algebra for solving them, it is only necessary to read // identification number in [0,2n 1] for the indices their clauses. − in the set x. By inspection andordering variables andclauses, Memory: base: integer; v,t: (k+1)-ism array struc- ϕ3’s satisfactory assignation only need that x3 = 1 ture of indices as number where its digits are in nu- and x1 = 1 (its other variables do not care). On the mericalbasen,i.e.,itsdigitsare n 1,n 2,...,1,0 other hand, ϕ4’s satisfactory assignations are 1010, { − − } { 1011, 1110, 1111 . These satisfactory assignations } ix=0; correspond to the variables with x3 =1 y x1 =1. k= x; // cardinality of a set. This toy example depicts that by doing algebraic | | |·| if (k == 0) then proceduresitisnecessarytoapplythe lawsoffactor- output: “ix”; ization and distribution after finding matching be- return; tween clauses and variables, but in order to find end if matchingbetweenclausesandvariablesitisnecessary tosortortousesearchingmatchingprocedurestode- base=0; termine the matching between clauses and variables 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- // · binomia(cid:0)l o(cid:1)r Newton coefficient · picts that they use expensive strategies, by example, end fo(cid:0)r(cid:1) concatenate v = vk,...,v0 ; stop all; { } // array of size k +1 as number for the indices in end if descending order Update Circular List(cand stat, c, next c); while (indices(x)<(indices(v)) do. end while t=v; if (n cand > 0) then while (1) do c := next c; t=incrementa(t,1); if (ϕ(c)==1) then // increase by one the t’s indices output: “The algorithm 2 confirms as a number in the numerical base n ϕ L(SAT), ∈ if indices(t) are different c is a satisfactory assignation.”; and in descending order then stop all; break end if // t is a valid set of different descent cand sta[c]:=0; //ordering indices n cand := n cand - 1; end if if (n cand == 0) then end while; output: “The algorithm 2 confirms v =t; ϕ /L(SAT)after reviewing Σn.”; ∈ ix=ix+1; stop all; end while end if // this loop end when the index set x is founded Update Circular List(cand stat, c, next c); output: “base+ix”; end if return; end while The integer pointers and the next available can- The next algorithms contain the changes for co- didateofthe circularlistcand statisupdated bythe operation and intensive parallel with the following routine Update Circular List. There is not dynamic algorithm for registering the failed candidates. memory, just integer pointers update. Algorithm 2 Updated failed candidate Algorithm 3 Number Σ Input: n: number of variables and ϕ: SAT formula; Input: (rw: set of integer values, for the identifica- Messagesc: binary number in Σn; tion of the logical variables, k: set of binary values of Do: get in(c, L C: List); each variable of rw) Output: Nothing or message and short termination. Output: (k : array binary value in Σn). Σ Memory: memory: L c : List of binary numbers; i : integer; Exclusive memory: n cand:=2n : integer; for i:=n 1 downto 0 do cand stat[0,2n−1] := 1: circular list of boolean, − if (i rw ) then next,prior: integer pointers; // 1: viable, 0: failure ∈ k [i] := value in k of the variable i; Σ for satisfying ϕ else next c:=0: Integer pointer to the next available k [i] := random selection from Σ; Σ cand stat; end if end for while (1) do return k ; Σ while not empty (L c) do c := get out( L c ); if (cand sta[c]==0) then continue; Algorithm 4 Updated SSAT end if Input: (SSAT: List of objects, rw: clause). cand sta[c]:=0; Output:SSAT:Updatedlistofobjects foreachSSAT n cand := n cand - 1; with identification IdSS(r). if (n cand == 0) then Each SSAT(IdSS(r)) updates its S : list of the so- output: “The algorithm 2 confirms lutions, where S[0 : 2n−1]: is an array as a doble ϕ /L(SAT)after reviewing Σn.”; chained list of integer , previous, next : integer; ∈ Memory: ct := 0 : integer; k,k aux: integer; output:Messageandifthereisasolutionthewitness first:=0: integer; last=2n 1: integer; x, such that ϕ(x)=1. − Memory: if ( SSAT(IdSS(rw)) not exist) then r: set of variables de X; build object SSAT(IdSS(rw)) SSAT=null: List de objets SSAT. end if with SSAT(IdSS(rw)) while not(eof clauses(ϕ)); k := clause to binary (rw); r= ϕ.read clause; k aux := k; algorithm.4 Updated SSAT( SSAT,r). if (size(k) <ϕ.n) then end while; k aux := number (set of variables(rw),k); with list SSAT Σ end if // θ cross product and natural joint × if (ϕ(k aux)==1) then estimate Θ = θ with all SSAT(IdSS(r)); × output: “The algorithm 4 confirms if Θ = then ∅ ϕ L(SAT), output: “The algorithm 5 confirms k a∈ux is a satisfactory assignation.”; ϕ /L(SAT). ∈ stop all; The SSAT(IdSS(r)) else are incompatible.” Updated failed candidate(k aux); // algo- stop all; rithm 2 otherwise end if output: “The algorithm 5 confirms // k of size n is not a satisfactory number for ϕ. ϕ L(SAT). ∈ // See proposition 1. s is a satisfactory assignation, s Θ. ∈ if (size(k)==ϕ.n) The SSAT(IdSS(r)) are compatible. Updated failed candidate(k); // algorithm 2 end if stop all; end with if (S[k].previous= 1) 6 − end if or (S[k].next= 1) then 6 − S[S[k].previous].next := S[k].next; S[S[k].next].previous = S[k].previous; if (k == first) then first := S[k].next; Algorithm 6 Test ϕ() · end if // It evaluates and updates failure candidates. if (k = last) then Input: c: integer value in Σn. last := S[k].previous; Output: none. end if S[k].next:= 1; if (Cand stat(c) == 1) then − S[k].previous:= 1; if (ϕ(c) == 1) then − ct:=ct+1; output: “The algorithms 6 and 7 confirm end if ϕ L(SAT). ∈ if (ct = 2n) then c is a satisfactory assignation.”; output: “ The algorithm 4 confirms stop all; ϕ /L(SAT) else ∈ SSAT(IdSS(rw)) is a blocked board.”; Updated failed candidate(c); // algorithm 2 stop all; end if end if end if end with return return The next algorithm is a modified version of the algorithm 4 in [Bar15]. The selected candidates are unique and randomly selected from Σn interpreted Algorithm 5 Solve ϕ L(SAT). as the interval of natural numbers [0,2n 1]. ∈ − input: n: number of variables and ϕ: SAT formula; Algorithm 7 Solve ϕ L(SAT)by a random search are found, no matters if the number of clauses is ∈ of [0,2n 1]. hugeortheclausesareindisorderandrepeated.Also, − Input: n: number of variables and ϕ: SAT formula; they send their failed candidates to the algorithm 2. Output: Message and if there is a solution, the wit- Thiscausesthatthespaceofcandidatesofitapprox- ness s (s [0,2n 1]), such that ϕ(s)=1. imatelydecreasesbyafactorof2p+1ineachiteration Memory∈: T[0 :−2n−1 1]=[0 : 2n 1]: integer; (the number of messages send to it). − − Mi=2n 1: integer; rdm,a: integer. − for i:=0 to 2n−1 2 Algorithm 8 Parallel algorithm for SAT − Input: n: number of variables and ϕ: SAT formula; if T[i] = i then Output: Message if ϕ L(SAT)or not. // random selection rdm [i+1,2n−1 1]; ∈ ∈ − rdm = floor(rand() (Mi i+1.5)) + (i+1); − parallel execution // rand() return a random number in (0,1); algorithm 2(n, ϕ); // floor(x) integer less than x algorithm 5(n, ϕ); a = T[rdm]; algorithm 7(n, ϕ); T[rdm] = T[i]; end parallel execution T[i] = a; end if parallel execution There are two mainideas for keeping efficient the // Concatenation of all the strings Σp algorithm7:1)arandomsearchusingapermutation // and the random string from Σn−p of the researchspace [0,2n 1], and 2) the permuta- − test(0T[i]) by algorithm 6; tionis computedatthe sametime ofthe trials.More test(1T[i]) by algorithm 6; information in [Bar15,Bar16c,Bar16a]. end parallel execution Thealgorithm5behavesasonepasscompilerover end for the reading of the clauses as they are. It does not parallel execution needmoreoperationsinordertopullapartthebinary // Concatenation of all the strings Σp numberofthecomplementoftheclause’stranslation // and the random string from Σn−p to a binary number from the research space of each test(0T[2n−1 1]) by algorithm 6; SSAT, this allows to detect if a SSAT is a blocked test(1T[2n−1−1]) by algorithm 6; board for short termination. Otherwise, when it fin- − ishestoreadtheclausesofthegivenformulaϕ,ithas end parallel execution output: “The algorithm 7 confirms ϕ /L(SAT) all the satisfactory assignations for each SSAT of ϕ. after exploring all Σn.”; ∈ The final step of the algorithm 5 is to execute with the satisfactory assignations of each SSAT a cross stop all; theta jointoperation θ.This operationis similarto × the crossproduct and naturaltheta joint in the rela- Theselectionof2p processorsis forsimplifiedthe tionaldatabases.Thedefinitionof θ withtwosetof segmentation of the space Σn in the parallel execu- logical variables r and r′, and with×their satisfactory tion.Theupperlimitfortheiterationsofpreviousal- assignations SSAT().S is: gorithmis2n−1,butthenumberoftestedcandidates SSAT(IdSS(r))· θ SSAT(IdSS(r′))= remains 2n. It is 2n =2n−1 by parallel execution by × 2 1. if r r′ = then two independent processors of the algorithm 6. It is SSAT∩(IdSS∅(r)).S SSAT(IdSS(r′)).S. possible to get down the number of iterations by us- 2. if r r′ = and×there are common values be- ingfourindependentprocessor,thennumberofitera- twee∩n SSA6 T∅(IdSS(r)).S and SSAT(IdSS(r′)).S tionsis2n−2.Thesimultaneouscandidatesfortesting for variables in r r′ then aTrhee0c0axn,d0id1axt,e1s0sxpaacnedΣ1n1xiswehxeprleorxin∈g i[n0,e2anc−h2i−ter1a]-. 3. iSfSrAT(rI′d=SS(ar)n)d.S∩θr∩r′SSAT(IdSS(r′)).S tion by all the strings of Σp and one random string ∩ 6 ∅ there are not common values between from Σn−p. In general with 2p independent proces- SSAT(IdSS(r)).S y SSAT(IdSS(r′)).S sors the upper limit of iterations is 22np =2n−p but it for the variables in r r′ then . is not as good as it sounds, see proposition 8. Also, ∩ ∅ the randomness is affected by the strings of Σp. For 1) y 2) SSAT(IdSS(r) and SSAT(IdSS(r′) The algorithms 5 and 7 have short termination are compatible. For 3) they are incompatible, i.e., when a satisfactory assignation or a blocked board there is not a satisfactory assignation for both. An example of 1) is ϕ5 =SAT(4,5) with closedboxthatitworkswhenthesignalsofthevalues (x3 x2) (x3 x2) (x3 x2) (x1 x0) ofthelogicalvariablesinitslinesaregiven.Theelec- ∨ ∧ ∨ ∧ ∨ ∧ ∨ ∧ (x1 x0). It has a SSAT(2,3) for its first three trons travel into the lines at the speed of light and ∨ clauses with solutions x3 = 1,x2 = 1. It has there is an small time required by the gates for an a SSAT(2,2) from its two last clauses with solu- stable output. Therefore the time cost for evaluating tions (x1,x0) (0,1) (1,0) . Then the satisfac- ϕ is a small constant. It is like a city that turns on { | ∨ } tory assignation for ϕ5 are (1,1) (0,1),(1,0) its lights when the dark comes. There are wonderful { }×{ } = (x3,x2,x1,x0) (1,1,0,1) (1,1,1,0) . videos of cities turn on their lights. { | ∨ } An example of 2) is ϕ6 =SAT(4,5) = (x3 x2) On the other hand, for analyzing the clauses of ∨ ∧ (x3 x2) (x3 x2) (x2 x1 x0) (x2 x1 x0).It ϕ it is necessary states and memory to keep the sta- ∨ ∧ ∨ ∧ ∨ ∨ ∧ ∨ ∨ has a SSAT(2,3) from its three first clauses with so- tus and information of the reviewing or reading ϕ’a lutions (x3,x2) (0,0) .It has a SSAT(3,2)fromits clauses. A deterministic automate is not enough for { | } lasttwoclauseswithsolutions (x2,x1,x0) (1,0,0) thistask,becauseitisnecessarytostoreandretrieve { | ∨ (1,0,1) (1,1,0) (1,1,1) (0,0,0) (0,1,1) .Then data about the reviewing process. Therefore an ap- ϕ6 L(∨SAT), be∨cause the∨re are sa∨tisfactory} assig- propriate computational model is a Turing machine. ∈ nations for the common value 0 of the common Assuming appropriate Turing machines for exe- variable x2. The satisfactory assignation for ϕ6 are cuting the algorithms, the following propositions de- (x3,x2,x1,x0) (0,0,0,0) (0,0,1,1) . picts the computability and complexity of: { | ∨ } An example of 3) is ϕ7 =SAT(4,7) = (x3 x2) 1. Thedeterministicsearchalgorithm5anditsdata ∨ ∧ (x3 x2) (x3 x2) (x2 x1 x0) (x2 x1 x0) processing of the operator θ. (x2∨x1 ∧x0) ∨(x2 x∧1 x0∨).It∨hasa∧SSAT∨(2,3∨)from∧ 2. The random search algorit×hm 7 with 2p proces- ∨ ∨ ∧ ∨ ∨ its three firstclauseswithsolutions (x3,x2) (0,0) . sors for exploring Σn in parallel. { | } It has a SSAT(3,4) from its last four clauses with 3. The updated failed candidates algorithm 2 inter- solutions (x2,x1,x0) (1,0,0) (1,0,1) (1,1,0) action with the algorithms 5 and 7, and its se- (1,1,1) . {Then ϕ7 /L|(SAT), b∨ecause th∨ere are no∨t quential search for a satisfactory candidate. } ∈ satisfactory assignations to build with the common Proposition 3. The algorithm 5 is computable and variable x2. its iterations are limited by m, the ϕ’s number of clauses plus the iterations of the operator Θ. × 4 Computability and complex Proof. The algorithm executes the algorithms 1, 4 analysis of the parallel algorithm and 3, and the operation Θ, which can be dupli- × cated by appropriate Turing machines because they correspondtocomputable operations as sum,product, copy, identify, and fill. There are three properties of the model of com- The operator Θ works as the relational data putation of the nowadays computers: 1) the concept × base operator cross product and natural joint. For ofdiscretestates;2)the manipulationofits memory, the set of variables r and r′ X and the satisfac- and 3) its finite alphabet. ⊂ tory assignations SSAT().S, SSAT(Id SSAT(r)) θ Thecommunicationbetweencomputersasinper- SSAT(Id SSAT(r′))= · × sonshasunsolvedissues.Securecommunicationwith- 1. if r r′ = then out eye drooping is one issue and checking and veri- SSA∩T(Id SS∅AT(r)).S SSAT(Id SSAT(r′)).S. fyingsendandreceivemessagesisalsoanopenprob- 2. ifr r′ = andthere×arecommonvaluesbetween lem.Here,noprotocolforcommunicationsisassumed SSA∩T(I6d S∅SAT(r)).S and SSAT(Id SSAT(r′)).S because the time cost could cause an increase of the for the variables in r r′ then complexity or not computability at all (forever loop) SSAT(Id SSAT(r)).S∩θr∩r′SSAT(Id SSAT(r′)).S with noise lines, repeatedmessages,and collisions.A 3. if r r′ = and ∩ 6 ∅ simplecommunicationinonedirectionfromsenderto there are not common values between ′ receiverwithoutacknowledgementfromalgorithms5 SSAT(Id SSAT(r)).S y SSAT(Id SSAT(r)).S for the variables in r r′ then . and 7 to algorithm 2 is assumed, if there are col- ∩ ∅ lisions or losing messages do not affect the time or For 1) and2)thesolutions ofSSAT().S arecom- · computability. patibles and any is a satisfactory assignation. For 3) Figure 1 depicts a SAT as an electronic circuit thesolutions of SSAT().S are incompatibles, thesat- · of and or gates where the lines are the logical vari- isfactory assignation is the empty set. ables. I assume that the evaluation of ϕ is without a The algorithm 5 always finishes with the solution computerprogram,itisagivenelectroniccircuitasa of the yes-no question: ϕ L(SAT)?. This means a ∈ satisfactory assignation orablockedboardisfounded, all possible satisfactory candidates Σn is limited by this include the operation ϕ() that it estimates one 2n =2n−p. · 2p satisfactory assignation when the SSAT’s data are In any of the independent processors, the condi- compatibles or not solution when SSAT’s data are in- tion ϕ(c) == 1 has the effect to interrupt and stop compatibles. all, because c becomes a witness, i.e., a satisfactory The failed candidates are sent to the algorithm 2 assignation for ϕ. Otherwise, the failed candidate is without a communication protocol. It does not af- sent to the algorithm 2. This does not increase the fect the efficiency and the computability of the algo- complexity, it is a simple sending of a message with- rithm 5. out any communication protocol. Finally, the iterations correspond to the ϕ’s num- It is worth to note that the randomness of select- ber of clauses and the operator ×Θ. ingonerandomcandidatefromtheinterval[0,2n−p − 1]islosingbycombiningallstringofΣpwithit.Also, The algorithm 5 behaves as one pass compiler the upper limit 2n−p is similar to 2n when p n for withshorttermination.Itrequirestoreadϕ’sclauses ≪ a SAT with a huge number of variables n. plustheconciliationofthesolutionsoftheSSATsub- problems. Examples of the operator Θ are: Proposition 5. The algorithm 2 for tracking the × For 1) ϕ5 =SAT(4,5)with (x3 x2) (x3 x2) failed candidates, which it sequentially look for a sat- ∨ ∧ ∨ ∧ (x3 x2) (x1 x0) (x1 x0). It has a SSAT(2,3) isfactory candidate is computable and its iterations ∨ ∧ ∨ ∧ ∨ (3 first clauses) with solutions x3 = 1 and x2 = 1. are limited by 2n. It has a SSAT(2,2) (2 last clauses) with solutions Proof. The algorithm hast two main parts one for re- {(x1,x0)| (0,1)∨(1,0)}. The the resulting satisfac- ceiving the failed candidates and one for a sequential tory assignations of ϕ5 are {(1,1)}×{(0,1),(1,0)} searchoftheviable candidates. Each ofthesesections = {(x3,x2,x1,x0)|(1,1,0,1)∨(1,1,1,0)}. can be mimic by appropriate Turing machines for for For2)ϕ6 =SAT(4,5)=(x3∨x2)∧(x3∨x2)∧(x3∨ generation of binary numbers, integer operations and x2)∧(x2∨x1∨x0)∧(x2∨x1∨x0).IthasaSSAT(2,3) identification. The reception of the failed candidates (3 first clauses) with solutions {(x3,x2)|(0,0)}. It is aFIFO queuebyusingalist. Inanytime, suchlist has a SSAT(3,2) (2 last clauses) with solutions is finite because Σn is finite and the messages from ({0(x,02,,0x)1∨,x(00),|1(,11,)0},.0T)h∨en(1ϕ,06,∈1)L∨(S(A1T,1),,0b)e∨ca(u1s,e1,th1)er∨e tehxeecouttheesrianlgsoerqiuthemntsiaalrwealiymoitneed abyfteirt.tTheheoathlgeorriitnhma are satisfactory assignations for the common value 0 loop limited by the number of possible candidates 2n. ofthevariablex2.Thesatisfactoryassignationsofϕ6 The effect of keeping track of the failed candidates is are {(x3,x2,x1,x0)|(0,0,0,0)∨(0,0,1,1)}. to decrease the number of viable candidates to 0. And For3)ϕ7 =SAT(4,7)=(x3∨x2)∧(x3∨x2)∧(x3∨ this will happen in a finite time because even without x2)∧(x2∨x1∨x0)∧(x2∨x1∨x0)∧(x2∨x1∨x0)∧ any failed candidate message, the algorithm tests all (x2 ∨x1 ∨x0). It has a SSAT(2,3) (3 first clauses) the 2n possible candidates of the circular list. with solutions {(x3,x2)|(0,0)}. It has a SSAT(3,4) The algorithm stops all when a viable candidate c ((41,l0a,s1t)c∨lau(1s,e1s),0w)i∨th(1so,l1u,t1i)o}n.sT{h(xe2n,xϕ17,∈x/0L)(|S(A1T,0),,0b)e∨- n∈aΣtionnffuolrfilϕls.ϕO(tch)er≡wi1s,e,i.iet.,mcariskac assatfiasiflaecdtocrayndaisdsaigte- cause there is not a common value for the variable and update the circular list cand stat. Therefore, it is x2. computable and limited by 2n iterations. Proposition 4. The random search algorithm 7 is Assuming that the algorithms runs with similar computable and its iterations are limited by 2n−p time slot, the algorithm 2 decreases by around 2p+1 when it uses 2p independent processors for the algo- the number of the 2n possible candidates in each it- rithm 6. eration. Proposition 6. The parallel algorithm 8 is com- Proof. The algorithm has steps that they are easily to putable and its complexity is limited by 2n iterations mimicbyappropriateTuringmachinesforgeneration or ϕ’s number of clauses plus the time of the opera- of binary numbers, integer operations and identifica- tion θ. tion. Therefore, it is computable. × The execution in parallel of the algorithm 6 by Proof. The computability follows from the proposi- 2p independent processors has the effect to explore tions 2, 5 and 7. Σn by splitting it into Σp and one random string In fact, for any SAT problem, the parallel algo- from Σn−p. Therefore, the iterations for reviewing rithm8onlyhastwouniqueanswers:1)ϕ L(SAT), ∈ becauseit existsx Σ,suchthatϕ(x) 1,or 2) ϕ / L(SAT), because it∈does not exist x Σ≡n such it sat∈- ∈ isfies ϕ(). This happen by a short termination or by · reviewing Σn or by reading all ϕ’s clauses and the conciliation of the solutions of SSATfor determining one satisfactory assignation or none. The iterations of the algorithms 7 and 2 are bounded by the number of candidates 2n. On the other hand, the algorithm 5 need to read all ϕ’s clauses and performs Θ operation for con- × ciliation of the solutions of SSAT. Therefore the parallel algorithm 8 is computable and it finishes at after 2n iterations or after it reads Fig.2. Behavior of the function P(s,k) where s is the the ϕ’s clauses plus the time of the θ operation. × number of satisfactory assignations and k is the number of trials Theprobabilityfunctionwithrespecttothenum- Proposition 7. For any SAT problem: ber of s satisfactory assignations and k failed trials is 2(k,s) 5(k,s) 7(k,s) P ≤P ≤P where (k,s) is the probability of finding a so- i P s lution by the i algorithm after k failed iterations, (s,k)= . P 2n k i = 2, 5,and 7, and s is the number of satisfactory − assignations. Proof. The probability for the algorithm 5 is: s (s,k)= . Therefore,forfindingauniquesolutionaftertest- P 2n k − ingk randomdifferentfailedcandidatesdecaysinex- The probability for the algorithm 7 using 2p inde- ponential way: pendent processors is: s (s,k)= . 1 P 2n k2p (1,k)= . − P 2n k And finally, the probability for the algorithm 2 − is approximately (the estimation is affected by los- ing messages and repeated failed candidates form the algorithms 5 y 7): Theexponentialdivisor2n causesarapidlydecay s asit depictedinfig.2where k=2n 2,k =500,000 (s,k) . − P ≈ 2n k(2p+1) and k = 1. When n 0 is a big number, only after − ≫ testing a huge number k = 2n 2 of the different When the number of clauses is a small number − candidates the probability grows to 0.5. Meanwhile, m, the probability for finding a satisfactory assigna- for a reasonable number k 2n of the different can- tion is high, because it means that there are around ≪ didates, the probability remains insignificant, i.e., 2n mcandidatesnotblockedbythesmallnumberof − clausesm.Underthissituationthealgorithm5could find the solution before the algorithms 7 and 2 not because its probability but the ϕ’s small number of 1 (1,k) 0. clauses. The previous proposition in fact states that P ≈ 2n ≈ the algorithm 2 will be solve the problems more fre- efficient time, but it is worst when there is not so- quentlyoftheotheralgorithmsundertheassumption lution, the probability always is equals to zero (see that they send their failed candidates to it. figure2)anditisnecessarytoverifythatnoneofthe I called an extreme SAT problem, a SAT prob- candidates of the 2n candidates of Σn are satisfac- lem with a huge number of variables n, where its tory assignations. Other alternative is the quantum clauses uses at most n variables, the clauses could computational model [ZM02,Bar15]. berepeated,andindisorder,butthemostimportant characteristic is that an extreme problem has one or 5 Results none solution,i.e.,one satisfactorybinary numberor none. It means in the case of one solution that the probability to guess the solution is 1 , and for none 2n Anyoftheformulationsr,1-SATor,2-SATor,r- solution is 0. Figure 2 depicts this behavior. There- SAT is solved by the algorithm 8 in linear time with fore,formextremeproblemsSAT,theexpectedvalue respect to the number of the ϕ’clauses. Therefore its for finding the solution is almost 0. efficiency is less or equal than the state of the art The next proposition analizases the effect of 2k algorithmsfor SAT [Pud98,ZMMM01,ZM02,Tov84]. independent processors for the parallel execution of The lower complexity is linear, and it is worth to the algorithm 2 for an extreme SAT. analice parallel processing. It could reduce the com- plexity, however this is not the case for the parallel Proposition 8. For any extreme SAT with a huge algorithmas it is depicted in the previoussection for number of variables n (n 0). Then the algoritmo 8 ≫ an extreme SAT problem. and particularly, the algorithms 2, and 7 do not improve the efficiency. 5.1 Implications of the parallel algorithm Proof. The parallel algorithm 8 executes in parallel for SAT and the NP Class the algorithms 5 and the random search algorithm 7. Withoutloss of generality, it is possible tohave 2p This section analice the NP class as the incom- processors for the execution of the algorithm 6. With pleteness of the rational numbers system for solving 2p a reasonable numbers of processors, the testing at some geometric problems. It is well know that the the same time of the 2k random unique candidates by rationalnumber are not sufficient for solving any ge- the algorithm 6, which it is called in parallel by the randomsearchalgorithm7,takes2n−p iterations.But ometric problem. By example, an rectangle triangle with sides of size 1, it has a diagonal with size √2, for an extremeSAT, n 0 is a huge number and the ≫ which is not a rationalnumber. The proof for verify- 2p processors is small and reasonable, then n p, ≫ ing that √2 is not rational is by contradiction. The and the time of the iterations for testing the candi- proof assumes that √2 is a rational number. This dates is 2n because n n p. ≈ − means that √2 = p where p and q are integer num- Even the algorithm 2 does not improve the effi- q bers, which are relative primes. This because any in- ciency. The proposition 7 states that it is the algo- teger number has a unique decomposition by prime rithm with high probability to solve SAT. Its number numbers and any common factor of p and q can be of viable candidates decrease by approximately 2p+1 cancelled. But the equivalent equation, 2 = p2 im- in each iteration. Therefore, after a reasonable num- q2 ber of iterations k, the number of viable candidates is plies that p and q are even. Therefore √2 is not a approximately 2n k(2p+1). Considering that k n rational number. − ≪ and p n are reasonable numbers comparing to a huge nu≪mber n, 2n k(2p+1) 2n. Proposition 9. There is no efficient algorithm to − ≈ solve an extreme SAT problem. No matters the algorithms 2, 5 and 7, the proba- bility for solving SAT is approximately s 0 for k Proof. Supposethereisanefficientalgorithm tosolve and 2p reasonable numbers, and n is a h2nug≈e number any SAT problem. Obviously, an extreme SAT prob- lem must be solved by such an algorithm. n, and s 1. | |≤ Two people are selected, the number one person In the case s=0 the only way to know that there is not satisfactory assignation is by reviewing all Σn, defines the extreme SAT problem with the freedom to decide one or no solution. The second person has a therefore there is way to improve the efficiency. powerful computer and has the efficient algorithm. For an extrema SAT, n 0 and with one sat- Howlongwillittakeforthesecondpersontosolve ≫ isfactory assignation or none, it is almost impossible a series of M extreme SAT problems? He has the ef- to determine the unique satisfactory assignation in ficient algorithm, so he has to give the two possible

See more

The list of books you might like

Most books are stored in the elastic cloud where traffic is expensive. For this reason, we have a limit on daily download.