<!DOCTYPE article PUBLIC "-//NLM//DTD JATS (Z39.96) Journal Archiving and Interchange DTD v1.0 20120330//EN" "JATS-archivearticle1.dtd">
<article xmlns:xlink="http://www.w3.org/1999/xlink">
  <front>
    <journal-meta />
    <article-meta>
      <title-group>
        <article-title>Counting Falsifying Assignments of Conjunctive Forms Using Binary Patterns</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>Guillermo De Ita</string-name>
          <email>deita@cs.buap.mx</email>
          <xref ref-type="aff" rid="aff1">1</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>J. Raymundo Marcial-Romero</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Pilar Pozos-Parra</string-name>
          <email>pilar.pozos@ujat.mx</email>
          <xref ref-type="aff" rid="aff2">2</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Nancy Barragan</string-name>
          <xref ref-type="aff" rid="aff1">1</xref>
        </contrib>
        <aff id="aff0">
          <label>0</label>
          <institution>Facultad de Ingenier a</institution>
          ,
          <addr-line>UAEM</addr-line>
        </aff>
        <aff id="aff1">
          <label>1</label>
          <institution>Faculty of Computer Sciences</institution>
          ,
          <addr-line>BUAP</addr-line>
        </aff>
        <aff id="aff2">
          <label>2</label>
          <institution>Universidad Juarez Autonoma de Tabasco</institution>
        </aff>
      </contrib-group>
      <abstract>
        <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 de ned 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 de ned by F is covered. Due to #SAT(F ) = 2n-#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>
      </abstract>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>-</title>
      <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 [1, 9{11]. 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 [
        <xref ref-type="bibr" rid="ref4">4</xref>
        ] 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 e cient 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 [
        <xref ref-type="bibr" rid="ref11 ref12">11, 12</xref>
        ].
      </p>
      <p>
        In [
        <xref ref-type="bibr" rid="ref3">3</xref>
        ], 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 [
        <xref ref-type="bibr" rid="ref2">2</xref>
        ] a new way to measure the degree of di culty 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 ) = 2n #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 de nitions. 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.
2</p>
    </sec>
    <sec id="sec-2">
      <title>Preliminaries</title>
      <p>Let X = fx1; : : : ; xng be a set of n Boolean variables. A literal is either a variable
xi or a negated variable xi. As usual, for each xi 2 X, xi0 = xi and xi1 = xi.</p>
      <p>A clause is a disjunction of di erent and non-contradictory literals
(sometimes, we also consider a clause as a set of literals, e.g. x1 _ x2 = fx1; x2g). For
k 2 IN , a k-clause is a clause consisting of exactly k literals. A variable x 2 X
appears in a clause c if either x or x is an element of c.</p>
      <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 de ned 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 c = fx1; x2g,
(c) = fx1; x2g. Lit(F ) is the set of literals involved in F , i.e. if X = (F ), then
Lit(F ) = X [ X = fx1; x1; :::; xn; xng. We denote f1; 2; :::; ng by [[n]] and the
cardinality of a set A by jAj.</p>
      <p>An assignment s for F is a function s : (F ) ! f0; 1g. An assignment s can
also be considered as a set of literals without a complementary pair of literals,
e.g., if l 2 s, then l 62 s, in other words s turns l true and l false or viceversa.
Let c be a clause and s an assignment, c is satis ed by s if and only if c \ s 6= ;.
On the other hand, if for all l 2 c, l 2 s, then s falsi es c. If n = j (F )j, then
there are 2n possible assignments de ned over (F ). Let S(F ) be the set of 2n
assignments de ned over (F ).</p>
      <p>Let F be a CF, F is satis ed by an assignment s if each clause in F is
satis ed by s. F is contradicted by s if any clause in F is falsi ed by s. A
model of F is an assignment for (F ) that satis es 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 ) n 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 de ned over (F ), while #F AL(F ) denotes the number of
falsifying assignments of F . Thus, #FAL(F ) = 2n- #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: GF = (V (F ); E(F )), where V (F ) = (F ) and
E(F ) = ff (x); (y)g : fx; yg 2 F g. I.e. the vertices of GF are the variables of
F , and for each clause fx; yg in F there is an edge f (x); (y)g 2 E(F ).</p>
      <p>The neighborhood for x 2 V (F ) is N (x) = fy 2 V (F ) : fx; yg 2 E(F )g and
