<?xml version="1.0" encoding="UTF-8"?>
<TEI xml:space="preserve" xmlns="http://www.tei-c.org/ns/1.0" 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
xsi:schemaLocation="http://www.tei-c.org/ns/1.0 https://raw.githubusercontent.com/kermitt2/grobid/master/grobid-home/schemas/xsd/Grobid.xsd"
 xmlns:xlink="http://www.w3.org/1999/xlink">
	<teiHeader xml:lang="en">
		<fileDesc>
			<titleStmt>
				<title level="a" type="main">Counting Falsifying Assignments of Conjunctive Forms Using Binary Patterns</title>
			</titleStmt>
			<publicationStmt>
				<publisher/>
				<availability status="unknown"><licence/></availability>
			</publicationStmt>
			<sourceDesc>
				<biblStruct>
					<analytic>
						<author role="corresp">
							<persName><forename type="first">Guillermo</forename><surname>De Ita</surname></persName>
							<email>deita@cs.buap.mx</email>
							<affiliation key="aff0">
								<orgName type="department">Faculty of Computer Sciences</orgName>
								<orgName type="institution">BUAP</orgName>
							</affiliation>
						</author>
						<author>
							<persName><forename type="first">J</forename><forename type="middle">Raymundo</forename><surname>Marcial-Romero</surname></persName>
							<affiliation key="aff1">
								<orgName type="department">Facultad de Ingeniería</orgName>
								<orgName type="institution">UAEM</orgName>
							</affiliation>
						</author>
						<author>
							<persName><forename type="first">Pilar</forename><surname>Pozos-Parra</surname></persName>
							<affiliation key="aff2">
								<orgName type="institution">Universidad Juárez Autónoma de Tabasco</orgName>
							</affiliation>
						</author>
						<author>
							<persName><forename type="first">Nancy</forename><surname>Barragán</surname></persName>
							<affiliation key="aff0">
								<orgName type="department">Faculty of Computer Sciences</orgName>
								<orgName type="institution">BUAP</orgName>
							</affiliation>
						</author>
						<title level="a" type="main">Counting Falsifying Assignments of Conjunctive Forms Using Binary Patterns</title>
					</analytic>
					<monogr>
						<imprint>
							<date/>
						</imprint>
					</monogr>
					<idno type="MD5">3C493869C9B01320D7E21E750E0DD8C7</idno>
				</biblStruct>
			</sourceDesc>
		</fileDesc>
		<encodingDesc>
			<appInfo>
				<application version="0.7.2" ident="GROBID" when="2023-03-23T22:16+0000">
					<desc>GROBID - A machine learning software for extracting information from scholarly documents</desc>
					<ref target="https://github.com/kermitt2/grobid"/>
				</application>
			</appInfo>
		</encodingDesc>
		<profileDesc>
			<textClass>
				<keywords>
					<term>#SAT</term>
					<term>#FAL</term>
					<term>Binary Patterns</term>
					<term>Enumerative Combinatorics</term>
				</keywords>
			</textClass>
			<abstract>
