A Randomized Algorithm for 3-SAT
In this work we propose and analyze a simple randomized algorithm to find a satisfiable assignment for a Boolean formula in conjunctive normal form (CNF) having at most 3 literals in every clause. Given a k-CNF formula phi on n variables, and alpha i…
Authors: Subhas Kumar Ghosh (Honeywell Technology Solutions), Janardan Misra (Honeywell Technology Solutions)
A Randomized Algorithm for 3-SA T Subhas Kumar Ghosh, Janardan Misra ∗ Octob er 25, 2 018 Abstract In this work w e prop ose and analyze a simple randomized a lgorithm to find a satisfi- able assignment for a Bo olean formula in co njunctiv e normal form ( CNF ) having at mo st 3 litera ls in every clause. Given a k - CNF for m ula φ on n v ariables, and α ∈ { 0 , 1 } n that satisfies φ , a clause of φ is critical if exactly one literal o f that cla us e is satisfied under assignment α . Paturi et. al. (Chicago Jour nal o f Theo retical Computer Science 1 999) prop osed a simple r a ndomized algo rithm ( PPZ ) for k - SA T for which success pr obabilit y increases with the n umber of critical cla uses (with resp ect to a fixe d satis fia ble solution of the input form ula). Here , we first describe another simple randomized algorithm DEL which p erforms b etter if the n umber of critical cla uses ar e less (with re spect to a fixed satisfiable solutio n o f the input formula). Subsequently , we c o m bine these tw o simple algorithms such that the success probability of the co m bined algorithm is maximum of the success probabilities of PPZ and DE L on every input instance. W e show that when the av erag e num ber of clauses p e r v ariable that app ear a s unique true literal in one o r more critica l clauses in φ is betw een 1 and 2 / (3 · log (3 / 2)), combined algo r ithm per forms b etter than the PPZ algor ithm. 1 In tro duction The pr ob lem of findin g a satisfiable assignmen t ( SA T ) for a prop ositional f orm ula in con- junctiv e normal form ( CNF ) is notably th e most imp ortan t p roblem in the theory of com- putation. The d ecisio n p roblem for CNF - S A T wa s one of the first problems sho wn to b e NP -complete[ 1 , 2 ]. CNF - SA T is widely b eliev ed to require deterministic algorithm of exp o- nen tial time complexit y . A synta ctically restricted v ersion of general CNF - SA T is k - SA T , where eac h clause of a giv en CNF f orm ula con tains at most k literals, for some constan t k . k - SA T r emains NP complete f or k ≥ 3 (while 2- SA T is solv able in p olynomial time [ 3 ]). This restriction on th e num b er of literals p er clause s eem to b e of help, and existing algorithms ha v e O (2 ǫ k n ) time complexit y for some constan t 0 < ǫ k < 1 dep endent on k . Several work exists on faster algorithms for k - SA T (cf. [ 4 ], [ 5 ], [ 6 ], [ 7 ], [ 8 ]). The ob j ective s of wo rking on k - SA T algorithms are sev eral. Primary of them is to obtain algorithms h aving pr o v able b ound s on the run ning time th at is significantly b etter than trivial s earch algorithm (whic h is p oly ( n ) 2 n for form ula ha ving n v ariables) and works ∗ Honeywell T echnology Solutions Lab oratory , 151/1, D orais anipalya, Bannerghatta Road, Bangalore, India, 560076, Email:subhas.kumar@honeywell .com, janardan.misra@honeyw ell.com 1 for larger set of k - CNF . Second ob j ecti ve is to un d erstand instances that are significan tly hard or easy while useful (i.e. they app ear in practical problems). In follo wing we m en tion all b ounds b y suppr essing the p olynomial factors. Monien and Sp ec k enmeyer [ 5 ] d escrib ed fir st suc h non-trivial algorithm with runnin g time O 2 (1 − ǫ k ) n , with ǫ k > 0 for all k , and in sp ecific it is O (1 . 618 n ) for k = 3. F aster algorithm for 3- CNF satisfiabilit y is du e to Ku llmann [ 9 ], with runnin g time O ( 1 . 50 5 n ) for k = 3. Both of these algorithms are deterministic. P aturi et al. [ 10 ] prop osed a simple r andomize d algorithm for k - SA T . Though it is not f aster than other known algorithms for k = 3, it has b etter p erformance for larger v alues of k . Th is algorithm w as impro ve d in [ 11 , 8 ] with a randomized v arian t of the Da vis-Putnam pro cedure [ 12 ] with limited resolution. Sc h¨ oning’s r andom w alk algorithm [ 13 , 6 ] is b etter than [ 8 ] for k = 3, b ut is w orse for k ≥ 4. Sc h¨ oning’s r andom w alk algorithm [ 6 ] has b oun d of O ((2 − 2 / ( k + ǫ )) n ) for some ǫ > 0. F ur ther impro ve ments of h is algorithm were found by Hofmeister et al. [ 14 ] for k = 3. Randomized algorithm of [ 8 ] h as exp ected r unning time O (1 . 362 n ) for k = 3. Better randomized algorithm is d ue to Iwama and T amaki [ 15 ], ha ving exp ected runn ing time O (1 . 3238 n ) for k = 3, wh ich is a com bination of the S c h¨ oning’s random wa lk algorithm [ 13 , 6 ] and the algorithm of P aturi et al. [ 11 ] (this b ound impr ov es to O (1 . 32266 n ) u s ing mo dified analysis in [ 8 ]). Iw ama and T amaki’s algorithm [ 15 ] h as b een impro ve d by Rolf [ 16 ] recen tly to b est kno wn randomized b ound of O ( 1 . 32 216 n ) for 3- SA T . Sc h¨ oning’s algorithm w as derandomized in [ 7 ] to the current ly b est known b ound of O (1 . 481 n ) for k = 3 and to a b oun d of O ((2 − 2 / (( k + 1) + ǫ )) n ) for k > 3, u sing limited lo cal s earch and co v ering cod es. This w as impro v ed for k = 3 in [ 17 ] to a deterministic b ound of O (1 . 473 n ). Rand omized alg orithm of [ 11 ] w as derandomized in [ 18 ] for Unique - k - S A T (i.e. k - CNF form ulas h a ving only one solution) using tec hniques of limited indep endence, i.e. by constructing a sm all bias pr obabilit y space to c ho ose samples for original algorithm of [ 11 ] yielding deterministic r unning time O (1 . 3071 n ) for Uni que -3- SA T . In this w ork we present and analyze a r andomized algorithm for fi nding a satisfiable assignment for a Bo olea n form ula in CNF having at most 3 literals in ev ery clause. W e consid er the k - SA T algorithm of Paturi et al. [ 10 ] for k = 3 and com bine it w ith another randomized algorithm that we describ e here, s uc h that the success p robabilit y of the com bined algorithm is maximum of the success pr ob ab ilities of these tw o algorithms on eve ry inp ut instance. Before w e pr oceed further let us introd u ce some notations. A formula φ in n -v ariables is defined o ve r a set { x 1 , . . . , x n } . Liter als are v ariable x or negated v ariable ¬ x . Clauses are disjunctions of literals, and we assume that a clause do n ot con tain b oth, a literal and its negation. A Boolean formula φ = ∧ m i =1 C i is a k - CNF if eac h clause C i is a disj u nction of at most k literals. V ariables are assigned truth v al ues 1 ( tr ue ) or 0 ( f als e ). An assignmen t to v ariables { x 1 , . . . , x n } is an elemen t α ∈ { 0 , 1 } n . F or S ⊆ { 0 , 1 } n and α ∈ S , α is an isolate d p oin t of S in direction i if flippin g i th bit of α pr o du ces an elemen t that is not in S . W e will call α ∈ S , j –isolated in S if ther e are exactly ( n − j ) neighbors of α in S . An n -isolated p oin t in S ⊆ { 0 , 1 } n will b e called isolated. Giv en a k - CNF form ula φ on n v ariables { x 1 , . . . , x n } , single iteration of P aturi et al.’s randomized algorithm [ 10 ] (see Algorithm- 1 ) works by selecting a random p ermutati on of v ariables π ∈ S n , and then assigning truth v alues uniformly at rand om in { 0 , 1 } to eac h v ariable x π ( i ) for i = 1 , . . . , n . Ho wev er, b efore assigning a random tru th v alue, algorithm c hec ks if there is an u nsatisfied un it clause (i.e., a clause ha ving only one literal ) corre- 2 Algorithm PPZ ( φ ) In put: 3- CNF φ = ∧ m i =1 C i on v aria bles { x 1 , . . . , x n } Pic k a p erm utation π of the set { 1 , . . . , n } uniformly at r andom. for i = 1 , . . . , n do if ther e is an unit clause c orr esp onding to the variable x π ( i ) then Set x π ( i ) so that corresp onding unit clause is satisfied, let b b e th e assignment. else Set x π ( i ) to true or f alse uniformly at random, let b b e the assignmen t. end φ := φ [ x π ( i ) ← b ], α i := b . end if α is a satisfying assignment then return α . else return “ U nsatisfiable” . end Algorithm 1 : One iteration of p ro cedure PPZ ( φ ) sp onding to v ariable x π ( i ) , and if there is one, it forces the v alue of x π ( i ) suc h that the corresp onding u nit clause gets satisfied. W e w ill call this algorithm PPZ . Let S ⊆ { 0 , 1 } n b e the set of all satisfying assignmen ts of φ . Crucial observ ation made in [ 10 ] is that if α is an isolated p oint of S in some direction i , then there exists a clause in wh ich exactly one literal is satisfied u nder assignmen t α – and that literal corresp ond s to th e v ariable x i (suc h a clause will b e called c ritic al for v ariable x i under solution α ). Giv en form ula φ let α ∈ S b e a fi xed satisfying assignm ent in the set of all satisfying assignmen ts of φ . No w observe that after s elec ting a r andom p ermutat ion of v ariables π , p r obabilit y that PPZ ( φ ) outp u ts assignmen t α d ep ends on n umb er of v ariables that are not forced. On the other hand v ariables th at are forced corresp ond to at least one critical clause. Thus Pr [ PPZ ( φ ) = α | π ] imp r o v es if there are more cr itical clauses. With clev er analysis it was shown in [ 10 ] that the success probability that one iteration of PPZ finds a satisfying assignmen t of φ is at least 2 − n (1 − 1 /k ) – w h ic h is at least 2 − 2 n/ 3 for 3- CNF . Finally we note that PPZ mak es one-sided err or - if input form ula φ is unsatisfiable then algorithm will alwa ys sa y so, but on satisfiable instances it ma y mak e error. Let u s consid er another v ery s im p le randomized algorithm for 3- CNF . W e will call this algorithm DEL (see Algorithm- 2 ). In a sin gle iteration of this algorithm we first d elete one literal fr om eac h clause ha ving three literals indep end en tly u niformly at random (a clause ha ving less than thr ee literals is ignored in this step) and obtain a n ew form ula. Sin ce inp ut form ula φ is a 3- CNF , w e obtain a new formula φ ′ in 2- CNF for w hic h there is a known linear time determin istic algorithm [ 3 ] (we will call this algorithm 2SA T ). After r u nning algorithm 2SA T ( φ ′ ) if w e find a satisfying assignment th en we outpu t that (after extend ing it to the rest of th e v ariables (if an y) - whic h can b e assigned an y truth v alue). Again, let α ∈ S b e a fixed solution in the set of all solutions of the inp u t f orm ula φ . Let C ( α ) b e a critical clause of φ for v ariable x under s olution α . No w observe that in the pro cess of deletion if we delete the literal corresp onding to v ariable x from C ( α ) then in the first step of the algorithm DEL ( φ ) we ma y pro du ce a formula φ ′ ha ving no satisfying 3 Algorithm DEL ( φ ) Input: 3- CNF φ = ∧ m i =1 C i on v ariables { x 1 , . . . , x n } for Each clause C having 3 liter als do /* ignore clause with less than 3 literals */ Select one literal uniform ly at random and delete it. end Let φ ′ b e the obtained 2- CNF . if 2SA T ( φ ′ ) r eturns a satisfiable assignment α then return α . else return “ U nsatisfiable” . end Algorithm 2 : One iteration of pro cedure DEL ( φ ) assignmen t (e.g. when α is the unique solution of form ula φ , or if we m ak e this error in a critical clause w ith resp ect to an isolated solution). Probabilit y that this ev en t do es not happ en is 2 / 3 for C ( α ) - as a clause can not b e critical for more than one v ariable, and ev ery clause hav e 3 literals (other clauses with less than three literals were not considered in the deletion step). No w observe that only the deletion step of the algorithm D EL mak es randomized c hoices, wh ile executing the algorithm 2SA T on φ ′ is d etermin istic. Hence, if the deletion step of the algorithm make s n o err or (i.e. it do es not remo v e solutions) then algorithm 2SA T on φ ′ will alw a ys find a satisfying assignmen t whenever input form ula φ is satisfiable. No w assu me there are c ( α ) num b er of critical clauses of φ un der solution α . Then w e hav e the pr obabilit y that DEL ( φ ) returns a satisfying assignment with resp ect to an α ∈ S is (2 / 3) c ( α ) . In general c ( α ) can b e p olynomial in n , th us DEL p erforms well only when all satisfiable solutions of φ h a v e less n umber of critica l clauses. Let u s note th at lik e PPZ algorithm, DEL also mak es one-sided error - if inp ut formula φ is unsatisfiable then algorithm will alwa ys sa y so, b ut on satisfiable instances it m ay make error. This can b e seen from the f ollo wing: assum e that the inpu t formula φ is unsatisfiable but 2SA T ( φ ′ ) returns with a satisfiable assignmen t - but φ ′ is ob tained fr om φ b y deleting one literal from eac h clause of size three, and hence the assignment th at satisfies φ ′ also satisfies φ - a con tradiction. While su ccess probability of DEL decreases with increasing num b er of critical clauses with r esp ect to a fixed s atisfiable solution α – su ccess probabilit y of PPZ increases. T his fact su ggests th at a com bination of these tw o algorithms can p erform b etter. In ord er to motiv ate this fur ther consider the worst case of PPZ algorithm [ 10 ] on 3- CNF . On e such example is φ = ∧ m − 1 i =0 ( x 3 i +1 ⊕ x 3 i +2 ⊕ x 3 i +3 ) where n = 3 m . An y solution α of φ has n critical clauses with resp ect to α , e.g. { ( x 3 i +1 + ¯ x 3 i +2 + ¯ x 3 i +3 ), ( ¯ x 3 i +1 + x 3 i +2 + ¯ x 3 i +3 ), ( ¯ x 3 i +1 + ¯ x 3 i +2 + x 3 i +3 ) } m − 1 i =0 , and su ccess pr obabilit y of PPZ on φ is 2 − 2 n/ 3 ≥ (1 . 5875 ) − n . On the other h an d success probabilit y of DEL on this instance is (2 / 3) n = (1 . 5) − n , an d this is more than the su ccess probabilit y of PPZ . Ou r ob jectiv e in th is work is to com bine these t w o algorithms s u c h that the success probabilit y of the com bined algorithm is m aximum of the success pr ob ab ility of DEL and PPZ on every inp ut instance. 4 Organization. Rest of the pap er is organized as follo ws. In sectio n- 2 we describ e the algorithm DEL - PPZ - whic h is a combination of al gorithm PPZ and algorithm DEL describ ed b efore. S ubsequen tly , in sectio n- 3 we analyze this com bined algorithm. Finally in section- 4 w e conclude the pap er. 2 Com bined algorithm In this section we d escrib e the algorithm D EL - PPZ (see Algorithm- 3 ) – w hic h is a com bi- nation of th e algorithm PPZ and algorithm D EL d escrib ed ab o v e. Algorithm- 3 describ es one iteration, and in order to increase the success p robabilit y as a standard tec hn ique the algorithm n eeds to b e executed sev eral times. W e w ill discuss ab out it at the end of this section. Lik e PPZ , one iteration of DEL - PPZ algorithm w orks by first selecting a rand om p erm utation of v ariables π ∈ S n . Then for i = 1 , . . . , n the algorithm either execute steps that are similar to DEL ( φ ) an d , if unsu ccessful in findin g a satisfying assignmen t, it execute steps that are similar to PPZ . Algorithm DEL - PPZ ( φ ) Input: 3 − CNF φ = ∧ m i =1 C i on v ariables { x 1 , . . . , x n } Pic k a p erm utation π of the set { 1 , . . . , n } uniformly at r andom. α := 0 n for i = 1 , . . . , n do for Each clause C having 3 liter als do /* ignore clause with less than 3 literals */ Select one literal uniform ly at rand om and delete it. end Let φ ′ b e the obtained 2- CNF . if 2SA T ( φ ′ ) r eturns a satisfiable assignment β then ( ∗ ) return β . else if ther e is an unit c lause c orr esp onding to the variable x π ( i ) then Set x π ( i ) so that corresp ond ing unit clause is satisfied, let b b e the assignmen t. else Set x π ( i ) to true or f alse u n iformly at random, let b b e the assignment. end end φ := φ [ x π ( i ) ← b ], α i := b . end if α is a satisfying assignment then ( ∗∗ ) ret urn α . else return “ U nsatisfiable” . end Algorithm 3 : One iteration of pro cedure DEL - PPZ ( φ ) In other w ords, for eac h i = 1 , . . . , n the algorithm works on th e curren t formula φ (lik e 5 PPZ , input form ula φ is mo dified in every execution of the for lo op as we assign truth v alue to v aria ble x π ( i ) in i th execution) and first delete one literal from eac h clause of φ h a ving three literals indep end en tly uniform ly at random (a clause h a ving less than three literals is ignored in this step) and obtain a new form ula φ ′ . Since input formula φ is a 3- CNF , w e obtain a new formula φ ′ in 2- CNF . After running algorithm 2SA T ( φ ′ ) if we find a satisfying assignmen t th en w e outpu t that (after extending it to the r est of the v ariables – whic h can b e assigned an y truth v alue), or else w e again consider the current formula φ and assign truth v al ues in { 0 , 1 } to v ariable x π ( i ) . This is d on e as follo ws: we firs t c hec k if there is an unsatisfied unit clause corresp onding to v ariable x π ( i ) and force the v alue of x π ( i ) suc h that the corresp ondin g unit clause gets satisfied, otherwise we assign truth v alues in { 0 , 1 } to x π ( i ) uniformly at r andom. After th is, the current formula φ is mo dified as φ := φ [ x π ( i ) ← b ]. Wher e, b y φ := φ [ x π ( i ) ← b ] we denote that v ariable x π ( i ) is assigned b ∈ { 0 , 1 } , and formula φ is mo difi ed b y treating eac h cla use C of φ as follo ws: ( i ) if C is satisfied w ith this assignment then delete C , otherwise ( ii ) r eplace clause C b y clause C ′ obtained by d eleting any literals of C that are set to 0 b y this assignmen t. Hence, D EL ( φ ) w orks on a new ins tance of formula in eac h execution of the for lo op. In ev ery execution there are t wo places from where the algorithm could exit and return a satisfying assignmen t. When 2SA T ( φ ′ ) r eturns a satisfying assignment β for some i = 1 , . . . , n (marked as ( ∗ ), and we sh all call it retur n by DEL ) or at the end (marked as ( ∗∗ ), whic h w e shall call as return by PPZ ). It is not hard to see th at the algorithm D EL - PPZ neve r return s an assignment if the input form ula is unsatisfiable. As stated earlier, b oth PPZ and DEL has one-sided error and sim ilar argumen t holds for DEL - PPZ as well. Thus the problem of in terest wo uld b e to b ound the probability th at the algorithm answers “unsatisfiable” wh en the input formula φ is satisfiable. I f τ ( φ ) is the su ccess probability of the algorithm DEL - PPZ on inpu t φ , and if we execute th e algorithm ω n um b er of times, then for a satisfiable form ula φ the error probab ility is equal to (1 − τ ( φ )) ω ≤ e − ( ω · τ ( φ )) . T his will b e at most e − n if we c ho ose ω ≥ n/τ ( φ ). In follo wing section we shall estimate τ ( φ ) and subsequently choose the v a lue of ω . 3 Analysis of the com bined algorithm In this section w e analyze the algorithm D EL - PPZ . Let φ = ∧ m i =1 C i b e the input 3 − CNF formula defined on n v ariables { x 1 , . . . , x n } . Let S ⊆ { 0 , 1 } n b e th e set of satisfying assignmen ts of φ , α ∈ S , and let π b e an y p erm utation in S n . Observe that in the main lo op f or eac h i = 1 , . . . , n , the algorithm can retur n by DEL (mark ed as ( ∗ )) for any i . When the algorithm returns b y DEL in the i th execution of the for lo op, w e estimate the success pr obabilit y of obtaining an y satisfying assignmen t in that execution of the for lo op with resp ect to a α ∈ S , for a fixed π ∈ S n . Let us denote th e i th suc h ev en t by A i ( α ) for i = 1 , . . . , n to indicate that i th execution retur ns by DEL with some satisfying assignm ent. T o indicate th at π ∈ S n is fixed we u se the shorthand notation Pr [ A | π ] to denote Pr [ A | When π is fi x ed], for some ev en t A . Also, for an y eve nt A let A denote th e complemen t of ev ent A . Similarly , let the ev en t B denote that the algorithm returns b y PPZ at the end of the for 6 lo op (mark ed as ( ∗∗ )) and satisfying assignment r eturned is α , again for a fi xed π ∈ S n . Let us denote b y DEL - PPZ ( φ, α ) the even t that with resp ect to some α ∈ S , algorithm DEL - PPZ returns with a s uccessful s atisfying assignmen t - either by DEL or by PPZ . No w observ e that the algorithm either r eturns by DEL in an y one of the execution of the for lo op for i = 1 . . . , n , or it returns b y PPZ at the end of the for lo op, h ence, Pr [( ∪ n i =1 A i ( α )) ∩ B | π ] = 0. With this we ha ve: Pr [ DEL - PPZ ( φ, α ) | π ] = Pr [ n [ i =1 A i ( α ) ∨ B | π ] = n X i =1 Pr [ A i ( α ) | i − 1 ^ j =1 A j ( α ) ∧ π ] · Pr [ i − 1 ^ j =1 A j ( α ) | π ] + Pr [ B | n ^ i =1 A i ( α ) ∧ π ] · Pr [ n ^ i =1 A i ( α ) | π ] (1) Recall, if the deletion step of the algorithm mak es no error then algorithm 2SA T on φ ′ will alw a ys find a satisfying assignment. O n the other hand in the pro cess of deletion if w e delete an y un iqu e true literal corresp onding to a critical clause with resp ect to satisfying assignmen t α we ma y pro du ce a formula φ ′ whic h will not ha v e any satisfying assignment, and we will mak e error. Let c i − 1 π ( α ) b e the num b er of critical cla uses of the resu lting formula in the i th step with resp ect to assignmen t α on w hic h the deletion step of DEL and su bsequen tly 2SA T is executed. I n sp ecific c 0 π ( α ) d enotes the num b er of critical clauses of the inpu t form ula φ . Since c i − 1 π ( α ) is the num b er of critical clauses of the resulting formula used in the i th step with r esp ect to assignment α then success pr obabilit y of returning by DEL in that step i.e. Pr [ A i ( α ) | ∧ i − 1 j =1 A j ( α ) ∧ π ] is (2 / 3) c i − 1 π ( α ) . No w for collection of ev ent s A 1 ( α ) , . . . , A n ( α ) it holds th at, for r = 1 , . . . , n , Pr [ r ^ j =1 A i ( α ) | π ] = Pr [ A 1 ( α ) | π ] · Pr [ A 2 ( α ) | A 1 ( α ) ∧ π ] · . . . · Pr [ A r ( α ) | r − 1 \ j =1 A j ( α ) ∧ π ] Observe that if the algorithm fails to return by D EL in the ( r − 1)th execution of the for lo op, then give n there were c r − 2 π ( α ) man y critical clauses in the b eginning of the ( r − 1)t h execution, there will b e c r − 1 π ( α ) man y critical clauses after PPZ part of the algorithm executes. Hence, for r = 1 , . . . , n, giv en all ( r − 1) trial of return by DEL has failed w e hav e: Pr [ A r ( α ) | r − 1 \ j =1 A j ( α ) ∧ π ] = 1 − 2 3 c r − 1 π ( α ) ! , for r = 1 , . . . , n. Hence, Pr [ r ^ j =1 A i ( α ) | π ] = r Y j =1 1 − 2 3 c r − 1 π ( α ) ! , for r = 1 , . . . , n. 7 And we ha ve, n X i =1 Pr [ A i ( α ) | i − 1 ^ j =1 A j ( α ) ∧ π ] · Pr [ i − 1 ^ j =1 A j ( α ) | π ] = n X i =1 2 3 c i − 1 π ( α ) · i − 1 Y j =1 1 − 2 3 c j − 1 π ( α ) ! (2) Let d π ( α ) b e the num b er of v aria bles that are not forced b y PPZ . T hen we ha v e: Pr [ B | n ^ i =1 A i ( α ) ∧ π ] · Pr [ n ^ i =1 A i ( α ) | π ] = 2 − d π ( α ) · n Y i =1 1 − 2 3 c i − 1 π ( α ) ! (3) Using Eq. ( 2 ) and Eq. ( 3 ) with Eq. ( 1 ) it is easy to see no w th at, Pr [ DEL - PPZ ( φ, α ) | π ] = n X i =1 2 3 c i − 1 π ( α ) · i − 1 Y j =1 1 − 2 3 c j − 1 π ( α ) ! + 2 − d π ( α ) · n Y i =1 1 − 2 3 c i − 1 π ( α ) !! (4) Let Exp π [ X ] den ote the exp ectation of r andom v ariable X tak en o ve r all random p ermu- tation π ∈ S n . No w it is easy to see that using Eq. ( 4 ), and summing o v er th e set S of all satisfying solutions of φ , w e ha ve usin g lin earity of exp ectation: τ ( φ ) = Pr [ DEL - PPZ ( φ ) outputs some satisfying assignment] = X α ∈ S Exp π n X i =1 2 3 c i − 1 π ( α ) · i − 1 Y j =1 1 − 2 3 c j − 1 π ( α ) ! + X α ∈ S Exp π " 2 − d π ( α ) · n Y i =1 1 − 2 3 c i − 1 π ( α ) !# ≥ X α ∈ S n X i =1 2 3 Exp π [ c i − 1 π ( α )] · i − 1 Y j =1 1 − 2 3 Exp π [ c j − 1 π ( α )] ! + X α ∈ S " 2 − Exp π [ d π ( α )] · n Y i =1 1 − 2 3 Exp π [ c i − 1 π ( α )] !# (5) Where last inequalit y (Eq. ( 5 )) follo ws from Jensen’s inequalit y (cf. [ 19 ])- which states that for a random v ariable X = ( c 0 π ( α ) , c 1 π ( α ) , . . . , c n − 1 π ( α ) , d π ( α )) and any con v ex f unction f , Exp [ f ( X )] ≥ f ( Exp [ X ]). No w ob s erv e that c 0 π ( α ), c 1 π ( α ), . . . , c n − 1 π ( α ) is a non-increasing sequence of integ ers, i. e. c 0 π ( α ) ≥ c 1 π ( α ) ≥ . . . ≥ c n − 1 π ( α ), b ecause in ev ery execution whenev er a v ariable is forced by PPZ a collectio n of critical clause gets satisfied and are remo v ed from φ . Hence, w e can simp lify Eq. ( 5 ) as follo ws using the f act that E xp π [ c 0 π ( α )] = 8 c 0 π ( α ), when c 0 π ( α ) 6 = 0. On the other han d wh en c 0 π ( α ) = 0, it follo ws that τ ( φ ) = 1 b y taking c i − 1 π ( α ) = 0 for all i = 1 , . . . , n in Eq. ( 4 ): τ ( φ ) ≥ X α ∈ S 2 3 c 0 π ( α ) · n X i =1 i − 1 Y j =1 1 − 2 3 Exp π [ c j − 1 π ( α )] ! + X α ∈ S " 2 − Exp π [ d π ( α )] · n Y i =1 1 − 2 3 Exp π [ c i − 1 π ( α )] !# (6) Let l ( α ) ∆ = |{ α ′ ∈ S : d ( α, α ′ ) = 1 }| denote that n umb er of s atisfying assignmen ts of φ that has Hammin g distance 1 from α . Using argum ents fr om [ 10 ] (cf. [ 20 ]) we can b ound Exp π [ d π ( α )]. F or completeness w e state it here. Given th e d efinition of l ( α ), there are n − l ( α ) v ariables such that eac h of them app ear as a unique tru e literal in some critical clause of φ . It follo ws that eac h su c h v ariable x π ( i ) will b e forced u n der r andomly chosen π ∈ S n if x π ( i ) o ccurs last in the corresp onding critical clause. This happ ens with pr ob ab ility at least 1 / 3 . Using linearit y of exp ectati on w e ha ve that exp ected num b er of forced v ariables is at least (( n − l ( α ))) / 3, and hence, Exp π [ d π ( α )] ≤ n − ( n − l ( α )) 3 (7) No w we concen trate on giving b ound s on Exp π [ c i − 1 π ( α )] f or i = 1 , . . . , n . Let C ( α ) b e the set of all critical clauses of φ with resp ect to α . Let us also denote b y r i π ( α ) th e n umb er of critical clauses that are remo v ed b y PPZ at the end of i th execution of the for loop. Clearly the exp ected n umber of critical clauses in the b eginning of the i th execution of the for loop, E xp π [ c i − 1 π ( α )] is equal to the exp ected n umber of critical clauses that w ere pr esen t in th e b eginning of the ( i − 1)th execution minus the exp ected num b er of critical clauses that we re remo v ed b y PPZ at th e end of the ( i − 1)th execution. It follo ws, Exp π [ c i − 1 π ( α )] = Exp π [ c i − 2 π ( α )] − Exp π [ r i − 1 π ( α )], w ith Exp π [ c 0 π ( α )] = c 0 π ( α ). Let C i − 2 π ( α ) denote the set of all critical clauses in the b eginning of i − 1th execution of the for lo op. Also, let X c b e an indicator r andom v ariable taking v alues in { 0 , 1 } s u c h that X c = 1 iff clause c ∈ C i − 2 π ( α ) is remo v ed by the end of i − 1th execution of the for lo op. Usin g lin earit y of exp ectation we ha v e that, Exp π [ c i − 1 π ( α )] = c i − 2 π ( α ) − X c ∈C i − 2 π ( α ) Exp π [ X c ] = c i − 2 π ( α ) − X c ∈C i − 2 π ( α ) (1 · Pr π [ X c = 1] + 0 · Pr π [ X c = 0]) = c i − 2 π ( α ) − X c ∈C i − 2 π ( α ) Pr π [ X c = 1] As d iscussed ab o v e, a clause can not b e critical for more than one v ariable. On the other hand eac h v ariable x π ( i ) that app ears as a unique true literal in some set of critical clauses of φ creates a partition of C ( α ). Let us denote the cardin alit y of the partition of critical clauses corresp onding to v ariable x π ( i ) with resp ect to α by t i π ( α ) (where, t 0 π ( α ) = 0). 9 Surely , c 0 π ( α ) = P n i =1 t i π ( α ). No w in the ( i − 1)th execution we consider v ariable x π ( i − 1) , that app ears as a un ique true literal in t i − 1 π ( α ) m an y critical clauses under assignment α . T h ere is one p ossible wa y a critical clause c is remo v ed b y PPZ in accordance with assignmen t α und er randomly c hosen π ∈ S n - (as discu s sed ab o v e) wh en corr esp onding v ariable is forced, and prob ab ility of th at ev ent to o ccur for clause c is at least 1 / 3. Note that here we hav e ignored one particular effect of the statement φ := φ [ x π ( i ) ← b ]. By this mo dification of φ in ev ery execution of the for lo op a critical clause w ith 3 literals can b ecome a clause ha ving 2 or less num b er of literals and still remain critical - but w ill not b e considered in the deletion step in next execution of the for lo op. How ev er, considerin g this effect will only impro ve the success probability of retur n b y DEL , as there w ill b e lesser n umb er of critical clauses in the sub sequen t execution of the f or lo op, on the other hand it will mak e the analysis complicated. Based on the ab o v e discussion we h a v e, P c ∈C i − 2 π ( α ) Pr π [ X c = 1] ≥ t i − 1 π ( α ) / 3. And w e ha v e, Exp π [ c 0 π ( α )] = c 0 π ( α ) , and Exp π [ c i − 1 π ( α )] ≤ c i − 2 π ( α ) − 1 3 · t i − 1 π ( α ). Solving this we obtain that, Exp π [ c i − 1 π ( α )] ≤ c 0 π ( α ) − 1 3 · i − 1 X j =1 t j π ( α ) = c 0 π ( α ) − 1 3 · n X j =1 t j π ( α ) + 1 3 · n X j = i t j π ( α ) = c 0 π ( α ) − c 0 π ( α ) 3 + 1 3 · n X j = i t j π ( α ) = 2 3 · c 0 π ( α ) + 1 3 · n X j = i t j π ( α ) (8) In follo wing, we sim p lify notation by r eplacing c 0 π ( α ) w ith c ( α ), and t i π ( α ) w ith t i ( α ). No w observ e that in the expr ession Q i − 1 j =1 (1 − (2 / 3) Exp π [ c j − 1 π ( α )] ) in Eq. ( 6 ), for ev ery i , term (1 − (2 / 3) Exp π [ c 0 π ( α )] ) app ears in every pr od uct. Also observe that P n j = i t j π ( α ) ≥ 0 for an y i . So we use Q i − 1 j =1 (1 − (2 / 3) 2 3 · c ( α ) ) ≤ Q i − 1 j =1 (1 − (2 / 3) Exp π [ c j − 1 π ( α )] ) as low er b oun d , and with Eq . ( 7 ) and Eq. ( 8 ) w e mo dify Eq. ( 6 ) as follo ws: τ ( φ ) ≥ X α ∈ S 2 3 c ( α ) · n X i =1 i − 1 Y j =1 1 − 2 3 2 3 · c ( α ) ! + X α ∈ S " 2 − “ n − ( n − l ( α )) 3 ” · n Y i =1 1 − 2 3 2 3 · c ( α ) !# (9) No w observ e that since α is ( n − l ( α ))–isola ted it m ust b e th at c ( α ) ≥ ( n − l ( α )). In fact recall that c ( α ) = P n i =1 t i ( α ). Let us define t as the minimum of t i ( α ) o v er i ∈ { 1 , . . . , n } suc h that x π ( i ) app ears as un ique true literal in at least one critical clause, and T av ∆ = c ( α ) / ( n − l ( α )). W e ha ve T av ( n − l ( α )) = c ( α ) ≥ t ( n − l ( α )). Also note that t ≥ 1. Using these tw o facts 10 with Eq . ( 9 ), w e can lo w er b ound τ ( φ ) no w as follo ws 1 : τ ( φ ) ≥ X α ∈ S 2 3 T av ( n − l ( α )) · n X i =1 i − 1 Y j =1 1 − 2 3 2 t ( n − l ( α )) 3 + X α ∈ S 2 − “ n − ( n − l ( α )) 3 ” · n Y i =1 1 − 2 3 2 t ( n − l ( α )) 3 = 2 − T av · n · log (3 / 2) · X α ∈ S 2 3 − T av · l ( α ) · 1 − 2 3 2 t ( n − l ( α )) 3 n − 1 + 2 − 2 n 3 · X α ∈ S 2 − l ( α ) 3 · 1 − 2 3 2 t ( n − l ( α )) 3 n (10) Let L ∆ = Exp α ∈ S [ l ( α )] and s ∆ = | S | . Using J ensen’s inequalit y w e obtain: X α ∈ S 2 3 − T av · l ( α ) · 1 − 2 3 2 t ( n − l ( α )) 3 n − 1 ≥ s · 2 3 − T av · L · 1 − 2 3 2 t ( n − L ) 3 n − 1 (11) And, X α ∈ S 2 − l ( α ) 3 · 1 − 2 3 2 t ( n − l ( α )) 3 n ≥ s · 2 − L/ 3 · 1 − 2 3 2 t ( n − L ) 3 n (12) Com bining Eq. ( 11 ) and Eq. ( 12 ) with Eq. ( 10 ) w e ha v e: τ ( φ ) ≥ s · 2 − ( n − L ) · T av · log (3 / 2) 1 − 2 3 2 t ( n − L ) 3 + 2 − (2 n + L ) / 3 · 1 − 2 3 2 t ( n − L ) 3 n ≥ s · 2 − ( n − L ) · T av · log (3 / 2)+ o (1) + 2 − (2 n + L ) / 3 · 1 − 2 3 2 t ( n − L ) 3 n (13) In order to b ound L we will u se th e edge isop erimetric inequalit y fr om [ 21 ], which stat es that for an y S ⊆ { 0 , 1 } n , |{ ( a, a ′ ) | a, a ′ ∈ S and d ( a, a ′ ) = 1 }| ≤ | S | · log ( | S | ), and P α ∈ S l ( α ) ≤ s · log s . So using this result as in [ 20 ] L = Exp α ∈ S [ l ( α )] ≤ log s . On the other han d , it is not hard to observ e that the lo wer b ound on P α ∈ S l ( α ) is 0 as long as s ≤ 2 n − 1 . This 1 All logarithms are base 2. 11 can b e seen as follo ws. W e consider { 0 , 1 } n as the vertex set of a graph (Hamming cub e, denoted Q n ) and for a, a ′ ∈ { 0 , 1 } n , aa ′ is an edge of this graph iff d ( a, a ′ ) = 1. Now the lo w er b ound in question corresp onds to finding a subgraph of Q n ha ving s many v ertices and ha ving minim um num b er of indu ced edges ha ving b oth of their end-p oint s in S ⊆ { 0 , 1 } n . No w obser ve that sin ce Q n is bipartite, with s ≤ 2 n − 1 w e hav e alw a ys a set of vertic es of size s having no ed ges b etw een them. Up dating E q. ( 13 ) with this we hav e: τ ( φ ) ≥ s · 2 − n · T av · log (3 / 2) + 2 − (2 n +log s ) / 3 · 1 − 2 3 2 t ( n − log s ) 3 n = s · 2 − n · T av · log (3 / 2) + 2 − n · s 2 / 3 · 1 − 2 − n · s 2 / 3 · t · log (3 / 2) n (14) No w it can b e seen that the term,(1 − (2 − n · s ) 2 / 3 · t · log (3 / 2) ) n con v erges to 1 ve ry fast with n . So for sufficient ly large n we can ignore this term. Thus for sufficient ly large n w e ha ve from E q . ( 14 ), τ ( φ ) ≥ s · 2 − n · T av · log (3 / 2) + 2 − n · s 2 / 3 (15) Lo w er b ound on τ ( φ ) from Eq. ( 15 ) shows that (lik e PPZ [ 10 ]) p erformance of the algorithm DEL - PPZ impr o v es with more num b er of solutions. O n the other h and for any v alue of 1 ≤ T av < 2 / (3 · log (3 / 2)) = 1 . 13967, p erf orm ance of DEL - PPZ is b etter than PPZ . F or higher v alues of T av and with s = 1 p erform ance of the algorithm DEL - PPZ tend s to b ecome same as th e p erformance of PPZ algorithm, whic h is 1 . 5875 − n . On th e other hand for s = 1 (unique solution) and T av = 1 (one critical clause p er v ariable) p erf ormance of the alg orithm DEL - PPZ tends to b ecome same as the p erform an ce of algorithm DEL , which is 1 . 5 − n (see Fig. 1 .). Ou r results on the algorithm DEL - PPZ can no w b e su mmarized in the follo wing 1.0000 1.0250 1.0500 1.0750 1.1000 1.1250 1.1500 1.1750 10 −30 10 −25 10 −20 10 −15 10 −10 τ ( φ ) T av Plo t of τ ( φ ) w .r. t T av for differen t n PPZ DEL−PPZ DEL n = 2 7 n = 2 6 Figure 1: I llustration of how success probab ility of PPZ , DEL and DEL - PPZ c hanges with 1 ≤ T av < 2 / (3 · log (3 / 2)) for different v alues of n with s = 1(Y-axis is in log scale). statemen ts: 12 Lemma 3.1. L et φ b e any 3 - CNF formula over n variables that has s numb er of satisfying assignments, and let T av b e the aver age numb er of c lauses p er variable that app e ar as unique true liter al in one or mor e critic al clauses in φ . Then pr ob ability that one iter atio n of algorithm D EL - PPZ outputs some satisfying assignment i s at le ast, s · 2 − n · T av · log (3 / 2) + 2 − n · s 2 / 3 Theorem 3.1. L et φ b e any 3 - CNF formula over n v ariables and let T av ∈ [1 , 2 / (3 · log (3 / 2))] b e the aver age nu mb er of clauses p e r variable that app e ar as unique true liter al in one or mor e critic al clauses in φ . Then pr ob ability that one iter ation algorithm DEL - PPZ outputs some satisfying assignment is at le ast 1 . 5 − n for T av = 1 and de cr e ases to 1 . 5875 − n for T av = 2 / (3 · log (3 / 2)) . F or T av > 2 / (3 · log (3 / 2)) pr ob ability that one iter atio n algorithm DEL - PPZ outputs some satisfying assignment is at le ast 1 . 5875 − n . And these b ounds ar e tight for φ = ∧ m − 1 i =1 ( x 3 i ⊕ x 3 i +1 ⊕ x 3 i +2 ) wher e n = 3 m . No w r ecal l that we can also b oun d the error pr obabilit y of the algorithm to o (1) if w e execute the algorithm DEL - PPZ for ω ≥ n/τ ( φ ) times. With this w e obtain follo wing results: Theorem 3.2. L et T av ≥ 1 b e a r e al numb er. Ther e is a r and omize d algorithm f or 3 - SA T , namely DEL - PPZ , that given any 3 - CNF formula φ over n variables with s numb er of satisfying assignments, makes one side d err or of at most o (1) on satisfiable instanc es, otherwise outputs one of the satisfying assignments of φ in exp e cte d time O min ( p oly ( n ) · 2 n · T av · log (3 / 2) s !! , p oly ( n ) · 2 n s 2 / 3 !)! 4 Concluding remarks As s tate d in the in tro duction that r ecen tly b est kno wn randomized b ound for 3– SA T is O (1 . 32216 n ) [ 16 ]. It is inte resting to note that this algorithm is a com bination of the random wa lk algorithm of [ 13 , 6 ] and algorithm of [ 11 ] (we w ill call this algorithm PPSZ ), and success probability of algorithm in [ 16 ] is maxim um of the success pr obabilit y of random w alk algorithm of [ 13 , 6 ] and algo rithm PPS Z . Algorithm PPSZ is a com bination of 3 d b ounded resolution on inpu t 3- CNF formula φ follo w ed by the PPZ algorithm. Purp ose of using a b ounded resolution fir st is to increase th e su ccess pr ob ab ility of PPZ algorithm - b y increasing the n umb er of critical clauses p er v ariable - as th at will in effect increase the probabilit y that a v ariable (that app ears as unique true literal in a set of critical clauses) is forced with r esp ect to a randomly chosen p erm utation. On the other hand algo rithm DEL - PPZ p erforms b etter when the a v erage num b er of critical clause p er v ariable in φ is close to 1. W e b eliev e that for v alues of T av close to 1 our algorithm improv es the algorithm PPSZ and b est kn o wn r andomized b oun d for 3– SA T as presented in [ 16 ]. W e will consider this analysis as our future work. 13 References [1] Co ok, S.A.: T he complexit y of theorem-pr o ving pro cedures. In : STOC ’71: P roceed- ings of the third annual A CM sym p osium on T heory of compu ting, New Y ork, NY, USA, ACM Press (1971) 151– 158 [2] Levin, L.: Univ ersal’n yie p ereb ornyie zadac hi (univ ersal searc h pr oblems: in russian). Problem y P eredac hi In formatsii, English translation in [ 22 ] 9 (3) (1973) 265–26 6 [3] Asp v all, B., P lass, M.F., T arjan, R.E.: A linear-time algorithm for testing the tr uth of certain quantified b o olean formulas. In f. Pro cess. Lett. 8 (3) (1979 ) 121–123 [4] Dan tsin, E.: Two prop ositional pro of systems based on the sp litting metho d. Za- piski Nauchn ykh Seminarov LOMI, 105:24- 44, 1981. (in Ru ssian),English translation in J ou r nal of S o viet Mathematics 22 (3) (1983) 1293– 1305 [5] Monien, B., Sp ec k enmey er, E.: S olving satisfiabilit y in less than 2 n steps. Discrete Applied Mathematic s 10 (1985) 287–295 [6] Sc h¨ onin g, U.: A probabilistic algorithm for k - SA T based on limited lo cal searc h an d restart. Algo rithm ica 32 (4) (2002) 615–62 3 [7] Dan tsin, E., Go er d t, A., Hirsc h, E.A., K annan, R., Kleinb erg, J., Papadimitriou, C., Ragha v an, P ., Sc h¨ oning, U.: A deterministic (2 − 2 / ( k + 1)) n algorithm for k - S A T based on lo cal searc h. Theor. Comp ut. Sci. 289 (1) (2002) 69–83 [8] P aturi, R., Pudl´ ak, P ., Saks, M.E., Zane, F.: An impr o v ed exp onen tial-time algorithm for k - SA T . J. A CM 52 (3) (2005) 337–364 [9] Kullmann, O.: New metho ds for 3- SA T decision and w orst-case analysis. Theor. Comput. Sci. 223 (1-2) (1999) 1–72 [10] P aturi, R., Pud l´ ak, P ., Zane, F.: Satisfiabilit y co ding lemma. Chicago Journal of Theoretical Computer Science 1999 (115) (1999) [11] P aturi, R., Pu dl´ ak, P ., Saks, M.E., Zane, F.: An improv ed exp onentia l-time algorithm for k - SA T . In: FOCS ’98: Pr oceedings of th e 39th Ann ual Symp osium on F oundations of Compu ter Science, W ashin gton, DC, USA, IEEE Computer So ciet y (1998) 628 [12] Da vis, M., Logemann, G., Lo ve land, D.: A m achine program for theorem-pro ving. Comm un. A CM 5 (7) (1962 ) 394–39 7 [13] Sc h¨ oning, U.: A probabilistic algorithm for k - SA T and constr aint satisfaction pr ob- lems. In : F OCS ’99: Proceedings of the 40th Annual S ymp osium on F oundations of Computer Science, W ashington, DC, USA, IEEE Compu ter So ciet y (1999) 410 [14] Hofmeister, T., S c honing, U., S c h uler, R., W atanab e, O.: Randomized algorithms for 3- SA T . Theor. Comp. Sys. 40 (3) (2007) 249–2 62 14 [15] Iw ama, K., T amaki, S.: Imp ro v ed upp er b ound s for 3- SA T . In : SO D A ’04: Pro ceedings of the fi fteen th annual ACM-SIAM symp osium on Discrete algorithms, Philadelphia, P A, USA, So ciet y for Industrial and Applied Mathematics (2004) 328–328 [16] Rolf, D.: Im p ro v ed b ound for the PPSZ /Sc h¨ oning-algorithm for 3- SA T . Jour nal on Satisfiabilit y , Bo olea n Mo deling and Compu tatio n (JSA T) 1 (1) (2006 ) 111–122 [17] Brueggemann, T., Kern, W.: An impro v ed deterministic lo cal searc h algorithm for 3- SA T . Theor. Compu t. Sci. 329 (1-3) (2004) 303–3 13 [18] Rolf, D.: Derandomization of PPSZ for uniqu e k - SA T . In Bacc hus, F., W alsh , T., eds.: SA T. V olume 3569 of Lecture Notes in Computer Science., Sp ringer (2005) 216– 225 [19] F eller, W.: An Introd u ction to Probabilit y Theory and Its App licat ions. S econd edn . V olume I I. John Wiley and Sons, New Y ork (1971) [20] Calabro, C., Im paglia zzo, R., Kabanets, V., P aturi, R.: Th e complexity of uniqu e k - SA T : An isolation lemma for k - CNF s. J . Comput. Syst. S ci. 74 (3) (2008) 386– 393 [21] Harp er, L.H.: A necessary condition on minimal cub e n umb erings. Journ al of Applied Probabilit y 4 (2) (1967) 397–40 1 [22] T rakh ten br ot, B.A. : A survey of r ussian approac hes to p ereb or (bru te-force searc h) algorithms. Annals of the History of Compu tin g 6 (4) (1984) 384–40 0 15
Original Paper
Loading high-quality paper...
Comments & Academic Discussion
Loading comments...
Leave a Comment