European Journal of Combinatorics 34 (2013) 793–805
Contents lists available at SciVerse ScienceDirect
European Journal of Combinatorics journal homepage: www.elsevier.com/locate/ejc
Sensitivity of Boolean formulas✩ Nadia Creignou a , Hervé Daudé b a b
Aix-Marseille Université, CNRS, LIF UMR 7279, 13 288 Marseille, France Aix-Marseille Université, CNRS, LATP UMR 7353, 13 453 Marseille, France
article
info
Article history: Received 3 July 2012 Accepted 15 December 2012 Available online 28 January 2013
abstract The sensitivity set of a Boolean function at a particular input is the set of input positions where changing that one bit changes the output. Analogously we define the sensitivity set of a Boolean formula in a conjunctive normal form at a particular truth assignment, it is the set of positions where changing that one bit of the truth assignment changes the evaluation of at least one of the conjunct in the formula. We consider Boolean formulas in a generalized conjunctive normal form. Given a set F of Boolean functions, an F -constraint is an application of a function from F to a tuple of literals built upon distinct variables, an F -formula is then a conjunction of F -constraints. In this framework, given a truth assignment I and a set of positions S, we are able to enumerate all F -formulas that are satisfied by I and that have S as the sensitivity set at I. We prove that this number depends on the cardinality of S only, and can be expressed according to the sensitivity of the Boolean functions in F . © 2012 Elsevier Ltd. All rights reserved.
1. Introduction Sensitivity was originally introduced by Cook and Dwork [2] as a simple combinatorial complexity measure for Boolean functions. It is nowadays a well-known invariant of Boolean functions that occurs in many different fields, ranging from quantum complexity [16] to discrete Fourier analysis [12,10]. The sensitivity set of a Boolean function at a particular input is the set of input positions where changing that one bit changes the output. The sensitivity of the Boolean function at a particular input is then the cardinality of the sensitivity set, while the sensitivity of the function is defined as the
✩ Supported by the Agence Nationale de la Recherche, ANR BOOLE 09-BLAN-0011-01.
E-mail addresses:
[email protected] (N. Creignou),
[email protected] (H. Daudé). 0195-6698/$ – see front matter © 2012 Elsevier Ltd. All rights reserved. doi:10.1016/j.ejc.2012.12.006
794
N. Creignou, H. Daudé / European Journal of Combinatorics 34 (2013) 793–805
maximum of its sensitivity over all possible inputs. This notion has been in particular studied for specific classes of Boolean function, such as monotone functions [14], symmetric Boolean functions and graph properties [17]. In this paper we define analogously the sensitivity set of a Boolean formula Φ at a particular truth assignment I. We consider formulas in conjunctive normal form, the sensitivity set of Φ at I is then defined as the set of positions where changing that one bit of I changes the evaluation of at least one of the conjunct in the formula. Our goal is to get first enumerative results on Boolean formulas according to their sensitivity set at a particular truth assignment. To this aim we consider F -formulas as defined by Schaefer [15], where F is a set of Boolean functions. These formulas are formulas in generalized conjunctive form, the type of the conjuncts being restricted by F . This framework has been recognized as particularly interesting since many years in complexity theory where it has allowed numerous unified and systematic complexity classifications (see [6] for a survey). We consider an adaptation of Schaefer’s framework that was originally proposed in [3] and that is well-suited to obtain enumerative results. Our main result, Theorem 4.17, is an exact enumeration of all F -formulas that have a given sensitivity set S at a particular satisfying truth assignment I. Due to our model this number does not depend on I, we prove that it depends on the cardinality of S only, and can be expressed according to the sensitivity of the Boolean functions in F . Our result allows for the easy derivation of expressions enumerating the formulas having any structure defined through some sensitivity set. The paper is organized as follows. In Section 2 we recall some definitions on the sensitivity of Boolean functions and introduce new invariants for Boolean functions. The Boolean formulas we are interested in, F -formulas, are described in Section 3. Sensitivity of Boolean formulas and our main result are presented in Section 4. Some applications are presented in Section 5 and a conclusion is given in Section 6. 2. Sensitivity of Boolean functions For a and b two integers we denote by [[a, b]] the set of integers defined by [[a, b]] := {x ∈ N | a ≤ x ≤ b}. If a > b then this set is the empty-set. Similarly, ]]a, b]] := {x ∈ N | a < x ≤ b} and this set is empty when a ≥ b. Let f : {0, 1}k −→ {0, 1} be a Boolean function, where k is called the arity of f . For any subset τ of [[1, k]] and x ∈ {0, 1}k we form xτ by complementing those bits in x indexed by elements of τ . We write xt for x{t } . A first natural invariant on a Boolean function f is its weight, namely |f −1 (1)|. Another invariant is its sensitivity. The sensitivity of f at a particular input x, s(f , x), is the number of input positions where changing that one bit changes the output. Thus, we define the sensitivity set of f at x as: S(f , x) = {t: 1 ≤ t ≤ k, f (x) ̸= f (xt )}.
Observe that for all x we have
|S(f , x)| = s(f , x). (1)
(r )
If s(f , x) = r, then V(f , x) = (if (x), . . . , if (x)) with (1)
(r )
if (x) < · · · < if (x) denotes the ordered sequence of sensitive indices of f on input x. An invariant of interest is the distribution of the sensitivity of f . Thus, for ε = 0, 1 we define:
Θrε (f ) = |{x : f (x) = ε and |S(f , x)| = r }|. Observe that k r =0
Θrε (f ) = |f −1 (ε)|.
(1)
N. Creignou, H. Daudé / European Journal of Combinatorics 34 (2013) 793–805
795
One can decompose this invariant one step further in identifying the positions of the sensitive bits. Thus for any sequence of r indices 1 ≤ i1 < i2 < · · · < ir ≤ k we define:
θiε1 ,...,ir (f ) = |{x: f (x) = ε, s(f , x) = r and i(f 1) (x) = i1 , . . . , i(f r ) (x) = ir }|. Obviously,
Θrε (f ) =
1≤i1
θiε1 ,...,ir (f ).
(2)
Example 2.1. • Let f : {0, 1}3 −→ {0, 1} be the Boolean function defined by f −1 (1) = {0, 1}3 \{000}. Its weight is 7, it has sensitivity 1 on the three tuples 001, 010, 100, and sensitivity 0 on the four tuples 011, 101, 110, 111. It has sensitivity 3 on the tuple 000. Therefore, Θ01 (f ) = 4, Θ11 (f ) = 3 and Θ30 (f ) = 1, while all the other coefficients are zero. • Let g: {0, 1}3 −→ {0, 1} be the Boolean function defined by g −1 (1) = {001, 010, 100, 111}. Its weight is 4, it has sensitivity 3 on all tuples. We have Θ31 (g ) = 4 and Θ30 (g ) = 4, while all the other coefficients are zero. The sensitivity parameters of a Boolean function can be naturally extended to define the sensitivity parameters of a finite set of Boolean functions. From now on F will denote a finite set of Boolean functions of arity k and we set for any ε = 0, 1:
Θrε (F ) =
Θrε (f )
(3)
f ∈F
and we denote
Θ ε (F ) :=
k
Θrε (F ).
r =0
From (1) it follows that
Θ ε (F ) =
|f −1 (ε)|.
(4)
f ∈F
To conclude this section we give some useful characterization of the weight and the sensitivity of any Boolean function f . It is obtained by considering the orbit of f when complementing its variables. More precisely, given τ ⊆ [[1, k]], we denote by fτ the Boolean function fτ : {0, 1}k −→ {0, 1} defined by fτ (x) = f (xτ ). Proposition 2.2. Let f be a Boolean function of arity k ≥ 1. For any given x ∈ {0, 1}k and ε = 0, 1 we have:
|f −1 (ε)| = |{τ : τ ⊆ [[1, k]], fτ (x) = ε}| Θrε (f ) = |{τ : τ ⊆ [[1, k]], fτ (x) = ε and s(fτ , x) = r }| ,
(5)
θiε1 ,...,ir (f ) = |{τ : τ ⊆ [[1, k]], fτ (x) = ε and V(fτ , x) = (i1 , . . . , ir )}| .
(6)
Proof. Just observe that for all (x, y) ∈ {0, 1}k there exists a unique τ such that y = xτ .
Remark. The observation above can be formulated as follows: the group action of the additive group Hk = {0, 1}k by translation on itself, is simply transitive. Then we easily deduce from the above that for any Boolean function f of arity k, for any σ ∈ Σk (the permutation group on k elements), for any τ and for any r ∈ [[0, k]] one has Θrε (f ) = Θrε (fτ(σ ) ), where f (σ ) (x1 , . . . , xk ) = f (xσ (1) , . . . , xσ (k) ). This means that for any k-ary Boolean function f , bit ε and natural number r ≤ k, the number of truth assignments with respect to which f gives value ε and has sensitivity r does not change if we change the logical sign of some of the variables of f or permute them. In more algebraic words, Θrε is an invariant of Boolean functions of arity k under the action of the hyper-octahedral group obtained as a semi direct product of Hk and Σk
796
N. Creignou, H. Daudé / European Journal of Combinatorics 34 (2013) 793–805
3. A symmetric model for F -formulas 3.1. F -formulas As mentioned in the introduction Schaefer [15] proposed a framework to capture a large class of syntactically restricted formulas. He considered formulas in generalized normal form, F -formulas, where F is a finite set of Boolean functions. In such a formula each conjunct consists of an application of a Boolean function from F to a tuple of variables. The aim of this section is to describe a model for such F -formulas that is conducive to enumeration. Our choice is guided by the remark concluding the previous section. Let f : {0, 1}k −→ {0, 1} be a Boolean function. Any non-trivial function f : {0, 1}k → {0, 1} is called a (Boolean) constraint function of arity k. From now on n and k denote two positive integers with n ≥ k ≥ 1 and F denotes a finite set of constraint functions of arity k. An n-{f } constraint, C , of arity k is given by:
• a one-to-one function ϕ : [[1, k]] → [[1, n]], • a subset τ ⊆ [[1, k]], and is denoted by C = (f , ϕ, τ ). An n-F -constraint is an n-{f }constraint for some f ∈ F . An n-assignment is a truth assignment I: [[1, n]] −→ {0, 1}. Given such an assignment and a one-to-one function ϕ : [[1, k]] → [[1, n]], we denote by m(I , ϕ) the motif of I pinpointed by ϕ : m(I , ϕ) := (I (ϕ(1)), . . . , I (ϕ(k))). We define C (I ) := fτ (m(I , ϕ)), as the status of the constraint C with respect to I. The n-assignment I satisfies C if C (I ) = 1. Example 3.1. Let us consider the functions f , g: {0, 1}3 −→ {0, 1} such that f −1 (1) = {0, 1}3 \ {000}, and g −1 (1) = {001, 010, 100, 111}. Thus f (x, y, z ) = (x ∨ y ∨ z ) and g (x, y, z ) = (x ⊕ y ⊕ z ). Set k = 3 and n = 7. Let ϕ1 and ϕ2 be such that ϕ1 (1) = 3, ϕ1 (2) = 7, ϕ1 (3) = 4, and ϕ2 (1) = 7, ϕ2 (2) = 4, ϕ2 (3) = 6. Let τ1 = {1, 2} and τ2 = {1, 3}. The two constraints C1 = (f , ϕ1 , τ1 ) and C2 = (g , ϕ2 , τ2 ) stand respectively for the clause (¯x3 ∨ x¯ 7 ∨ x4 ) and the XOR-clause (¯x7 ⊕ x4 ⊕ x¯ 6 ). Let I be the all-one assignment. Then, m(I , ϕ1 ) = m(I , ϕ2 ) = (1, 1, 1), and C1 (I ) = fτ1 (1, 1, 1) = f (0, 0, 1) = 1, while C2 (I ) = gτ2 (1, 1, 1) = f (0, 1, 0) = 1. A sequence of n-F -constraints, Φ = (C1 , . . . , CL ), is called an (n, l)-F -formula. Given a truth assignment I, the status of Φ with respect to I is defined as:
Φ (I ) = (C1 (I ), . . . , CL (I )). A formula Φ = (C1 , . . . , CL ) is satisfiable if there exists an n-assignment I that satisfies simultaneously all its n-constraints, i.e., such that Φ (I ) = (1, . . . , 1). Such an assignment is then called a solution of Φ . Example 3.2. Let us consider F = {f , g } and C1 , C2 the two constraints introduced in Example 3.1, with I the all-one assignment. Let Φ = (C1 , C2 ). Then Φ (I ) = (1, 1). This model is referred to as the symmetric model because a constraint C = (f , ϕ, τ ) can be τ τ interpreted as f (xϕ(1 1) , . . . , xϕ(k k) ) and thus literals and not only variables occur in the scope of the constraint function. This induces a symmetry on the role of the truth values 0 and 1, which together with the fact mentioned above that Θrε is an invariant of Boolean functions, will allow us to enumerate all formulas that are satisfied by a given truth assignment.
N. Creignou, H. Daudé / European Journal of Combinatorics 34 (2013) 793–805
797
3.2. Enumeration of formulas satisfied by a given truth assignment First observe that the number of n-F -constraints is 2k · (n)k · |F |, where (n)k := n(n − 1) · · · (n − k + 1). The number of n-F -formulas of size L, NF (n, L), is then
L
NF (n, L) = 2k · (n)k · |F |
.
Let I be a given n-assignment. We are interested in enumerating the formulas that are satisfied by I. From the observation (5) in Proposition 2.2 it follows that the number of n-{f } constraints that are satisfied by a I depends on the weight of the constraint function f only. More generally we have the following. Proposition 3.3. Let n ≥ k ≥ 1 be positive integers. Let f be a Boolean function of arity k, I an n-assignment and ε ∈ {0, 1}.
|{C = (f , ϕ, τ ): C (I ) = ε}| = (n)k · |f −1 (ε)|. Proof.
|{C = (f , ϕ, τ ): C (I ) = ε}| = |{(ϕ, τ ): fτ (m(I , ϕ)) = ε}| = |{τ : fτ (m(I , ϕ)) = ε}| ϕ
=
|f −1 (ε)| from (5) in Proposition 2.2, since m(I , ϕ) is fixed when I and ϕ are fixed
ϕ
= (n)k · |f −1 (ε)|. Hence and according to (4), the number of n-F -constraints C such that C (I ) = ε can be expressed as follows. Proposition 3.4. Let n ≥ k ≥ 1 be positive integers. Let F be a finite set of constraint functions of arity k, I be an n-assignment and ε ∈ {0, 1}.
|{C : C is an n-F -constraint and C (I ) = ε}| = (n)k · Θ ε (F ). From this proposition it follows that the number of (n, l)-F -formulas Φ that are satisfied by I, i.e., such that Φ (I ) = (1, . . . , 1), can be expressed with the weight of the functions in F . More generally we have the following. Proposition 3.5. Let n ≥ k ≥ 1 and L be positive integers, and F a finite set of constraint functions L of arity k. Let I be an n-assignment and E = (e1 , . . . , eL ) ∈ {0, 1}L with e := j=1 ej . The number of formulas having the status E at I depends on the weight of E only and can be expressed according to the weight of the functions in F . More precisely:
L−e e |{Φ : Φ is an (n, l)-F -formula and Φ (I ) = E }| = (n)k · Θ 0 (F ) (n)k · Θ 1 (F ) . 4. Sensitivity of F -formulas and main result 4.1. Sensitivity of F -formulas Let I be an n-assignment. By analogy to previous definitions I t denotes the assignment obtained from I by flipping the truth value of the t-th variable. Let C = (f , ϕ, τ ) be an n-constraint and I be a truth assignment. The sensitive set of C at I is defined as: S(C , I ) := {t: 1 ≤ t ≤ n, C (I ) ̸= C (I t )}.
798
N. Creignou, H. Daudé / European Journal of Combinatorics 34 (2013) 793–805
The sensitivity of C at the truth assignment I is then the cardinality of this set: s(C , I ) := |S(C , I )|. In order to be able to give an expression of this in terms of the invariants of F , suppose that (1) (r ) s(fτ , m(I , ϕ)) = r and let us consider ifτ (m(I , ϕ)) , . . . , ifτ (m(I , ϕ)) the ordered sequence of sensitive indices of fτ on input m(I , ϕ). In considering the r-arrangement of their image by ϕ we keep track of this ordering in S (C , I ). More formally we consider the following one-to-one correspondence G(C , I ), denoted G for more readability: G: [[1, r ]] → [[1, n]] (u)
u → ϕ ifτ (m(I , ϕ)) .
Thus the sequence (G(u))ru=1 is the ordered sequence of sensitivity indices of C at I. Example 4.1. Let us consider once more the constraints C1 = (¯x3 ∨ x¯ 7 ∨ x4 ) and C2 = (¯x7 ⊕ x4 ⊕ x¯ 6 ) introduced in Example 3.1, with I the all-one assignment. The sensitive set of C1 at I is {4}, hence s(C1 , I ) = 1 and the ordered sequence of sensitive indices of C1 at I is (4), i.e., G(C1 , I )(1) = 4. It is related to the fact that, at the point (1, 1, 1), the function fτ1 (x, y, z ) = (¯x ∨ y¯ ∨ z ) is sensitive on its third variable only, and to the fact that ϕ1 (3) = 4. The sensitive set of C2 at I is {4, 6, 7}, s(C2 , I ) = 3 and the ordered sequence of sensitive indices of C2 at I is (7, 4, 6), i.e., G(C2 , I )(1) = 7, G(C2 , I )(2) = 4 and G(C2 , I )(3) = 6. It is related to the fact that the function gτ2 (x, y, z ) = (¯x ⊕ y ⊕ z¯ ) is sensitive on all its variables at the point (1, 1, 1), and to the fact that ϕ2 (1) = 7, ϕ2 (2) = 4, ϕ2 (3) = 6. Let us now turn to formulas and let us consider Φ = (C1 , . . . , CL ) together with I a truth assignment. We define the sensitivity set of Φ at the truth assignment I as: S(Φ , I ) := {t: 1 ≤ t ≤ n, Φ (I ) ̸= Φ (I t )}.
Observe that S(Φ , I ) = j=1 S(Cj , I ). The sensitivity of Φ at the satisfying truth assignment I is the cardinality of the sensitivity set:
L
s(Φ , I ) := |S(Φ , I )|. This notion can be refined in considering the sequence that gives the sensitivity of each constraint in Φ at I. Thus, let us consider the sequence of L non-negative integers. R(Φ , I ) = (r1 , . . . , rL ) where rj = s(Cj , I ) for 1 ≤ j ≤ L. Example 4.2. In the running example (Example 3.1), Φ = (C1 , C2 ) and I is the all-one assignment. We have S(Φ , I ) = {4, 6, 7}, s(Φ , I ) = 3 and R(Φ , I ) = (1, 3). Let us now state some combinatorial results, which will be of use to get enumeration results. 4.2. Combinatorics In the following l is a positive integer and R = (r1 , . . . , rl ) denotes a sequence of l non-negative integers. Then, let us introduce some notation:
• • • •
l(R) = l is the length of R, s t0 (R) = 0, for 1 ≤ s ≤ l, ts (R) = i=1 ri , and t (R) = tl (R) is the sum of R, h(R) = max{ri | i = 1, . . . , l} is the height of R, i(R) is the non-decreasing sequence of non-negative integers given by: i(R) = (0, . . . , 0, . . . , . . . l − 1, . . . , l − 1).
r1
rl
N. Creignou, H. Daudé / European Journal of Combinatorics 34 (2013) 793–805
799
• for 0 ≤ s ≤ h, ps (R) = |{i | ri = s}| and the print of R is p(R) = (p0 , . . . , ph )
• for 1 ≤ i ≤ l, let Ii (R) =]]ti−1 (R), ti (R)]]. Thus, (Ii (R))li=1 is a partition of [[1, t (R)]] into l(R) intervals, from which (l(R) − p0 (R)) are nonempty. Example 4.3. Let R = (0, 1, 2, 2, 1, 1). Then l(R) = 6; t0 (R) = t1 (R) = 0, t2 (R) = 1, t3 (R) = 3, t4 (R) = 5, t5 (R) = 6 and t6 (R) = 7 = t (R). We have h(R) = 2 and i(R) = (1, 2, 2, 3, 3, 4, 5). The print of R is p(R) = (1, 3, 2). So, R provides the following partition of [[1, 7]] into 6 intervals (5 of them are non-empty): I1 = ∅, I2 = {1}, I3 = [[2, 3]], I4 = [[4, 5]], I5 = {6} and I6 = {7}. Finally, since p(R) is a sequence of non-negative integers i(p(R)) is well defined and i(p(R)) = (0, 1, 1, 1, 2, 2). Observe that s≥0 ps (R) = l(R) and l(p(R)) = h(R)+ 1. Moreover, l(i(R)) = t (R), p(i(R)) = R (that is the print of i(R) is R, hence i(R) can be seen as the canonical sequence of print R) and in particular p(p(i(R))) = p(R) and l(p(i(R))) = l(R). We have also p(R) = p(i(p(R))), which says that i(p(R)) is the canonical sequence having the same print as R. Moreover we have the following.
Lemma 4.4. Let k ≥ 1 be an integer. Let Q = (q0 , . . . , qk ) be a sequence of k + 1 non-negative integers. Then, i(Q ) = (0, . . . , 0, . . . , k, . . . , k) has print Q , l(i(Q )) = t (Q ) = q0 + · · · + qk , and
q0
|{R | i(p(R)) = i(Q )}| =
qk
q0 + · · · + qk
q0 , . . . , qk
.
Definition 4.5 (R-Injectivity). Let R = (r1 , . . . , rl ) be a sequence of l non-negative integers. A function G defined on [[1, t (R)]] is said to be R-injective if for all i such that 1 ≤ i ≤ l(R), G restricted to the interval Ii (R) =]]ti−1 (R), ti (R)]] is injective. Definition 4.6 (Definition of SR ). Let S be a finite set and R = (r1 , . . . , rl ) be a sequence of l nonnegative integers. The set SR is defined as the set of surjective applications G from [[1, t (R)]] onto S that are R-injective. Observe that the cardinality of the set SR defines a combinatorial coefficient that has the following properties. Lemma 4.7. Let S be a finite set and R = (r1 , . . . , rl ) be a sequence of l non-negative integers, then 1. |SR | depends on R and on |S | only; |SR | ̸= 0 if and only if h(R) ≤ |S | ≤ t (R). 2. |SR | = |Si(p(R)) |, i.e., |SR | depends on the print of R and on the cardinality of S only. 3. |SR | ≤ S (t (R), |S |) · |S |! where S (a, b) is the Stirling number of the second kind associated to the number of functions from [[1, a]] onto [[1, b]]. Proof. For the first item observe that we need |S | ≤ t (R) to get a surjection. Injectivity on all intervals requires |S | ≥ h(R). For the last item observe that the functions from SR are in particular surjective functions, from [[1, t (R)]] onto S. Proposition 4.8. Let k ≥ 1 be an integer, S be a finite set. Let Q = (q0 , . . . , qk ) be a sequence of k + 1 non-negative integers, then
|{(G, R) | i(p(R)) = i(Q ) and G ∈ SR }| =
q0 + · · · + qk q0 , . . . , qk
|Si(Q ) |.
Proof. From 2 in Lemma 4.7 we get
|{(G, R) | i(p(R)) = i(Q ) and G ∈ SR }| =
R s.t.i(p(R))=i(Q )
We then conclude with Lemma 4.4.
|SR | = |Si(Q ) |
Rs.t.i(p(R))=i(Q )
1.
800
N. Creignou, H. Daudé / European Journal of Combinatorics 34 (2013) 793–805
4.3. Enumeration Given a formula Φ and a truth assignment I, following the notation introduced above one can define p(R(Φ , I )). Observe that p(R(Φ , I )) ‘‘prints’’ the number of constraints in Φ that are 0-sensitive, 1-sensitive etc. . . ., at I. Let p(R(Φ , I )) = (p0 , . . . , ph ), observe that h ≤ k and that t (p(R)) = p0 + · · · + ph = L. For j = 1, . . . , L, the interval Ij (R(Φ , I )) =]]tj−1 , tj ]] has length rj , i.e., s(Cj , I ). The way the sensitive indices of the constraints fill the sensitivity set of the formula can be described in considering G(Φ , I ) defined as G: [[1, t (R(Φ , I ))]] −→ [[1, n]], with G|Ij (R(Φ ,I )) (u) = G(Cj , I )(u − tj−1 ) for every j, 1 ≤ j ≤ L. Note that G so defined is R(Φ , I )-injective onto S(Φ , I ) (i.e., G ∈ SR ). Example 4.9. In the running example (Examples 4.1 and 4.2), Φ = (C1 , C2 ) and I is the all-one assignment. We have R(Φ , I ) = (1, 3) and thus t (R(Φ , I )) = 4. The function G: [[1, 4]] −→ [[1, 7]] with G(1) = 4, G(2) = 7, G(3) = 4, G(4) = 6 describes successively the ordered sequence of sensitives indices at I of each clause of Φ . Observe that I1 (R(Φ , I )) = {1} and I2 (R(Φ , I )) = [[2, 4]] and that G is injective on both these intervals and surjective onto {4, 6, 7}. In the following we show that, due to Proposition 2.2, our model is well-suited for an enumeration of formulas according to their sensitivity. Our first combinatorial result is that the number of n-F -constraints that have a given ordered sequence of sensitivity indices at some given satisfying truth assignment I depends only on the sensitivity parameters of F . Indeed, one can refine Proposition 3.3 according to the sensitivity of a constraint at I. Proposition 4.10. Let n ≥ k ≥ 1 be positive integers and F a finite set of constraint functions of arity k. Let I be an n-assignment, 0 ≤ r ≤ n, σ : [[1, r ]] −→ [[1, n]] a one-to-one application and ε ∈ {0, 1}.
|{C : C is an n-F -constraint , C (I ) = ε and G(C , I ) = σ }| = (n − r )k−r Θrε (F ). Proof. For more readability let us write m for m(I , ϕ).
|{C : C is an n-F -constraint, C (I ) = ε and G(C , I ) = σ }| (r ) (1) {(ϕ, τ ): fτ (m) = ε, s(fτ , m) = r and ϕ(ifτ (m)) = σ (1), . . . , ϕ(ifτ (m)) = σ (r )} = f ∈F |{τ : fτ (m) = ε and V(fτ , m) = (i1 , . . . , ir )}| = =
f ∈F i1 <···
ϕ s.t. ϕ(i1 )=σ (1),...,ϕ(ir )=σ (r )
θiε1 ,...,ir (f ) × (n − r )(k−r ) according to Proposition 2.2
f ∈F i1 <···
=
Θrε (f )(n − r )(k−r ) = Θrε (F )(n − r )(k−r ) .
f ∈F
We deduce easily that given a truth assignment I and a set of positions S, the number of n-F -constraints that have a given status at I and whose sensitivity set at I is S, depends on the cardinality of S only and can be expressed according to the sensitivity parameters of F . Corollary 4.11. Let n ≥ k ≥ 1 be positive integers and F a finite set of constraint functions of arity k. Let I be an n-assignment, S ⊆ {1, . . . , n} of cardinality r and ε ∈ {0, 1},
|{C : C is an n-F -constraint , C (I ) = ε and S (C , I ) = S }| = r !(n − r )k−r Θrε (F ). Let us now generalize this last result to formulas. We first introduce some notation.
N. Creignou, H. Daudé / European Journal of Combinatorics 34 (2013) 793–805
801
Notation 4.12. Let k and n be fixed integers. Let F be a finite set of constraint functions of arity k. Let P = (p0 , . . . , ph ) with h ≤ k be a sequence of non-negative integers and ε ∈ {0, 1}.
γkε,n,F (P ) =
h
p (n − s)k−s Θsε (F ) s .
s=0
For more readability part of the subscript of this function will be omitted in the following, and we will ε write γnε,F or even γF . Example 4.13. Let us consider F = {f } where f is Boolean function of arity 3 defined by f −1 (0) = {(0, 0, 0)}, and ε = 1. As seen in Example 2.1, Θ01 (f ) = 4, Θ11 (f ) = 3, Θ21 (f ) = 0 and Θ31 (f ) = 0. Therefore for any sequence (p0 , p1 , p2 , p3 ), we have γn1,F (p0 , . . . , p3 ) = (4(n)3 )p0 (3(n − 1)2 )p1 if p2 = p3 = 0 and γn1,F (p0 , . . . , p3 ) = 0 otherwise.
In a first step we will enumerate formulas that have a given sensitivity set S and whose ordered sequence of sensitive indices is also given. The next proposition shows that given R, S and G in SR , the number of formulas Φ that are satisfied by a given truth assignment I, i.e., such that Φ (I ) = 1, and such that G(Φ , I ) = G depends on the print of R only. Proposition 4.14. Let k, n, L be positive integers, F a finite set of constraint functions of arity k. Let R = (r1 , . . . , rL ) be a sequence of non-negative integers, S ⊆ {1, . . . , n} with h(R) ≤ |S | ≤ t (R), and G in SR . Then for all n-assignment I and all ε ∈ {0, 1}: ε |{Φ : Φ is an (n, l)-F -formula, Φ (I ) = (ε, . . . , ε) and G(Φ , I ) = G}| = γF (p(R)).
Proof. Observe that
|{Φ : Φ is an (n, l)-F -formula, Φ (I ) = (ε, . . . , ε) and G(Φ , I ) = G}| L = |{Cj is an n-F -constraint, Cj (I ) = ε and G(Cj , I ) = σj }|, j =1
where σj : [[1, rj ]] → [[1, n]] is defined by σj (u) = G(u + tj−1 (R)) and then conclude in using Proposition 4.10.
For more readability we introduce a last notation. Notation 4.15. Let k, n, L be positive integers, F a finite set of constraint functions of arity k, ε ∈ {0, 1} and 0 ≤ s ≤ n.
Γkε,n,L,F (s) =
Q =(q0 ,...,qk ) q0 +···+qk =L
L q0 , . . . , qk
γkε,n,F (Q )si(Q ) ,
where according to Definition 4.6 and Lemma 4.7, si(Q ) denotes the number of applications from [[1, t (i(Q ))]] onto a set of cardinality s that are i(Q )-injective. Remark. Observe that in the special case L = 0 we have Γkε,n,0,F (s) = 0 for s > 0 and Γkε,n,0,F (0) = 1. Example 4.16. Let us continue with our running example, Example 4.13, where F = {f }, f is Boolean function of arity 3 defined by f −1 (0) = {(0, 0, 0)}, and ε = 1. As we have seen above γn1,F (Q ) = 0 except if Q = (q0 , q1 , 0, 0). In such a case i(Q ) is made of 0 and 1 only, therefore the non-empty sets of the associated partition Ij (i(Q )) are all singletons. Hence, for such Q any application from [[1, t (i(Q ))]] onto a set of cardinality s is i(Q )-injective. Therefore s(i(Q )) is the number of applications from a set of cardinality t (i(Q )) onto a set of cardinality s, and thus si(Q ) = S (t (i(Q )), s) · s! (thus showing that
802
N. Creignou, H. Daudé / European Journal of Combinatorics 34 (2013) 793–805
the bound obtained in Lemma 4.7 is tight). Therefore we get an explicit expression in this particular case:
Γ31,n,L,F (s) =
q0 , . . . , q3
Q =(q0 ,...,q3 ) q0 +···+q3 =L
=
Q =(q0 ,q1 ,0,0) q0 +q1 =L
L q1
Q =(q0 ,q1 ,0,0) q0 +q1 =L
=
L
L q1
γ31,n,F (Q )S (t (i(Q )), s) · s!
γ31,n,F (Q )S (t (i(Q )), s) · s! (4(n)3 )q0 (3(n − 1)2 )q1 S (q1 , s) · s!.
We are now in a position to state our main result. It says that the number of formulas satisfied by I having a given sensitivity set S ⊆ {1, . . . , n} at I depends on the cardinality of S only and can be expressed according to the sensitivity of the functions in F . Theorem 4.17. Let n ≥ k ≥ 1 and L be positive integers, and F a finite set of constraint functions of arity k. Let I be an n-assignment and S ⊆ {1, . . . , n} a set of cardinality r.
|{Φ : Φ is an (n, l)-F -formula, Φ (I ) = (1, . . . , 1) and S(Φ , I ) = S }| = Γk1,n,L,F (r ). Proof. Let N (I , S ) = |{Φ : Φ is an (n, l)-F -formula, Φ (I ) = (1, . . . , 1), and S(Φ , I ) = S }|. Observe that S(Φ , I ) = S if and only if there are G and R such that G(Φ , I ) = GR(Φ , I ) = R and G ∈ SR . Thus we have
{Φ : Φ is an (n, l)-F -formula, Φ (I ) = (1, . . . , 1) and G(Φ , I ) = G} N (I , S ) = (G,R),G∈S R |{Φ : Φ (I ) = (1, . . . , 1) and G(Φ , I ) = G}| = Q =(q0 ,...,qk ) (G,R),G∈SR q0 +···+qk =L i(p(R))=i(Q )
=
Q =(q0 ,...,qk ) (G,R),G∈SR q0 +···+qk =L i(p(R))=i(Q )
=
Q =(q0 ,...,qk ) q0 +···+qk =L
=
Q =(q0 ,...,qk ) q0 +···+qk =L
1 γF (p(R)) (according to Proposition 4.14)
1 γF (p(i(Q )))
1 γF (Q )
1 (since p(R) = p(i(p(R))))
(G,R),G∈SR i(p(R))=i(Q )
L q0 , . . . , qk
|Si(Q ) |
(according to Proposition 4.8 and the fact that Q = p(i(Q ))). According to Lemma 4.7, si(Q ) = |[[1, r ]]i(Q ) |, where r = |S |. Therefore, N (I , S ) depends on |S | only. Observe that this theorem holds as well for enumerating the formulas Φ such that Φ (I ) = 0 (0, . . . , 0) and S(Φ , I ) = S, it is ΓF (r ). Thus we can easily extend our main theorem to formulas having any fixed status.
Proposition 4.18. Let n ≥ k ≥ 1 and L be positive integers, and F a finite set of constraint functions of L arity k. Let I be an n-assignment, E = (e1 , . . . , eL ) ∈ {0, 1}L with e := j=1 ej , and S ⊆ {1, . . . , n}. The
N. Creignou, H. Daudé / European Journal of Combinatorics 34 (2013) 793–805
803
number of formulas having the status E and S as sensitivity set at I depends on |S | and the weight of E only, and can be expressed according to the sensitivity of the functions in F . More precisely
|{Φ : Φ is an (n, l)-F -formula, Φ (I ) = E and S(Φ , I ) = S }| |S | = Γk0,n,L−e,F (a + c )Γk1,n,e,F (b + c ). a, b, c a+b+c =|S | Proof. Observe that a formula Φ such that Φ (I ) = E can be decomposed into two formulas of length L1 = e and L0 = L − e, respectively Φ1 and Φ0 , such that Φ1 (I ) = (1, . . . , 1) and Φ0 (I ) = (0, . . . , 0). Therefore from Theorem 4.17 we obtain:
|{Φ : Φ is an (n, l)-F -formula, Φ (I ) = E and S(Φ , I ) = S }| = (Φ0 , Φ1 ) : Φ0 (I ) = (0, . . . , 0), Φ1 (I ) = (1, . . . , 1), S (Φ0 , I ) = S0 , S (Φ1 , I ) = S1 S0 , S1 L0 L1 S0 ∪S1 =S Γk0,n,L0 F (|S0 |)Γk1,n,L1 ,F (|S1 |) = S0 ,S1 S0 ∪S1 =S
=
a+b+c =|S |
|S | a, b , c
Γk0,n,L0 F (a + c )Γk1,n,L1 F (b + c ).
Remark. Observe that this proposition, together with Remark 4.3, gives indeed Theorem 4.17 as a special case with E = (1, . . . , 1). 5. Applications In this section we are interested in exploiting the combinatorial results obtained in the previous section in order to describe – from a combinatorial point of view – the set of solutions of a given satisfiable formula. 5.1. Formulas having a given truth assignment as a sufficiently isolated solution Let δ be fixed, 0 < δ < 1, a truth assignment I is a sufficiently isolated solution of a formula Φ if it satisfies Φ and |S(Φ , I )| ≥ δ n. Formulas having a sufficiently isolated solution play an important role in the analysis of random algorithms for the k-SAT problem (see [11]). As a corollary of Theorem 4.17 we obtain that, in our model, the number of formulas having a truth assignment I as a sufficiently isolated solution does not depend on I. Proposition 5.1. Let n ≥ k ≥ 1 and L be positive integers, and F a finite set of constraint functions of arity k. Let I be an n-assignment and 0 < δ < 1.
|{Φ : Φ is an (n, l)-F -formula, Φ (I ) = (1, . . . , 1) and |S(Φ , I )| ≥ δ n}| =
n r ≥δ n
r
Γk1,n,L,F (r ).
5.2. Formulas having a given truth assignment as a locally maximal solution Among the truth assignments that satisfy a formula, locally maximal ones have been distinguished in the literature. These satisfying assignments are local maxima in the lexicographic ordering of assignments, where the neighborhood of an assignment is the Hamming ball of radius 1. In other words a solution I of a formula Φ is a locally maximal solution of Φ if flipping any variable set to 0
804
N. Creignou, H. Daudé / European Journal of Combinatorics 34 (2013) 793–805
leads to unsatisfiability(see [8,13]). Up to now the best upper bounds for the critical ratio associated with the satisfiability phase transition of Boolean formulas have been obtained through an analytic evaluation of the expected number of these distinguished solutions (see [9,5,7,1]). Roughly speaking locally maximal solutions can be characterized by the fact that all the variables set to 0 are sensitive. Thus, locally maximal solutions can be characterized in terms of the sensitive set of the formula, as made precise in the following proposition. Proposition 5.2. A solution I of a formula Φ is a locally maximal solution of Φ if and only if {t: I (t ) = 0} ⊆ S(Φ , I ). As a result the following theorem is now an easy consequence of Theorem 4.17. It shows that the number of formulas having a given assignment I as a locally maximal solution depends on theweight of I, i.e., the number of variables assigned 1 by I, only and can be expressed in terms of the sensitivity invariants of F . Proposition 5.3. Let n ≥ k ≥ 1 and L be positive integers, and F a finite set of constraint functions of arity k. Let I be an n-assignment of weight w . The number of (n, l)-F -formulas that have I as a locally maximal solution is:
n p=n−w
w Γk1,n,L,F (p). p−n+w
6. Conclusion Schaefer’s framework lead to many classification results for F -formulas in terms of properties of F only. Such classifications were first obtained in complexity theory (see [6] for a survey) and in the study of phase transition [3,4]. In the same spirit in this paper we identified new invariants for F , namely the sensitivity parameters Θr (F ), that drive the enumeration of F -formulas according to their sensitivity. In order to obtain concise and workable expressions for such an enumeration we exhibited a sufficiently symmetric model and made explicit the algebraic source of this symmetry, namely the invariance under the action of the hyper-octahedral group (which is the group of symmetries of the discrete hypercube). Now, in this framework, it becomes possible to tackle combinatorial issues that might be informative for a better understanding of the behavior of random instances. For instance, from Proposition 3.4 it is very easy to give and then analyze the expected number of solutions of random F -formulas. Also, from Proposition 5.3 it is easy to give a combinatorial expression of the expected number of locally maximal solutions, whose asymptotic behavior can be analyzed due to the close relationship between the combinatorial coefficient |SR | occurring in this expression and the well-studied Stirling numbers of the second kind (see [5]). References [1] Y. Boufkhad, T. Hugel, Estimating satisfiability, Discrete Applied Mathematics 160 (1–2) (2012) 61–80. [2] S. Cook, C. Dwork, Bounds on the time for parallel ram’s to compute simple functions, in: Proceedings 14th STOC, Association for Computing Machinery, 1982, pp. 231–233. [3] N. Creignou, H. Daudé, Combinatorial sharpness criterion and phase transition classification for random CSPs, Information and Computation 190 (2) (2004) 220–238. [4] N. Creignou, H. Daudé, The SAT–UNSAT transition for random constraint satisfaction problems, Discrete Mathematics 309 (8) (2009) 2085–2099. [5] N. Creignou, H. Daudé, O. Dubois, Expected number of locally maximal solutions for random boolean CSPs, in: Proc. of 13th International Conference on Analysis of Algorithms, AofA’07, DMTCS, 2007. [6] N. Creignou, H. Vollmer, in: N. Creignou, Ph. Kolaitis, H. Vollmer (Eds.), Boolean Constraint Satisfaction Problems: When Does Post’s Lattice Help?, in: Complexity of Constraints, vol. 5250, 2008, pp. 3–37. [7] J. Díaz, L.M. Kirousis, D. Mitsche, X. Pérez-Giménez, On the satisfiability threshold of formulas with three literals per clause, Theoretical Computer Science 410 (30–32) (2009) 2920–2934. [8] O. Dubois, Y. Boufkhad, A general upper bound for the satisfiability threshold of random r-sat formulae, Journal of Algorithms 24 (2) (1997) 395–420. [9] O. Dubois, Y. Boufkhad, J. Mandler, Typical random 3-SAT formulae and the satisfiability threshold, in: David B. Shmoys (Ed.), SODA, ACM/SIAM, 2000, pp. 126–127.
N. Creignou, H. Daudé / European Journal of Combinatorics 34 (2013) 793–805
805
[10] E. Friedgut, Boolean functions with low average sensitivity depend on few coordinates, Combinatorica 18 (1) (1998) 27–35. [11] R. Impagliazzo, R. Paturi, On the complexity of k-SAT, Journal of of Computer and System Sciences 62 (2001) 367–375. [12] J. Kahn, G. Kalai, N. Linial, The influence of variables on boolean functions (extended abstract), in: FOCS, IEEE Computer Society, 1988, pp. 68–80. [13] L.M. Kirousis, E. Kranakis, D. Krizanc, Y.C. Stamatiou, Approximating the unsatisfiability threshold of random formulas, Random Structures and Algorithms 12 (3) (1998) 253–269. [14] N. Nisan, Crew prams and decision trees, SIAM Journal on Computing 20 (6) (1991) 999–10707. [15] T.J. Schaefer, The complexity of satisfiability problems, in: Proceedings 10th STOC, San Diego (CA, USA), Association for Computing Machinery, 1978, pp. 216–226. [16] Y. Shi, Lower bounds of quantum black-box complexity and degree of approximating polynomials by influence of Boolean variables, Information Processing Letters 75 (1–2) (2000) 79–83. [17] G. Turán, The critical complexity of graph properties, Information Processing Letters 18 (1984) 151–153.