<div xmlns="http://www.tei-c.org/ns/1.0"><p>The representation of the set of falsifying assignments of clauses via binary patterns has been useful in the design of algorithms for solving #FAL (counting the number of falsifying assignments of conjunctive forms (CF)). Given as input a CF formula F expressed by m clauses defined over n variables, we present a deterministic algorithm for computing #SAT (F ). Initially, our algorithm computes non-intersecting subsets of falsifying assignments of F until the space of falsifying assignments defined by F is covered. Due to #SAT(F ) = 2 n -#FAL(F ), results about #FAL can be established dually for #SAT. The time complexity of our proposals for computing #SAT(F ) is established according with the number of clauses and the number of variables of F .</p></div>
			</abstract>
		</profileDesc>
	</teiHeader>
	<text xml:lang="en">
		<body>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="1">Introduction</head><p>The problem of counting models for a Boolean formula (#SAT problem) can be reduced to several problems in approximate reasoning. For example, estimating the degree of belief in propositional theories, generating explanations to propositional queries, repairing inconsistent databases, Bayesian inference and truth maintenance systems <ref type="bibr" target="#b0">[1,</ref><ref type="bibr" target="#b8">[9]</ref><ref type="bibr" target="#b9">[10]</ref><ref type="bibr" target="#b10">[11]</ref>. The above problems come from several AI applications such as planning, expert systems, approximate reasoning, etc.</p><p>The combinatorial problems that we are going to address are the computation of the number of models and falsifying assignments for Boolean formulas in Conjunctive Forms (CF), denoted as #SAT and #FAL respectively, based on string patterns formed by its set of falsifying assignments. Both problems are classical #P -complete problems even for the restricted cases of monotone and Horn formulas. We generalize the approach presented in <ref type="bibr" target="#b3">[4]</ref> which considers only 2-CF formulas.</p><p>Among the class of #P-complete problems, #SAT is considered a fundamental instance due to both its application in deduction issues and its relevance to establish a boundary between efficient and intractable counting problems.</p><p>Given a 2-CF F with n variables and m clauses, it is common to analyze the computational complexity of the algorithms for solving #SAT and #FAL regarding to n or m or any combination of both <ref type="bibr" target="#b10">[11,</ref><ref type="bibr" target="#b11">12]</ref>.</p><p>In <ref type="bibr" target="#b2">[3]</ref>, some cases are presented where #SAT(F ) is computed in polynomial time considering the graph-topological structure of the constrained graph of F . Additionally, in <ref type="bibr" target="#b1">[2]</ref> a new way to measure the degree of difficulty for solving #SAT is presented. It is shown that there is a threshold, determined by the same number of models, where #SAT is computed in polynomial time.</p><p>Since #SAT (F ) = 2 n − #F AL(F ), it is the case that analogous results can be proved for #SAT (F ) and #F AL(F ). In this paper, we present a method for compute #FAL(F ) in an incremental way with respect to the set of clauses in F . Some reductions among clauses are presented, as subsumed clauses and the independent reduction, in order to accelerate the computation of #FAL(F ).</p><p>The paper is organized as follows. In Section 2 we give the basic notation as well as several definitions. In Section 3 we describe the binary pattern based approach for 2-CF cases, and we extend such approach for CF cases. Section 4 provides the algorithm associated with our proposal. Section 5 concludes.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="2">Preliminaries</head><p>Let X = {x 1 , . . . , x n } be a set of n Boolean variables. A literal is either a variable x i or a negated variable x i . As usual, for each x i ∈ X, x 0 i = x i and x 1 i = x i . A clause is a disjunction of different and non-contradictory literals (sometimes, we also consider a clause as a set of literals, e.g.</p><formula xml:id="formula_0">x 1 ∨ x 2 = {x 1 , x 2 }). For k ∈ IN , a k-clause is a clause consisting of exactly k literals. A variable x ∈ X appears in a clause c if either x or x is an element of c.</formula><p>A conjunctive form (CF) F is a conjunction of non-tautological clauses. We say that F is a monotone positive CF if all of its variables appear in unnegated form. A k-CF is a CF containing only k-clauses. (≤ k)-CF denotes a CF containing clauses with at most k literals. A 2-CF formula F is said to be strict only if each clause of F consists of two literals. The size of a formula F is defined as the sum of the number of clauses and variables of F .</p><p>We use υ(X) to represent the variables involved in the object X, where X could be a literal, a clause or a CF. For instance, for the clause</p><formula xml:id="formula_1">c = {x 1 , x 2 }, υ(c) = {x 1 , x 2 }. Lit(F ) is the set of literals involved in F , i.e. if X = υ(F ), then Lit(F ) = X ∪ X = {x 1 , x 1 , ..., x n , x n }. We denote {1, 2, ..., n} by [[n]</formula><p>] and the cardinality of a set A by |A|.</p><p>An assignment s for F is a function s : υ(F ) → {0, 1}. An assignment s can also be considered as a set of literals without a complementary pair of literals, e.g., if l ∈ s, then l ∈ s, in other words s turns l true and l false or viceversa. Let c be a clause and s an assignment, c is satisfied by s if and only if c ∩ s = ∅. On the other hand, if for all l ∈ c, l ∈ s, then s falsifies c. If n = |υ(F )|, then there are 2 n possible assignments defined over υ(F ). Let S(F ) be the set of 2 n assignments defined over υ(F ).</p><p>Let F be a CF, F is satisfied by an assignment s if each clause in F is satisfied by s. F is contradicted by s if any clause in F is falsified by s. A model of F is an assignment for υ(F ) that satisfies F . A falsifying assignment of F is an assignment for υ(F ) that contradicts F . The SAT problem consists of determining whether F has a model. SAT(F ) denotes the set of models of F , then SAT(F ) ⊆ S(F ). The set FAL(F ) = S(F ) \ SAT (F ) consists of the assignments from S(F ) that falsify F .</p><p>The #SAT problem (or #SAT(F ) problem) consists of counting the number of models of F defined over υ(F ), while #F AL(F ) denotes the number of falsifying assignments of F . Thus, #FAL(F ) = 2 n -#SAT(F ) and #2SAT denotes #SAT for 2-CF formulas.</p><p>A 2-CF F can be represented by an undirected graph, called the constrained graph of F , and determined as: G F = (V (F ), E(F )), where V (F ) = υ(F ) and E(F ) = {{υ(x), υ(y)} : {x, y} ∈ F }. I.e. the vertices of G F are the variables of F , and for each clause {x, y} in F there is an edge {υ(x), υ(y)} ∈ E(F ).</p><p>The</p><formula xml:id="formula_2">neighborhood for x ∈ V (F ) is N (x) = {y ∈ V (F ) : {x, y} ∈ E(F )} and its closed neighborhood is N (x)∪{x} denoted as N [x]. The degree of a variable x, denoted by δ(x), is |N (x)|, and the degree of F is ∆(F ) = max{δ(x) : x ∈ V (F )}. The size of the neighborhood of x, δ(N (x)), is δ(N (x)) = y∈N (x) δ(y).</formula><p>An algorithm to compute #SAT (F ), considers the set of connected components of its constrained graph G F . It has been proved that the set of connected components of a constrained graph can be determined in linear time with respect to the number of clauses in the formula.</p><p>Thus, #SAT (</p><formula xml:id="formula_3">F ) = #SAT (G F ) = k i=1 #SAT (G i ), where {G 1 , . . . , G k } is the set of connected components of G F [9].</formula><p>The set of connected components of G F conforms a partition of F . So, from now on, we will work with a formula F represented by just one connected component.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="3">Computing #FAL via Binary Patterns</head><p>Let F = {C 1 , C 2 , . . . , C m } be a strict 2-CF (each clause has length 2) and let n = |υ(F )|. The size of F is n+m. Let k be a positive integer parameter such that k &lt; 2 n . The values of k, where #SAT(F ) = k, can be determined in polynomial time in the following cases.</p><p>If k = 0 or k = 1 the Transitive Closure procedure presented in <ref type="bibr" target="#b5">[6]</ref> can be applied. Such procedure has a linear time complexity on the size of the 2-CF.</p><p>If k is upper bounded by a polynomial function on n, e.g. k ≤ p(n), then in <ref type="bibr" target="#b1">[2]</ref>, an exact algorithm was shown for determining k in polynomial time on the size of F .</p><p>So, the hard cases to answer whether #SAT(F ) = k are given when k &gt; p(n). In <ref type="bibr" target="#b3">[4]</ref>, several hard cases for solving #SAT(F ) are identified. Such identification depends on the relation between its number of clauses (m) and the variables (n) of the instances F . E.g. the following theorem was proved. </p><formula xml:id="formula_4">= |υ(F )|, if F is not a tautology then #F AL(F ) ≥ 2 n−2 or the number of Falsifying Assignments is at least 2 n−2 .</formula><p>It is known <ref type="bibr" target="#b4">[5]</ref> that for any pair of clauses C i and C j , it holds that #F AL(</p><formula xml:id="formula_5">C i ∪ C j ) = #F AL(C i ) + #F AL(C j ) − #F AL(C i ∩ C j ).</formula><p>The following lemmas show when the number of models can be reduced.</p><formula xml:id="formula_6">Lemma 2. [4] Let F be a 2-CF, n = |υ(F )|. If C i ∈ F and C j ∈ F , i = j have non-complementary pairs of literals, but they share a literal (e.g. C i ∩ C j = ∅), then there are exactly 2 n−2 + 2 n−3 assignments from S(F ) falsifying C i ∪ C j .</formula><p>Binary patterns have been introduced to represent the set of falsifying assignments of any clause defined on n variables. Those patterns allow us to design efficient procedures for computing #FAL(F ).</p><p>Let F = {C 1 , . . . , C m } be a 2-CF and n = |υ(F )|. Assume an enumeration over the variables of υ(F ), e.g. x 1 , x 2 , . . . , x n . For each clause C i = {x j , x k }, let A i be a set of binary strings of length n such that the values at the j-th and k-th positions of each string, 1 ≤ j &lt; k ≤ n, represent the truth value of x j and x k that falsifies C i . E.g., if x j ∈ C i then the j-th element of A i is set to 0. On the other hand, if x j ∈ C i then the j-th element of A i is set to 1. The same argument applies to x k . It is easy to show that if C i = {x j , x k }, then x j and x k have the same values in each string of A i in order to be a falsifying assignment of F . Those variables not contained in the clause can take any truth value since the clause has been already falsified. We propose to generalize the previous definitions and results to any CF and then consider #SAT and #F AL problems for CF formulas in general, not only the 2-CF cases. We consider now any CF without restriction on the length of its clauses. Definition 1. <ref type="bibr" target="#b4">[5]</ref> Given two clauses C i and C j , if they have at least one complementary literal, it is said that they have the independence property. Otherwise, we say that both clauses are dependent.</p><p>Definition 1 can be written in terms of falsifying strings as follows: Definition 2. Given two falsifying strings A and B both of the same length, if there is an i such that A[i] = x and B[i] = 1 − x, x ∈ {0, 1}, it is said that they have the independence property. Otherwise, we say that both strings are dependent.</p><formula xml:id="formula_7">Definition 3. Let F = {C 1 , C 2 , • • • C m } be a CF. F is called independent if each pair of clauses C i , C j ∈ F, i = j, has the independence property, otherwise F is called dependent. Let F = {C 1 , C 2 , • • • C m } be a CF, n = |υ(F )|.</formula><p>Let C be a clause in F and x ∈ υ(F ) \ υ(C) be any variable, we have that</p><formula xml:id="formula_8">C = (C ∨ x) ∧ (C ∨ x)<label>(1)</label></formula><p>Furthermore, this reduction preserves the number of falsifying assignments of C with respect to</p><formula xml:id="formula_9">F , since #F AL(C) = 2 n−|C| = 2 n−(|C|+1) + 2 n−(|C|+1) = #F AL((C ∨ x) ∧ (C ∨ x)), because (C ∨ x) ∧ (C ∨ x) are two independent clauses. In terms of falsifying strings, let F = {C 1 , C 2 , . . . C m }, n = υ(F ), if A</formula><p>is the falsifying string of a clause C j such that there is an index i, A[i] = * then the falsifying string A can be replaced by two falsifying strings say A 1 and A 2 as follows:</p><p>1.</p><formula xml:id="formula_10">A 1 [j] = A[j] if j = i and A 1 [j] = 1 if j = i. 2. A 2 [j] = A[j] if j = i and A 2 [j] = 0 if j = i.</formula><p>It is easy to show that the falsifying assignments represented by A with respect to F are equal to the sum of the falsifying assignments represented by A 1 and A 2 with respect to F .</p><p>Given a pair of dependent clauses C 1 and C 2 . Let us assume that there are literals in C 1 which are not in C 2 , let x 1 , x 2 , ..., x p be these literals. There exists a reduction to transform C 2 to be independent with C 1 , we call at this transformation the independent reduction, and this works as follows: By (1) we can write:</p><formula xml:id="formula_11">C 1 ∧ C 2 = C 1 ∧ (C 2 ∨ ¬x 1 ) ∧ (C 2 ∨ x 1 ). Now C 1 and (C 2 ∨ ¬x 1 ) are independent. Applying (1) to (C 2 ∨ x 1 ): C 1 ∧ C 2 = C 1 ∧ (C 2 ∨ ¬x 1 ) ∧ (C 2 ∨ x 1 ∨ ¬x 2 ) ∧ (C 2 ∨ x 1 ∨ x 2 )</formula><p>The first three clauses are independent. Repeating the process of being independent between the last clause with the previous ones, until x p is considered, we have that C 1 ∧ C 2 can be written as:</p><formula xml:id="formula_12">C 1 ∧(C 2 ∨¬x 1 )∧(C 2 ∨x 1 ∨¬x 2 )∧...∧(C 2 ∨x 1 ∨x 2 ∨...∨¬x p )∧(C 2 ∨x 1 ∨x 2 ∨...∨x p ).</formula><p>The last clause contains all literals of C 1 , so it can be eliminated, and then</p><formula xml:id="formula_13">C 1 ∧ C 2 = C 1 ∧ (C 2 ∨ ¬x 1 ) ∧ (C 2 ∨ x 1 ∨ ¬x 2 ) ∧ ... ∧ (C 2 ∨ x 1 ∨ x 2 ∨ ... ∨ ¬x p ) (2)</formula><p>We obtain on the right hand side of (2) an independent set of p + 1 clauses. Let us present the independent reduction transformation in terms of falsifying strings.</p><p>Given a pair of falsifying strings A and B. Let us assume that there are indices x 1 , x 2 , ..., x p such that A[</p><formula xml:id="formula_14">x i ] = 1 or A[x i ] = 0 and B[x i ] = * , for all i ∈ [[p]].</formula><p>There exists a reduction to transform B to be independent with A, we call at this transformation the independent reduction, and this works by replacing the falsifying string B by p falsifying strings say B 1 , B 2 , . . . B p as follows:</p><p>-</p><formula xml:id="formula_15">B 1 [i] = B[i] if i = x 1 and B 1 [i] = 1 − A[i] if i = x 1 . -B 2 [i] = B[i] if i = x 1 and i = x 2 , B 2 [i] = A[i] if i = x 1 and B 1 [i] = 1 − A[i] if i = x 2 . -• • • -B p [i] = B[i] if i = x j , j ∈ {1 • • • p} and B p [i] = A[i] if i = x j , j ∈ {1 • • • p−1},</formula><p>and</p><formula xml:id="formula_16">B p [i] = 1 − A[i] if i = x p .</formula><p>We will denote the independent reduction between two clauses C 1 and C 2 or their corresponding falsifying strings A and B as: reduc(C 1 , C 2 ) or reduc(A, B) respectively. Notice that the independent reduction is not commutative, in the sense that reduc(C 2 , C 1 ) builds an independent set of |Lit(C 2 ) − (Lit(C 1 ) ∩ Lit(C 2 ))| clauses. However, reduc(C 1 , C 2 ) and reduc(C 2 , C 1 ) are logically equivalent because they determine the same set of falsifying assignments. Furthermore, when (Lit</p><formula xml:id="formula_17">(C 1 ) − (Lit(C 1 ) ∩ Lit(C 2 ))) = ∅ then the set of falsifying as- signments of C 2 is a subset of the set of falsifying assignments of C 1 , that is, F AL(C 2 ) ⊆ F AL(C 1 ), and then reduc(C 1 , C 2 ) = C 1 .</formula><p>Reduction that contains the smallest number of clauses can be obtained by computing both |Lit( The set with the smallest cardinality can be chosen to be reduced.</p><p>For formulas in CF, a pair of dependent clauses has either at least one common literal or not variables in common.</p><p>Let C i , C j be two dependent clauses with at least one common literal, in a CF F with n variables. Let A and B the falsifying strings of C i and C j . That A and B are dependents with at least one common literal means that the following conditions hold: Example 2. The following table shows two falsifying strings of two dependent clauses with a common literal</p><formula xml:id="formula_18">1. if A[i] = x then B[i] = 1 − x for all i ∈ {1 . . . n},<label>2</label></formula><formula xml:id="formula_19">x1 x2 x3 • • • x k • • • xn−1 xn Falsifying string C1 1 * * • • • 1 • • • * * 1**. . . 1. . . ** A C2 * 1 * • • • 1 • • • * * *1*. . . 1. . . ** B</formula><p>The application of reduc(A, B) modifies the string B as follows </p><formula xml:id="formula_20">x1 x2 x3 • • • x k • • • xn−1 xn Falsifying string C1 1 * * • • • 1 • • • * * 1**. . . 1. . . ** A C2 0 1 * • • • 1 • • • *</formula><formula xml:id="formula_21">i ∧ C j ) = 2 n−2 + 2 n−3 + 2 n−4 .</formula><p>The transformation to obtain independent clauses can be applied over C j as (</p><formula xml:id="formula_22">x 1 ∨ x 2 ) ∧ (x 3 ∨ x 4 ) = (x 1 ∨ x 2 ) ∧ (x 1 ∨ x 3 ∨ x 4 ) ∧ (x 1 ∨ x 2 ∨ x 3 ∨ x 4 ).</formula><p>Lemma 5. For any independent formula</p><formula xml:id="formula_23">F = {C 1 , . . . , C m } involving n varia- bles #F AL(F ) = m i=1 2 n−|Ci| . Corollary 1. If F is an independent k-CF then #F AL(F ) = m i=1 2 n−k .</formula><p>F is a contradiction when #FAL(F ) = 2 n , then all k-CF with at least 2 k independent clauses will be a contradiction.</p><p>Furthermore, let F be a CF, n = |υ(F )| and F is not necessarily an independent formula. Let C be an independent clause with each clause of F , based on the iterative application of lemma 3, it holds</p><formula xml:id="formula_24">#F AL(F ∧ C) = #F AL(F ) + 2 n−|C|<label>(3)</label></formula><p>The independent reduction determines a procedure to compute #FAL(F ∧C) when #F AL(F ) has already been computed. The procedure consists of applying the independent reduction on C and the clauses in F involving the variables υ(C) until we build a new set of clauses C which will be independent with each clause C i ∈ F .</p><p>For example, let F = {{x 1 , x 2 }, {x 3 , x 2 }, {x 4 , x 3 }, {x 4 , x 5 }, {x 5 , x 6 }}. #FAL(F ) can be computed incrementally using the falsifying strings of the clauses of F . The matrix of Table <ref type="table">1</ref> represents the falsifying string of each clause.  <ref type="table">2</ref>. The falsifying strings after applying the independent reduction between C1 and C3.</p><p>Clauses C 1 and C 2 are independent so no reduction is needed between those clauses. The clause C 3 is not independent with C 1 , even more, this pair of clauses <ref type="table">3</ref>. The falsifying strings after applying the independent reduction between C1 and C4.</p><formula xml:id="formula_25">x1 x2 x3 x4 x5 x6 C1 1 1 * * * * C2 * 0 1 * * * C3−1 1 0 * 0 1 * * C3−1 2 1 0 0 1 * * C4−1 1 0 * * 0 0 * C4−1 2 1 0 * 0 0 * Table</formula><formula xml:id="formula_26">x1 x2 x3 x4 x5 x6 C1 1 1 * * * * C2 * 0 1 * * * C3 0 * 0 1 * * C4 1 0 0 1 * * C5 0 1 * 0 0 * C6 0 0 0 0 0 1 C7 1 0 0 0 0 1 C8 0 1 1 1 0 0 C9 0 0 0 0 0 0 C10 1 0 0 * 0 0 Table 4.</formula><p>The falsifying strings after applying the independent reduction between C1 and C4.</p><p>does not have a common literal hence the independent reduction has to be applied either to C 1 or C 3 . Applying it to C 3 we obtain the strings of Table <ref type="table">2</ref>. Now, the four clauses are independent each other. Consider now C 4 whose falsifying string is * * * 00 * . Again it is not independent with C 1 , applying the independent reduction rule we obtain the strings of Table <ref type="table">3</ref>.</p><p>Both C 4−1 1 and C 4−1 2 are independent with C 1 . The new clauses have to be checked to be independent with the rest of the clauses. It can be noticed that the new clause C 4−1 1 is not independent with the clause C 2 so the procedure is repeated until each clause in F is independent with each other. The independent reduction application gives the results shown in Table <ref type="table">4</ref>.</p><p>From lemma 5, #FAL(F ) = Σ 10 i=1 2 n−|Ci| = 2 4 + 2 4 + 2 3 + 2 2 + 2 2 + 2 0 + 2 0 + 2 0 + 2 0 + 2 0 = 53. Then, #SAT(F ) = 2 n − #F AL(F ) = 64 − 53 = 11.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="3.1">Reducing the sizes of CF's</head><p>In order to reduce the number of clauses while applying the independent reduction principle, the following rule can be applied. Subsumed clause Rule. Given two clauses C i and C j of a CF F , if Lit(C i ) ⊆ Lit(C j ), then C j is subsumed by C i , and then C j can be deleted from F .</p><p>Namely, all satisfying assignments of C j are satisfying assignments of C i : SAT(C j ) ⊆ SAT(C i ). Thus, it is enough to keep C i (the clause which subsumes) in the CF. In terms of falsifying strings. The subsumed clause rule requests that each falsifying string will be compared with the rest in the Table of falsifying strings in order to find a subsumed clause, if it exists. That implies the order of O(n • m 2 ) basic operations in the worst case.</p></div><figure xmlns="http://www.tei-c.org/ns/1.0" xml:id="fig_0"><head>Theorem 1 .</head><label>1</label><figDesc><ref type="bibr" target="#b3">[4]</ref> Let F = {C 1 , C 2 , . . . , C m } be a 2-CF and n = |υ(F )|. The hard cases to answer whether #SAT(F ) = k, are given when m &gt; n. Lemma 1.<ref type="bibr" target="#b3">[4]</ref> Let F = {C 1 , . . . , C m } be a 2-CF and n</figDesc></figure>
<figure xmlns="http://www.tei-c.org/ns/1.0" xml:id="fig_1"><head>Example 1 ..Lemma 3 .</head><label>13</label><figDesc>Let F = {C 1 , C 2 } be a 2-CF and |υ(F )| = 3. If C 1 = {x 1 , x 2 } and C 2 = {x 2 , x 3 } then A 1 = {000, 001} and A 2 = {000, 100}. We will use the symbol * to represent the variables that can take any truth value in the set A i , e.g. if F = {C 1 , . . . , C m } is a 2-CF, n = |υ(F )|, C 1 = {x 1 , x 2 } and C 2 = {x 2 , x 3 } then we will write A 1 = 00 * * . . . * n and A 2 = * 00 * . . . * n . This abuse of notation will allow us to present a concise and clear representation in the rest of the paper, for considering the string A i as a binary pattern that represents the set of falsifying assignments of the clause C i . We define falsifying string as a binary pattern A i which represents the set of falsifying assignments of C i . Let F = {C 1 , . . . , C m } be a 2-CF, n = |υ(F )|, we denote by F als String(C i ) the procedure which constructs the falsifying string (with n symbols) of C i . Given a falsifying string A i , the positions where 0 or 1 appear in A i are called the fixed values of the string, while the positions where the symbol * appears are called the free values of the string. We define the string representing the null clause as the full string * * . . . * n [4] Let F be a 2-CF, n = |υ(F )|.If C i ∈ F and C j ∈ F , i = j contain a complementary pair of literals, that is x k ∈ C i and x k ∈ C j , the falsifying set of assignments A i and A j of C i and C j respectively, forms a disjoint set of falsifying assignments. Consequently, both clauses suppress exactly 2 n−2 + 2 n−2 = 2 n−1 assignments from S(F ).</figDesc></figure>
<figure xmlns="http://www.tei-c.org/ns/1.0" xml:id="fig_2"><head></head><label></label><figDesc>C 1 )−(Lit(C 1 )∩Lit(C 2 ))| and |Lit(C 2 )−(Lit(C 1 )∩Lit(C 2 ))| or if we are working with falsifying strings by computing the set of indices {i | A[i] = 1 or A[i] = 0 and B[i] = * } and {i | B[i] = 1 or B[i] = 0 and A[i] = * }.</figDesc></figure>
<figure xmlns="http://www.tei-c.org/ns/1.0" xml:id="fig_3"><head></head><label></label><figDesc>. there is a non-empty set of indices x j such that A[x j ] = B[x j ] and 3. there is a set of indices x j such that (A[x j ] = 0 or A[x j ] = 1 and B[x j ] = * ) or (B[x j ] = 0 or B[x j ] = 1 and A[x j ] = * ).</figDesc></figure>
<figure xmlns="http://www.tei-c.org/ns/1.0" xml:id="fig_5"><head>Definition 4 .</head><label>4</label><figDesc>Let A and B be two falsifying strings of length n. It is said that B subsumes A if there is a set of indices I = {i 1 , . . . , i k } ⊂ {1, . . . , n} such that the following conditions hold: -∀i ∈ I, (A[i] = 0 or A[i] = 1) and B[i] = * -∀j / ∈ I, j ∈ [[n]], A[j] = B[j].</figDesc></figure>
<figure xmlns="http://www.tei-c.org/ns/1.0" type="table" xml:id="tab_0"><head></head><label></label><figDesc>Proof. By applying |C i |-times the independent reduction on C i and C j . Example 3. Let C i , C j ∈ F , where C i = (x 1 ∨ x 2 ) and C j = (x 3 ∨ x 4 ) are dependent clauses. By lemma 4, #F AL(C</figDesc><table><row><cell></cell><cell>*</cell><cell>01*. . . 1. . . ** B</cell></row><row><cell cols="3">Lemma 4. Let C i , C j be two dependent clauses with no common literals, in a</cell></row><row><cell cols="3">formula F with n variables. The number of falsifying assignments for this pair</cell></row><row><cell>of clauses is:</cell><cell></cell></row><row><cell>|Ci|</cell><cell></cell></row><row><cell>2 n−|Ci| +</cell><cell cols="2">2 n−|Cj |−i</cell></row><row><cell>i=1</cell><cell></cell></row></table></figure>
		</body>
		<back>
			<div type="annex">
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="4">An Incremental Computation for #FAL</head><p>Given F (n, m) a CF, Algorithm 1 computes #SAT (F ) based on the computation of #F AL(F ). We start with the first clause C 1 ∈ F , and continue adding the following clause making it independent with the previous processed clauses, until all the original clauses in F are processed. The algorithm is tailor-made to compute SAT (F ), however, it can also be used to compute #SAT (F ) and #F AL(F ). The procedure Simplif y(T i ) works on a set of falsifying strings T i , looking for pair of strings representing subsumed clauses in order to delete the string corresponding to the subsumed clause. The procedure Simplif y(T i ) keeps or reduces the cardinality of the set of strings T i . As Simplif y(T i ) involves to compare each falsifying string A with the following strings in T i , it has a time complexity of O(n</p><p>The procedure Count F alsif yings(T m ) counts the number of falsifying assignments of an independent set of clauses represented by the set of falsifying strings T m , and this computation is done in time O(|T m |). Furthermore, the function Count F alsif yings can be performed into the body of the main loop of the procedure #F alsif ying(F ) in order to detect any minimum unsatisfiable subset of clauses of F .</p><p>The total time complexity of our proposal is polynomial on n and on the size of the falsifying table T i . Then, we have to compute the growing size of the set T i when each new falsifying string A j is processed into the loop of #F alsif ying(F ). Of course, a non-tight upper bound for |T m | is #FAL(F ) itself, because at most each falsifying string can have n fixed values and there are at most #FAL(F ) falsifying strings in T m . However, the representation of each F AL(C i ), C i ∈ F by a falsifying string guarantees that is not needed to express in exhaustive way all falsifying assignment of F AL(C i ).</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="5">Conclusions</head><p>Given as input a CF F expressed by m clauses defined on n variables, we have shown a deterministic algorithm for computing #F AL(F ). Our method is incremental on the set of clauses of F . We start computing excluded subsets of falsifying assignments of F until all the space of falsifying assignments defined by F is covered, and as #SAT(F ) = 2 n -#FAL(F ), results about #SAT(F ) can be dually established. Some reductions in our procedure are used, as subsumed clauses and the independent reduction between dependent clauses, in order to accelerate the computation of #FAL(F ).</p></div>			</div>
			<div type="references">

				<listBibl>