its closed neighborhood is N (x)[fxg denoted as N [x]. The degree of a variable x,
denoted by (x), is jN (x)j, and the degree of F is (F ) = maxf (x) : x 2 V (F )g.
The size of the neighborhood of x, (N (x)), is (N (x)) = Py2N(x) (y).</p>
      <p>An algorithm to compute #SAT (F ), considers the set of connected
components of its constrained graph GF . 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 (F ) = #SAT (GF ) = Qk
i=1 #SAT (Gi); where fG1; : : : ; Gkg is
the set of connected components of GF [
        <xref ref-type="bibr" rid="ref9">9</xref>
        ].
      </p>
      <p>The set of connected components of GF conforms a partition of F . So, from
now on, we will work with a formula F represented by just one connected
component.
3</p>
    </sec>
    <sec id="sec-3">
      <title>Computing #FAL via Binary Patterns</title>
      <p>Let F = fC1; C2; : : : ; Cmg be a strict 2-CF (each clause has length 2) and let
n = j (F )j. The size of F is n+m. Let k be a positive integer parameter such that
k &lt; 2n. 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 [
        <xref ref-type="bibr" rid="ref6">6</xref>
        ] 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 [
        <xref ref-type="bibr" rid="ref2">2</xref>
        ], 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 [
        <xref ref-type="bibr" rid="ref4">4</xref>
        ], several hard cases for solving #SAT(F ) are identi ed. Such identi cation
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>
      <p>
        Theorem 1. [
        <xref ref-type="bibr" rid="ref4">4</xref>
        ] Let F = fC1; C2; : : : ; Cmg be a 2-CF and n = j (F )j. The hard
cases to answer whether #SAT(F ) = k, are given when m &gt; n.
      </p>
      <p>
        Lemma 1. [
        <xref ref-type="bibr" rid="ref4">4</xref>
        ] Let F = fC1; : : : ; Cmg be a 2-CF and n = j (F )j, if F is not a
tautology then #F AL(F ) 2n 2 or the number of Falsifying Assignments is at
least 2n 2.
      </p>
      <p>
        It is known [
        <xref ref-type="bibr" rid="ref5">5</xref>
        ] that for any pair of clauses Ci and Cj , it holds that #F AL(Ci[
Cj ) = #F AL(Ci) + #F AL(Cj ) #F AL(Ci \ Cj ). The following lemmas show
when the number of models can be reduced.
      </p>
      <p>
        Lemma 2. [
        <xref ref-type="bibr" rid="ref4">4</xref>
        ] Let F be a 2-CF, n = j (F )j. If Ci 2 F and Cj 2 F , i 6= j have
