<<

A new algorithm for Solving 3-CNF-SAT problem Belal Qasemi, University of Bonab, Bonab, Iran [email protected] Abstract NP-Complete problems have an important attribute that if one NP-Complete problem can be solved in polynomial time, all NP-Complete problems will have a polynomial solution. The 3-CNF-SAT problem is a NP-Complete problem and the primary method to solve it checks all values of the truth table. This task is of the Ω(2푛) time order. This paper shows that by changing the viewpoint towards the problem, it is possible to know if a 3-CNF-SAT problem is satisfiable in time 푂(푛10) or not? In this paper, the value of all clauses are considered as false. With this presumption, any of the values inside the truth table can be shown in string form in order to define the set of compatible clauses for each of the strings. So, rather than processing strings, their 푛 clauses will be processed implicating that instead of 2푛 strings, ( ) clauses are to be processed; therefore, the time and space 3 complexity of the algorithm would be polynomial.

Keywords 3-CNF-SAT problem, P versus NP problem, , Computational Complexity, SAT, Boolean Logic

1 Introduction The most compelling reason why theoretical computer scientists believe that P ≠ NP may be the existence of “NP-complete” problems. This class has the surprising property that if any NP-complete problem can be solved in polynomial time, then every problem in NP has a polynomial-time solution, that is, P = NP[1]. Despite years of study on this issue by different researchers, no polynomial- time algorithm has ever been discovered for any NP-complete problem. In this paper, a novel polynomial (in time and space) algorithm is proposed to decide 3-CNF-SAT problem. The class of sat problems was shown to be NP-complete as proven in previous works [2, 3,5, 6]. The goals are to establish lower bounds in complexity, see Meyer and Sotckmeyer in [8] and Meyer in [7]. The literature in this area is rich of very nice surveys, like [4] and [9].

2 Problem definition A formula such as 휑 in Boolean Logic is assumed as satisfiable if there is a valuation v for set of atoms in 휑 so that value(휑) is true. If no such valuation exists, value(휑) is false for any valuation, which means that 휑 is unsatisfiable.

2.1 3-CNF-SAT problem We define 3-CNF-SAT satisfiability using the following terms. A literal in a boolean formula is an occurrence of a variable or its . A boolean formula is in , or CNF, if it is expressed as conjunctions (by AND) of clauses, each of which is the disjunction (by OR) of one or more literals. A boolean formula is in 3-conjunctive normal form, or 3-CNF-SAT, if each clause has exactly three distinct literals. For example, the boolean formula (푥1 ∨ 푥2 ∨ 푥̅3) ∧ (푥1̅ ∨ 푥̅2 ∨ 푥3) ∧ (푥1 ∨ 푥̅2 ∨ 푥3) is in 3-CNF-SAT. The first clause is (푥1 ∨ 푥2 ∨ 푥̅3), which contains the three literals 푥1, 푥2, and 푥̅3. In 3-CNF-SAT, we are asked whether a given boolean formula the φ in 3-CNF-SAT is satisfiable. The following theorem shows that a polynomial-time algorithm that can determine the satisfiability of boolean formulas is unlikely to exist, even when they are expressed in this simple normal form. satisfiability of boolean formulas in 3-conjunctive normal form is NP-complete[3].

2.2 The truth table

According to the for any 3-CNF formula like φ with n variables [ x1, x2, ..., xn ], the truth table can be formed from Table 1 in order to initialize the variables in the given formula using values in one of the rows in truth table(Table 1).

Table 1. The truth table of problem 휑

퐱ퟏ 퐱ퟐ … 퐱퐧 퐯퐚퐥퐮퐞(훗)

풇풂풍풔풆 풇풂풍풔풆 풇풂풍풔풆 푻풓풖풆 푶푹 푭풂풍풔풆

… …

풕풓풖풆 풕풓풖풆 풕풓풖풆 푻풓풖풆 푶푹 푭풂풍풔풆 2.3 Assumption The literals of each clause are sorted based on the positional index in the list of variables.

∀푐푙푎푢푠푒푠 푠푢푐ℎ 푎푠 (푙푖∨푙푗∨푙푘 ) 푖 < 푗 < 푘 and 푙푖 ∈ {푥푖, 푥̅푖}, 푙푗 ∈ {푥푗, 푥푗̅ }, 푙푘 ∈ {푥푘, 푥̅푘} 2.4 Presumption The value of each clause is assumed as false.

∀푐푙푎푢푠푒푠 푠푢푐ℎ 푎푠 (푙푖∨푙푗∨푙푘 ) 푣푎푙푢푒 ((푙푖 ∨ 푙푗 ∨ 푙푘 )) = 푓푎푙푠푒 푠표 푙푖 = 푓푎푙푠푒, 푙푗 = 푓푎푙푠푒, 푙푘 = 푓푎푙푠푒, 푙푖 ∈ {푥푖, 푥̅푖}, 푙푗 ∈ {푥푗, 푥푗̅ }, 푙푘 ∈ {푥푘, 푥̅푘}.

2.5 The table of strings The table of strings is generated from the truth table, which holds the rows and columns of the same size. For each row of the truth table, there is only one equivalent row in the table of strings and vice versa; in fact, the table of strings is a conversion of the truth table(Table 2). Table 2. The strings of 푝푟표푏푙푒푚 휑

풙ퟏ 풙ퟐ … 풙풏 퐯퐚퐥퐮퐞(훗)

풙ퟏ 풙ퟐ … 풙풏 푻풓풖풆 푶푹 푭풂풍풔풆

… …

풙̅ퟏ 풙̅ퟐ … 풙̅풏 푻풓풖풆 푶푹 푭풂풍풔풆

ALGORITHM 1: The method to generating Table 2 based on Table 1 퐟퐨퐫 푖 ← 1 푡표 2푛 퐝퐨 // n is the number of variables 퐟퐨퐫 푗 ← 1 푡표 푛 퐝퐨 퐢퐟 푇푎푏푙푒 1[푖][푗] = 푓푎푙푠푒 퐭퐡퐞퐧 푇푎푏푙푒 2[푖][푗] ← ′푥푖′ ; 퐢퐟 푇푎푏푙푒 1[푖][푗] = 푡푟푢푒 퐭퐡퐞퐧 푇푎푏푙푒 2[푖][푗] ← ′푥̅푖′ ; end end end

Definition 1. Each row in the table of strings contains a string.

LEMMA 1. All strings are unique. PROOF. The Lemma is correct due to the truth table (Table 1).

2

For example for 휑 = (푥1̅ ∨ 푥̅2 ∨ 푥̅3) ∧ (푥̅2 ∨ 푥̅3 ∨ 푥4) ∧ (푥̅2 ∨ 푥̅3 ∨ 푥̅4) ∧ (푥1 ∨ 푥̅2 ∨ 푥5) ∧ (푥̅2 ∨ 푥3 ∨ 푥̅5) ∧ (푥1̅ ∨ 푥̅2 ∨ 푥̅6), truth table and string table of problem φ are in Fig. 1. Definition 2. Clause_Set (w) is said to the set of all clauses resulted from the literals of one string such as w. ALGORITHM 2: The method to generating Clause_Set(w)

//Suppose that w is a string like "푙1푙2푙3 … . 푙푛−1푙푛" and the length of w is equal 푛. 퐶푙푎푢푠푒_푆푒푡(푤) ← 푛푢푙푙 퐟퐨퐫 푖 ← 1 푡표 푛 − 2 퐝퐨 퐟퐨퐫 푗 ← 푖 + 1 푡표 푛 − 1 퐝퐨 퐟퐨퐫 푘 ← 푗 + 1 푡표 푛 퐝퐨 퐶푙푎푢푠푒_푆푒푡(푤) ← 퐶푙푎푢푠푒_푆푒푡(푤) ∪ (푙푖 ∨ 푙푗 ∨ 푙푘) end end end end

3

Fig. 1 : 퐓퐫퐮퐭퐡 퐭퐚퐛퐥퐞 퐚퐧퐝 퐬퐭퐫퐢퐧퐠 퐭퐚퐛퐥퐞 퐨퐟 훗

( ) 푛 LEMMA 2. 푙푒푛푔ℎ푡 표푓 퐶푙푎푢푠푒_푆푒푡 푤 푖푠 푒푞푢푎푙 (3). PROOF. According to the ALGORITHM 2: 푛−2 푛−1 푛 푛−2 푛−1 푛−2 1 lenght of Clause_Set(w) = ∑ ∑ ∑ 1 = ∑ ∑ (푛 − 푗) = ∑ ((푛 − 푖 − 1) − (푛 + 푖) × (푛 − 푗 − 1) 푖=1 푗=푖+1 푘=푗+1 푖=1 푗=푖+1 푖=1 2 푛−2 푛−2 1 푛−2 = 푛2(푛 − 2) − 푛(푛 − 2) − 푛 ∑ 푖 − ((푛2 − 푛)(푛 − 2) − ∑ 푖2 − ∑ 푖) 푖=1 2 푖=1 푖=1 2푛3 − 6푛2 + 4푛 푛3 − 3푛2 + 2푛 푛 = 푛3 − 3푛2 − 2푛 − = = ( ) 6 6 3 ALGORITHM 3: The method to convert a Clause_Set(w) to string w: 푤[푛] ← 푛푢푙푙 푛 퐟퐨퐫 푥 ← 1 푡표 ( ) 퐝퐨 3 퐢퐟 (퐶푙푎푢푠푒_푆푒푡(푤)[푥] = (푙푖 ∨ 푙푗 ∨ 푙푘) 퐭퐡퐞퐧 푤[푖] ← 푙푖; 푤[푗] ← 푙푗; 푤[푘] ← 푙푘; end end

For example: 풘 = "풙ퟏ풙ퟐ풙ퟑ풙̅ퟒ풙ퟓ풙̅ퟔ"

Clause_Set(w) = {(풙ퟏ ∨ 풙ퟐ ∨ 풙ퟑ), (풙ퟏ ∨ 풙ퟐ ∨ 풙̅ퟒ), (풙ퟏ ∨ 풙ퟐ ∨ 풙ퟓ), (풙ퟏ ∨ 풙ퟐ ∨ 풙̅ퟔ), (풙ퟏ ∨ 풙ퟑ ∨ 풙̅ퟒ),

(풙ퟏ ∨ 풙ퟑ ∨ 풙ퟓ), (풙ퟏ ∨ 풙ퟑ ∨ 풙̅ퟔ), (풙ퟏ ∨ 풙̅ퟒ ∨ 풙ퟓ), (풙ퟏ ∨ 풙̅ퟒ ∨ 풙̅ퟔ), (풙ퟏ ∨ 풙ퟓ ∨ 풙̅ퟔ), (풙ퟐ ∨ 풙ퟑ ∨ 풙̅ퟒ),

(풙ퟐ ∨ 풙ퟑ ∨ 풙ퟓ), (풙ퟐ ∨ 풙ퟑ ∨ 풙̅ퟔ), (풙ퟐ ∨ 풙̅ퟒ ∨ 풙ퟓ), (풙ퟐ ∨ 풙̅ퟒ ∨ 풙̅ퟔ), (풙ퟐ ∨ 풙ퟓ ∨ 풙ퟔ), (풙ퟑ ∨ 풙̅ퟒ ∨ 풙ퟓ),

(풙ퟑ ∨ 풙̅ퟒ ∨ 풙̅ퟔ), (풙ퟑ ∨ 풙ퟓ ∨ 풙̅ퟔ), (풙̅ퟒ ∨ 풙ퟓ ∨ 풙̅ퟔ) } LEMMA 3. There is only one Clause_Set for each single string and each Clause_Set belongs to only one string. PROOF. a) The proof by reductio ad absurdum: suppose that for a string such as w there are at least two different Clause_Sets: Clause_Set1 (w) and Clause_Set2 (w) where Clause_Set1 (w) ≠ Clause_Set2 (w). As two Clause_Sets are different, so at least there is one clause which belongs to one of the two Clause_Sets and this is a contradiction because each Clause_Set contains all clauses. Therefore such a clause does not exist b) The proof by reductio ad absurdum: suppose there is a Clause_Set which at least belongs to two strings w1 and w2. According to LEMMA 1, these two strings are mutually different and each string incorporates at least one different literal. Therefore Clause_Set of each of strings contains at least one clause which consists of one different literal implicating that each of the mentioned Clause_Set’s consists of at least one different literal .So Clause_Set1 (w1) ≠ Clause_Set2 (w2) and this is in contradiction with the presumption of the problem. 2.6 The Compatibility of two clauses Two clauses are compatible when they don’t contain mutually conflicting literals but they can have different literals. For example, (푥푖 ∨ 푥푗 ∨ 푥̅푘) and (푥푝 ∨ 푥푞 ∨ 푥푘) are mutually incompatible (becuse 푥푘 ≠ 푥̅푘) and the clauses (푥푖 ∨ 푥푗 ∨ 푥̅푘) and (푥푖 ∨ 푥푞 ∨ 푥푟) are mutually compatible (푖 ≠ 푗 ≠ 푘 ≠ 푝 ≠ 푞 ≠ 푟). LEMMA 4. All clauses of one Clause_Set are compatible with each other. PROOF. According to the definition of Clause_Set all of its clauses don’t have mutually conflicting literals so they are compatible with each other. 푛 LEMMA 5. Each set containing (3) of compatible clauses resulting from n literal 푙1, 푙2, … , 푙푛 form a string.