<biblStruct xml:id="b0">
	<analytic>
		<title level="a" type="main">Counting models for 2SAT and 3SAT formulae</title>
		<author>
			<persName><forename type="first">V</forename><surname>Dahllöf</surname></persName>
		</author>
		<author>
			<persName><forename type="first">P</forename><surname>Jonsson</surname></persName>
		</author>
		<author>
			<persName><forename type="first">M</forename><surname>Wahlström</surname></persName>
		</author>
	</analytic>
	<monogr>
		<title level="j">Theoretical Computer Sciences</title>
		<imprint>
			<biblScope unit="volume">332</biblScope>
			<biblScope unit="issue">1-3</biblScope>
			<biblScope unit="page" from="265" to="291" />
			<date type="published" when="2005">2005</date>
		</imprint>
	</monogr>
</biblStruct>

<biblStruct xml:id="b1">
	<analytic>
		<title level="a" type="main">A threshold for a Polynomial Solution of #2SAT</title>
		<author>
			<persName><forename type="first">De</forename><surname>Ita</surname></persName>
		</author>
		<author>
			<persName><forename type="first">G</forename><surname>Marcial-Romero</surname></persName>
		</author>
		<author>
			<persName><forename type="first">R</forename><surname>Hernández</surname></persName>
		</author>
		<author>
			<persName><forename type="first">J</forename><forename type="middle">A</forename></persName>
		</author>
	</analytic>
	<monogr>
		<title level="j">Fundamenta Informaticae</title>
		<imprint>
			<biblScope unit="volume">113</biblScope>
			<biblScope unit="issue">1</biblScope>
			<biblScope unit="page" from="63" to="77" />
			<date type="published" when="2011">2011</date>
		</imprint>
	</monogr>