non-complementary pairs of literals, but they share a literal (e.g. Ci \ Cj 6= ;),
then there are exactly 2n 2 + 2n 3 assignments from S(F ) falsifying Ci [ Cj .
      </p>
      <p>Binary patterns have been introduced to represent the set of falsifying
assignments of any clause de ned on n variables. Those patterns allow us to design
e cient procedures for computing #FAL(F ).</p>
      <p>Let F = fC1; : : : ; Cmg be a 2-CF and n = j (F )j. Assume an enumeration
over the variables of (F ), e.g. x1; x2; : : : ; xn. For each clause Ci = fxj ; xkg, let
Ai 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 xj
and xk that falsi es Ci. E.g., if xj 2 Ci then the j-th element of Ai is set to 0.
On the other hand, if xj 2 Ci then the j-th element of Ai is set to 1. The same
argument applies to xk. It is easy to show that if Ci = fxj ; xkg, then xj and xk
have the same values in each string of Ai 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 falsi ed.</p>
      <p>Example 1. Let F = fC1; C2g be a 2-CF and j (F )j = 3. If C1 = fx1; x2g and
C2 = fx2; x3g then A1 = f000; 001g and A2 = f000; 100g.</p>
      <p>We will use the symbol to represent the variables that can take any truth
value in the set Ai, e.g. if F = fC1; : : : ; Cmg is a 2-CF, n = j (F )j, C1 = fx1; x2g
and C2 = fx2; x3g then we will write A1 = 00 : : : and A2 = 00 : : : . This
| {nz } | {nz }
abuse of notation will allow us to present a concise and clear representation in
the rest of the paper, for considering the string Ai as a binary pattern that
represents the set of falsifying assignments of the clause Ci.</p>
      <p>
        We de ne falsifying string as a binary pattern Ai which represents the set of
falsifying assignments of Ci. Let F = fC1; : : : ; Cmg be a 2-CF, n = j (F )j, we
denote by F als String(Ci) the procedure which constructs the falsifying string
(with n symbols) of Ci. Given a falsifying string Ai, the positions where 0 or 1
appear in Ai are called the xed values of the string, while the positions where
the symbol appears are called the free values of the string. We de ne the string
representing the null clause as the full string : : : .
| {z }
n
Lemma 3. [
        <xref ref-type="bibr" rid="ref4">4</xref>
        ] Let F be a 2-CF, n = j (F )j. If Ci 2 F and Cj 2 F , i 6= j
contain a complementary pair of literals, that is xk 2 Ci and xk 2 Cj , the
falsifying set of assignments Ai and Aj of Ci and Cj respectively, forms a disjoint
set of falsifying assignments. Consequently, both clauses suppress exactly 2n 2
+ 2n 2 = 2n 1 assignments from S(F ).
      </p>
      <p>We propose to generalize the previous de nitions 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.</p>
      <p>
        De nition 1. [
        <xref ref-type="bibr" rid="ref5">5</xref>
        ] Given two clauses Ci and Cj, 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>De nition 1 can be written in terms of falsifying strings as follows:
De nition 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 2 f0; 1g, it is said that
they have the independence property. Otherwise, we say that both strings are
dependent.</p>
      <p>De nition 3. Let F = fC1; C2; Cmg be a CF. F is called independent if
each pair of clauses Ci; Cj 2 F; i 6= j, has the independence property, otherwise
F is called dependent.</p>
      <p>Let F = fC1; C2; Cmg be a CF, n = j (F )j. Let C be a clause in F and
x 2 (F ) n (C) be any variable, we have that</p>
      <p>C = (C _ x) ^ (C _ x)
(1)</p>
      <p>Furthermore, this reduction preserves the number of falsifying assignments
of C with respect to F , since #F AL(C) = 2n jCj = 2n (jCj+1) + 2n (jCj+1) =
#F AL((C _ x) ^ (C _ x)), because (C _ x) ^ (C _ x) are two independent clauses.
In terms of falsifying strings, let F = fC1; C2; : : : Cmg, n = (F ), if A is the
falsifying string of a clause Cj such that there is an index i; A[i] = then the
falsifying string A can be replaced by two falsifying strings say A1 and A2 as
follows:
1. A1[j] = A[j] if j 6= i and A1[j] = 1 if j = i.
2. A2[j] = A[j] if j 6= i and A2[j] = 0 if j = i.</p>
      <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
A1 and A2 with respect to F .</p>
      <p>Given a pair of dependent clauses C1 and C2. Let us assume that there
are literals in C1 which are not in C2, let x1; x2; :::; xp be these literals. There
exists a reduction to transform C2 to be independent with C1, we call at this
transformation the independent reduction, and this works as follows: By (1) we
can write: C1 ^ C2 = C1 ^ (C2 _ :x1) ^ (C2 _ x1). Now C1 and (C2 _ :x1) are
independent. Applying (1) to (C2 _ x1):</p>
      <p>C1 ^ C2 = C1 ^ (C2 _ :x1) ^ (C2 _ x1 _ :x2) ^ (C2 _ x1 _ x2)</p>
      <p>The rst three clauses are independent. Repeating the process of being
independent between the last clause with the previous ones, until xp is considered,
we have that C1 ^ C2 can be written as:
C1^(C2_:x1)^(C2_x1_:x2)^:::^(C2_x1_x2_:::_:xp)^(C2_x1_x2_:::_xp).</p>
      <p>The last clause contains all literals of C1, so it can be eliminated, and then
C1 ^ C2 = C1 ^ (C2 _ :x1) ^ (C2 _ x1 _ :x2) ^ ::: ^ (C2 _ x1 _ x2 _ ::: _ :xp) (2)</p>
      <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 x1; x2; :::; xp such that A[xi] = 1 or A[xi] = 0 and B[xi] = , for all
i 2 [[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 B1; B2; : : : Bp as follows:
{ B1[i] = B[i] if i 6= x1 and B1[i] = 1 A[i] if i = x1.
{ B2[i] = B[i] if i 6= x1 and i 6= x2, B2[i] = A[i] if i = x1 and B1[i] = 1
if i = x2.
{
{ Bp[i] = B[i] if i 6= xj; j 2 f1 pg and Bp[i] = A[i] if i = xj; j 2 f1 p 1g,
and Bp[i] = 1 A[i] if i = xp.</p>
      <p>We will denote the independent reduction between two clauses C1 and C2 or
their corresponding falsifying strings A and B as: reduc(C1; C2) or reduc(A; B)
respectively. Notice that the independent reduction is not commutative, in the
sense that reduc(C2; C1) builds an independent set of jLit(C2) (Lit(C1) \
Lit(C2))j clauses. However, reduc(C1; C2) and reduc(C2; C1) are logically
equivalent because they determine the same set of falsifying assignments.
Furthermore, when (Lit(C1) (Lit(C1) \ Lit(C2))) = ; then the set of falsifying
assignments of C2 is a subset of the set of falsifying assignments of C1, that is,
F AL(C2) F AL(C1), and then reduc(C1; C2) = C1.</p>
      <p>Reduction that contains the smallest number of clauses can be obtained by
computing both jLit(C1) (Lit(C1)\Lit(C2))j and jLit(C2) (Lit(C1)\Lit(C2))j
or if we are working with falsifying strings by computing the set of indices fi j
A[i] = 1 or A[i] = 0 and B[i] = g and fi j B[i] = 1 or B[i] = 0 and A[i] = g.
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 Ci; Cj 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 Ci and Cj. That A
and B are dependents with at least one common literal means that the following
conditions hold:
1. if A[i] = x then B[i] 6= 1 x for all i 2 f1 : : : ng,
2. there is a non-empty set of indices xj such that A[xj] = B[xj] and
3. there is a set of indices xj such that (A[xj] = 0 or A[xj] = 1 and B[xj] = )
or (B[xj] = 0 or B[xj] = 1 and A[xj] = ).
Example 2. The following table shows two falsifying strings of two dependent
clauses with a common literal
The application of reduc(A; B) modi es the string B as follows
xn 1 xn Falsifying string
* * 1**. . . 1. . . ** A
* * 01*. . . 1. . . ** B
Lemma 4. Let Ci; Cj be two dependent clauses with no common literals, in a
formula F with n variables. The number of falsifying assignments for this pair
of clauses is:</p>
      <p>jCij
2n jCij + X 2n jCjj i
Example 3. Let Ci; Cj 2 F , where Ci = (x1 _ x2) and Cj = (x3 _ x4) are
dependent clauses. By lemma 4, #F AL(Ci ^ Cj) = 2n 2 + 2n 3 + 2n 4. The
transformation to obtain independent clauses can be applied over Cj as (x1 _
x2) ^ (x3 _ x4) = (x1 _ x2) ^ (x1 _ x3 _ x4) ^ (x1 _ x2 _ x3 _ x4).
Lemma 5. For any independent formula F = fC1; : : : ; Cmg involving n
variables #F AL(F ) = Pim=1 2n jCij.</p>
      <p>Corollary 1. If F is an independent k-CF then #F AL(F ) = Pim=1 2n k.</p>
      <p>F is a contradiction when #FAL(F ) = 2n, then all k-CF with at least 2k
independent clauses will be a contradiction.</p>
      <p>Furthermore, let F be a CF, n = j (F )j 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
#F AL(F ^ C) = #F AL(F ) + 2n jCj
(3)</p>
      <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 C0 which will be independent with each clause
Ci 2 F .</p>
      <p>For example, let F = ffx1; x2g; fx3; x2g; fx4; x3g; fx4; x5g; fx5; x6gg. #FAL(F )
can be computed incrementally using the falsifying strings of the clauses of F .
The matrix of Table 1 represents the falsifying string of each clause.
x1 x2 x3 x4 x5 x6
C1 1 1 * * * *</p>
      <p>C2 * 0 1 * * *
C3 11 0 * 0 1 * *</p>
      <p>C3 12 1 0 0 1 * *
Table 2. The falsifying strings after
applying the independent reduction between C1
and C3.</p>
      <p>Clauses C1 and C2 are independent so no reduction is needed between those
clauses. The clause C3 is not independent with C1, even more, this pair of clauses
does not have a common literal hence the independent reduction has to be
applied either to C1 or C3. Applying it to C3 we obtain the strings of Table 2.</p>
      <p>Now, the four clauses are independent each other. Consider now C4 whose
falsifying string is 00 . Again it is not independent with C1, applying the
independent reduction rule we obtain the strings of Table 3.</p>
      <p>Both C4 11 and C4 12 are independent with C1. The new clauses have to be
checked to be independent with the rest of the clauses. It can be noticed that
the new clause C4 11 is not independent with the clause C2 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 4.</p>
      <p>From lemma 5, #FAL(F ) = i1=012n jCij = 24 + 24 + 23 + 22 + 22 + 20 + 20 +
20 + 20 + 20 = 53. Then, #SAT(F ) = 2n #F AL(F ) = 64 53 = 11.
3.1</p>
      <p>Reducing the sizes of CF's
In order to reduce the number of clauses while applying the independent
reduction principle, the following rule can be applied.</p>
      <p>Subsumed clause Rule. Given two clauses Ci and Cj of a CF F , if Lit(Ci)
Lit(Cj), then Cj is subsumed by Ci, and then Cj can be deleted from F .</p>
      <p>Namely, all satisfying assignments of Cj are satisfying assignments of Ci:
SAT(Cj) SAT(Ci). Thus, it is enough to keep Ci (the clause which subsumes)
in the CF. In terms of falsifying strings.</p>
      <p>De nition 4. 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 = fi1; : : : ; ikg f1; : : : ; ng such that
the following conditions hold:
{ 8i 2 I; (A[i] = 0 or A[i] = 1) and B[i] =
{ 8j 2= I, j 2 [[n]], A[j] = B[j].</p>
      <p>The subsumed clause rule requests that each falsifying string will be
compared with the rest in the Table of falsifying strings in order to nd a subsumed
clause, if it exists. That implies the order of O(n m2) basic operations in the
worst case.</p>
    </sec>
    <sec id="sec-4">
      <title>An Incremental Computation for #FAL</title>
      <p>Given F (n; m) a CF, Algorithm 1 computes #SAT (F ) based on the
computation of #F AL(F ). We start with the rst clause C1 2 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 ).</p>
      <p>The procedure Simplif y(Ti) works on a set of falsifying strings Ti, looking
for pair of strings representing subsumed clauses in order to delete the string
corresponding to the subsumed clause. The procedure Simplif y(Ti) keeps or
reduces the cardinality of the set of strings Ti. As Simplif y(Ti) involves to
compare each falsifying string A with the following strings in Ti, it has a time
complexity of O(n jTij2).</p>
      <p>The procedure Count F alsif yings(Tm) counts the number of falsifying
assignments of an independent set of clauses represented by the set of falsifying
strings Tm, and this computation is done in time O(jTmj). 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 unsatis able
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 Ti. Then, we have to compute the growing size of the set Ti
when each new falsifying string Aj is processed into the loop of #F alsif ying(F ).
Of course, a non-tight upper bound for jTmj is #FAL(F ) itself, because at most
each falsifying string can have n xed values and there are at most #FAL(F )
falsifying strings in Tm. However, the representation of each F AL(Ci), Ci 2 F
by a falsifying string guarantees that is not needed to express in exhaustive way
all falsifying assignment of F AL(Ci).
5</p>
    </sec>
    <sec id="sec-5">
      <title>Conclusions</title>
      <p>Given as input a CF F expressed by m clauses de ned 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 de ned
by F is covered, and as #SAT(F ) = 2n-#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>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          1. Dahllof V.,
          <string-name>
            <surname>Jonsson</surname>
            <given-names>P.</given-names>
          </string-name>
          , Wahlstrom
          <string-name>
            <surname>M.</surname>
          </string-name>
          ,
          <article-title>Counting models for 2SAT and 3SAT formulae</article-title>
          .,
          <source>Theoretical Computer Sciences</source>
          ,
          <volume>332</volume>
          (
          <issue>1-3</issue>
          ), (
          <year>2005</year>
          ), pp.
          <fpage>265</fpage>
          -
          <lpage>291</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          2. De Ita G.,
          <string-name>
            <surname>Marcial-Romero</surname>
            <given-names>R.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Hernandez</surname>
            <given-names>J.A.</given-names>
          </string-name>
          ,
          <article-title>A threshold for a Polynomial Solution of #2SAT</article-title>
          ,
          <string-name>
            <surname>Fundamenta</surname>
            <given-names>Informaticae</given-names>
          </string-name>
          ,
          <volume>113</volume>
          :1(
          <issue>2011</issue>
          ), pp.
          <fpage>63</fpage>
          -
          <lpage>77</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          3. De Ita G.,
          <string-name>
            <surname>Bello</surname>
            <given-names>P.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Contreras</surname>
            <given-names>M.</given-names>
          </string-name>
          , New Polynomial Classes for #2SAT
          <string-name>
            <given-names>Established</given-names>
            <surname>Via Graph-Topological</surname>
          </string-name>
          <string-name>
            <surname>Structure</surname>
          </string-name>
          ,
          <source>Engineering Letters</source>
          , Vol.
          <volume>15</volume>
          ;
          <issue>2</issue>
          ,
          <string-name>
            <surname>Int</surname>
          </string-name>
          . Assoc. of Engineers, www.engineeringletters.com, (
          <year>2007</year>
          ), pp.
          <fpage>250</fpage>
          -
          <lpage>258</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          4. De Ita G.,
          <string-name>
            <surname>Marcial-Romero</surname>
            <given-names>J.R.</given-names>
          </string-name>
          ,
          <source>Computing #2SAT and #2UNSAT by Binary Patterns</source>
          ,
          <string-name>
            <surname>LNCS</surname>
          </string-name>
          , Vol.
          <volume>7329</volume>
          - 4th
          <source>Mexican Conf. on Pattern Recognition</source>
          , (
          <year>2012</year>
          ), pp.
          <fpage>273</fpage>
          -
          <lpage>282</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref5">
        <mixed-citation>
          5.
          <string-name>
            <given-names>Dubois</given-names>
            <surname>Olivier</surname>
          </string-name>
          ,
          <article-title>Counting the number of solutions for instances of satis ability</article-title>
          ,
          <source>Theor. Comp. Sc. 81</source>
          , (
          <year>1991</year>
          ),
          <fpage>49</fpage>
          -
          <lpage>64</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref6">
        <mixed-citation>
          6.
          <string-name>
            <surname>Gus</surname>
            eld
            <given-names>D.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Pitt</surname>
            <given-names>L.</given-names>
          </string-name>
          ,
          <article-title>A bounded approximation for the minimum cost 2-Sat problem</article-title>
          ,
          <source>Algorithmica</source>
          <volume>8</volume>
          , (
          <year>1992</year>
          ),
          <fpage>103</fpage>
          -
          <lpage>117</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref7">
        <mixed-citation>
          7.
          <string-name>
            <surname>Linial</surname>
            <given-names>N.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Nisan</surname>
            <given-names>N.</given-names>
          </string-name>
          <string-name>
            <surname>Approximate</surname>
          </string-name>
          inclusion-exclusion.
          <source>Combinatorica</source>
          , Vol.
          <volume>10</volume>
          , No.
          <volume>4</volume>
          , (
          <year>1990</year>
          ), pp.
          <fpage>349</fpage>
          -
          <lpage>365</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref8">
        <mixed-citation>
          8.
          <string-name>
            <surname>Lozinskii</surname>
            <given-names>E.</given-names>
          </string-name>
          , Counting propositional models,
          <source>Inf. Proc. Letters</source>
          <volume>41</volume>
          , (
          <year>1992</year>
          ), pp.
          <fpage>327</fpage>
          -
          <lpage>332</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref9">
        <mixed-citation>
          9.
          <string-name>
            <surname>Roth</surname>
            <given-names>D.</given-names>
          </string-name>
          ,
          <article-title>On the hardness of approximate reasoning</article-title>
          ,
          <source>Arti cial Intelligence</source>
          <volume>82</volume>
          , (
          <year>1996</year>
          ), pp.
          <fpage>273</fpage>
          -
          <lpage>302</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref10">
        <mixed-citation>
          10.
          <string-name>
            <surname>Vadhan Salil</surname>
            <given-names>P.</given-names>
          </string-name>
          , The Complexity of Counting in Sparse, Regular, and Planar Graphs,
          <source>SIAM Journal on Computing</source>
          , Vol.
          <volume>31</volume>
          , No.
          <volume>2</volume>
          , (
          <year>2001</year>
          ), pp.
          <fpage>398</fpage>
          -
          <lpage>427</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref11">
        <mixed-citation>
          11.
          <string-name>
            <surname>Wahlstrom M.</surname>
            ,
            <given-names>A Tighter</given-names>
          </string-name>
          <string-name>
            <surname>Bound for Counting</surname>
            Max-Weight Solutions to 2SAT Instances,
            <given-names>LNCS</given-names>
          </string-name>
          , Vol.
          <volume>5018</volume>
          - Parameterized and Exact Computation:
          <source>Third Int. Workshop</source>
          , (
          <year>2008</year>
          ), pp.
          <fpage>202</fpage>
          -
          <lpage>213</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref12">
        <mixed-citation>
          12.
          <string-name>
            <surname>Zhou</surname>
            <given-names>Junping</given-names>
          </string-name>
          , Yin Minghao,
          <string-name>
            <surname>Zhou</surname>
            <given-names>C.</given-names>
          </string-name>
          ,
          <article-title>New Worts-Case Upper Bound for #2-SAT and #3-SAT with the Number of Clauses as the Parameter</article-title>
          ,
          <source>Proc. of the AAAI</source>
          , (
          <year>2010</year>
          ), pp.
          <fpage>217</fpage>
          -
          <lpage>222</lpage>
          .
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>