PROOF. All clauses are formed from literals 푙1, 푙2, … , 푙푛 and they are compatible with each other. So their forming literals can be placed beside each other in one string. 2.7 The clauses of peer group According to the table of strings all strings are in the form as follows. 푛 푤 = "푙1푙2 … 푙푛" , ∀1 푙푖 ∈ {푥푖, 푥̅푖}

4

So the prototype of all Clause_Sets is as below.

퐶푙푎푢푠푒_푆푒푡(푤) = {(푙1 ∨ 푙2 ∨ 푙3), … , (푙푖 ∨ 푙푗 ∨ 푙푘) 푖 < 푗 < 푗, … , (푙푛−2 ∨ 푙푛−1 ∨ 푙푛)} Each of existing clauses in Clause_Set (w) is called the Clause prototype. The set of clauses adherent to one given clause is called the peer group and the number of this set is 8.

For example, the prototype (푙푖 ∨ 푙푗 ∨ 푙푘) has the following clauses:

{ (푥푖˅푥푗˅푥푘) , (푥푖˅푥푗˅푥̅푘) , (푥푖˅푥푗̅ ˅푥푘) , (푥푖˅푥푗̅ ˅푥̅푘) , (푥̅푖˅푥푗˅푥푘) , (푥̅푖˅푥푗˅푥̅푘), (푥̅푖˅푥푗̅ ˅푥푘) , (푥̅푖˅푥푗̅ ˅푥푘) , (푥̅푖˅푥푗̅ ˅푥̅푘) | 1 ≤ 푖 < 푗 < 푘 < 푛 } LEMMA 6. Each clause yields “true “for the values of all its peer-group clauses but for its own value it takes “false”.

PROOF. According to the presumption of the paper the value of each clause is “false” and the clauses of one group have at least one complement literal with each other. The correctness of the LEMMA 6 is proved due to the following table (Table 3).

For example : 푣푎푙푢푒(푐 = (푥푖˅푥푗˅푥푘)) = 푓푎푙푠푒 푡ℎ푒푛 푥푖 = 푓푎푙푠푒 푎푛푑 푥푗 = 푓푎푙푠푒 푎푛푑 푥푘 = 푓푎푙푠푒 Table 3. An example for Lemma 6

peer-group valuation value

(풙풊˅풙풋˅풙풌) (풇풂풍풔풆 ˅ 풇풂풍풔풆 ˅ 풇풂풍풔풆 ) 풇풂풍풔풆

(풙풊˅풙풋˅풙̅풌) (풇풂풍풔풆 ˅ 풇풂풍풔풆 ˅ 풕풓풖풆 ) 풕풓풖풆

(풙풊˅풙̅풋˅풙풌) (풇풂풍풔풆 ˅ 풕풓풖풆 ˅ 풇풂풍풔풆 ) 풕풓풖풆

(풙풊˅풙̅풋˅풙̅풌) (풇풂풍풔풆 ˅ 풕풓풖풆 ˅ 풕풓풖풆 ) 풕풓풖풆

(풙̅풊˅풙풋˅풙풌) (풕풓풖풆 ˅ 풇풂풍풔풆 ˅ 풇풂풍풔풆 ) 풕풓풖풆

(풙̅풊˅풙풋˅풙̅풌) (풕풓풖풆 ˅ 풇풂풍풔풆 ˅ 풕풓풖풆 ) 풕풓풖풆

(풙̅풊˅풙̅풋˅풙풌) (풕풓풖풆 ˅ 풕풓풖풆 ˅ 풇풂풍풔풆 ) 풕풓풖풆

(풙̅풊˅풙̅풋˅풙̅풌) (풕풓풖풆 ˅ 풕풓풖풆 ˅ 풕풓풖풆 ) 풕풓풖풆

The algorithm processes only clauses instead of processing the values of the truth table and the table of strings. In the remainder of the paper, the CM containing all Clause_Sets are discussed. 푛 LEMMA 7. The number of clauses of the problem φ with n variables is 8 × ( ) 3 푛 PROOF. According to the table of strings of the problem φ, the prototype of all strings is 푤 = "푙1푙2 … 푙푛" , ∀1 푙푖 ∈ {푥푖, 푥̅푖}. 푛 Due to LEMMA 2, the number of clauses of one Clause_Set is ( ) and 퐶푙푎푢푠푒_푆푒푡(푤) = {(푙 ∨ 푙 ∨ 푙 ), … , (푙 ∨ 푙 ∨ 푙 ) 푖 < 3 1 2 3 푖 푗 푘 푗 < 푗, … , (푙푛−2 ∨ 푙푛−1 ∨ 푙푛)} So, as each of the existing clause prototypes in Clause_Set (w) can take eight different values, 푛 the number of clauses of the problem is 8 × ( ). 3 3 Data structures 3.1 CM (Clauses Matrix) The Clause Matrix (CM) is a matrix incorporating all resulting clauses from all problem variables and their complements. All resulting clauses from the existing literals in problem are copied to CM. Then the existing clauses in the problem are omitted from the

5

CM as according to the presumption of the paper, the result value of the problem for those clauses would be false. After theis removal, there may be circumstances in which some of the remaining clauses in the CM also should be deleted. If by removal of these clauses, one row of the CM become empty, the result of the problem would be false; otherwise, the presented algorithm in this paper using a data structure named as CDAG, checks the existence of the set of clauses from CM for which the result of the problem for them can be true. If the algorithm is able to create at least one CDAG from the existing clauses in the CM, it implicates that the result of the problem is true. If the algorithm could generate no CDAG, the result of the problem is false. 푛 LEMMA 8. The dimensions of CM is 8 × ( ). 3 PROOF. It is proved according to the LEMMA 7. ALGORITHM 4: The method to generation CM GenerateCM( ) n 푟표푤 ← 1 //1 ≤ row ≤ ( ) 3 퐟퐨퐫 푖 ← 1 푡표 푛 − 2 퐝퐨 퐟퐨퐫 푗 ← 푖 + 1 푡표 푛 − 1 퐝퐨 퐟퐨퐫 푘 ← 푗 + 1 푡표 푛 퐝퐨 퐶푀[푟표푤][1] ← (푥푖 ∨ 푥푘 ∨ 푥푘) 퐶푀[푟표푤][2] ← (푥푖 ∨ 푥푘 ∨ 푥̅푘) 퐶푀[푟표푤][3] ← (푥푖 ∨ 푥̅푘 ∨ 푥푘) 퐶푀[푟표푤][4] ← (푥푖 ∨ 푥̅푘 ∨ 푥̅푘) 퐶푀[푟표푤][5] ← (푥̅푖 ∨ 푥푘 ∨ 푥푘) 퐶푀[푟표푤][6] ← (푥̅푖 ∨ 푥푘 ∨ 푥̅푘) 퐶푀[푟표푤][7] ← (푥̅푖 ∨ 푥̅푘 ∨ 푥푘) 퐶푀[푟표푤][8] ← (푥̅푖 ∨ 푥̅푘 ∨ 푥̅푘) 푖푛푐푟푒푚푒푛푡 푟표푤 ; end end end end