</biblStruct>

<biblStruct xml:id="b2">
	<analytic>
		<title level="a" type="main">New Polynomial Classes for #2SAT Established Via Graph-Topological Structure</title>
		<author>
			<persName><forename type="first">De</forename><surname>Ita</surname></persName>
		</author>
		<author>
			<persName><forename type="first">G</forename><surname>Bello</surname></persName>
		</author>
		<author>
			<persName><forename type="first">P</forename><surname>Contreras</surname></persName>
		</author>
		<author>
			<persName><forename type="first">M</forename></persName>
		</author>
		<ptr target="com" />
	</analytic>
	<monogr>
		<title level="j">Engineering Letters</title>
		<imprint>
			<biblScope unit="volume">15</biblScope>
			<biblScope unit="issue">2</biblScope>
			<biblScope unit="page" from="250" to="258" />
			<date type="published" when="2007">2007</date>
			<publisher>engineeringletters</publisher>
		</imprint>
	</monogr>
</biblStruct>

<biblStruct xml:id="b3">
	<analytic>
		<title level="a" type="main">Computing #2SAT and #2UNSAT by Binary Patterns</title>
		<author>
			<persName><forename type="first">De</forename><surname>Ita</surname></persName>
		</author>
		<author>
			<persName><forename type="first">G</forename><surname>Marcial-Romero</surname></persName>
		</author>
		<author>
			<persName><forename type="first">J</forename><forename type="middle">R</forename></persName>
		</author>
	</analytic>
	<monogr>
		<title level="m">-4th Mexican Conf. on Pattern Recognition</title>
				<imprint>
			<date type="published" when="2012">2012</date>
			<biblScope unit="volume">7329</biblScope>
			<biblScope unit="page" from="273" to="282" />
		</imprint>
	</monogr>
