Necessary and Sufficient Condition for Satisfiability of a Boolean Formula in CNF and its Implications on P versus NP problem
aa r X i v : . [ c s . CC ] J a n NECESSARY AND SUFFICIENT CONDITION FORSATISFIABILITY OF A BOOLEAN FORMULA IN CNF AND IT’SIMPLICATIONS ON P VERSUS NP PROBLEM
MANOJ KUMAR ∗ Abstract.
In this paper, a necessary and sufficient condition for satisfiability of a booleanformula, in CNF, has been determined. It has been found that the maximum cardinality of satisfiableboolean formula increases exponentially, with increase in number of variables. Due to which, anyalgorithm require exponential time, in worst case scenario, depending upon the number of variablesin a boolean formula, to check satisfiability of the given boolean formula. Which proves the non-existence of a polynomial time algorithm for satisfiability problem. As satisfiability is a NP-completeproblem, and non-existence of a polynomial time algorithm to solve satisfiability proves exclusion ofsatisfiability from class P. Which implies P = NP . Furhter, the necessary and sufficient conditioncan be used to optimize existing algorithms, in some cases, the unsatisfiability of a given booleanfunction can be determined in polynomial time. For this purpose, a novel function has been defined,that can be used to determine cardinality of a given boolean formula, and occurances of a literal inthe given formula, in polynomial time. Key words.
Boolean Satisfiability Problem, Polynomial Time, P vs NP, Non Polynomial Time
AMS subject classifications.
1. Introduction.
Boolean Satisfiability problem is a NP-complete problem.[7]It implies, all other NP-complete problems can be reduced to Boolean Satisfiabilityproblem in polynomial time. So, if there exist an algorithm that can solve BooleanSatisfiability problem in polynomial time, then every other NP-complete problem canbe solved in polynomial time. However, still there does not exist such algorithm, thathas been proved to solve the problem in polynomial time. It has lead to formulationof P versus NP problem defined by Stephen Cook in [1]. History and importance ofP versus NP problem has been discussed in detail in [1].Various attempts have been made to create efficient algorithms and systems tosolve Boolean Satisfiability problem.In 1971, in [2], it was shown that any boolean formula, in CNF, can be convertedinto a formula with at most three literals in polynomial time, based on the assumption,that number of clauses in the given formula are of the polynomial length.In 1992, in [9], a greedy local search procedure called GSAT, was introduced. Itwas shown that, GSAT can solve structural satisfiability problems quickly. However,for testing of the algorithm, input contained a considerably less number of clauses forthe given number of variables, for e.g. formulas with 50 variables having only 215clauses were used. Whereas, it has been found that, a satisfiable boolean formula,with 50 variables can have more than 7 . × clauses.In 2001, in [8], development of a new complete solver, Chaff, has been described.It has been shown that, Chaff has been able to obtain one to two orders of magnitudeperformance improvement on difficult SAT benchmarks in comparison with othersolvers. In experiments, in [8], the benchmark problems were used, but again, theseproblems contained considerably less number of clauses for the given variables.In 2018, in [10], used problems with 50 variables and 212 clauses for testing, whichis again, contained considerably less clauses for the given variables.In 1999, in [4], sharp thresholds for graph properties and k -SAT problem were ∗ Assistant Professor in Computer Application, Government College of Teacher Education,Dharamshala, Dist. Kangra, Himachal Pradesh, India. ([email protected])1 resented. k -SAT is a special case of SATISFIABILITY problem defined in [7], andany boolean formula in k -SAT is a special case of general boolean formula in CNF.Most of the results presented in above works used much less number of clauses fora given number of variables. Further, no study has been able to establish a relationshipbetween number of variables, number of clauses, and satisfiability of a general booleanformula in CNF.In this paper, properties of clauses have been studied, novel relationships havebeen defined among clauses, and a necessary and sufficient condition has been es-tablished that determine satisfiability of any boolean formula in CNF. Further, ithas been found that, any algorithm that solves Boolean Satisfiability problem, canbe divided in two parts, one part generate possible solutions, which has exponentialcomplexity and other part is similar to linear search. Thus combined complexity ofany algorithm is of exponential order, which implies satisfiability cannot be solved inpolynomial time, which implies P = N P . [7]However, The necessary and suffient condition for satisfiability can be used tooptimise existing algorithms, like DPLL presented in [3], for improving complexity ofbest-case scenarios.
2. Boolean Satisfiability Problem.
As defined in [7], For the given clauses C , C , C . . . C p , we need to find whether conjuction of the given clauses is satisfiableor not.
3. Terminology used.
The terms literal, boolean variable, clause are used withsame meaning as defined in [5]. A boolean formula in CNF is a conjuction of clauses.It can be represented as a finite set of clauses. [5] A set of boolean variables is calleda variable set.
4. Notations used.
The notations, representing basic relations between setshave been used as defined in [6].
Let a variable, X, can be assigned values x , x and x ,independently, then, it is written as: X = x x x
5. Tautology Clause.
A clause, which evaluates to true for every valuation, iscalled a tautology clause. If a clause contains a complemented pair of literals, it is atautology.[5] In other words, If ∃ x ∈ T |¬ x ∈ T , then T is a taulogy clause. As a tau-tology clause always evaluates to true , that is represented by 1 in boolean algebra.Let F is a boolean formula in CNF, which containins a tautology clause, we can write(5.1) F = C ∧ T where T is a tautology clause. = ⇒ F = C ∧ ⇒ F = C Hence, The tautology clause has no effect on satisfiablity of a boolean formula,So, It can be ignored while solving satisfiability problem. .2. Non-Tautology Clause. A clause which is not a tautology is called anon-tautology clause.
Lemma If N is a non-tautology clause, then ∀ x ∈ N = ⇒ ¬ x / ∈ N .Proof. Given that, N is not a tautology clause. Let, for the sake of contradiction, ∃ x ∈ N |¬ x ∈ N = ⇒ N is a tautology clause(from definition), which is not true. So, our assumptionis wrong. Hence, ∀ x ∈ N = ⇒ ¬ x / ∈ N Lemma If C is a clause, with n literals, such that, ∃ x i ∈ C | x i = 1( true ) then C = 1( true ) Proof.
Given that, C is a clause, by definition, C is a disjunction of literals, so,we can write, C = ( x ∨ x ∨ · · · ∨ x i ∨ · · · ∨ x n )also, given that, x i = 1, so we can write, C = ( x ∨ x ∨ · · · ∨ ∨ · · · ∨ x n )by using dominance law of boolean algebra,= ⇒ C = 1Hence proved. Lemma If C is a clause, with n literals, such that, C = 0( f alse ) then x i = 0 ∀ x i ∈ C Proof.
Given that, C is a clause, by definition, C is a disjunction of literals, so,we can write, C = ( x ∨ x ∨ · · · ∨ x n )also, given that, C = 0( f alse )Suppose, for the sake of contradiction, x i = 1 for some x i ∈ C . Using Lemma 5.2,we get, C = 1which is a contradiction, Therefore, the assumption, x i = 1 is not true, hence,(5.3) x i = 0 ∀ x i ∈ C Hence proved.
Theorem If C and D are clauses, such that, D ⊆ C and C = 0 then D = 0 roof. Given that, D ⊆ C and(5.4) C = 0using Lemma 5.3,(5.5) x i = 0 ∀ x i ∈ C As D ⊆ C ,(5.6) ∀ x ∈ D = ⇒ x ∈ C From (5.5) and (5.6) we have, x j = 0 ∀ x j ∈ D We can write, D = (0 ∨ ∨ ∨ · · · ∨ ⇒ D = 0Hence proved.
6. Clause over a variable set.
A non-tautology clause, C , is called a clauseover a variable set, V , if,( ∀ x )( x ∈ C or ¬ x ∈ C = ⇒ x ∈ V )For e.g. clauses, C = { x , x } and C = { x , x , x } are clauses over variable set, V = { x , x , x } A non-tautology clause, C full , is called a fully populated clause over a variable set, V , if( ∀ x )( x ∈ V ⇔ x ∈ C full or ¬ x ∈ C full )For e.g. clause C = { x , ¬ x } is a fully populated clause over variable set, V = { x , x } Lemma If C is a clause over a variable set, V , then, ∃ V sub ⊆ V , such that, C is a fully populated clause over V sub .Proof. Given that, C is a clause over a variable set, V , from definition,(6.1) = ⇒ ( ∀ x )( x ∈ C or ¬ x ∈ C = ⇒ x ∈ V )We define a variable set,(6.2) V sub = { x | x ∈ C or ¬ x ∈ C } = ⇒ ( ∀ x )( x ∈ V sub ⇔ x ∈ C or ¬ x ∈ C )also, from (6.1) and (6.2) ∀ x ∈ V sub = ⇒ x ∈ V = ⇒ V sub ⊆ V Hence, ∃ V sub ⊆ V , such that, C is a fully populated clause over variable set, V sub . emma If C is a fully populated clause over a variable set, V , then ∀ D ⊆ C , ∃ V sub ⊆ V , such that, D is a fully populated clause over variable set V sub Proof.
Given that, C is a fully populated clause over a variable set, V = ⇒ ( ∀ x )( x ∈ V ⇔ x ∈ C or ¬ x ∈ C )Suppose, D ⊆ C = ⇒ ∀ x ∈ D = ⇒ x ∈ C = ⇒ ( ∀ x )( x ∈ D or ¬ x ∈ D = ⇒ x ∈ V )= ⇒ D is a clause over V .From Lemma 6.1, ∃ V sub ⊆ V , such that, D is a fully populated clause over V sub Hence, ∀ D ⊆ C , ∃ V sub ⊆ V , such that, D is a fully populated clause over V sub Theorem
For any given valuation to a variable set, V , there exist a fullypopulated clause, say C k , over V , such that, C k = 0( f alse ) Proof.
Let, the variable set, V , is given by, V = { x , x , . . . , x n } where x i = ( ∀ x i ∈ V Let, each x i has been assigned any of the values given above.Now, we define a clause, C k , depending upon the valuation assigned above, C k = { y | y = ( ¬ x i if x i = 1 x i if x i = 0 ∀ x i ∈ V } = ⇒ ( ∀ x )( x ∈ V ⇔ x ∈ C k or ¬ x ∈ C k )= ⇒ C k is a fully populated clause. and,By putting values assigned for variables in V , in C k , we get, x i = 0 ∀ x i ∈ C k = ⇒ C k = 0( f alse )Hence, for any given valuation to the variable set, V , there exists a fully populatedclause, C k , such that, C k = 0( f alse ) Theorem
For a given set of variables, V , with n variables, there exist n fully populated clauses.Proof. For a given set of variables, V , with n variables, we can write a fullypopulated clause in the general form, given by, C = { x , x , . . . , x n } here x i = ( x i ¬ x i i.e. each x i can be assigned a value in two ways, independently. As there are n number of variables, in a clause. So, by using basic principle of counting, there are 2 n ways, in which, a clause C can be selected. Hence, for a given variable set, V , with n variables, there exist 2 n number of fully populated clauses.
7. Sibling Clause.
Two unequal fully populated clauses over a common variableset, V , are called sibling clauses. In other words, If A and B are two non-tautologyclauses, such that:1. ( ∀ x )( x ∈ V ⇔ x ∈ A or ¬ x ∈ A ⇔ x ∈ B or ¬ x ∈ B )2. ∃ x ∈ A |¬ x ∈ B then A is a sibling clause of B and vice-versa. For e.g. {¬ x , x } and { x , ¬ x } aresibling clauses over a variable set, { x , x } . Theorem
If A and B are two sibling clauses, and A = 0( f alse ) , then B =1( true ) .Proof. Given that A and B are sibling clauses.(7.1) = ⇒ ∃ x i ∈ A |¬ x i ∈ B also, given that, A = 0Using Lemma 5.3, = ⇒ x i = 0 ∀ x i ∈ A from equation (7.1), = ⇒ ∃¬ x i ∈ B | x i = 0put y = ¬ x i = ⇒ ∃ y ∈ B | y = 1from Lemma 5.2, B = 1Hence proved. Theorem If C i and C j are two sibling clauses, over a variable set, V , and P ( C i ) and P ( C j ) are power sets of C i and C j , respectively, then ∀ D ∈ P ( C i ) | D / ∈ P ( C j ) ∃ E ∈ P ( C j ) such that, D and E are sibling clauses.Proof. Given that, C i and C j are sibling clauses over a variable set, V . It implies,by definition of sibling clauses, C i and C j are fully populated clauses over V .From Lemma 6.2,(7.2) ∀ D ⊆ C i , ∃ V sub ⊆ V such that, D is a fully populated clause over V sub . Or we can write,(7.3) ∀ D ∈ P ( C i ) , ∃ V sub ⊆ V uch that, D is a fully populated clause over V sub .Now, We define a set, E ,(7.4) E = { y | y = ( x, if x ∈ C j ¬ x if ¬ x ∈ C j and x ∈ V sub } = ⇒ ∀ x ∈ E = ⇒ x ∈ C j (7.5) = ⇒ E ⊆ C j as C j is a fully populated clause over V , and V sub ⊆ V ,( ∀ x )( x ∈ V ⇔ x ∈ C j or ¬ x ∈ C j )= ⇒ ∀ x ∈ V sub = ⇒ x ∈ C j or ¬ x ∈ C j = ⇒ ( ∀ x )( x ∈ V sub ⇔ x ∈ E or ¬ x ∈ E )Thus, E is a fully populated clause over V sub .From (7.3) and (7.5),(7.6) ∀ D ∈ P ( C i ) , ∃ E ∈ P ( C j )such that, D and E are fully populated clauses over a common variable set, V sub .(7.7) = ⇒ ( ∀ x )( x ∈ V sub ⇔ x ∈ D or ¬ x ∈ D ⇔ x ∈ E or ¬ x ∈ E )Now, there can be two cases, either D = E or D = E ,Suppose, D = E from (7.5), E ∈ P ( C j ) = ⇒ D ∈ P ( C j )But, given that, D / ∈ P ( C j ) = ⇒ D = E Thus, from (7.7), = ⇒ D and E are two unequal fully populated clauses over acommon variable set, V sub = ⇒ D and E are sibling clauses.Hence, ∀ D ∈ P ( C i ) | D / ∈ P ( C j ) ∃ E ∈ P ( C j )such that, D and E are sibling clauses. . Cardinality of a Boolean formula in CNF. As we know that, a clauseis a set of literals. For a variable x , there are two literals, i.e. x and ¬ x . Let usrepresent each literal as l i . So, for each variable x , there are two literals l and l .For a variable set, V , of n variables, there are 2 n literals. So, a general clause in aboolean formula, F gen can be written in the form, given by, C = { l , l . . . , l n , l n +1 , l n +2 , . . . , l n } where, l i = ( l i null ∀ l i ∈ C As each l i can be selected in two ways, independently, and there are 2 n literals in C . So, using fundamental counting principle, the total number of clauses possible aregiven by, | F gen | = 2 × × × . . . n times = ⇒ | F gen | = 2 n Hence, maximum possible cardinality of a boolean formula in CNF, is 2 n , in-cluding a null clause, φ .
9. Boolean formula in effective CNF.
A boolean formula in CNF, given by, F , is called a boolean formula in effective CNF, if it does not contain a tautologyclause. We can write,(9.1) ∀ C ∈ F = ⇒ C is not a tautology
Or, C is non-tautology clause. As discussed in subsection 5.1 , a tautology clausehas no effect on satisfiability of a CNF. So, for any given boolean formula, if we canidentify tautology clauses, and ignore their existence, we can get an effective CNF.
10. A complete boolean formula.
A boolean formula, F n , containing everypossible non-tautology clause, over a set of variables, V , including null clause, is calleda complete boolean formula. For eg. for variable set, V = { x , x } , the completeboolean formula is given by, F = ( x ∨ x ) ∧ ( x ∨ ¬ x ) ∧ ( ¬ x ∨ x ) ∧ ( ¬ x ∨ ¬ x ) ∧ ( x ) ∧ ( ¬ x ) ∧ ( x ) ∧ ( ¬ x ) ∧ φ where φ is a null clause.In sets notation, it can be written as: F = {{ x , x } , { x , ¬ x } , {¬ x , x } , {¬ x , ¬ x } , { x } , {¬ x } , { x } , {¬ x } , φ } Theorem If F n is a complete boolean formula, over a variable set, V , of n variables, then F n contains n clauses, including a null clause.Proof. Given, that F n is a complete boolean formula, over V , and V contains n variables. = ⇒ | V | = n From the definition of a complete boolean formula, we know that, ∀ C ∈ F n = ⇒ C is a non − tautology clause ⇒ ∀ x ∈ C = ⇒ ¬ x / ∈ C We can write, a general clause in F n as,(10.1) C = ( X , X , X , . . . X n )where, X i = x i ¬ x i nullX i is a variable, which can be assigned the values x i , ¬ x i or null independently. A null value for X i means, the clause C , neither contain x i nor ¬ x i .Now, Each X i can be assigned a value in 3 different ways. By using fundamentalcounting principle, the total number of clauses possible is given by, n ( C ) = 3 × × . . . n times = ⇒ n ( C ) = 3 n Also, there will be a clause in which, X i is assigned null value ∀ X i ∈ C . It will resultin a null clause, given by, φ . Hence, F n contains 3 n clauses, including a null clause. Corollary If F n is a complete boolean formula, over a variable set, V ,with n variables, then, for any given variable x i , n ( x i ) = n ( ¬ x i ) = n ( x i − null ) = 3 n − where, n ( x i ) is number of clauses containing x i , n ( ¬ x i ) is number of clauses containing ¬ x i n ( x i − null ) is number of clauses containing neither x i nor ¬ x i Proof.
As explained in Theorem 10.1, for the given complete boolean formula F n ,with n clauses, we can write a clause in the form, given by,(10.2) C = ( X , X , X , . . . X n )where, X i = x i ¬ x i null Now, suppose, we put X i = x i for some i ∈ [1 , n ] in (10.2), we get, C = ( X , X , X , . . . x i , . . . X n ) C = ( x i , X , X , X , . . . X n )We have assigned the value x i to one of the variables. There are n − x i is given by, n ( x i ) = 3 × × . . . n − timesn ( x i ) = 3 n − imilarily, by assigning X i = ¬ x i and X i = null we find n ( ¬ x i ) = 3 n − and n ( x i − null ) = 3 n − Hence, we get, n ( x i ) = n ( ¬ x i ) = n ( x i − null ) = 3 n − Corollary
A complete boolean formula, F n can be written as: F n = P ( C ) ∪ P ( C ) ∪ · · · ∪ P ( C p ) where { C , C , . . . C p } is set of all poosible fully populated clauses over a set of vari-ables, V .Proof. As explained in Theorem 10.1, for the given complete boolean formula F n ,with n clauses, we can write a clause in the form, given by,(10.3) C = ( X , X , X , . . . X n )where, X i = x i ¬ x i null But, First, if we assign X i = ( x i ¬ x i ∀ X i ∈ C We get a set of all fully populated clauses over V , say F full , given by, F full = { C , C , . . . , C p } Then, we assign, for any C i ∈ F full X i = ( x | x ∈ C i null We get power set of clause C i . By assigning vaues, as above, ∀ C i ∈ F full , we get allpossible clauses over V . Thus, we can write:(10.4) F n = P ( C ) ∪ P ( C ) ∪ · · · ∪ P ( C p )Hence proved. Theorem If P ( C ) is a powerset of C, where C is a fully populated clause,over a variable set, V , with n variables, then, n ( x i ) = n ( x i − null ) = 2 n − ∀ x i ∈ C where, n ( x i ) is number of clauses containing x i , in P ( C ) and n ( x i − null ) is number of clauses not containing x i , in P ( C ) roof. Given that, C is a fully populated clause, over a variable set, V , with n variables, and P ( C ) is a power set of C . Let D ∈ P ( C ). We can write, D , in generalform, D = ( X , X , X . . . X n )where, X i = ( x i x i ∈ Cnull
Now, if we put X i = x i for some i ∈ [1 , n ], we get, D = ( X , X , X . . . x i . . . X n ) D = ( x i , X , X , X . . . X n )We have assigned the value x i to one of the variables. There are n − x i is given by, n ( x i ) = 2 × × . . . ( n − timesn ( x i ) = 2 n − Similarily, by assigning X i = null we find n ( x i − null ) = 2 n − Hence, we get, n ( x i ) = n ( x i − null ) = 2 n − Theorem
If there exists a fully populated clause, C k over V , such that, F = F n \ P ( C k ) where, F n is a complete boolean formula over V , then, F is satisfiable.Proof. Given that, F = F n \ P ( C k )Suppose D is any clause in F , i.e. D ∈ F = ⇒ D ∈ F n \ P ( C k )= ⇒ D ∈ F n | D / ∈ P ( C k )Let F full = { C , C , . . . , C p } is a set of all fully populated clauses over V , thenfrom Corollary 10.3= ⇒ D ∈ P ( C ) ∪ P ( C ) ∪ · · · ∪ P ( C p ) | D / ∈ P ( C k )As, C , C , . . . , C p are unequal fully populated clauses over V , which implies, fromthe definition of sibling clauses, C , C , . . . , C p are sibling clauses, including C k .Let D ∈ P ( C i ), where C i is any clause in F full but C i = C k = ⇒ D ∈ P ( C i ) | D / ∈ P ( C k ) rom Theorem 7.2 ∃ E ∈ P ( C k )such that, D and E are sibling clauses.As D is any clause in F = ⇒ ∀ D ∈ F, ∃ E ∈ P ( C k )such that, D and E are sibling clauses.As, C k is a fully populated clause, so for a valuation, given by, C k = 0( f alse )from Theorem 5.4 ∀ E ⊆ C k = ⇒ E = 0( f alse )= ⇒ ∀ E ∈ P ( C k ) = ⇒ E = 0( f alse )As D and E are sibling clauses, from Theorem 7.1= ⇒ ∀ D ∈ F = ⇒ D = 1( true )for valuation C k = 0( f alse )= ⇒ F is satisfiable. Theorem If F is satisfiable, and F sub ⊆ F , then F sub is satisfiable.Proof. Given that, F sub ⊆ F = ⇒ ∀ C ∈ F sub = ⇒ C ∈ F As F is satisfiable. It implies, there exists a valuation, such that, ∀ D ∈ F = ⇒ D =1( true ) = ⇒ ∀ C ∈ F sub = ⇒ C = 1( true )Hence, F sub is satisfiable. Theorem If F is satisfiable, then, there exists a fully populated clause, C k ,such that, ∀ E ∈ P ( C k ) = ⇒ E / ∈ F Proof.
Given that, F is satisfiable.Now, suppose, for the sake of contradiction, that, there does not exist a fullypopulated clause, C k , such that, ∀ E ∈ P ( C k ) = ⇒ E / ∈ F = ⇒ ∀ C k , ∃ E ∈ P ( C k ) | E ∈ F From Theorem 6.3, for any valuation, to the variable set, V , ∃ C k | C k = 0( f alse )= ⇒ for any valuation, to the variable set, V , in which, C k = 0( f alse ) ∃ E ∈ P ( C k ) | E ∈ FE ∈ P ( C k ) = ⇒ E ⊆ C k , from Theorem 5.4, for any valuation, to the variableset, V , in which, C k = 0( f alse ) = ⇒ E = 0( f alse ) ⇒ for any valuation, to the variable set, V , ∃ E ∈ F | E = 0= ⇒ F is unsatisfiable. Which is a contradiction, so our assumption was wrong.Hence, there exist a fully populated clause, C k , such that, ∀ E ∈ P ( C k ) = ⇒ E / ∈ F Hence proved.
Theorem F issatisfiable, if and only if, there exists a fully populated clause, C k , such that, ∀ E ∈ P ( C k ) = ⇒ E / ∈ F Proof.
Let F is satisfiable, from Theorem 10.7, it implies,(10.5) ∀ E ∈ P ( C k ) = ⇒ E / ∈ F Conversely, Let there exists a fully populated clause, C k , such that, ∀ E ∈ P ( C k ) = ⇒ E / ∈ F Let F n is a complete boolean formula, over V , then we can write, F ⊆ F n \ P ( C k )From Theorem 10.5 and Theorem 10.6, we get, F is satisfiable.Hence, F is satisfiable, if and only if, there exists a fully populated clause, C k ,such that, ∀ E ∈ P ( C k ) = ⇒ E / ∈ F
11. Time complexity of an algorithm to solve boolean satisfiabilityproblem.
Theorem
The time complexity of an algorithm to solve boolean satisfiabilityproblem is O (2 n ) Proof.
The Theorem 10.8 provides us the necessary and sufficient condition forsatisfiability of a boolean formula. Which states that, a boolean formula is satisfiable,iff there exist a fully populated clause, C k , such that, the clause, C k and all it’s subsetsare absent in the given boolean formula.And, for a valuation, in which, C k = 0( f alse ), makes that formula saisfiable. So,an algorithm is not required to check for absence of each subset of C k , individually,as all subsets are related to each other by the results of Theorem 5.4. However, if analgorithm process individual clauses in a given boolean formula, it would require toprocess clauses in the order of 3 n to 2 n in worst case scenarios. But, the existence ofeach fully populated clause is independent of existence of the other clauses. So, anyalgorithm shall require to search for a fully populated clause, C k , from the list of allpossible fully populated clauses for the variable set, V , over which the boolean formulahas been defined. Which implies that, boolean satisfiability problem is basically asearching problem. urther, the input of the satisfiability problem is not mentioned to be in sortedform.[7] However, the algorithm may attempt to sort the input, but it will lead toadditional complexity of O ( m log m ), where m is the number of elements in the list.From Theorem 6.4, we know, that number of fully populated clauses, for a variableset, V , of n variables, is 2 n . Which implies, there will be additional complexity of O (2 n log 2 n ) or O ( n n ). Which implies, it can be solved using linear search only. Andtime complexity of linear search is O ( m ), where m is the number of items in the list.From Theorem 6.4, we know, that number of fully populated clauses, for a variableset, V , of n variables, is 2 n . Which implies, the time complexity of an algorithm tosolve boolean satisfiability problem is O (2 n ). Hence proved.
12. Implications on P vs NP Problem.
In [7] it has been established thatSATISFIABILITY is a NP-complete problem. In Theorem 11.1, it has been provedthat, the time complexity of an algorithm to solve boolean satisfiability problem is O (2 n ), which is not polynomial. Which implies, SAT ISF IABILIT Y / ∈ P From Corollary 1. in [7] = ⇒ P = N P
13. Cardinality Function.
Cardinality function can be used to determine car-dinality of a given boolean formula. It can be used to optimise existing algorithms.For a given boolean formula in CNF, we define a function f ( X, X c ) where, X =( x , x , x , ..., x n ) and X c = ( ¬ x , ¬ x , ¬ x , ..., ¬ x n ), by replacing disjunction withmultiplication and conjuction with addition. For e.g. Let the boolean formula, F , isgiven by,(13.1) F = ( x ∨ x ∨ ¬ x ) ∧ ( ¬ x ∨ x ∨ x )We define the function, f ( X, X c ), given by:(13.2) f ( X, X c ) = ( x x ¬ x ) + ( ¬ x x x )In general, f ( X, X c ) can be defined as:(13.3) f ( X, X c ) = p X i =1 M i ∀ i ∈ [1 , p ]where, p is number of clauses in F and(13.4) M i = Y x j ∀ x j ∈ C i where, C i is i th clause in the given boolean formula, F . It is to be noted that f ( X, X c )is a function on integers, i.e. f : Z → Z The algorithm for f ( X, XC ) for the boolean formula given in (13.1) is givenbelow:
Algorithm 13.1 f ( X, XC ) return ( X [1] ∗ X [2] ∗ XC [3]) + ( XC [1] ∗ X [2] ∗ X [3]) Following algorithm can be used to checktotal number of clauses in F Algorithm 13.2
TotalClauses()Set X:=1, XC=1 return f(X,XC) x i . Following algorithm can beused to check total number of clauses, containing x i in F Algorithm 13.3 n( i )Set T:= T otalClauses ()Set X[i]=0 return
T-f(X,XC) ¬ x i . Following algorithm can beused to check total number of clauses, containing ¬ x i in F Algorithm 13.4 nc( i )Set T:= T otalClauses ()Set XC[i]=0 return
T-f(X,XC) x i or ¬ x i . Following algorithmcan be used to check total number of clauses, containing x i or ¬ x i in F Algorithm 13.5 nxUxi( i )Set T:= T otalClauses ()Set X[i]:=0, XC[i]=0 return
T-f(X,XC) F . The following algorithm can be usedto check existence of tautology clauses, in a given formula, F , in polynomial time. Algorithm 13.6
CheckTautologyClauses()Define i:=0Set i:=1 while i ≤ n doif n ( i ) + nc ( i ) > nxU xi ( i ) thenreturn true end if Update i := i + 1 end whilereturn f alse
4. Optimisations.
Suppose, F n is a complete boolean formula over a variableset, V , and C k is a fully populated clause over V , and F is a boolean formula, suchthat, F = F n \ P ( C k )From Theorem 10.5, = ⇒ F is satisfiable.And, | F | = | F n | − |P ( C k ) | We know that cardinality of a power set of C k is 2 n , where | C k | = n , i.e.(14.1) |P ( C k ) | = 2 n from Theorem 10.1, | F n | = 3 n = ⇒ | F | = 3 n − n and from Corollary 10.2 and Theorem 10.4 ∀ x i ∈ C k = ⇒ n ( x i ) = 3 n − − n − and ∀¬ x i ∈ C k = ⇒ n ( ¬ x i ) = 3 n − − n − where, n ( x i ) is number of clauses containing x i in F , and n ( ¬ x i ) is number of clausescontaining ¬ x i in F .Now, Suppose D is any non-tautology clause over variable set V such that, D / ∈ F ,= ⇒ D / ∈ ( F n \ P ( C k ))But, F n is a complete boolean formula over V ,= ⇒ D ∈ P ( C k )Now, we define a formula F new , such that, F new = F ∧ D It implies, there does not exists a fully populated clause, C k , such that, ∀ D ∈ P ( C k ) = ⇒ D / ∈ F new From Theorem 10.8, = ⇒ F new is unsatisfiable.It implies, inclusion of any non-tautology clause in F , results in unsatisfiableformula.So, for a boolean formula F , in effective CNF, which can be checked using algo-rithm given in subsection 13.5, over a variable set V , of n variables, we have, • If | F | > n − n then F is unsatisfiable. • If ∃ x i ∈ V | min ( n ( x i ) , n ( ¬ x i )) > n − − n − then F is unsatisfiable. • If ∃ x i ∈ V | n ( x i ) ≤ n − − n − < n ( ¬ x i ) then x i = 0, ¬ x i = 1 belong tothe solution, if any. • If ∃ x i ∈ V | n ( ¬ x i ) ≤ n − − n − < n ( x i ) then ¬ x i = 0, x i = 1 belong tothe solution, if any.Suppose, the given boolean formula, F gen , is not in effective CNF, which can bechecked using algorithm given in subsection 13.5, then, from section 8, we know thatmaximum possible cardinality of a general boolean formula in CNF, is 2 n , includinga null clause, φ . Which implies, • If | F gen | > n − n then F gen is unsatisfiable.
5. Conclusion.
A necessary and sufficient condition has been established todetermine satisfiability of a boolean formula in CNF. It has been found that a satis-fiable boolean formula with n variables, can have 3 n − n clauses. This property canbe used to improve encryption algorithms.[1] While, same condtion can be used tooptimise existing algorithms to solve Boolean Satisfiabilty problem, which has appli-cations in automatic theorem proving procedures.[3] REFERENCES[1]
S. Cook , The p versus np problem , 2006.[2]
S. A. Cook , The complexity of theorem-proving procedures , in Proceedings of the Annual ACMSymposium on Theory of Computing, 1971, https://doi.org/10.1145/800157.805047.[3]
M. Davis, G. Logemann, and D. Loveland , A machine program for theorem-proving , Com-mun. ACM, 5 (1962), p. 394–397, https://doi.org/10.1145/368273.368557.[4]
E. Friedgut and appendix by Jean Bourgain , Sharp thresholds of graph properties, and the k -sat problem , Journal of the American Mathematical Society, 12 (1999), https://doi.org/10.1090/S0894-0347-99-00305-7.[5] M. Heule, M. J¨arvisalo, F. Lonsing, M. Seidl, and A. Biere , Clause elimination for satand qsat , Journal of Artificial Intelligence Research, 53 (2015), https://doi.org/10.1613/jair.4694.[6]
T. Jech , Set theory , Springer Science & Business Media, 2013.[7]
R. M. Karp , Reducibility among Combinatorial Problems , in Complexity of Computer Com-putations, 1972, https://doi.org/10.1007/978-1-4684-2001-2 9.[8]
M. W. Moskewicz, C. F. Madigan, Y. Zhao, L. Zhang, and S. Malik , Chaff: Engineeringan efficient sat solver , 2001, https://doi.org/10.1109/dac.2001.935565.[9]
B. Selman, H. Levesque, and D. Mitchell , A new method for solving hard satisfiability prob-lems , in Proceedings of the Tenth National Conference on Artificial Intelligence, AAAI’92,AAAI Press, 1992, pp. 440 – 446.[10]