푛−2 푛−1 푛 푛−2 푛−1 푛−2 1 푇(푛) = ∑ ∑ ∑ 1 = ∑ ∑ (푛 − 푗) = ∑ ((푛 − 푖 − 1) − (푛 + 푖) × (푛 − 푗 − 1) 푖=1 푗=푖+1 푘=푗+1 푖=1 푗=푖+1 푖=1 2 푛−2 푛−2 1 푛−2 = 푛2(푛 − 2) − 푛(푛 − 2) − 푛 ∑ 푖 − ((푛2 − 푛)(푛 − 2) − ∑ 푖2 − ∑ 푖) 푖=1 2 푖=1 푖=1 2푛3 − 6푛2 + 4푛 푛3 − 3푛2 + 2푛 = 푛3 − 3푛2 − 2푛 − = = 휃(푛3) 6 6 LEMMA 9. The CM covers 퐶푙푎푢푠푒_푆푒푡s of all strings.

PROOF. All clauses locate in the CM so clauses of Clause_Set of all strings are available in the CM. So, all strings can be extracted from the CM .

ALGORITHM 5:The method to Subtracting 휑 from 퐶푀 푛 퐟퐨퐫 푖 = 1 푡표 ( ) 퐝퐨 3 퐟퐨퐫 푗 = 1 푡표 8 퐝퐨 퐈퐟 퐶푀[푖][푗] ∈ 휑 퐭퐡퐞퐧 퐶푀[푖][푗] ← 푛푢푙푙 end end end

푛 푛3 − 3푛2 + 2푛 푇(푛) = ( ) × 8 = × 8 = 휃(푛3) 3 6

LEMMA 10. For every 3-CNF-SAT expression such as 휑 = 푐1 ∧ … ∧ 푐푚, the value of 휑 푝푒푟 the clauses of 푐푚, … , 푐1 푖푠 푓푎푙푠푒. PROOF. According to the Boolean algebra, the result of expressions containing the ‘and’ operator is false when at least one operand is 푓푎푙푠푒, so based on the convention of paper, the value of all clauses are 푓푎푙푠푒. Hence, for all clauses of 휑 the result value of φ is 푓푎푙푠푒. Based on LEMMA 10 and the paper’s presumption, all clauses of the 휑 are removed from the CM because the value of φ per value of those clauses becomes 푓푎푙푠푒. Note that after subtracting 휑 from 퐶푀 , the peer group

6

clauses of each clause of 휑 problem remain in the CM and due to LEMMA 6 the result of each clause of the 휑 problem per the values of its peer group clauses becomes true. LEMMA 11. When a row from CM becomes empty, the result of the 휑 becomes 푓푎푙푠푒.

PROOF. 1. Based on the generation code of the CM, eight clauses like (푥푖˅푥푗˅푥푘) (푥̅푖˅푥푗˅푥̅푘) (푥̅푖˅푥푗˅푥푘) (푥푖˅푥푗̅ ˅푥̅푘) (푥푖˅푥푗̅ ˅푥푘) (푥푖˅푥푗˅푥̅푘) (푥̅푖˅푥푗̅ ˅푥̅푘) (푥̅푖˅푥푗̅ ˅푥푘) exist in each row of CM. 2. Based on the generation code of the Clause_Set(w), only one of the above-mentioned clauses is available in Clause_Sets of all strings. 3. Based on LEMMA 6 per all above-mentioned clauses, the result of the 휑 becomes 푓푎푙푠푒, so they are removed from the 퐶푀. Based on 1, 2, and 3, the result of φ is false per all strings ̅ REMOVAL LEMMA 1. By removing the clauses of (푙푖˅푙푗˅푙푘) and (푙푖˅푙푗˅푙푘) from the CM, all clauses containing literals 푙푖 푎푛푑 푙푗 become useless and should be removed. 푙푖 ∈ {푥푖, 푥̅푖} , 푙푗 ∈ {푥푗, 푥푗̅ } , 푙푘 ∈ {푥푘, 푥̅푘}. ̅ ̅ ̅ PROOF. According to the literals 푙푘 , 푙푗 , 푙 푖 , 푙푗 , 푙푖 and 푙푘, all strings are partitioned into eight following groups. ̅ ̅ ̅ ̅ ̅ ̅ ̅ ̅ ̅ ̅ ̅ ̅ (푙푖˅푙푗˅푙푘) (푙푖˅푙푗˅푙푘) (푙푖˅푙푗˅푙푘) (푙푖˅푙푗˅푙푘) (푙푖˅푙푗˅푙푘) (푙푖˅푙푗˅푙푘) (푙푖˅푙푗˅푙푘) (푙푖˅푙푗˅푙푘) ̅ All strings consist of n literals with the length of n. By removing (푙푖˅푙푗˅푙푘) and (푙푖˅푙푗˅푙푘), the 퐶푙푎푢푠푒_푆푒푡 of strings containing the literals of 푙푗 and 푙푖 is extracted from the CM so these strings cannot be extracted from the CM because in ̅ the kth place of these strings, none of the literals 푙푘 and 푙푘 appears and their kth place remains empty; hence, this string will not be formed. Obviously, the 푐푙푎푢푠푒푠 containing the literals of 푙푖 푙푗 only locate in the 퐶푙푎푢푠푒_푆푒푡 of these strings. Therefore these 푐푙푎푢푠푒푠 are useless and can be removed from the CM. In the Table 5, the conditions of removing the clauses are tabulated. Table 4. The patterns of removal Lemma 1

removed clauses Literals which make a clause useless

̅ (풍풊˅풍풋˅풍풌) , (풍풊˅풍풋˅풍풌) 풍풊 풍풋

̅ (풍풊˅풍풋˅풍풌) , (풍풊˅풍풋˅풍풌) 풍풊 풍풌

̅ (풍풊˅풍풋˅풍풌) , (풍풊˅풍풋˅풍풌) 풍풋 풍풌

̅ ̅ ̅ ̅ ̅ ̅ ̅ (풍풊˅풍풋˅풍풌) , (풍풊˅풍풋˅풍풌) 풍풋 풍풌

̅ ̅ ̅ ̅ ̅ ̅ ̅ (풍풊˅풍풋˅풍풌) , (풍풊˅풍풋˅풍풌) 풍풊 풍풌

̅ ̅ ̅ ̅ ̅ ̅ ̅ (풍풊˅풍풋˅풍풌) , (풍풊˅풍풋˅풍풌) 풍풊 풍풋

REMOVAL LEMMA 2. By removing the clauses of (푙푖˅푙푗˅푙푘), (푙푖˅푙푗˅푙푘̅ ) , (푙푖˅푙푗̅ ˅푙푘̅ ) and (푙푖˅푙푗̅ ˅푙푘) from the CM, all clauses containing literal 푙푗 become useless and should be removed. ̅ ̅ ̅ PROOF. According to the literals 푙푘 , 푙푗 , 푙 푖 , 푙푗 , 푙푖 and 푙푘, all strings are partitioned ineight following groups. ̅ ̅ ̅ ̅ ̅ ̅ ̅ ̅ ̅ ̅ ̅ ̅ (푙푖˅푙푗˅푙푘) (푙푖˅푙푗˅푙푘) (푙푖˅푙푗˅푙푘) (푙푖˅푙푗˅푙푘) (푙푖˅푙푗˅푙푘) (푙푖˅푙푗˅푙푘) (푙푖˅푙푗˅푙푘) (푙푖˅푙푗˅푙푘) ̅ ̅ ̅ ̅ All strings consist of n literals with the length of n. By removing (푙푖˅푙푗˅푙푘), (푙푖˅푙푗˅푙푘) , (푙푖˅푙푗˅푙푘) and (푙푖˅푙푗˅푙푘), the 퐶푙푎푢푠푒- _푆푒푡 of strings containing the literal 푙푖 does not come out from the CM so these strings cannot be extracted from the CM ̅ ̅ ̅ ̅ because in the kth and jth places of these strings none of the literals 푙푗푙푘 , 푙푗푙푘 , 푙푗푙푘 and 푙푗푙푘 appears and their kth and jth places

7

remains empty. Hence, these strings will not be formed. Obviously, the 푐푙푎푢푠푒푠 containing the literals of 푙푖 only locate in the 퐶푙푎푢푠푒_푆푒푡 of these strings. Therefore, these 푐푙푎푢푠푒푠 are useless and can be removed from the CM. In the Table 6, the removal conditions of REMOVAL LEMMA 2 are tabulated. Table 5. The patterns of removal Lemma 2

removed clauses Literals which make a clause useless

̅ ̅ ̅ ̅ (풍풊˅풍풋˅풍풌) , (풍풊˅풍풋˅풍풌) , (풍풊˅풍풋˅풍풌) , (풍풊˅풍풋˅풍풌) 풍풊

̅ ̅ ̅ ̅ ̅ ̅ ̅ ̅ ̅ (풍풊˅풍풋˅풍풌) , (풍풊˅풍풋˅풍풌) , (풍풊˅풍풋˅풍풌) , (풍풊˅풍풋˅풍풌) 풍풊

̅ ̅ ̅ ̅ (풍풊˅풍풋˅풍풌) , (풍풊˅풍풋˅풍풌) , (풍풊˅풍풋˅풍풌) , (풍풊˅풍풋˅풍풌) 풍풋

̅ ̅ ̅ ̅ ̅ ̅ ̅ ̅ ̅ (풍풊˅풍풋˅풍풌) , (풍풊˅풍풋˅풍풌) , (풍풊˅풍풋˅풍풌) , (풍풊˅풍풋˅풍풌) 풍풋

̅ ̅ ̅ ̅ (풍풊˅풍풋˅풍풌) , (풍풊˅풍풋˅풍풌) , (풍풊˅풍풋˅풍풌) , (풍풊˅풍풋˅풍풌) 풍풌

̅ ̅ ̅ ̅ ̅ ̅ ̅ ̅ ̅̅̅ (풍풊˅풍풋˅풍풌) , (풍풊˅풍풋˅풍풌) , (풍풊˅풍풋˅풍풌) , (풍풊˅풍풋˅풍풌) 풍풌

3.2 PRC (Public Removal Conditions) The PRC is a matrix with the dimensions of 2푛 ∗ 2푛 trueisfying the removal conditions related to the 퐶푀. 푖푓(푃푅퐶[푖, 푖] = 1)

푎푛푦 푐푙푎푢푠푒 ℎ푎푠 푙푖 푖푠 useless , 푙푖 ∈ {푥푖 , 푥̅푖} 푖푓(푃푅퐶[푖, 푗] = 1)

푎푛푦 푐푙푎푢푠푒 ℎ푎푠 푙푖 푎푛푑 푙푗 푖푠 useless , 푙푖 ∈ {푥푖 , 푥̅푖} , 푙푗 ∈ {푥푗 , 푥푗̅ } LEMMA 12. If after removal operation, one row from CM remains empty, then the result of the problem 휑 becomes 푓푎푙푠푒. PROOF. The removal operation deletes those clauses that are the member of the 퐶푙푎푢푠푒_푆푒푡, the equivalent string of which, falsifies the problem 휑. Based on the generation code of the CM, eight clauses exist in each row of this matrix:

(푥푖˅푥푗˅푥푘) (푥̅푖˅푥푗˅푥̅푘) (푥̅푖˅푥푗˅푥푘) (푥푖˅푥푗̅ ˅푥̅푘) (푥푖˅푥푗̅ ˅푥푘) (푥푖˅푥푗˅푥̅푘) (푥̅푖˅푥푗̅ ˅푥̅푘) (푥̅푖˅푥푗̅ ˅푥푘). In Clause_Set of all strings only one of the aforementioned clauses is available. Therefore the removal of all these clauses culminates at the 휑 being 푓푎푙푠푒 per all strings. Hence the result of 휑 is false. LEMMA 13. The result of problem 휑 is true when there exists at least one 퐶푙푎푢푠푒_푆푒푡 in the CM. PROOF. If one 퐶푙푎푢푠푒_푆푒푡 is resulted from the CM, based on LEMMA 6, the result of all 푐푙푎푢푠푒푠 of the problem φ per the values of existing clauses in the outcome Clause_Set are true because these clauses are peer-group with clauses of the problem φ so the result of the problem φ is true. ALGORITHM 6: The method to finding removal conditions 퐅퐢퐧퐝퐑퐞퐦퐨퐯퐚퐥퐂퐨퐧퐝퐢퐭퐢퐨퐧퐬 (퐌퐚퐭퐫퐢퐱[][] 푚푎푡푟푖푥, 퐑퐞퐦퐨퐯퐚퐥퐂퐨퐧퐝퐢퐭퐢퐨퐧퐬[][] 푟푐) 푛푒푤푅푒푚표푣푎푙퐶표푛푑푖푡푖표푛 ← 푓푎푙푠푒 푛 퐟퐨퐫 푖 ← 1 푡표 ( ) 퐝퐨 3 //퐴푠푠푢푚푒 푚푎푡푟푖푥[푖][1] = (푥푝˅푥푞˅푥푟), 푚푎푡푟푖푥[푖][2] = (푥푝˅푥푞˅푥̅푟), //푚푎푡푟푖푥[푖][3] = (푥푝˅푥̅푞˅푥푟), 푚푎푡푟푖푥[푖][4] = (푥푝˅푥̅푞˅푥̅푟), //푚푎푡푟푖푥[푖][5] = (푥̅푝˅푥푞˅푥푟), 푚푎푡푟푖푥[푖][6] = (푥̅푝˅푥푞˅푥̅푟), //푚푎푡푟푖푥[푖][7] = (푥̅푝˅푥̅푞˅푥푟), 푚푎푡푟푖푥[푖][8] = (푥̅푝˅푥̅푞˅푥̅푟), //1 ≤ 푝 < 푞 < 푟 ≤ 푛

8

퐢퐟(푚푎푡푟푖푥[푖][1] = 푛푢푙푙 퐚퐧퐝 푚푎푡푟푖푥[푖][2] = 푛푢푙푙 퐚퐧퐝 푟푐[퐢퐧퐝퐞퐱 (푥푝)][ 퐢퐧퐝퐞퐱 (푥푞)] = 0) 퐭퐡퐞퐧 푟푐[퐢퐧퐝퐞퐱 (푥푝)][ 퐢퐧퐝퐞퐱 (푥푞)] ← 1 푛푒푤푅푒푚표푣푎푙퐶표푛푑푖푡푖표푛 ← 푡푟푢푒 end 퐢퐟(푚푎푡푟푖푥[푖][1] = 푛푢푙푙 퐚퐧퐝 푚푎푡푟푖푥[푖][3] = 푛푢푙푙퐚퐧퐝 푟푐[퐢퐧퐝퐞퐱 (푥푝)][ 퐢퐧퐝퐞퐱 (푥푟)] = 0) 퐭퐡퐞퐧 푟푐[퐢퐧퐝퐞퐱 (푥푝)][ 퐢퐧퐝퐞퐱 (푥푟)] ← 1 푛푒푤푅푒푚표푣푎푙퐶표푛푑푖푡푖표푛 ← 푡푟푢푒 end 퐢퐟(푚푎푡푟푖푥[푖][1] = 푛푢푙푙 퐚퐧퐝 푚푎푡푟푖푥[푖][5] = 푛푢푙푙 퐚퐧퐝 푟푐[퐢퐧퐝퐞퐱 (푥푞)][ 퐢퐧퐝퐞퐱 (푥푟)] = 0) 퐭퐡퐞퐧 푟푐[퐢퐧퐝퐞퐱 (푥푞)][ 퐢퐧퐝퐞퐱 (푥푟)] ← 1 푛푒푤푅푒푚표푣푎푙퐶표푛푑푖푡푖표푛 ← 푡푟푢푒 end 퐢퐟(푚푎푡푟푖푥[푖][2] = 푛푢푙푙 푎퐧퐝 푚푎푡푟푖푥[푖][4] = 푛푢푙푙 퐚퐧퐝 푟푐[퐢퐧퐝퐞퐱 (푥푝)][ 퐢퐧퐝퐞퐱 (푥̅푟)] = 0) 퐭퐡퐞퐧 푟푐[퐢퐧퐝퐞퐱 (푥푝)][ 퐢퐧퐝퐞퐱 (푥̅푟)] ← 1 푛푒푤푅푒푚표푣푎푙퐶표푛푑푖푡푖표푛 ← 푡푟푢푒 end 퐢퐟(푚푎푡푟푖푥[푖][2] = 푛푢푙푙 퐚퐧퐝 푚푎푡푟푖푥[푖][6] = 푛푢푙푙 퐚퐧퐝 푟푐[퐢퐧퐝퐞퐱 (푥푞)][ 퐢퐧퐝퐞퐱 (푥̅푟)] = 0) 푡ℎ푒푛 푟푐[퐢퐧퐝퐞퐱 (푥푞)][ 퐢퐧퐝퐞퐱 (푥̅푟)] ← 1 푛푒푤푅푒푚표푣푎푙퐶표푛푑푖푡푖표푛 ← 푡푟푢푒 end 퐢퐟(푚푎푡푟푖푥[푖][3] = 푛푢푙푙 퐚퐧퐝 푚푎푡푟푖푥[푖][4] = 푛푢푙푙 퐚퐧퐝 푟푐[퐢퐧퐝퐞퐱 (푥푝)][ 퐢퐧퐝퐞퐱 (푥̅푞)] = 0) 퐭퐡퐞퐧 푟푐[퐢퐧퐝퐞퐱 (푥푝)][ 퐢퐧퐝퐞퐱 (푥̅푞)] ← 1 푛푒푤푅푒푚표푣푎푙퐶표푛푑푖푡푖표푛 ← 푡푟푢푒 end 퐢퐟(푚푎푡푟푖푥[푖][3] = 푛푢푙푙 퐚퐧퐝 푚푎푡푟푖푥[푖][7] = 푛푢푙푙 퐚퐧퐝 푟푐[퐢퐧퐝퐞퐱 (푥̅푞)][ 퐢퐧퐝퐞퐱 (푥푟)] = 0) 퐭퐡퐞퐧 푟푐[퐢퐧퐝퐞퐱 (푥̅푞)][ 퐢퐧퐝퐞퐱 (푥푟)] ← 1 푛푒푤푅푒푚표푣푎푙퐶표푛푑푖푡푖표푛 ← 푡푟푢푒 end 퐢퐟(푚푎푡푟푖푥[푖][4] = 푛푢푙푙 퐚퐧퐝 푚푎푡푟푖푥[푖][8] = 푛푢푙푙 퐚퐧퐝 푟푐[퐢퐧퐝퐞퐱 (푥̅푞)][ 퐢퐧퐝퐞퐱 (푥̅푟)] = 0) 퐭퐡퐞퐧 푟푐[퐢퐧퐝퐞퐱 (푥̅푞)][ 퐢퐧퐝퐞퐱 (푥̅푟)] ← 1 푛푒푤푅푒푚표푣푎푙퐶표푛푑푖푡푖표푛 ← 푡푟푢푒 end 퐢퐟(푚푎푡푟푖푥[푖][5] = 푛푢푙푙 퐚퐧퐝 푚푎푡푟푖푥[푖][7] = 푛푢푙푙 퐚퐧퐝 푟푐[퐢퐧퐝퐞퐱 (푥̅푝)][ 퐢퐧퐝퐞퐱 (푥푟)] = 0) 퐭퐡퐞퐧 푟푐[퐢퐧퐝퐞퐱 (푥̅푝)][ 퐢퐧퐝퐞퐱 (푥푟)] ← 1 푛푒푤푅푒푚표푣푎푙퐶표푛푑푖푡푖표푛 ← 푡푟푢푒 end 퐢퐟(푚푎푡푟푖푥[푖][6] = 푛푢푙푙 퐚퐧퐝 푚푎푡푟푖푥[푖][8] = 푛푢푙푙 퐚퐧퐝 푟푐[퐢퐧퐝퐞퐱 (푥̅푝)][ 퐢퐧퐝퐞퐱 (푥̅푟)] = 0) 퐭퐡퐞퐧 푟푐[퐢퐧퐝퐞퐱 (푥̅푝)][ 퐢퐧퐝퐞퐱 (푥̅푟)] ← 1 푛푒푤푅푒푚표푣푎푙퐶표푛푑푖푡푖표푛 ← 푡푟푢푒 end 퐢퐟(푚푎푡푟푖푥[푖][7] = 푛푢푙푙 퐚퐧퐝 푚푎푡푟푖푥[푖][8] = 푛푢푙푙 퐚퐧퐝 푟푐[퐢퐧퐝퐞퐱 (푥̅푝)][ 퐢퐧퐝퐞퐱 (푥̅푞)] = 0) 퐭퐡퐞퐧 푟푐[퐢퐧퐝퐞퐱 (푥̅푝)][ 퐢퐧퐝퐞퐱 (푥̅푞)] ← 1 푛푒푤푅푒푚표푣푎푙퐶표푛푑푖푡푖표푛 ← 푡푟푢푒 end 퐢퐟(푚푎푡푟푖푥[푖][1] = 푛푢푙푙 퐚퐧퐝 푚푎푡푟푖푥[푖][2] = 푛푢푙푙 퐚퐧퐝 푚푎푡푟푖푥[푖][3] = 푛푢푙푙 퐚퐧퐝 푚푎푡푟푖푥[푖][4] = 푛푢푙푙 퐚퐧퐝 푟푐[퐢퐧퐝퐞퐱 (푥푝)][ 퐢퐧퐝퐞퐱 (푥푝)] = 0) 퐭퐡퐞퐧 푟푐[ 퐢퐧퐝퐞퐱 (푥푝)][ 퐢퐧퐝퐞퐱 (푥푝)] ← 1 푛푒푤푅푒푚표푣푎푙퐶표푛푑푖푡푖표푛 ← 푡푟푢푒 end 퐢퐟(푚푎푡푟푖푥[푖][1] = 푛푢푙푙 퐚퐧퐝 푚푎푡푟푖푥[푖][2] = 푛푢푙푙 퐚퐧퐝 푚푎푡푟푖푥[푖][5] = 푛푢푙푙 퐚퐧퐝 푚푎푡푟푖푥[푖][6] = 푛푢푙푙 퐚퐧퐝 푟푐[퐢퐧퐝퐞퐱 (푥푞)][ 퐢퐧퐝퐞퐱 (푥푞)] = 0) 퐭퐡퐞퐧 푟푐[ 퐢퐧퐝퐞퐱 (푥푞)][ 퐢퐧퐝퐞퐱 (푥푞)] ← 1 푛푒푤푅푒푚표푣푎푙퐶표푛푑푖푡푖표푛 ← 푡푟푢푒 end 퐢퐟(푚푎푡푟푖푥[푖][1] = 푛푢푙푙 퐚퐧퐝 푚푎푡푟푖푥[푖][3] = 푛푢푙푙 퐚퐧퐝 푚푎푡푟푖푥[푖][5] = 푛푢푙푙 퐚퐧퐝 푚푎푡푟푖푥[푖][7] = 푛푢푙푙 퐚퐧퐝 푟푐[퐢퐧퐝퐞퐱 (푥푟)][ 퐢퐧퐝퐞퐱 (푥푟)] = 0) 퐭퐡퐞퐧 푟푐[ 퐢퐧퐝퐞퐱 (푥푟)][ 퐢퐧퐝퐞퐱 (푥푟)] ← 1 푛푒푤푅푒푚표푣푎푙퐶표푛푑푖푡푖표푛 ← 푡푟푢푒 end 퐢퐟(푚푎푡푟푖푥[푖][5] = 푛푢푙푙 퐚퐧퐝 푚푎푡푟푖푥[푖][6] = 푛푢푙푙 퐚퐧퐝 푚푎푡푟푖푥[푖][7] = 푛푢푙푙 퐚퐧퐝 푚푎푡푟푖푥[푖][8] = 푛푢푙푙퐚퐧퐝 푟푐[ 퐢퐧퐝퐞퐱 (푥̅푝)][ 퐢퐧퐝퐞퐱 (푥̅푝)] = 0) 퐭퐡퐞퐧

9

푟푐[ 퐢퐧퐝퐞퐱 (푥̅푝)][ 퐢퐧퐝퐞퐱 (푥̅푝)] ← 1 푛푒푤푅푒푚표푣푎푙퐶표푛푑푖푡푖표푛 ← 푡푟푢푒 end 퐢퐟(푚푎푡푟푖푥[푖][3] = 푛푢푙푙 퐚퐧퐝 푚푎푡푟푖푥[푖][4] = 푛푢푙푙 퐚퐧퐝 푚푎푡푟푖푥[푖][7] = 푛푢푙푙 퐚퐧퐝 푚푎푡푟푖푥[푖][8] = 푛푢푙푙 퐚퐧퐝 푟푐[퐢퐧퐝퐞퐱 (푥̅푞)][ 퐢퐧퐝퐞퐱 (푥̅푞)] = 0) 퐭퐡퐞퐧 푟푐[ 퐢퐧퐝퐞퐱 (푥̅푞)][ 퐢퐧퐝퐞퐱 (푥̅푞)] ← 1 푛푒푤푅푒푚표푣푎푙퐶표푛푑푖푡푖표푛 ← 푡푟푢푒 end 퐢퐟(푚푎푡푟푖푥[푖][2] = 푛푢푙푙 퐚퐧퐝 푚푎푡푟푖푥[푖][4] = 푛푢푙푙 퐚퐧퐝 푚푎푡푟푖푥[푖][6] = 푛푢푙푙 퐚퐧퐝 푚푎푡푟푖푥[푖][8] = 푛푢푙푙 퐚퐧퐝 푟푐[퐢퐧퐝퐞퐱 (푥푝)][ 퐢퐧퐝퐞퐱 (푥푞)] = 0) 퐭퐡퐞퐧 푟푐[ 퐢퐧퐝퐞퐱 (푥̅푟)][ 퐢퐧퐝퐞퐱 (푥̅푟)] ← 1 푛푒푤푅푒푚표푣푎푙퐶표푛푑푖푡푖표푛 ← 푡푟푢푒 end 퐞퐧퐝 // end of for 퐑퐞퐭퐮퐫퐧 푛푒푤푅푒푚표푣푎푙퐶표푛푑푖푡푖표푛 퐞퐧퐝 //end of algorithm

(푛) 3 2 3 푛 푛 − 3푛 + 2푛 푇(푛) = ∑ 17 = 17 × ( ) = 17 × = 휃(푛3) 1 3 6 ALGORITHM 7: The method to finding index of a literal in Removal condition matrix

퐢퐧퐝퐞퐱 (퐥퐢퐭퐞퐫퐚퐥 푙푖) 퐢퐟 ( 푙푖 = 푥푖) 퐭퐡퐞퐧 푟푒푡푢푟푛 2 × 푖 − 1 퐞퐥퐬퐞 퐢퐟 (푙푖 = 푥̅푖) 퐭퐡퐞퐧 퐫퐞퐭퐮퐫퐧 2 × 푖 퐞퐧퐝

ALGORITHM 8: The method to garbage collection 퐆퐚퐫퐛퐚퐠퐞 퐜퐨퐥퐥퐞퐜퐭퐢퐨퐧(퐌퐚퐭퐫퐢퐱[][] 푚푎푡푟푖푥, 퐑퐞퐦퐨퐯퐚퐥퐂퐨퐧퐝퐢퐭퐢퐨퐧퐬[][] 푟푐) 퐟퐨퐫퐞퐚퐜퐡 퐶푙푎푢푠푒 푐 퐢퐧 푚푎푡푟푖푥 퐢퐟(푐 푖푛푐푙푢푑푒푠 푅푒푚표푣푎푙 푐표푛푑푖푡푖표푛) 퐭퐡퐞퐧 푅푒푚표푣푒 푐 푓푟표푚 푚푎푡푟푖푥 // matrix[i][j] ← null 푛푒푤푅푒푚표푣푎푙퐶표푛푑푖푡푖표푛 ← 퐅퐢퐧퐝퐑퐞퐦퐨퐯퐚퐥퐂퐨퐧퐝퐢퐭퐢퐨퐧퐬(푚푎푡푟푖푥, 푟푐) 퐢퐟 ( 푛푒푤푅푒푚표푣푎푙퐶표푛푑푖푡푖표푛 = 푡푟푢푒) 퐭퐡퐞퐧 퐆퐚퐫퐛퐚퐠퐞 퐜퐨퐥퐥퐞퐜퐭퐢퐨퐧(푚푎푡푟푖푥, 푟푐) 퐞퐥퐬퐞 퐢퐟( 푛푒푤푅푒푚표푣푎푙퐶표푛푑푖푡푖표푛 = 푓푎푙푠푒) 퐭퐡퐞퐧 퐞퐱퐢퐭퐞 end // end of algorithm

n n3 − 3n2 + 2n T(n) = all removal conditions × all clauses in matrix = (2 × n)2 × 8 × ( ) = 4n2 × 8 × = O(n5) 3 6

ALGORITHM 9: The method to checking matrix 퐌퐚퐭퐫퐢퐱퐈퐬퐕퐚퐥퐢퐝(퐌퐚퐭퐫퐢퐱[][] 푚푎푡푟푖푥) 퐟퐨퐫퐞퐚퐜퐡 푅표푤 푙푖푘푒 푟표푤 퐢퐧 푚푎푡푟푖푥 퐢퐟(푚푎푡푟푖푥[푟표푤][] 푖푠 푒푚푝푡푦) 퐭퐡퐞퐧 퐑퐞퐭퐮퐫퐧 푓푎푙푠푒 퐞퐧퐝 퐑퐞퐭퐮퐫퐧 푡푟푢푒 퐞퐧퐝

n n3 − 3n2 + 2n T(n) = The number of rows of the matrix = ( ) = = O(n3) 3 6 3.3 CDAG (Clauses Directed Acyclic Graph(

10

After subtracting φ from the CM, those clauses that make φ false as well as useless Clauses are removed from the CM. Based on LEMMA 13, if at least one Clause_Set results from CM, the result value of the problem φ is true. The suggested algorithm uses the CDAG data structure in order to check the existence or absence of 퐶푙푎푢푠푒_푆푒푡 in the CM. The root of the CDAG is equal to one of the 푐푙푎푢푠푒푠 of the first row in the CM. Due to the number of the 푐푙푎푢푠푒푠 in the first row of the CM, at least eight the CDAG’s can be created for the problem 휑 .In the following part, we will prove that if at least one the CDAG is successfully generated, the result of the problem 휑 is true. 3.3.1 The structure of CDAG The CDAG is a directed acyclic graph which is implemented by a doubly linked list. The CDAG’s nodes contain one 푐푙푎푢푠푒 and two 푛 links of left and right for the left and right children. The CDAG consists of ( ) columns with at least one node and at most eight nodes. 3 In the first column of the CDAG, a node exists with the name of “root” which contains one 푐푙푎푢푠푒 from the first row of the CM. In the 푛 last column of the CDAG, two leaves exist at most. The nodes of the CDAG’s kth column (1 ≤ 푘 < ( )) have at least one and at most 3 two chilren in k+1th column except for the leaves which have no children.

When there is an edge between two nodes containing 푐1 and 푐2, it means that the 푐푙푎푢푠푒푠 of 푐1 and 푐2 are compatible.

Each the CDAG incorporates n-3 sections as 푙푛, 푙푛−1, … , 푙5, 푙4 (see Fig. 2).

The section 푙푖 consists of (푛 − 2 − 푖) subsections 푙푖푙푛, 푙푖푙푛−1, … , 푙푖푙푖+1 .There exist at least one and at most four edges between two sections 푙푝 and 푙푞, ; and due to the REMOVAL LEMMA 1 in the columns where the 푐푙푎푢푠푒푠 related to 푙푝 and 푙푞 exist, the combination of 푙푝푙푞would also exist. The literal 푙푖 exits in the 푐푙푎푢푠푒푠 of sections 4… , but it does not exist in sections 푖 + 1, … , 푛 .

Fig. 2. Sections of CDAG

Fig. 3. Section 풍풏

11

Fig. 4. Section 풍풊

Fig. 5. Begining of section 풍풊

12

Fig. 6. End of section 풍풊

Fig. 7. Subsection 풍풊풍풋

13

Section 푙푖 consists of all 푐푙푎푢푠푒푠 containing 푥푖 and 푥̅푖, so this section is divided into two separate sets of 푥푖 and 푥̅푖 . In 푥푖, the set of 푐푙푎푢푠푒푠 containing 푥푖 is locate and in the 푥̅푖,set the 푐푙푎푢푠푒푠 containing 푥̅푖. In section 푙푖, at least one of the 푥푖 and 푥̅푖 sections exist. Each column of the CDAG relates to the clauses of one group such as (푙푖 ∨ 푙푗 ∨ 푙푘) where: ( 1 ≤ 푖 < 푗 < 푘 ≤ 푛) 푎푛푑 푙푖 ∈ {푥푖, 푥̅푖} , 푙푗 ∈ {푥푗, 푥푗̅ }, 푙푘 ∈ {푥푘, 푥̅푘}.

LEMMA 14. If in the CDAG, the variables 푥푝 and 푥̅푝 exist, in the columns containing the clauses related to the literal 푙푝 (푙푝 ∈ {푥푝, 푥̅푝}) , 푡ℎ푒 푐푙푎푢푠푒푠 containing the variables of 푥푝 and 푥̅푝 would definitely exist.

PROOF. It is true due to the REMOVAL LEMMA 2.

LEMMA 15. If in the CDAG, the combination of 푥푝푥푞 exists then in the columns related to the literals containing the combination of 푙푝푙푞 (푙푝 ∈ {푥푝, 푥̅푝}, 푙푞 ∈ {푥푞, 푥̅푞}) 푡ℎ푒 푐푙푎푢푠푒푠 containing the combination of xpxq would definitely exist.

PROOF. It is true due to the REMOVAL LEMMA 1. 3.3.2 SM (Source Matrix), LRC (Local Removal Conditions) For generating the CDAG, two data structures of LRC and SM are required. 3.3.2.1 SM The SM is a matrix with the same size of the CM containing all of its clauses. which can be used in the construction of the CDAG. The initialization of SM works as follows: ALGORITHM 10: The method to generating SM 퐆퐞퐧퐞퐫퐚퐭퐢퐧퐠퐒퐌(퐢퐧퐭퐞퐠퐞퐫 푐표푙푢푚푛) 푆푀[1][푐표푙푢푚푛] ← 퐶푀[1][푐표푙푢푚푛] 푛 퐟퐨퐫 푖 = 2 푡표 ( ) 퐝퐨 3 퐟퐨퐫 푗 = 1 푡표 8 퐝퐨 퐢퐟(퐶푀[푖][푗] ≠ 푛푢푙푙 퐚퐧퐝 퐶푀[1][푐표푙푢푚푛] 퐚퐧퐝 퐶푀[푖][푗] 푎푟푒 푐표푚푝푎푡푖푏푙푒 ) 퐭퐡퐞퐧 푆푀[푖][푗] ← 퐶푀[푖][푗] 퐞퐧퐝 // end of for(i) 퐢퐟(퐌퐚퐭퐫퐢퐱퐈퐬퐕퐚퐥퐢퐝(푆푀) = 푡푟푢푒) 퐭퐡퐞퐧 푛푒푤푅푒푚표푣푎푙퐶표푛푑푖푡푖표푛 ← 퐅퐢퐧퐝퐑퐞퐦퐨퐯퐚퐥퐂퐨퐧퐝퐢퐭퐢퐨퐧퐬(푆푀, 퐿푅퐶) 퐢퐟(푛푒푤푅푒푚표푣푎푙퐶표푛푑푖푡푖표푛 = 푡푟푢푒) 퐭퐡퐞퐧 퐆퐚퐫퐛퐚퐠퐞 퐜퐨퐥퐥퐞퐜퐭퐢퐨퐧(푆푀, 퐿푅퐶) 퐞퐥퐬퐞 퐢퐟(푛푒푤푅푒푚표푣푎푙퐶표푛푑푖푡푖표푛 = 푓푎푙푠푒) 퐭퐡퐞퐧 exite 퐞퐧퐝 // end of if (MatrixIsValid) 퐞퐥퐬퐞 퐢퐟(퐌퐚퐭퐫퐢퐱퐈퐬퐕퐚퐥퐢퐝(푆푀) = 푓푎푙푠푒) 퐭퐡퐞퐧 exite 퐞퐧퐝 // end of algorithm

n n3 − 3n2 + 2n T(n) = 8 × ( ) + O(n5) = 8 × + O(n5) = O(n5) 3 6 3.3.2.2 LRC The LRC is a data structure in PRC dimensions containing all the CDAG removal conditions. The LRC is initialized by the PRC values. The initialization of LRC works as follows: ALGORITHM 11: The method to generating LRC 퐆퐞퐧퐞퐫퐚퐭퐢퐧퐠퐋퐑퐂() 퐿푅퐶[2푛][2푛] ← 푃푅퐶 퐅퐢퐧퐝퐑퐞퐦퐨퐯퐚퐥퐂퐨퐧퐝퐢퐭퐢퐨퐧퐬 (푆푀, 퐿푅퐶) 퐞퐧퐝

T(n) = (2n)2 = O(n2) The construction of CDAG:

In the first stage, the root of the CDAG is selected among existing clauses of the first row. Assume that 푐 = (푥1 ∨ 푥2 ∨ 푥3) is selected.By choosing the root, new conditions of removal emerge and these conditions are entered into the LRC. Then, all compatible

14

clauses with the root inside the CM, which lack removal requirements are entered into the SM. In case of the birth of any new removal condition, that new condition is entered into the LRC. If a row from the SM is not empty, the construction of CDAG goes on as below:

The construction of the CDAG is done in stage 푛 − 4. The CDAG generated in stage i (4 ≤ 푖 ≤ 푛), is named 퐶퐷퐴퐺푖 .In stage i, two clauses of 푐 = (푥1 ∨ 푥2 ∨ 푥푖) 푎푛푑 푐̅ = (푥1 ∨ 푥2 ∨ 푥̅푖) are inserted into the CDAG given that they are available in the SM.

CDAG1 ⃪ CDAGi , CDAG2 ⃪ CDAGi

“c” is inserted into the CDAG1 and “푐” ” is inserted to CDAG2 .

The method of inserting c to the 퐂퐃퐀퐆ퟏ: The CDAG1 is scanned from the first column to the last one. In column 푖 (CDAG1. Length ≥ i ≥ 1), the combination of c with the clauses of the nodes of that column is orderly computed and for each combination, it is checked if that combination is compatible with the CDAG1 or not. and also if it has no removal condition. Then, all resulted clauses from that combination are attached to the combined node. If c is not added to any one of the nodes in the ith column, c is not added to the CDAG1.

ALGORITHM 12: The method to insert clause c to CDAG1

퐈퐧퐬퐞퐫퐭퐓퐨퐂퐃퐀퐆퐜(퐜퐥퐚퐮퐬퐞 푐, 퐂퐃퐀퐆 퐶퐷퐴퐺1) 푐표푢푛푡 ← 퐶퐷퐴퐺1. 푙푒푛푔푡ℎ 퐴 ← 퐶퐷퐴퐺1. 푟표표푡 퐰퐡퐢퐥퐞(퐴 ≠ 푛푢푙푙 퐚퐧퐝 푐표푢푛푡 > 0) 퐝퐨 퐵 ← 푛푢푙푙 퐟퐨퐫 푖 ← 1 푡표 퐴. 푙푒푛푔푡ℎ 퐝퐨 퐷 ← {푎푙푙 푙푖푡푡푟푎푙푠 표푓 퐴[푖]. 푐푙푎푢푠푒} ∪ {푎푙푙 푙푖푡푡푟푎푙푠 표푓 푐} 퐒퐨퐫퐭(퐷) 퐢퐟(퐂퐨퐦퐩퐚퐭퐢퐛퐥퐞퐃퐰퐢퐭퐡퐂퐃퐀퐆(퐷, 퐶퐷퐴퐺1, 퐴[푖]) = 푡푟푢푒) 퐭퐡퐞퐧 퐿푖푠푡 ← 퐋퐢퐬퐭퐂퐥퐚퐮퐬퐞퐬퐎퐟퐃(퐷) 퐵 ← 퐵 ∪ 퐴[푖]. 푙푒푓푡 퐵 ← 퐵 ∪ 퐴[푖]. 푟푖푔ℎ푡 푡 ← 퐴[푖]. 푙푒푓푡 푠 ← 퐴[푖]. 푟푖푔ℎ푡 푟 ← 퐴[푖] 퐟퐨퐫 푗 ← 1 푡표 퐿푖푠푡. 푙푒푛푔ℎ푡 퐝퐨 퐢퐟(퐿푖푠푡[푗] ∉ 푆푀) th퐞퐧 Return false 퐢퐟(퐿푖푠푡[푗] ∉ 퐶퐷퐴퐺1) th퐞퐧 푟. 푙푒푓푡 ← 퐿푖푠푡[푗] 푟 ← 푟. 푙푒푓푡 퐞퐧퐝 퐞퐧퐝 // end of for(j) 푟. 푙푒푓푡 ← 푡 푟. 푟푖푔ℎ푡 ← 푠 퐞퐧퐝 퐞퐧퐝 퐴 ← 퐵 퐷푒푐푟푖푚푒푛푡 퐶표푢푛푡 퐞퐧퐝 // end of for end // end of while(퐴 ≠ 푛푢푙푙 and 푐표푢푛푡 > 0) 퐢퐟(푐표푢푛푡 > 0) 퐭퐡퐞퐧 퐑퐞퐭퐮퐫퐧 푓푎푙푠푒 퐞퐥퐬퐞 퐢퐟 (푐표푢푛푡 = 0) 퐭퐡퐞퐧 퐑퐞퐭퐮퐫퐧 푡푟푢푒 퐞퐧퐝 // end of InsertToCDAGc

T(n) = length of CDAG × T(n)of CompatibleDwithCDAG = O(n3) × O(n3) = O(n6)

The method of inserting 풄̅ to the 퐂퐃퐀퐆ퟐ: The CDAG2 is scanned from the first column to the last one. In column 푖 (CDAG2. Length ≥ i ≥ 1), the combination of 푐̅ with the clauses of the nodes of that column is orderly computed and for each combination, it is checked if that combination is compatible with the CDAG2 or not. and also if it has no removal condition. Then, all resulted clauses from that combination are attached to the combined node. If 푐̅ is not added to any one of the nodes in the ith column, 푐̅ is not added to the CDAG2.

ALGORITHM 13: The method to insert clause 푐̅ to 퐶퐷퐴퐺2

퐈퐧퐬퐞퐫퐭퐓퐨퐂퐃퐀퐆퐜̅(퐜퐥퐚퐮퐬퐞 푐̅, 퐂퐃퐀퐆 퐶퐷퐴퐺2) 푐표푢푛푡 ← 퐶퐷퐴퐺2. 푙푒푛푔푡ℎ

15

퐴 ← 퐶퐷퐴퐺2. 푟표표푡 퐰퐡퐢퐥퐞(퐴 ≠ 푛푢푙푙 퐚퐧퐝 푐표푢푛푡 > 0) 퐝퐨 퐵 ← 푛푢푙푙 퐟퐨퐫 푖 ← 1 푡표 퐴. 푙푒푛푔푡ℎ 퐝퐨 퐷 ← {푎푙푙 푙푖푡푡푟푎푙푠 표푓 퐴[푖]. 푐푙푎푢푠푒} ∪ {푎푙푙 푙푖푡푡푟푎푙푠 표푓 푐} 퐒퐨퐫퐭(퐷) 퐢퐟(퐂퐨퐦퐩퐚퐭퐢퐛퐥퐞퐃퐰퐢퐭퐡퐂퐃퐀퐆(퐷, 퐶퐷퐴퐺2, 퐴[푖]) = 푡푟푢푒) 퐭퐡퐞퐧 퐿푖푠푡 ← 퐋퐢퐬퐭퐂퐥퐚퐮퐬퐞퐬퐎퐟퐃(퐷) 퐵 ← 퐵 ∪ 퐴[푖]. 푙푒푓푡 퐵 ← 퐵 ∪ 퐴[푖]. 푟푖푔ℎ푡 푡 ← 퐴[푖]. 푙푒푓푡 푠 ← 퐴[푖]. 푟푖푔ℎ푡 푟 ← 퐴[푖] 퐟퐨퐫 푗 ← 1 푡표 퐿푖푠푡. 푙푒푛푔ℎ푡 퐝퐨 퐢퐟(퐿푖푠푡[푗] ∉ 푆푀) th퐞퐧 Return false 퐢퐟(퐿푖푠푡[푗] ∉ 퐶퐷퐴퐺2) 퐭퐡퐞퐧 푟. 푟푖푔ℎ푡 ← 퐿푖푠푡[푗] 푟 ← 푟. 푟푖푔ℎ푡 퐞퐧퐝 퐞퐧퐝 // end of for(j) 푟. 푙푒푓푡 ← 푡 푟. 푟푖푔ℎ푡 ← 푠 퐞퐧퐝 퐞퐧퐝 퐴 ← 퐵 퐷푒푐푟푖푚푒푛푡 퐶표푢푛푡 퐞퐧퐝 // end of for end // end of while(퐴 ≠ 푛푢푙푙 and 푐표푢푛푡 > 0) 퐢퐟(푐표푢푛푡 > 0) 퐭퐡퐞퐧 퐑퐞퐭퐮퐫퐧 푓푎푙푠푒 퐞퐥퐬퐞 퐢퐟 (푐표푢푛푡 = 0) 퐭퐡퐞퐧 퐑퐞퐭퐮퐫퐧 푡푟푢푒 퐞퐧퐝 // end of InsertToCDAGc̅

T(n) = length of CDAG × T(n) of CompatibleDwithCDAG = O(n3) × O(n3) = O(n6)

ALGORITHM 14: The method of compatibility check for D and the CDAG 퐂퐨퐦퐩퐚퐭퐢퐛퐥퐞퐃퐰퐢퐭퐡퐂퐃퐀퐆(퐥퐢퐭퐭퐫퐚퐥 퐷[], 퐂퐃퐀퐆 푐푑푎푔, 퐍퐨퐝퐞 푐푢푟푟푒푛푡푁표푑푒) 푃 ← 퐶푑푎푔. 푟표표푡 퐖퐡퐢퐥퐞(퐷 푑표푒푠 푛표푡 ℎ푎푣푒 푎푛푦 푟푒푚표푣푎푙 푐표푛푑푖푡푖표푛 퐚퐧퐝 푐푢푟푟푒푛푡푁표푑푒 ∉ 푃 퐚퐧퐝 푃 ≠ 푛푢푙푙) 퐝퐨 푄 ← 푛푢푙푙 퐟퐨퐫 푖 ← 1 푡표 푃. 푙푒푛푔푡ℎ 퐝퐨 퐢퐟(퐷 퐚퐧퐝 푃[푖]. 푐푙푎푢푠푒푠 푎푟푒 푐표푚푝푎푡푖푏푙푒) 퐭퐡퐞퐧 푄 ← 푄 ∪ 푃[푖]. 푙푒푓푡 푄 ← 푄 ∪ 푃[푖]. 푟푖푔ℎ푡 퐞퐧퐝 퐞퐧퐝 푃 ← 푛푢푙푙 푃 ← 푄 퐞퐧퐝 // end of while 퐢퐟(푐푢푟푟푒푛푡푁표푑푒 ∈ 푃) 퐭퐡퐞퐧 퐑퐞퐭퐮퐫퐧 푡푟푢푒 퐞퐥퐬퐞 퐑퐞퐭퐮퐫퐧 푓푎푙푠푒 퐞퐧퐝 // end of CompatibleDwithCDAG

n n3 − 3n2 + 2n T(n) = length of CDAG = ( ) = = O(n3) 3 6

16

ALGORITHM 15: The method to generating list of clauses of D 퐋퐢퐬퐭퐂퐥퐚퐮퐬퐞퐬퐎퐟퐃(퐥퐢퐭퐞퐫퐚퐥 퐷[]) 퐿푖푠푡 ← 푛푢푙푙 퐟퐨퐫 푖 ← 1 푡표 퐷. 푙푒푛푔푡ℎ − 2 퐝퐨 퐟퐨퐫 푗 ← 푖 + 1 푡표 퐷. 푙푒푛푔푡ℎ − 1 퐝퐨 퐟퐨퐫 푘 ← 푗 + 1 푡표 퐷. 푙푒푛푔푡ℎ 퐝퐨 푙푖푠푡 ← 푙푖푠푡 ∪ (푙푖˅푙푗˅푙푘 )//푙푖, 푙푗, 푙푘 ∈ 퐷 퐑퐞퐭퐮퐫퐧 푙푖푠푡 퐞퐧퐝

3 2 퐷.푙푒푛𝑔푡ℎ−2 퐷.푙푒푛𝑔푡ℎ−1 퐷.푙푒푛𝑔푡ℎ 퐷. 푙푒푛푔푡ℎ − 3퐷. 푙푒푛푔푡ℎ + 2퐷. 푙푒푛푔푡ℎ 퐷.푙푒푛𝑔푡ℎ≤6 6 T(n) = ∑ ∑ ∑ 1 = ⇒ 푇(푛) ≤ ( ) = O(1) 푖=1 푗=푖+1 푘=푗+1 6 3

After inserting “c” into the CDAG1 and “푐̅” into the CDAG2 , CDAGi is generated as follows:

CDAGi ← Merg( CDAG1 , CDAG2)

ALGORITHM 16: The method to merging CDAG1 and CDAG2

퐌퐞퐫퐠퐞(퐂퐃퐀퐆 퐶퐷퐴퐺1, 퐂퐃퐀퐆 퐶퐷퐴퐺2) //if n ∈ CDAG1 and m ∈ CDAG2 and n. cluse = m. cluse, then m = n. 퐢퐟(퐶퐷퐴퐺1 ≠ 푛푢푙푙 퐚퐧퐝 퐶퐷퐴퐺2 = 푛푢푙푙) 퐭퐡퐞퐧 퐑퐞퐭퐮퐫퐧 퐶퐷퐴퐺1 퐞퐥퐬퐞 퐢퐟(퐶퐷퐴퐺1 = 푛푢푙푙 퐚퐧퐝 퐶퐷퐴퐺2 ≠ 푛푢푙푙) 퐭퐡퐞퐧 퐑퐞퐭퐮퐫퐧 퐶퐷퐴퐺2 퐞퐥퐬퐞 퐢퐟(퐶퐷퐴퐺1 ≠ 푛푢푙푙 퐚퐧퐝 퐶퐷퐴퐺2 ≠ 푛푢푙푙) 퐭퐡퐞퐧 퐴 ← 퐶퐷퐴퐺1. 푟표표푡 퐵 ← 퐶퐷퐴퐺2. 푟표표푡 퐶푑푎푔. 푟표표푡 ← 퐶퐷퐴퐺1. 푟표표푡 푃 ← 퐴 ∪ 퐵 퐰퐡퐢퐥퐞(푃 ≠ 푛푢푙푙) 퐝퐨 푄 ← 푛푢푙푙 퐶 ← 푛푢푙푙 퐷 ← 푛푢푙푙 퐟퐨퐫 푖 ← 1 푡표 퐴. 푙푒푛푔푡ℎ 퐝퐨 퐶 ← 퐶 ∪ 퐴[푖]. 푙푒푓푡 ∪ 퐴[푖]. 푟푖푔ℎ푡 // A navigates the 퐶퐷퐴퐺1 퐟퐨퐫 푗 ← 1 푡표 퐵. 푙푒푛푔푡ℎ 퐝퐨 퐷 ← 퐷 ∪ 퐵[푗]. 푙푒푓푡 ∪ 퐵[푗]. 푟푖푔ℎ푡 //B navigates the 퐶퐷퐴퐺2 푄 ← 퐶 ∪ 퐷 퐢퐟(푄 ≠ 푛푢푙푙) 퐭퐡퐞퐧 퐟퐨퐫 푖 ← 1 푡표 푄. 푙푒푛푔푡ℎ 퐝퐨 퐶푑푎푔. 푎푑푑(푄[푖]) 퐟퐨퐫 푗 ← 1 푡표 푃. 푙푒푛푔푡ℎ 퐝퐨 푃[푗]. 푙푒푓푡 ← 퐴[푗]. 푙푒푓푡 ∪ 퐵[푗]. 푙푒푓푡 푃[푗]. 푟푖푔ℎ푡 ← 퐴[푗]. 푟푖푔ℎ푡 ∪ 퐵[푗]. 푟푖푔ℎ푡 퐞퐧퐝 // end of for(j) 퐞퐧퐝 // end of if 퐴 ← 퐶 퐵 ← 퐷 푃 ← 푄 퐞퐧퐝//end of while 퐞퐧퐝 // end of else if 퐑퐞퐭퐮퐫퐧 퐶푑푎푔 퐞퐧퐝

n n3−3n2+2n T(n) = length of CDAG = ( ) = = O(n3) 3 6

17

If none of the clauses “c” and “푐̅” is added to the CDAGi, the construction of the CDAGi fails and the existing clause in the root of the CDAG is removed from the CM and in case of observing any new removal condition, this condition is added into the PRC and then CM is updated. After the creation of the CDAGi, Any garbage will be removed from CDAGi by the Garbage collection method. The nodes without children are removed from the CDAGi (except for leaves). If during garbage removal, any new removal condition is seen, it is entered into the LRC. The removal conditions are applied to the SM and the 퐶퐷퐴퐺푖. ALGORITHM 17: The method to garbaging collection from CDAGi 퐆퐚퐫퐛퐚퐠퐞퐂퐨퐥퐥퐞퐜퐭퐢퐨퐧퐂퐃퐀퐆(퐂퐃퐀퐆 푐푑푎푔) 푓푙푎푔 ← 푓푎푙푠푒 퐟퐨퐫 푖 ← 푐푑푎푔. 푙푒푛푔ℎ푡 − 1 푑표푤푛푡표 1 퐝퐨 퐟퐨퐫퐞퐚퐜퐡 푛표푑푒 푛 퐢퐧 푐표푙푢푚푛 푖 표푓 푡ℎ푒 푐푑푎푔 퐢퐟(푛. 푙푒푓푡 = 푛푢푙푙 퐚퐧퐝 푛. 푟푖푔ℎ푡 = 푛푢푙푙) 퐭퐡퐞퐧 푅푒푚표푣푒 푛. 푐푙푢푠푒 푓푟표푚 푡ℎ푒 푆푀 푎푛푑 푟푒푚표푣푒 푛 푓푟표푚 푡ℎ푒 푐푑푎푔 푓푙푎푔 ← 푡푟푢푒 end 퐞퐧퐝 // end of for 퐆퐚퐫퐛퐚퐠퐞 퐜퐨퐥퐥퐞퐜퐭퐢퐨퐧(푆푀, 퐿푅퐶) 퐑퐞퐭퐮퐫퐧 푓푙푎푔 퐞퐧퐝

n n3 − 3n2 + 2n T(n) = length of CDAG = ( ) = = O(n3) 3 6 ALGORITHM 18: The method to generating CDAG

// root ∈ {CM[1][column], 1 ≤ column ≤ 8}, root = (l1˅l2˅l3), // l1 ∈ {x1, x̅1}, l2 ∈ {x2, x̅2}, l3 ∈ {x3, x̅3} 퐆퐞퐧퐞퐫퐚퐭퐢퐧퐠퐂퐃퐀퐆(퐂퐥퐚퐮퐬퐞 푟표표푡) 퐶퐷퐴퐺 ← 푛푢푙푙 퐿푅퐶[2푛][2푛] ← 푃푅퐶 퐆퐞퐧퐞퐫퐚퐭퐢퐧퐠퐒퐌(푐표푙푢푚푛) 퐢퐟(퐌퐚퐭퐫퐢퐱퐈퐬퐕퐚퐥퐢퐝(푆푀) = 푡푟푢푒) 퐭퐡퐞퐧 퐶퐷퐴퐺. 푟표표푡 ← 푟표표푡 퐟퐨퐫 푖 ← 4 푡표 푛 퐝퐨 퐶퐷퐴퐺1 ← 퐶퐷퐴퐺 퐶퐷퐴퐺2 ← 퐶퐷퐴퐺 푐1 ← (푙1˅푙2˅푥푖) 푐2 ← (푙1˅푙2˅푥̅푖); 퐢퐟(푐1 ∈ 푆푀) 퐭퐡퐞퐧 퐈퐧퐬퐞퐫퐭퐓퐨퐂퐃퐀퐆퐜(푐1, 퐶퐷퐴퐺1) 퐢퐟(푐2 ∈ 푆푀) 퐭퐡퐞퐧 퐈퐧퐬퐞퐫퐭퐓퐨퐂퐃퐀퐆퐜̅ (푐2, 퐶퐷퐴퐺2) 퐶퐷퐴퐺 ← 퐌퐞퐫퐠퐞(퐶퐷퐴퐺1, 퐶퐷퐴퐺2) 퐢퐟(퐶퐷퐴퐺 ≠ 푛푢푙푙) 퐭퐡퐞퐧 푠푡푎푡푒 ← 퐆퐚퐫퐛퐚퐠퐞퐜퐨퐥퐥퐞퐜퐭퐢퐨퐧퐂퐃퐀퐆(퐶퐷퐴퐺) 퐢퐟(푠푡푎푡푒 = 푡푟푢푒) 퐭퐡퐞퐧 퐢퐟(퐌퐚퐭퐫퐢퐱퐈퐬퐕퐚퐥퐢퐝(푆푀) = 푡푟푢푒) 퐭퐡퐞퐧 퐆퐞퐧퐞퐫퐚퐭퐢퐧퐠퐂퐃퐀퐆(푟표표푡) 퐞퐥퐬퐞 퐢퐟(퐌퐚퐭퐫퐢퐱퐈퐬퐕퐚퐥퐢퐝(푆푀) = 푡푟푢푒) 퐭퐡퐞퐧 Return false 퐞퐧퐝 // end of if(state) 퐞퐧퐝 //end of if(퐶퐷퐴퐺 ≠ 푛푢푙푙) else if (CDAG=null) then 퐑퐞퐭퐮퐫퐧 푓푎푙푠푒 end // end of for(i) 퐞퐧퐝 // end of if (MatrixIsValid(푆푀) = 푡푟푢푒) 퐞퐥퐬퐞 퐢퐟 (퐌퐚퐭퐫퐢퐱퐈퐬퐕퐚퐥퐢퐝(푆푀) = 푓푎푙푠푒) 퐭퐡퐞퐧 퐑퐞퐭퐮퐫퐧 푓푎푙푠푒 Return true 퐞퐧퐝 //end of algorithm

n n 푛3 − 3푛2 + 2푛 T(n) = ∑ (n6 + n6) × The count of clauses of the CM = n × n6 × 8 × ( ) = n × n6 × 8 × = n × n6 × n3 = O(n10) 4 3 6

18

If a node is removed from the CDAGi by the garbage removal, the construction of the CDAG restarts from stage 1 with the resulting SM from the Garbage collection method. Note: According to the algorithm in construction of the final CDAG, no node is removed from the CDAG as according to the algorithm in case of any removal, , the construction stages would restart from the scratch. LEMMA 16. Each CDAG created by the offered algorithm is equivalent to a compatible binary tree.

PROOF. The proof is completed using the mathematic induction method. In this induction, the method for building a compatible binary tree equivalent to the CDAG, is explained. The induction base:

If section 푙4contains part 푥4, this part is supposed as the schema tree 푡4. The clauses of the schema tree 푡4 are compatible with each other according to variable 푥4. If section 푙4contains part 푥̅4, this part is taken as schema tree 푡4̅ . The clauses of the schema tree 푡4̅ are compatible with each other according to variable 푥̅4. Due to the structure of the CDAG, section 푙4 incorporates at least one of the parts 푥4or 푥̅4 . The schema tree 푇4 is generated as follows (see Fig. 8):

푇4 = 푡4 ∪ 푡4̅

Fig. 8. Schema tree 푻ퟒ

The schema tree 푇4consists of two completely separated sets. Worth noting that no clause is deleted from section 푙4 and the clauses of section 푙4 locate either in 푡4 or 푡4̅ . If section 푙5 contains section 푥5, then a copy from schema tree 푇4 is placed in front of section 푥5 , By processing the copy of schema tree 푇4 the schema tree 푡5 is yielded according to the following method.

The processing method of 퐓ퟒ : 푇4is scanned from the last column to the first one, In this scan, if there are clauses relating to 푙5 in the current column, the clauses containing variable 푥5 are reserved and their parent or parents will be kept as the nodes of next stages (Which exist due to the REMOVAL LEMMA 2). Due to the REMOVAL LEMMA 2, in the current column, clauses containing variable 푥̅5 may also exist which are removed from the copy of schema tree 푇4. If in the clauses of current column, there is no 푙5 literal, without processing those clauses, their parents will be kept as the nodes of next processing stages. By having the task of scanning finished the schema tree 푡5 is achieved. The clauses of schema tree 푡5 are compatible relative to variable 푥5. If the section 푙5 contains section 푥̅5 , a copy from schema tree 푇4 is placed in front of the section 푥̅5 , By processing the copy of schema tree 푇4, schema tree 푡5̅ is yielded according to the following method.

The processing method of 푻ퟒ : 푇4 is scanned from the last column to the first one, In this scan, if there are clauses relating to 푙5 in the current column, the clauses containing variable 푥̅5 are reserved and their parent or parents will be kept as the nodes of next stages (Which exist due to the REMOVAL LEMMA 2). Due to the REMOVAL LEMMA 2, in the current column, clauses containing variable 푥5 may also exist which are removed from the copy of schema tree 푇4. If in the clauses of current column, there is no 푙5 literal, without processing those clauses, their parents will be kept as the nodes of next processing stages. After the scanning task, finishing , schema tree 푡5̅ is achieved. The clauses of schema tree 푡5̅ are compatible relative to variable 푥̅5. Due to the structure of the CDAG, section 푙5 incorporates at least one of the parts 푥5or 푥̅5 . Schema tree 푇5 is generated as follows ( see Fig. 9):

푇5 = 푡5 ∪ 푡5̅

19

Fig. 9. Schema tree 푻ퟓ

The schema tree 푇5 consists of two completely separated sets. Worth noting that no clause is deleted from section 푙5 and the clauses of section 푙5 locate either in 푡5 or 푡5̅ . The clauses of the routes in schema tree 푇5 are compatible relative to variables 푥5, 푥̅5, 푥4, 푥̅4. The induction hypothesis:

Schema tree 푇푘 exists in which the clauses over the routes of this schema tree are compatible relative to variables 푥푘, 푥̅푘, … , 푥5, 푥̅5, 푥4, 푥̅4 . The induction mandate:

In (k+1) th stage, schema tree Tk+1 is created.

If section 푙푘+1 contains section 푥푘+1, a copy from the schema tree 푇푘 is placed in front of section 푥푘+1 , By processing the copy of schema tree 푇푘, the schema tree 푡푘+1 is yielded according to the following method.

The processing method of 푻풌 :

푇푘 is scanned from the last column to the first one, In this scan, if there exist clauses relating to 푙푘+1 in the current column, the clauses containing variable 푥푘+1 are reserved and their parent or parents will be kept as the nodes of next stages (Which exist due to the REMOVAL LEMMA 2). Due to the REMOVAL LEMMA 2, in the current column, clauses containing variable 푥̅푘+1 may also exist which are removed from the copy of schema tree 푇푘. If in the clauses of current column, there is no 푙푘+1 literal, , their parents will be kept as the nodes of next processing stages without processing those clauses. By having the task of scanning finished, schema tree 푡푘+1 is achieved. The clauses of schema tree 푡푘+1 are compatible relative to variable 푥푘+1. If section 푙푘+1 contains section 푥̅푘+1,a copy from schema tree 푇푘 is placed in front of section 푥̅푘+1 , By processing the copy of schema tree 푇푘, schema tree 푡푘̅ +1 is yielded following the below method.

The processing method of 푻풌 :

푇푘 is scanned from the last column to the first one, . In this scan, if there are clauses relating to 푙푘+1 in the current column, the clauses containing variable 푥̅푘+1 are reserved and their parent or parents will be kept as the nodes of next stages (Which exist due to the REMOVAL LEMMA 2). Due to the REMOVAL LEMMA 2, in the current column, clauses containing variable 푥푘+1 may also exist which are removed from the copy of schema tree 푇푘. If in the clauses of current column, there is no 푙푘+1 literal, without processing those clauses, their parents will be kept as the nodes of next processing stages. By having the task of scanning finished, the schema tree 푡푘̅ +1 is achieved. The clauses of schema tree 푡푘̅ +1 are compatible relative to variable 푥̅푘+1. Due to structure of the CDAG, section 푙푘+1 incorporates at least one of the parts 푥푘+1or 푥̅푘+1 . Schema tree 푇푘+1 is generated as follows (see Fig. 10):

푇푘+1 = 푡푘+1 ∪ 푡푘̅ +1

Fig. 10. Schema tree 푻풌+ퟏ

The schema tree 푇푘+1 consists of two completely separated sets.Worth noting that no clause is deleted from section 푙푘+1 and the clauses of section 푙푘+1 locate either in 푡푘+1 or 푡푘̅ +1.

The clauses of the routes of schema tree 푇푘+1 are compatible relative to variables 푥푘+1, 푥̅푘+1, … , 푥5, 푥̅5, 푥4, 푥̅4 .

20

푛 If the above-mentioned procedure continue until stage n, a binary tree with depth ( ) would be generated. Apparently, the 3 푛 length of the path from the root node to the leaf nodes in this tree would be also ( ). All clauses in a path would be consistent 3 with each other because they have been correctly separated from each other. According to LEMMA 5, each path is actually a Clause_Set and according to LEMMA 13, the result value of φ based on the Clause_Set would be true.

4 Algorithm The proposed algorithm attempts to generate at least one of the CDAGs of the problem. If the algorithm can achieve this goal, the result value of the problem φ would be true, otherwise, it would be false.

ALGORITHM 18: The main algorithm

//Input is a 3 − CNF − SAT like φ = c1 ∧ … ∧ cm //Output is "true" or "false" 퐬퐨퐫퐭 푎푙푙 푐푙푎푢푠푒푠 표푓 φ GenerateCM() Subtracting 휑 from 퐶푀( ) 푃푅퐶[2푛][2푛] ← 0; 퐆퐚퐫퐛퐚퐠퐞 퐜퐨퐥퐥퐞퐜퐭퐢퐨퐧(퐶푀, 푃푅퐶) 퐢퐟(퐌퐚퐭퐫퐢퐱퐈퐬퐕퐚퐥퐢퐝(퐶푀) = 푡푟푢푒) 퐭퐡퐞퐧 퐟퐨퐫 푖 ← 1 푡표 8 퐝퐨 퐢퐟(퐶푀[1][푖] ≠ 푛푢푙푙) 퐭퐡퐞퐧 state ← 퐆퐞퐧퐞퐫퐚퐭퐢퐧퐠퐂퐃퐀퐆(퐶푀[1][푖]) 퐢퐟 (푠푡푎푡푒 = 푡푟푢푒) 퐭퐡퐞퐧 퐎퐮퐭퐩퐮퐭(“푡푟푢푒”) 퐄퐱퐢퐭() 퐞퐧퐝 퐞퐥퐬퐞 퐢퐟 (푠푡푎푡푒 = 푓푎푙푠푒) 퐭퐡퐞퐧 퐶푀[1][푖] ← 푛푢푙푙; 퐅퐢퐧퐝퐑퐞퐦퐨퐯퐚퐥퐂퐨퐧퐝퐢퐭퐢퐨퐧퐬(퐶푀, 푃푅퐶) 퐆퐚퐫퐛퐚퐠퐞 퐜퐨퐥퐥퐞퐜퐭퐢퐨퐧(퐶푀) 퐢퐟(퐌퐚퐭퐫퐢퐱퐈퐬퐕퐚퐥퐢퐝(퐶푀) = 푓푎푙푠푒) 퐭퐡퐞퐧 퐎퐮퐭퐩퐮퐭(“푓푎푙푠푒”) 퐄퐱퐢퐭( ) 퐞퐧퐝 end // 푒푛푑 표푓 푒푙푠푒 end // end of If(CM[1][i] ≠ null) end //푒푛푑 표푓 푓표푟 퐎퐮퐭퐩퐮퐭(“푓푎푙푠푒”) 퐄퐱퐢퐭() end //푒푛푑 표푓 if(MatrixIsValid(퐶푀) = 푡푟푢푒) 퐞퐥퐬퐞 퐢퐟(퐌퐚퐭퐫퐢퐱퐈퐬퐕퐚퐥퐢퐝(퐶푀) = 푓푎푙푠푒) 퐭퐡퐞퐧 퐎퐮퐭퐩퐮퐭(“푓푎푙푠푒”) 퐄퐱퐢퐭( ) 퐞퐧퐝 end //푒푛푑 표푓 푎푙푔표푟푖푡ℎ푚

T(n) = 8 × T(n) of Generating CDAG = 8 × n10 = O(n10)

LEMMA 17. If the problem is satisfiable, the algorithm returns true, and consequently if the algorithm returns true, the problem 휑 is satisfiable.

PROOF. a) If the result value of the problem φ is true, there would be at least one assignment in truth table, that makes the result value of the problem φ as true. Also there would be a string w in strings’ table, which also makes the problem φ as true. Therefore, none of the clauses in clause_set(w) includes the removal condition and will remain in the CM and the SM. According to the fact that all clauses in Clause_Set(w) are consistent with each other, the algorithm will create a CDAG based on 퐶푙푎푢푠푒_푆푒푡(푤)It is enough to choose the corresponding clause to the first index in the Clause_Set(w) e.g., (푥1 ∨ 푥2 ∨ 푥3), as the root. In the following stages such as stag푒 푖 (4 ≤ 푖 ≤ 푛), because all clauses are resulted from combination of (푥1 ∨ 푥2 ∨ 푥3) and clauses of the CDAG, are consistent with each other, and they exist in the CM and the SM, the resulted clauses (from combination) will be inserted into the CDAG, and therefore the CDAG will be generated.

21

b) The algorithm will return true as its result, if a CDAG is generated. In this case, according to LEMMA 16, the result value of the problem φ would be true.

5 Sample

흋 = (풙̅ퟏ ∨ 풙̅ퟐ ∨ 풙̅ퟑ) ∧ (풙̅ퟐ ∨ 풙̅ퟑ ∨ 풙ퟒ) ∧ (풙̅ퟐ ∨ 풙̅ퟑ ∨ 풙̅ퟒ) ∧ (풙ퟏ ∨ 풙̅ퟐ ∨ 풙ퟓ) ∧ (풙̅ퟐ ∨ 풙ퟑ ∨ 풙̅ퟓ) ∧ (풙̅ퟏ ∨ 풙̅ퟐ ∨ 풙̅ퟔ)

5.1 퐆퐞퐧퐞퐫퐚퐭퐞퐂퐌 퐭퐡퐞퐧 퐒퐒퐒퐒퐒퐒퐒퐒퐒퐒퐒 훗 퐒퐒퐒퐒 퐂퐌 (see Fig. 11)

Fig. 11. CM of 훗

5.2 GeneratingSM(1) then Garbage Collection(SM) (see Fig. 12)

22

Fig. 12. SM of root (퐱ퟏ ∨ 퐱ퟐ ∨ 퐱ퟑ)

5.3 퐈퐧퐬퐞퐫퐭퐓퐨퐂퐃퐀퐆퐜((퐱ퟏ ∨ 퐱ퟐ ∨ 퐱ퟒ), 푪푫푨푮ퟏ) (see Fig. 13)

Fig. 13. 퐑퐞퐬퐮퐥퐭 퐨퐟 퐈퐧퐬퐞퐫퐭퐓퐨퐂퐃퐀퐆퐜((퐱ퟏ ∨ 퐱ퟐ ∨ 퐱ퟒ), 푪푫푨푮ퟏ)

5.4 퐈퐧퐬퐞퐫퐭퐓퐨퐂퐃퐀퐆퐜̅ ((퐱ퟏ ∨ 퐱ퟐ ∨ x̅4), 퐶퐷퐴퐺2) (see Fig. 14)

Fig. 14. 퐑퐞퐬퐮퐥퐭 퐨퐟 퐈퐧퐬퐞퐫퐭퐓퐨퐂퐃퐀퐆퐜̅((퐱ퟏ ∨ 퐱ퟐ ∨ 퐱̅ퟒ), 푪푫푨푮ퟐ)

23

5.5 퐶퐷퐴퐺 ← 퐌퐞퐫퐠퐞(퐶퐷퐴퐺1, 퐶퐷퐴퐺2)(see Fig. 15)

Fig. 15. CDAG

5.6 퐈퐧퐬퐞퐫퐭퐓퐨퐂퐃퐀퐆퐜((퐱ퟏ ∨ 퐱ퟐ ∨ 퐱ퟓ), 푪푫푨푮ퟏ) (see Fig. 16)

Fig. 16. 퐑퐞퐬퐮퐥퐭 퐨퐟 퐈퐧퐬퐞퐫퐭퐓퐨퐂퐃퐀퐆퐜((퐱ퟏ ∨ 퐱ퟐ ∨ 퐱ퟓ), 푪푫푨푮ퟏ)

5.7 퐈퐧퐬퐞퐫퐭퐓퐨퐂퐃퐀퐆퐜̅ ((퐱ퟏ ∨ 퐱ퟐ ∨ x̅5), 퐶퐷퐴퐺2) (see Fig. 17)

24

Fig. 17. 퐑퐞퐬퐮퐥퐭 퐨퐟 퐈퐧퐬퐞퐫퐭퐓퐨퐂퐃퐀퐆퐜̅((퐱ퟏ ∨ 퐱ퟐ ∨ 퐱̅ퟓ), 푪푫푨푮ퟐ)

5.8 퐶퐷퐴퐺 ← 퐌퐞퐫퐠퐞(퐶퐷퐴퐺1, 퐶퐷퐴퐺2) (see Fig. 18)

Fig. 18. CDAG

25

5.9 퐈퐧퐬퐞퐫퐭퐓퐨퐂퐃퐀퐆퐜((퐱ퟏ ∨ 퐱ퟐ ∨ 퐱ퟔ), 푪푫푨푮ퟏ) (see Fig. 19)

Fig. 19. 퐑퐞퐬퐮퐥퐭 퐨퐟 퐈퐧퐬퐞퐫퐭퐓퐨퐂퐃퐀퐆퐜((퐱ퟏ ∨ 퐱ퟐ ∨ 퐱ퟔ), 푪푫푨푮ퟏ)

5.10 퐈퐧퐬퐞퐫퐭퐓퐨퐂퐃퐀퐆퐜̅ ((퐱ퟏ ∨ 퐱ퟐ ∨ x̅6), 퐶퐷퐴퐺2) (see Fig. 20)

26

Fig. 20. 퐑퐞퐬퐮퐥퐭 퐨퐟 퐈퐧퐬퐞퐫퐭퐓퐨퐂퐃퐀퐆퐜̅((퐱ퟏ ∨ 퐱ퟐ ∨ 퐱̅ퟔ), 푪푫푨푮ퟐ)

5.11 퐶퐷퐴퐺 ← 퐌퐞퐫퐠퐞(퐶퐷퐴퐺1, 퐶퐷퐴퐺2) (see Fig. 21)

27

Fig. 21. CDAG

5.12 For instance, a clause set is selected from the generated DAG in Figure 21 (see Fig. 22).

28

Fig. 22. A Claus_Set

푪풍풂풖풔풆_푺풆풕(풘) = {(풙ퟏ ∨ 풙ퟐ ∨ 풙ퟑ), (풙ퟏ ∨ 풙ퟐ ∨ 풙ퟒ), (풙ퟏ ∨ 풙ퟐ ∨ 풙ퟓ), (풙ퟏ ∨ 풙ퟐ ∨ 풙ퟔ), (풙ퟏ ∨ 풙ퟑ ∨ 풙ퟒ), (풙ퟏ ∨ 풙ퟑ ∨ 풙ퟓ),

(풙ퟏ ∨ 풙ퟑ ∨ 풙ퟔ), (풙ퟏ ∨ 풙ퟒ ∨ 풙ퟓ), (풙ퟏ ∨ 풙ퟒ ∨ 풙ퟔ), (풙ퟏ ∨ 풙ퟓ ∨ 풙ퟔ), (풙ퟐ ∨ 풙ퟑ ∨ 풙ퟒ), (풙ퟐ ∨ 풙ퟑ ∨ 풙ퟓ), (풙ퟐ ∨ 풙ퟑ ∨ 풙ퟔ),

(풙ퟐ ∨ 풙ퟒ ∨ 풙ퟓ), (풙ퟐ ∨ 풙ퟒ ∨ 풙ퟔ), (풙ퟐ ∨ 풙ퟓ ∨ 풙ퟔ), (풙ퟑ ∨ 풙ퟒ ∨ 풙ퟓ), (풙ퟑ ∨ 풙ퟒ ∨ 풙ퟔ), (풙ퟑ ∨ 풙ퟓ ∨ 풙ퟔ), (풙ퟒ ∨ 풙ퟓ ∨ 풙ퟔ) }

푥1 = 푓푎푙푠푒,

푥2 = 푓푎푙푠푒,

푥3 = 푓푎푙푠푒,

푥4 = 푓푎푙푠푒,

푥5 = 푓푎푙푠푒,

29

푥6 = 푓푎푙푠푒

휑 = (푥1̅ ∨ 푥̅2 ∨ 푥̅3) ∧ (푥̅2 ∨ 푥̅3 ∨ 푥4) ∧ (푥̅2 ∨ 푥̅3 ∨ 푥̅4) ∧ (푥1 ∨ 푥̅2 ∨ 푥5) ∧ (푥̅2 ∨ 푥3 ∨ 푥̅5) ∧ (푥1̅ ∨ 푥̅2 ∨ 푥̅6)

푉푎푙푢푒((푥1̅ ∨ 푥̅2 ∨ 푥̅3)) = (푓푎푙푠푒̅̅̅̅̅̅̅ ∨ 푓푎푙푠푒̅̅̅̅̅̅̅ ∨ 푓푎푙푠푒̅̅̅̅̅̅̅) = (푡푟푢푒 ∨ 푡푟푢푒 ∨ 푡푟푢푒) = 푡푟푢푒

푉푎푙푢푒((푥̅2 ∨ 푥̅3 ∨ 푥4)) = (푓푎푙푠푒̅̅̅̅̅̅̅ ∨ 푓푎푙푠푒̅̅̅̅̅̅̅ ∨ 푓푎푙푠푒) = (푡푟푢푒 ∨ 푡푟푢푒 ∨ 푓푎푙푠푒) = 푡푟푢푒

푉푎푙푢푒((푥̅2 ∨ 푥̅3 ∨ 푥̅4)) = (푓푎푙푠푒̅̅̅̅̅̅̅ ∨ 푓푎푙푠푒̅̅̅̅̅̅̅ ∨ 푓푎푙푠푒̅̅̅̅̅̅̅) = (푡푟푢푒 ∨ 푡푟푢푒 ∨ 푡푟푢푒) = 푡푟푢푒

푉푎푙푢푒((푥1 ∨ 푥̅2 ∨ 푥5)) = (푓푎푙푠푒 ∨ 푓푎푙푠푒̅̅̅̅̅̅̅ ∨ 푓푎푙푠푒) = (푓푎푙푠푒 ∨ 푡푟푢푒 ∨ 푓푎푙푠푒) = 푡푟푢푒

푉푎푙푢푒((푥̅2 ∨ 푥3 ∨ 푥̅5)) = (푓푎푙푠푒̅̅̅̅̅̅̅ ∨ 푓푎푙푠푒 ∨ 푓푎푙푠푒̅̅̅̅̅̅̅) = (푡푟푢푒 ∨ 푓푎푙푠푒 ∨ 푡푟푢푒) = 푡푟푢푒

푉푎푙푢푒((푥1̅ ∨ 푥̅2 ∨ 푥̅6)) = (푓푎푙푠푒̅̅̅̅̅̅̅ ∨ 푓푎푙푠푒̅̅̅̅̅̅̅ ∨ 푓푎푙푠푒̅̅̅̅̅̅̅) = (푡푟푢푒 ∨ 푡푟푢푒 ∨ 푡푟푢푒) = 푡푟푢푒 푉푎푙푢푒(휑) = (푡푟푢푒 ∧ 푡푟푢푒 ∧ 푡푟푢푒 ∧ 푡푟푢푒 ∧ 푡푟푢푒 ∧ 푡푟푢푒) = 푡푟푢푒

6 conclosion The time-complexity of algorithm is 푂(푛10), so the problem 3-CNF-SAT is solved by engaging an algorithm with space complexity of 푂(푛3) and time complexity of 푂(푛10) . So that, result of P versus NP problem is P = NP.

7 Refrences [1] Cormen, T. H., Leiserson, C. E., Rivest, R. L., & Stein, C. (2001). Introduction to algorithms second edition. [2] Cook S.A. The complexity of theorem proving procedures. Proc 3rd STOC, pages 151–158, 1971. [3] Cook S.A. Reckhow A.R. The relative efficiency of propositional proof systems. J. of Symbolic Logic, 44(1):36–50, 1979. [4] Stockmeyer L. J. Classifying the computational complexity problems. The Journal of Symbolic Logic, 52 No 1:1–43, 1987. [5] Levin, Leonid. Universal sorting problems. problems of information transmission. Problemy Peredachi Informatsii, 9:265266, 1973. [6] Levin, Leonid. ”universal search problems”. Problemy Peredachi Informatsii, 6(4):265–266, 1984. [7] Meyer A.R. weak monadic second-ordet theory of successor is not elementary recursive. In R Parikh, editor, Lecture Notes in Mathematics, volume vol 453, pages 132–154. Spring-Verlag, New York, 1972-73. [8] Meyer A.R. Stockmeyer L. J. The equivalence problem for regular expressions with squaring requires exponential space. Proceedings of the 13th IEEE Symposium on Switching and Automata Theory, pages 125– 129, 1972. [9] Pudlak P. Satisfiability - algorithms and logic. In Mathematical Foundations of Computer Science, pages 129–141. Springer, 1998.

30