</biblStruct>

<biblStruct xml:id="b4">
	<analytic>
		<title level="a" type="main">Counting the number of solutions for instances of satisfiability</title>
		<author>
			<persName><forename type="first">Dubois</forename><surname>Olivier</surname></persName>
		</author>
	</analytic>
	<monogr>
		<title level="j">Theor. Comp. Sc</title>
		<imprint>
			<biblScope unit="volume">81</biblScope>
			<biblScope unit="page" from="49" to="64" />
			<date type="published" when="1991">1991</date>
		</imprint>
	</monogr>
</biblStruct>

<biblStruct xml:id="b5">
	<analytic>
		<title level="a" type="main">A bounded approximation for the minimum cost 2-Sat problem</title>
		<author>
			<persName><forename type="first">D</forename><surname>Gusfield</surname></persName>
		</author>
		<author>
			<persName><forename type="first">L</forename><surname>Pitt</surname></persName>
		</author>
	</analytic>
	<monogr>
		<title level="j">Algorithmica</title>
		<imprint>
			<biblScope unit="volume">8</biblScope>
			<biblScope unit="page" from="103" to="117" />
			<date type="published" when="1992">1992</date>
		</imprint>
	</monogr>
</biblStruct>

<biblStruct xml:id="b6">
	<analytic>
		<title level="a" type="main">Approximate inclusion-exclusion</title>
		<author>
			<persName><forename type="first">N</forename><surname>Linial</surname></persName>
		</author>
		<author>
			<persName><forename type="first">N</forename><surname>Nisan</surname></persName>
		</author>
	</analytic>
	<monogr>
		<title level="j">Combinatorica</title>
		<imprint>
			<biblScope unit="volume">10</biblScope>
			<biblScope unit="issue">4</biblScope>
			<biblScope unit="page" from="349" to="365" />
			<date type="published" when="1990">1990</date>
		</imprint>
	</monogr>
</biblStruct>

<biblStruct xml:id="b7">
	<analytic>
		<title level="a" type="main">Counting propositional models</title>
		<author>
			<persName><forename type="first">E</forename><surname>Lozinskii</surname></persName>
		</author>
	</analytic>
	<monogr>
		<title level="j">Inf. Proc. Letters</title>
		<imprint>
			<biblScope unit="volume">41</biblScope>
			<biblScope unit="page" from="327" to="332" />
			<date type="published" when="1992">1992</date>
		</imprint>
	</monogr>
</biblStruct>

<biblStruct xml:id="b8">
	<analytic>
		<title level="a" type="main">On the hardness of approximate reasoning</title>
		<author>
			<persName><forename type="first">D</forename><surname>Roth</surname></persName>
		</author>
	</analytic>
	<monogr>
		<title level="j">Artificial Intelligence</title>
		<imprint>
			<biblScope unit="volume">82</biblScope>
			<biblScope unit="page" from="273" to="302" />
			<date type="published" when="1996">1996</date>
		</imprint>
	</monogr>
</biblStruct>

<biblStruct xml:id="b9">
	<analytic>
		<title level="a" type="main">The Complexity of Counting in Sparse, Regular, and Planar Graphs</title>
		<author>
			<persName><forename type="first">Vadhan</forename><surname>Salil</surname></persName>
		</author>
		<author>
			<persName><forename type="first">P</forename></persName>
		</author>
	</analytic>
	<monogr>
		<title level="j">SIAM Journal on Computing</title>
		<imprint>
			<biblScope unit="volume">31</biblScope>
			<biblScope unit="issue">2</biblScope>
			<biblScope unit="page" from="398" to="427" />
			<date type="published" when="2001">2001</date>
		</imprint>
	</monogr>
</biblStruct>

<biblStruct xml:id="b10">
	<analytic>
		<title level="a" type="main">A Tighter Bound for Counting Max-Weight Solutions to 2SAT Instances</title>
		<author>
			<persName><forename type="first">M</forename><surname>Wahlström</surname></persName>
		</author>
	</analytic>
	<monogr>
		<title level="m">Parameterized and Exact Computation: Third Int. Workshop</title>
				<imprint>
			<date type="published" when="2008">2008</date>
			<biblScope unit="volume">5018</biblScope>
			<biblScope unit="page" from="202" to="213" />
		</imprint>
	</monogr>
</biblStruct>

<biblStruct xml:id="b11">
	<analytic>
		<title level="a" type="main">New Worts-Case Upper Bound for #2-SAT and #3-SAT with the Number of Clauses as the Parameter</title>
		<author>
			<persName><forename type="first">Zhou</forename><surname>Junping</surname></persName>
		</author>
		<author>
			<persName><forename type="first">Yin</forename><surname>Minghao</surname></persName>
		</author>
		<author>
			<persName><forename type="first">C</forename><surname>Zhou</surname></persName>
		</author>
	</analytic>
	<monogr>
		<title level="m">Proc. of the AAAI</title>
				<meeting>of the AAAI</meeting>
		<imprint>
			<date type="published" when="2010">2010</date>
			<biblScope unit="page" from="217" to="222" />
		</imprint>
	</monogr>
</biblStruct>

				</listBibl>
			</div>
		</back>
	</text>
</TEI>
