• Keine Ergebnisse gefunden

Connectivity of Boolean satisfiability

N/A
N/A
Protected

Academic year: 2022

Aktie "Connectivity of Boolean satisfiability"

Copied!
83
0
0

Wird geladen.... (Jetzt Volltext ansehen)

Volltext

(1)

Von der

Fakultät für Elektrotechnik und Informatik der Gottfried Wilhelm Leibniz Universität Hannover

zur Erlangung des Grades

Doktor der Naturwissenschaften Dr. rer. nat.

genehmigte Dissertation

von

Dipl.-Physiker Konrad W. Schwerdtfeger

geboren am 6. August 1985 in Hildesheim

2016

(2)

Referent: Heribert Vollmer, Leibniz Universität Hannover Korrefferent: Olaf Beyersdorff, University of Leeds

Tag der Promotion: 17.06.2016

(3)

1926 - 2014

Mein herzlicher Dank gilt meinem Doktorvater Heribert Vollmer für seine Unterstützung bei der Arbeit an dieser Dissertation.

(4)

The first principle is that you must not fool yourself, and you are the easiest person to fool.

Richard Feynman

(5)

In dieser Dissertation befassen wir uns mit der Lösungsraum-Struktur Boolescher Erfüllbarkeits-Probleme, aus Sicht der theoretischen Informatik, insbesondere der Kom- plexitätstheorie.

Wir betrachten denLösungs-GraphenBoolescher Formeln; dieser Graph hat als Kno- ten die Lösungen der Formel, und zwei Lösungen sind verbunden wenn sie sich in der Belegung genau einer Variablen unterscheiden. Für diesen implizit definierten Graphen untersuchen wir dann das Erreichbarkeitsproblem und das Zusammenhangsproblem.

Die erste systematische Untersuchung der Lösungs-Graphen Boolescher Constraint- Satisfaction-Probleme wurde 2006 von Gopalan et al. durchgeführt, motiviert haupt- sächlich von Forschung für Erfüllbarkeits-Algorithmen. Insbesondere untersuchten sie CNFC(S)-Formeln, d.h. Konjunktionen von Bedingungen, welche sich aus dem Einset- zen von Variablen und Konstanten in Boolesche Relationen einer endlichen Menge S ergeben.

Gopalan et al. bewiesen eine Dichotomie für die Komplexität des Erreichbarkeitspro- blems: Entweder ist es in Polynomialzeit lösbar oder PSPACE-vollständig, Damit über- einstimmend fanden sie auch eine strukturelle Dichotomie: Der maximale Durchmesser der Zusammenhangskomponenten ist entweder linear in der Zahl der Variablen, oder er kann exponentiell sein, Weiterhin vermuteten sie eine Trichotomie für das Zusam- menhangsproblem: entweder ist es in P, coNP-vollständig oder PSPACE-vollständig.

Zusammen mit Makino et al. bewiesen sie schon Teile dieser Trichotomie.

Auf diesen Arbeiten aufbauend vervollständigen wir hier den Beweis der Trichotomie, und korrigieren auch einen kleineren Fehler von Gopalan et al, was in einer leichten Verschiebung der Grenzen resultiert.

Anschließend untersuchen wir zwei wichtige Varianten: CNF(S)-Formeln ohne Kon- stanten, und partiell quantifizierte Formeln. In beiden Fällen beweisen wir für das Erreichbarkeitsproblem und den Durchmesser Dichotomien analog jener für CNFC(S)- Formeln. Für das Zusammenhangsproblem zeigen wir eine Trichotomie im Fall quanti- fizierter Formeln, während wir im Fall der Formeln ohne Konstanten Fragmente iden- tifizieren in denen das Problem in P, coNP-vollständig, und PSPACE-vollständig ist.

Schließlich betrachten wir die Zusammenhangs-Fragen fürB-Formeln, d.h. geschach- telte Formeln, aufgebaut aus Junktoren einer endlichen Menge B, und fürB-Circuits, d.h. Boolesche Schaltkreise, aufgebaut aus Gattern einer festen Menge B. Hier nut- zen wir Emil Post’s Klassifikation aller geschlossener Klassen Boolescher Funktionen.

Wir beweisen eine gemeinsame Dichotomie für das Erreichbarkeitsproblem, das Zusam- menhangsproblem und den Durchmesser: Auf der einen Seite sind beide Probleme in P und der Durchmesser ist linear, während auf der anderen Seite die Probleme PSPACE- vollständig sind und der Durchmesser exponentiell sein kann. Für partiell quantifizierte B-Formeln zeigen wir eine analoge Dichotomie.

Schlagworte Komplexität · Erfüllbarkeit · Zusammenhang in Graphen · Boolesche CSPs · Boolesche Schaltkreise· Post’scher Verband · Dichotomien

(6)

Abstract

In this thesis we are concerned with the solution-space structure of Boolean satisfiability problems, from the view of theoretical computer science, especially complexity theory.

We consider the solution graph of Boolean formulas; this is the graph where the vertices are the solutions of the formula, and two solutions are connected iff they differ in the assignment of exactly one variable. For this implicitly defined graph, we then study the st-connectivity and connectivity problems.

The first systematic study of the solution graphs of Boolean constraint satisfac- tion problems was done in 2006 by Gopalan et al., motivated mainly by research for satisfiability algorithms. In particular, they considered CNFC(S)-formulas, which are conjunctions of constraints that arise from inserting variables and constants in relations of some finite set S.

Gopalan et al. proved a computational dichotomy for the st-connectivity problem, asserting that it is either solvable in polynomial time or PSPACE-complete, and an aligned structural dichotomy, asserting that the maximal diameter of connected com- ponents is either linear in the number of variables, or can be exponential. Further, they conjectured a trichotomy for the connectivity problem: That it is either in P, coNP- complete, or PSPACE-complete. Together with Makino et al., they already proved parts of this trichotomy.

Building on this work, we here complete the proof of the trichotomy, and also correct a minor mistake of Gopalan et al., which leads to slight shifts of the boundaries.

We then investigate two important variants: CNF(S)-formulas without constants, and partially quantified formulas. In both cases, we prove dichotomies forst-connectivity and the diameter analogous to the ones for CNFC(S)-formulas. For for the connectivity problem, we show a trichotomy in the case of quantified formulas, while in the case of formulas without constants, we identify fragments where the problem is in P, where it is coNP-complete, and where it is PSPACE-complete.

Finally, we consider the connectivity issues for B-formulas, which are arbitrarily nested formulas built from some fixed set B of connectives, and for B-circuits, which are Boolean circuits where the gates are from some finite set B. Here, we make use of Emil Post’s classification of all closed classes of Boolean functions. We prove a common dichotomy for both connectivity problems and the diameter: on one side, both problems are in P and the diameter is linear, while on the other, the problems are PSPACE-complete and the diameter can be exponential. For partially quantified B-formulas, we show an analogous dichotomy.

Keywords Computational complexity· Boolean satisfiability · Graph connectivity · Boolean CSPs ·Boolean circuits ·Post’s lattice · Dichotomy theorems

(7)

1 Introduction 1

1.1 Boolean Satisfiability and Solution Space Connectivity . . . 1

1.2 Relevance of Solution Space Connectivity . . . 2

1.3 Related Work, Prior Publications, and this Thesis . . . 3

1.4 Associated Software. . . 4

1.5 General Preliminaries . . . 4

2 Connectivity of Constraints 7 2.1 Preliminaries . . . 7

2.1.1 CNF-Formulas and Schaefer’s Framework. . . 7

2.1.2 Classes of Relations . . . 8

2.1.3 Classes of Sets of Relations . . . 9

2.2 Results . . . 11

2.3 The General Case: Reduction from a Turing Machine . . . 12

2.4 Extension of PSPACE-Completeness: Structural Expressibility . . . 12

2.5 Safely Tight Sets of Relations: Structure and Algorithms . . . 20

2.6 CPSS Sets of Relations: A Simple Algorithm for Connectivity . . . 22

2.7 The Last Piece: coNP-Hardness for Connectivity . . . 24

2.7.1 Connectivity of Horn Formulas . . . 25

2.7.2 Reduction from Satisfiability . . . 27

2.7.3 Expressing M . . . 28

2.8 Further Results about Constraint-Projection Separation . . . 32

3 No-Constants and Quantified Variants 35 3.1 No-Constants . . . 35

3.1.1 st-Connectivity and Diameter . . . 36

3.1.2 Deciding Connectivity via Constraint-Projection Separation . . 39

3.1.3 Deciding Connectivity via Self-Implication . . . 41

3.1.4 coNP-Completeness for Connectivity within Schaefer . . . 42

3.1.5 Reductions for Connectivity . . . 46

3.2 Quantified Constraints . . . 48

3.2.1 Properties that Persist . . . 49

3.2.2 coNP-Completeness for Connectivity . . . 50

3.2.3 Deciding Connectivity in Polynomial Time . . . 52

4 Connectivity of Nested Formulas and Circuits 55 4.1 Preliminaries: B-Circuits, B-Formulas, and Post’s Lattice . . . 55

4.2 Results . . . 59

4.3 The Easy Side of the Dichotomy . . . 59

4.4 The Hard Side of the Dichotomy . . . 60

4.5 Quantified Formulas . . . 65

5 Future Directions 69

(8)

Bibliography 70

List of Figures

1.1.1 Depictions of the subgraph of the 5-dimensional hypercube graph in-

duced by a typical random Boolean relation with 12 elements. . . 1

1.1.2 Subgraphs of the 8-dimensional hypercube graph induced by typical ran- dom relations . . . 2

2.4.1 Proof of Step 1 of Lemma 2.4.6, and an example . . . 15

2.7.1 An example for the proof of Lemma 2.7.9, illustrating the idea . . . 28

2.7.2 A more complex example for the proof of Lemma 2.7.9 . . . 29

3.1.1 Producing a 1-isolating relation from every 3-ary relation R satisfying 110∈R and 010∈/ R for the proof of Lemma 3.1.4 . . . 38

4.1.1 Post’s lattice with our results . . . 57

4.4.1 An example for the transformation in the proof of Lemma 4.4.5 . . . . 63

List of Tables

2.1 Our classifications for CNFC(S)-formulas, in comparison to Sat . . . . 11

3.1 The classifications for CNF(S)-formulas without constants . . . 35

3.2 The classifications for Q-CNFC(S)-formulas . . . 48 4.1 List of all closed classes of Boolean functions with definitions and bases 58

(9)

1.1 Boolean Satisfiability

and Solution Space Connectivity

The Boolean satisfiability problem (SAT) asks for a propositional formula if there is an assignment to the variables such that it evaluates to true. It is of great importance in many areas of theoretical and applied computer science: In complexity theory, it was one of the first problems proven to be NP-complete, and still is the most important standard problem for reductions. In propositional logic, many important reasoning problems can be reduced to SAT, e.g. checking entailment: For any two sentences α and β, α |= β if and only if αβ is unsatisfiable. These connections are used for example in artificial intelligence for reasoning, planning, and automated theorem proving, and in electronic design automation (EDA) for formal equivalence checking.

SAT is only the most basic version of a multitude of related problems, asking ques- tions about a relation given by some short description. In one direction, one may look at constraint satisfaction problems over higher domains, or at multi-valued logics. In another direction, one may consider other tasks like enumerating all solutions, counting the solutions, checking the equivalence of formulas or circuits, or finding the optimal solution according to some measure. In this thesis, we follow the second direction and focus on the solution-space structure: For a formula φ, we consider the solution graph G(φ), where the vertices are the solutions, and two solutions are connected iff they differ in the assignment of exactly one variable. For this implicitly defined graph, we then study the connectivity and st-connectivity problems.

Since any propositional formula over n variables defines an n-ary Boolean relation R, i.e. a subset of {0,1}n, another way to think of the solution graph is the subgraph of the n-dimensional hypercube graph induced by the vectors inR. The figures below give an impression of how solution graphs may look like.

Figure 1.1.1 Depictions of the subgraph of the 5-dimensional hypercube graph induced by a typical random Boolean relation with 12 elements. Left: highlighted on an orthographic hypercube projection by ourSatConn-tool. Center: highlighted on a “Spectral Embedding” of the hypercube graph byMathematica. Right: the sole subgraph, arranged by Mathematica.

(10)

2 1.2 Relevance of Solution Space Connectivity

Figure 1.1.2 Subgraphs of the 8-dimensional hypercube graph (with 256 vertices) induced by typical random relations with 40, 60 and 80 elements, arranged by Mathematica.

Our perspective is mainly from complexity theory: As it was done for SAT and many of the related problems, we classify restrictions of the connectivity problems by their worst-case complexity. Along the way, we will also examine structural properties of the solution graph, and devise efficient algorithms for solving the connectivity problems.

Besides the usual propositional formulas with the connectives ∧, ∨ and¬, there are many alternative representations of Boolean relations; we will consider the following:

Boolean constraint satisfaction problems (Boolean CSPs, here CSPs for short), specifically

CNFC(S)-formulas, i.e. conjunctions of constraints that arise from inserting variables and constants in relations of some finite set S,

CNF(S)-formulas, where no constants may be used,

B-formulas, i.e. arbitrarily nested formulas built from some finite setB of connec- tives,

B-circuits, i.e. Boolean circuits where the gates are from some finite set B. For CNFC(S)-formulas and B-formulas, we also consider versions with quantifiers.

1.2 Relevance of Solution Space Connectivity

A direct application ofst-connectivity in solution graphs arereconfiguration problems, that arise when we wish to find a step-by-step transformation between two feasible solutions of a problem, such that all intermediate results are also feasible. Recently, the reconfiguration versions of many problems such as Independent-Set, Vertex- Cover, Set-Cover Graph-k-Coloring, Shortest-Path have been studied (see e.g. [IDH+11, KMM11]).

The connectivity properties of solution graphs are also of relevance to the problem of structure identification, where one is given a relation explicitly and seeks a short representation of some kind (see e.g. [CKZ08]); this problem is important especially for learning in artificial intelligence.

Further, a better understanding of the solution space structure promises advance- ment of SAT algorithms: It has been discovered that the solution space connectivity is

(11)

strongly correlated to the performance of standard satisfiability algorithms like Walk- SAT and DPLL on random instances: As one approaches thesatisfiability threshold (the ratio of constraints to variables at which randomk-CNF-formulas become unsatisfiable fork ≥3) from below, the solution space (with the connectivity defined as above) frac- tures, and the performance of the algorithms deteriorates [MMZ05, MMW07]. These insights mainly came from statistical physics, and lead to the development of thesurvey propagation algorithm, which has superior performance on random instances [MMW07].

While current SAT solvers normally accept only CNF-formulas as input, in EDA the instances mostly derive from digital circuit descriptions [WLLH07], and although many such instances can easily be encoded in CNF, the original structural information, such as signal ordering, gate orientation and logic paths, is lost, or at least obscured. Since exactly this information can be very helpful for solving these instances, considerable effort has been made recently to develop satisfiability solvers that work with the circuit description directly [WLLH07], which have far better performance in EDA applications, or to restore the circuit structure from CNF [FM07]. This is a reason for us to study the solution space also for Boolean circuits.

1.3 Related Work, Prior Publications, and this Thesis

Research has focused on the solution space structure only quite recently: Complexity results for the connectivity problems in the solution graphs of CSPs have first been obtained in 2006 by P. Gopalan, P. G. Kolaitis, E. Maneva, and C. H. Papadimitriou [GKMP06,GKMP09]. In particular, they investigated CNFC(S)-formulas and studied

• the st-connectivity problem st-ConnC(S), that asks for a CNFC(S)-formula φ and two solutions sand t whether there a path from sto t inG(φ),

• the connectivity problemConnC(S), that asks for a CNFC(S)-formula φ whether G(φ) is connected,

and

• the maximal diameter of any connected component ofG(φ) for a CNFC(S)-formula φ, where the diameter of a component is the maximal shortest-path distance be- tween any two vectors in that component.

They found a common structural and computational dichotomy: On one side, the maximal diameter is linear in the number of variables, st-connectivity is in P and connectivity is in coNP, while on the other side, the diameter can be exponential, and both problems are PSPACE-complete. Moreover, they conjectured a trichotomy for connectivity: That it is in P, coNP-complete, or PSPACE-complete. Together with Makino et al. [MTY07], they already proved parts of this trichotomy.

In [Sch13], we completed the proof of the trichotomy, and also corrected minor mistakes in [GKMP09], which lead to a slight shift of the boundaries towards the hard side. So for CNFC(S)-formulas, we now have a quite complete picture, which we present in Chapter 2. In [Sch13], we explained in detail the mistakes of Gopalan et al.

and their implications, here we just give the correct statement and proofs.

In Chapter 3, we investigate two important variants: CNF(S)-formulas without constants, and partially quantified CNFC(S)-formulas. In both cases, we prove a

(12)

4 1.4 Associated Software dichotomy for st-connectivity and the diameter analogous to the one for CNFC(S)- formulas. For for the connectivity problem, we prove a trichotomy in the case of quan- tified formulas, while in the case of formulas without constants, we have no complete classification, but identify fragments where the problem is in P, where it is coNP- complete, and where it is PSPACE-complete. Of this chapter, only a preprint with preliminary results appeared on ArXiv [Sch14b].

Finally, in Chapter4, we look atB-formulas andB-circuits. Here, we find a common dichotomy for the diameter and both connectivity problems: on one side, the diameter is linear and both problems are in P, while on the other, the diameter can be exponen- tial, and the problems are PSPACE-complete. For quantifiedB-formulas, we prove an analogous dichotomy. The work in this chapter has been published in [Sch14a].

1.4 Associated Software

As part of the research for this thesis, several programs were written, some of which may be useful for future work on related problems. All software is written in Java (version 8) and provided in the SatConn package at https://github.com/konradws/SatConn, including a graphical tool to draw the solution graphs on hypercube projections, used for several graphics in this thesis.

After downloading the complete repository, the folder can be opened resp. imported inNetbeansorEclipseas a project. The graphical tool is also provided as executable (SatConnTool.jar).

The most useful functions are declaredpublicand equipped with Javadoc comments, where helpful. The main-functions provide usage examples and can be executed by running the respective file.

1.5 General Preliminaries

Prerequisites We assume familiarity with some basic concepts from theoretical com- puter science, especially complexity theory, and its mathematical foundations:

• From mathematics, we require propositional logic, and basics about graphs, hy- pergraphs, and lattices,

• From theoretical computer science, we require Turing machines, the common com- plexity classes P, NP, coNP, PSPACE, and polynomial-time reductions.

Notation We use a,b, . . . or a1,a2, . . . to denote vectors of Boolean values and x,y, . . .orx1,x2, . . .to denote vectors of variables,a= (a1, a2, . . .) andx= (x1, x2, . . .).

φ[xi/a] denotes the formula resulting fromφby substituting the constantsaj for the variables xij.

The symbol ≤pm is used for polynomial-time many-one reductions.

Central concepts In the following definition, we formally introduce some concepts related to solution space connectivity in general. At the beginning of the next chapter, we define notions specific to CSPs. A reader only interested in B-formulas and B- circuits may read Section 2.3 after the next definition, and then skip to Chapter 4.

(13)

Definition 1.5.1 An n-ary Boolean relation (or logical relation, relation for short) is a subset of{0,1}n for some integer n≥1.

The set of solutions of a propositional formulaφ overn variables defines in a natural way ann-ary relation [φ], where the variables are taken in lexicographic order. We will often identify the formula φ with the relation it defines and omit the brackets.

The solution graph G(φ) of φ then is the subgraph of the n-dimensional hypercube graph induced by the vectors in [φ]. We will also refer to G(R) for any logical relation R (not necessarily defined by a formula).

The Hamming weight |a| of a Boolean vector a is the number of 1’s in a. For two vectors a and b, the Hamming distance |a−b| is is the number of positions in which they differ.

If a and b are solutions of φ and lie in the same connected component (component for short) of G(φ), we write dφ(a,b) to denote the shortest-path distance between a and b. The diameter of a component is the maximal shortest-path distance between any two vectors in that component. Thediameter of G(φ) is the maximal diameter of any of its connected components.

(14)
(15)

We start our investigation with constraint satisfaction problems. A constraint is a tuple of variables together with a Boolean relation, restricting the assignment of the variables. A CSP then is the question whether there is an assignment to all variables of a set of constraints such that all constraints are satisfied.

2.1 Preliminaries

2.1.1 CNF-Formulas and Schaefer’s Framework

In line with Gopalan et al., we define CSPs by CNF(S)-formulas, which were introduced in 1978 by Thomas Schaefer as a generalization of CNF (conjunctive normal form) formulas [Sch78].

Definition 2.1.1 ACNF-formula is a propositional formula of the formC1∧ · · · ∧Cm

(1≤m <∞), where eachCiis aclause, that is, a finite disjunction ofliterals(variables or negated variables). A k-CNF-formula (k≥1) is a CNF-formula where each Ci has at most k literals. A Horn (dual Horn) formula is a CNF-formula where each Ci has at most one positive (negative) literal.

Definition 2.1.2 For a finite set of relations S, a CNFC(S)-formula over a set of variablesV is a finite conjunctionC1∧· · ·∧Cm, where eachCiis aconstraint application (constraint for short), i.e., an expression of the formR(ξ1, . . . , ξk), with ak-ary relation R ∈ S, and each ξj is a variable from V or one of the constants {0, 1}. A CNF(S)- formula is a CNFC(S)-formula where each ξj is a variable in V, not a constant.

By Var(Ci), we denote the set of variables occurring inξ1, . . . , ξk. With the relation corresponding to Ci we mean the relation [R(ξ1, . . . , ξk)] (that may be different fromR by substitution of constants, and identification and permutation of variables).

A k-clause is a disjunction of k variables or negated variables. For 0 ≤ ik, let Di be the corresponding to the k-clause whose first i literals are negated, and let Sk ={D0, . . . , Dk}, e.g., S3 ={[x∨yz], [x∨yz], [x∨yz], [x∨yz]}. Thus, CNF(Sk) is the collection ofk-CNF-formulas.

Thomas Schaefer introduced CNF(S)-formulas for expressing variants of Boolean satisfiability; in his dichotomy theorem, Schaefer then classified the complexity of the satisfiability problem for CNFC(S)- and CNF(S)-formulas [Sch78]; we will do so here for the connectivity problems. We use the following notation:

• Sat(S) for the satisfiability problem: Given a CNF(S)-formulaφ, is φsatisfiable?

• st-Conn(S) for the st-connectivity problem: Given a CNF(S)-formula φand two solutionss and t, is there a path from sto t inG(φ)?

• Conn(S) for the connectivity problem: Given a CNF(S)-formula φ, is G(φ) con- nected? (if φ is unsatisfiable, we consider G(φ) connected)

(16)

8 2.1 Preliminaries The respective problems for CNFC(S)-formulas are marked with the subscriptC. Note that Gopalan et al. considered the case with constants, but omitted the C.

2.1.2 Classes of Relations

In the following definition, we introduce the types of relations needed for the classi- fications. Some are already familiar from Schaefer’s dichotomy theorem, some were introduced by Gopalan et al., and the ones starting with “safely” we defined in [Sch13]

to account for the shift of the boundaries resulting from Gopalan et al.’s mistake;IHSB stands for “implicative hitting set-bounded” and was introduced in [CKS01].

Definition 2.1.3 Let R be an n-ary logical relation.

R is 0-valid (1-valid) if 0nR (1nR).

Riscomplementiveif for every vector (a1, . . . , an)∈R, also (a1⊕1, . . . , an⊕1)∈R.

R is bijunctive if it is the set of solutions of a 2-CNF-formula.

R is Horn (dual Horn) if it is the set of solutions of a Horn (dual Horn) formula.

Risaffine if it is the set of solutions of a formulaxi1⊕. . .⊕xim⊕cwithi1, . . . , im ∈ {1, . . . , n}and c∈ {0,1}.

Riscomponentwise bijunctiveif every connected component ofG(R) is a bijunctive relation. R is safely componentwise bijunctiveif R and every relationR obtained from R by identification of variables is componentwise bijunctive.

RisOR-free(NAND-free) if the relation OR ={01,10,11}(NAND ={00,01,10}) cannot be obtained from R by substitution of constants. R is safely OR-free (safely NAND-free) if R and every relation R obtained from R by identification of variables is OR-free (NAND-free).

R isIHSB− (IHSB+)if it is the set of solutions of a Horn (dual Horn) formula in which all clauses with more than 2 literals have only negative literals (only positive literals).

R is componentwise IHSB− (componentwise IHSB+) if every connected compo- nent of G(R) is IHSB− (IHSB+). R issafely componentwise IHSB− (safely com- ponentwise IHSB+) if R and every relation R obtained from R by identification of variables is componentwise IHSB− (componentwise IHSB+).

If one is given the relation explicitly (as a set of vectors), the properties 0-valid, 1- valid, complementive, OR-free and NAND-free can be checked straightforward, while bijunctive, Horn, dual Horn, affine, IHSB− and IHSB+ can be checked by closure properties:

Definition 2.1.4 A relation R is closed under some n-ary operation f iff the vector obtained by the coordinate-wise application of f to any m vectors fromR is again in R, i.e., if

a1, . . . ,amR =⇒f(a11, . . . , am1 ), . . . , f(a1n, . . . , amn)R.

(17)

Lemma 2.1.5 A relation R is

1. bijunctive, iff it is closed under the ternary majority operation maj(x, y, z)=(xy)∧(y∨z)∧(z∨x),

2. Horn (dual Horn), iff it is closed under(under ∨, resp.), 3. affine, iff it is closed under xyz,

4. IHSB− (IHSB+), iff it is closed under x∧(y∨z) (under x∨(y∧z), resp.).

Proof. 1. See [CKS01, Lemma 4.9].

2. See [CKS01, Lemma 4.8].

3. See [CKS01, Lemma 4.10].

4. This can be verified using the Galois correspondence between closed sets of rela- tions and closed sets of Boolean functions (see [BRSV05]): From the table (Fig. 1) in [BRSV05], we find that the IHSB− relations are a base of the co-clone INV(S10), and the IHSB+ ones a base of INV(S00), and from the table (Figure 1) in [BCRV03], we see thatx∧(y∨z) and x∨(y∧z) are bases of the clones S10 and S00, resp.

Remark 2.1.6. The class Checkof SatConnprovides functions to check the properties of Definition 2.1.3, and the classClones provides functions to calculate the clone and co-clone of a relation.

The closure properties carry over from a relation to its connected components, as shown by Gopalan et al.:

Lemma 2.1.7 [GKMP09, Lemma 4.1] If a logical relation R is closed under an operation α:{0,1}k → {0,1} such thatα(1, . . . ,1) = 1 and α(0, . . . ,0) = 0 (a.k.a. an idempotent operation), then every connected component of G(R) is closed under α.

2.1.3 Classes of Sets of Relations

The classes in the following definition demarcate the structural and computational boundaries for the solution graphs of CNFC(S)-formulas.

Definition 2.1.8 A set S of logical relations is safely tight if at least one of the following conditions holds:

1. Every relation inS is safely componentwise bijunctive.

2. Every relation inS is safely OR-free . 3. Every relation inS is safely NAND-free.

A set S of logical relations is Schaefer if at least one of the following conditions holds:

1. Every relation inS is bijunctive.

2. Every relation inS is Horn.

3. Every relation inS is dual Horn.

4. Every relation inS is affine.

(18)

10 2.1 Preliminaries A setS of logical relations is CPSS if at least one of the following conditions holds:

1. Every relation inS is bijunctive.

2. Every relation inS is Horn and safely componentwise IHSB−.

3. Every relation inS is dual Horn and safely componentwise IHSB+.

4. Every relation inS is affine.

A single logical relation R is safely tight, Schaefer, or CPSS, if {R} has that property.

Vice versa, we say that a set S of logical relations has one of the properties from Definition 2.1.3 if every relation in S has that property, e.g., S is 0-valid if every relation in S is 0-valid.

The term tight was introduced by Gopalan et al. because of the structural properties of the formulas built from tight (actually, only safely tight) relations, see Lemma 2.5.1 and Lemma 2.5.4. We introduced the CPSS class in [Sch13]; CPSS stands for

“constraint-projection separating Schaefer”, which will become clear in Section2.6from Definition 2.6.1, Lemma2.6.4 and Lemma 2.8.1.

From the definition we see that every CPSS set of relations is also Schaefer, and we can show that it also holds that every Schaefer set is safely tight, by modifying a lemma of Gopalan et al.:

Lemma 2.1.9 [modified from GKMP09, Lemma 4.2] Let R be a logical relation.

1. If R is bijunctive, then it is safely componentwise bijunctive.

2. If R is Horn, then it is safely OR-free.

3. If R is dual Horn, then it is safely NAND-free.

4. IfR is affine, then it is safely componentwise bijunctive, safely OR-free, and safely NAND-free.

Proof. We first note that

(*) any relation obtained from a bijunctive (Horn, dual Horn, affine) one by identifi- cation of variables is itself bijunctive (Horn, dual Horn, affine),

which is obvious from the definitions.

If R is bijunctive, it is closed under maj, which is idempotent, so by Lemma 2.1.7, R is also componentwise bijunctive, and by (*), it is safely componentwise bijunctive as well.

The cases of Horn and dual Horn are symmetric. Suppose a r-ary Horn relation R is not OR-free. Then there exist i, j ∈ {1, . . . , r} and constantst1, . . . , tr ∈ {0,1}such that the relation R(t1, . . . , ti−1, x, ti+1, . . . , tj−1, y, tj+1, . . . , tr) on variables x and y is equivalent to xy, i.e.

R(t1, . . . , ti−1, x, ti+1, . . . , tj−1, y, tj+1, . . . , tr) = {01,11,10}.

Thus the tuples t00,t01t10,t11 defined by (tabi , tabj ) = (a, b) and tabk = tk for every k 6∈ {i, j}, where a, b,∈ {0,1} satisfy t10,t11,t01R and t00 6∈ R. However, since

(19)

every Horn relation is closed under ∧, it follows that t01t10 = t00 must be in R, which is a contradiction. So R is OR-free, and again by (*), it must be safely OR-free as well.

For the affine case, a small modification of the last step of the above argument shows that an affine relation also is OR-free; therefore, dually, it is also NAND-free.

Namely, since a relation R is affine if and only if it is closed under ternary ⊕, it follows that t01t11t10 = t00 must be in R. Since the connected components of an affine relation are both OR-free and NAND-free the subgraphs that they induce are hypercubes, which are also bijunctive relations. Therefore an affine relation is also componentwise bijunctive. With this, it must also be safely OR-free, safely OR-free and safely componentwise bijunctive by (*).

2.2 Results

We are now ready to state the results for CNFC(S)-formulas; in the subsequent sections we will prove them. The following two theorems give complete classifications up to polynomial-time isomorphisms. They are summarized in the table below.

S SatC(S) ConnC(S) st-ConnC(S) Diameter not safely tight

NP-complete PSPACE-complete PSPACE-complete 2Ω(n) safely tight, not Schaefer

coNP-complete

in P O(n)

Schaefer, not CPSS

CPSS in P in P

Table 2.1 Our classifications for CNFC(S)-formulas, in comparison toSat.

Theorem 2.2.1 (Dichotomy theorem for st-ConnC(S) and the diameter) Let S be a finite set of logical relations.

1. IfS is safely tight, st-ConnC(S)is in P, and for every CNFC(S)-formula φ, the diameter of G(φ) is linear in the number of variables.

2. Otherwise,st-ConnC(S)isPSPACE-complete, and there areCNFC(S)-formulas φ, such that the diameter of G(φ) is exponential in the number of variables.

Proof. 1. See Lemma2.5.6.

2. See Corollary 2.4.9.

Theorem 2.2.2 (Trichotomy theorem for ConnC(S)) Let S be a finite set of logical relations.

1. If S is CPSS, ConnC(S) is in P.

2. Else if S is safely tight, ConnC(S) is coNP-complete.

3. Else, ConnC(S) is PSPACE-complete.

Proof. 1. See Corollary 2.6.6.

2. See Corollary 2.7.11.

3. See Corollary 2.4.9.

(20)

12 2.3 The General Case: Reduction from a Turing Machine

2.3 The General Case:

Reduction from a Turing Machine

We start with the general case. Gopalan et al. showed that for 3-CNF-formulas, st- ConnC and ConnC are PSPACE-complete, and the diameter can be exponential:

Lemma 2.3.1 [GKMP09, Lemma 3.6] For general CNF-formulas, as well as for 3-CNF-formulas, st-ConnC and ConnC are PSPACE-complete.

Showing that the problems are in PSPACE is straightforward: Given a CNF-formula φ and two solutionss and t, we can guess a path of length at most 2n between them and verify that each vertex along the path is indeed a solution. Hencest-Conn is in NPSPACE, which equals PSPACE by Savitch’s theorem. ForConn, by reusing space we can check for all pairs of vectors whether they are satisfying, and, if they both are, whether they are connected inG(φ).

The hardness-proof is quite intricate: it consists of a direct reduction from the computation of a space-bounded Turing machine M. The input-string w of M is mapped to a 3-CNF-formula φ and two satisfying assignments s and t, corresponding to the initial and accepting configuration of a Turing machine M constructed from M and w, s.t. s and t are connected in G(φ) iff M accepts w. Further, all satisfying assignments ofφare connected to eithersort, so thatG(φ) is connected iffM accepts.

Lemma 2.3.2 [GKMP09, Lemma 3.7] For n even, there is a 3-CNF-formula φn with n variables and O(n2) clauses, s.t. G(φn) is a path of length greater than 2n2.

The proof of this lemma is by direct construction of such a formula.

2.4 Extension of PSPACE-Completeness:

Structural Expressibility

To show that PSPACE-hardness and exponential diameter extend to all not (safely) tight sets of relations, Gopalan et al. used the concept of structural expressibility, which is a modification of Schaefer’s “representability” that he used for his dichotomy theorem1, so let us have a quick look at this first:

Theorem 2.4.1(Schaefer’s dichotomy theorem [Sch78]) LetS be a finite set of logical relations.

1. If S is Schaefer, then SatC(S) is in P; otherwise, SatC(S) is NP-complete.

2. If S is 0-valid, 1-valid, or Schaefer, then Sat(S) is in P; otherwise, Sat(S) is NP-complete.2

1While Schaefer’s dichotomy theorem and many related complexity classifications can also be proved using Post’s classification of all closed classes of Boolean functions and a Galois correspondence (see e.g. [CKV08]), this seems not possible for our connectivity problems: The boundaries here

“cut across Boolean clones” (more exactly: co-clones), as already Gopalan et al. noted [GKMP09].

For example, the co-clone of bothR={100,010,001} andR ={100,010,001,110,101}isI2, but R is safely OR-free and thus tight, whileR is not safely tight.

2Here we assume thatS contains no empty relations, see Section 3.1.

(21)

Schaefer first proved statement 1, and from that derived the no-constants version;

we here discuss only the proof statement 1.

Schaefer used a reduction from satisfiability of 3-CNF-formulas, i.e. CNFC(S3)- formulas (see Definition 2.1.2), which was already known to be NP-complete by the Cook–Levin theorem. Therefor, he exploited that any existentially quantified formula is satisfiability-equivalent to the formula with the quantifiers removed, and introduced the notion of representability, that became also know as expressibility:

Definition 2.4.2 A relation R is expressible from a set of relations S if there is a CNFC(S)-formula φ(x,y) such that R={a|∃yφ(a,y)}.

He then showed that every Boolean relation is expressible from any set of relations that is not Schaefer, and that this expression can efficiently be constructed.

With this, it is easy to see that for every non-Schaefer set S, satisfiability of any CNFC(S3)-formula ψ can be reduced to satisfiability of a CNFC(S)-formula, con- structed as follows: Replace inψ every constraintR(ξ) by φ(ξ,y) withφ from Defini- tion 2.4.2, and new variables y, distinct for each constraint.

As Gopalan et al. explain in section 3.1 of [GKMP09], for the connectivity problems, expressibility is not sufficient; therefore, they introducedstructural expressibility: Definition 2.4.3 A relation R is structurally expressible from a set of relations S if there is a CNFC(S)-formula φ such that the following conditions hold:

1. R ={a|∃yφ(a,y)}.

2. For every aR, the graphG(φ(a,y)) is connected.

3. Fora,bRwith|a−b|= 1, there exists awitnessw such that (a,w) and (b,w) are solutions of φ.

Gopalan et al. now argued that connectivity were retained when replacing every constraint R with a structural expression of R in a CNFC(S)-formula. In fact, this is only true for CNFC(S)-formulas where no variable is used more than once in any constraint, and their proof is only correct for such formulas that also use no constants:

Lemma 2.4.4 [corrected fromGKMP09, Lemma 3.2] LetS andS be sets of relations such that every R ∈ S is structurally expressible from S. Given a CNF(S)-formula ψ(x) (without constants), where no variable is used more than once in any constraint, one can efficiently construct a CNFC(S)-formula ϕ(x,y) such that

1. ψ(x) = ∃yϕ(x,y);

2. if(s, ws), (t,wt)are connected in G(ϕ)by a path of lengthd, then there is a path from s to t in G(ψ) of length at most d;

3. if s,tψ are connected in G(ψ), then for every witness ws of s, and every witness wt of t, there is a path from (s, ws) to (t,wt) in G(ϕ).

In Gopalan et al.’s proof, we only clarify the notation a little:

(22)

14 2.4 Extension of PSPACE-Completeness: Structural Expressibility Proof. Let ψ(x) = C1 ∧ · · · ∧Cm with Cj = Rj(xj), where Rj is some relation from S, and xj is the vector of variables to which Rj is applied. Let ϕj be the structural expression for Rj from S, so that Rj(xj) ≡ ∃yj ϕj(xj,yj). Let y be the vector (y1, . . . ,ym) and let ϕ(x,y) be the formulamj=1ϕj(xj,yj). Then ψ(x)≡ ∃y ϕ(x,y).

Statement 2 follows from 1 by projection of the path on the coordinates of x. For statement 3, considers,tψ that are connected in G(ψ) via a path s=u0u1

· · · → ur = t . For every ui,ui+1, and clause Cj, there exists an assignment wij to yj such that both (uij,wji) and (ui+1j ,wji) are solutions of ϕj, by condition 3 of structural expressibility. Thus (ui,wi) and (ui+1,wi) are both solutions of ϕ, where wi = (w1i, . . . ,wim). Further, for every ui, the space of solutions of ϕ(ui,y) is the product space of the solutions of ϕj(uij,yj) over j = 1, . . . , m. Since these are all connected by condition 2 of structural expressibility, G(ϕ(ui,y)) is connected. The following describes a path from (s,ws) to (t,wt) in G(ϕ): (s,ws) (s,w0) → (u1,w0) (u1,w1)→ · · · (ur−1,wr−1)→(t,wr−1) (t,wt). Here indicates a path in G(ϕ(ui,y)).

It is easy to show that the statement of Lemma 2.4.4 is also correct if we allow constants in ψ; however, we don’t need this result. In [Sch13], we explain in detail the problem with repeated variables in constraint applications.

We have to change Gopalan et al.’s corollary accordingly; we denote the connectivity problems for CNF(S)-formulas without repeated variables in constraints (and without constants) by the subscriptni:

Corollary 2.4.5 [corrected fromGKMP09, Corollary 3.3] SupposeS and S are sets of relations such that every R ∈ S is structurally expressible from S.

1. There are polynomial-time reductions from Connni(S’) to ConnC(S), and from st-Connni(S’) to st-ConnC(S).

2. If there exists aCNFni(S’)-formulaψ(x)withn variables,mclauses and diameter d, then there exists a CNFC(S)-formula φ(x,y), where y is a vector of O(m) variables, such that the diameter of G(φ) is at least d.

Since 3-CNF-fomulas are CNFni(S1∪ S2∪ S3)-formulas, for the reductions to work it now remains to prove that S1∪ S2∪ S3 is structurally expressible from any not safely tight set. As Theorem2.4.8 below shows, in fact every Boolean relation is structurally expressible from any such set. The long proof of the next lemma contains only minor modifications from [GKMP09].

Lemma 2.4.6 [modified from GKMP09, Lemma 3.4] If a set S of relations is not safely tight, S3 is structurally expressible from S.

Proof. First, observe that all 2-clauses are structurally expressible fromS. There exists R∈ S which is not safely OR-free, so we can express (x1∨x2) by substituting constants and identifying variables inR. Similarly, we can express (¯x1∨¯x2) using a relation that is not safely NAND-free. The last 2-clause (x1x¯2) can be obtained from OR and NAND by a technique that corresponds to reverse resolution. (x1x¯2) =∃y(x1y)∧(¯yx¯2).

It is easy to see that this gives a structural expression. From here onwards we assume that S contains all 2-clauses. The proof now proceeds in four steps. First, we will

(23)

express a relation in which there exist two elements that are at graph distance larger than their Hamming distance. Second, we will express a relation that is just a single path between such elements. Third, we will express a relation which is a path of length 4 between elements at Hamming distance 2. Finally, we will express the 3-clauses.

Step 1. Structurally expressing a relation in which some distance expands.

For a relationR, we say that the distance betweenaand bexpands if aand bare con- nected inG(R), butdR(a,b)>|a−b|. Later on, we will show that no distance expands in safely componentwise bijunctive relations. The same also holds true for the relation RNAE = {0,1}3 \ {000,111}, which is not safely componentwise bijunctive. Nonethe- less, we show here that if R is not safely componentwise bijunctive, then, by adding 2-clauses, we can structurally express a relationQin which some distance expands. For instance, whenR=RNAE, then we can takeQ(x1, x2, x3) =RNAE(x1, x2, x3)∧( ¯x1x¯3).

The distance between a = 100 and b = 001 in Q expands. Similarly, in the general construction, we identify a and b on a cycle, and add 2-clauses that eliminate all the vertices along the shorter arc between a and b.

UV

U

b V c

W

a

V W

UW V U

WU

W V

010

011

100 100

110

100 101 001

011 010

110

RN AE(x1, x2, x3) RN AE(x1, x2, x3)∧(¯x1∨x¯2) Figure 2.4.1 Proof of Step 1, and an example.

Since S is not safely tight, it contains a relation which is not safely componentwise bijunctive, from which we can obtain a not componentwise bijunctive relationR. If R contains a,b where the distance between them expands, we are done. So assume that for alla,bG(R),dR(a,b) =|a−b|. SinceR is not componentwise bijunctive, there

(24)

16 2.4 Extension of PSPACE-Completeness: Structural Expressibility exists a triple of assignmentsa,b,clying in the same component such that Maj(a,b,c) is not in that component (which also easily implies it is not in R). Choose the triple such that the sum of pairwise distances dR(a,b) +dR(b,c) +dR(c,a) is minimized.

Let U = {i|ai 6=bi}, V = {i|bi 6=ci}, and W ={i|ci 6=ai}. Since dR(a,b) = |a−b|, a shortest path does not flip variables outside of U, and each variable in U is flipped exactly once. The same holds forV andW. We note some useful properties of the sets U, V, W.

1. Every index iUVW occurs in exactly two of U, V, W.

Consider going by a shortest path from a to b to c and back to a. Every iUVW is seen an even number of times along this path since we return to a.

It is seen at least once, and at most thrice, so in fact it occurs twice.

2. Every pairwise intersection UV, VW and WU is non-empty.

Suppose the setsU andV are disjoint. From Property 1, we must haveW =U∪V. But then it is easy to see that Maj(a,b,c) = b which is in R. This contradicts the choice ofa,b,c.

3. The sets UV and UW partition the set U.

By Property 1, each index of U occurs in one of V and W as well. Also since no index occurs in all three sets U, V, W this is in fact a disjoint partition.

4. For each index iUW, it holds thataei 6∈R.

Assume for the sake of contradiction thata =a⊕eiR. SinceiU∩W we have simultaneously moved closer to bothbandc. Hence we havedR(a,b) +dR(b,c) + dR(c,a)< dR(a,b) +dR(b,c) +dR(c,a). Also Maj(a,b,c) = Maj(a,b,c)6∈ R.

But this contradicts our choice of a,b,c.

Property 4 implies that the shortest paths tobandcdiverge ata, since for any shortest path tob the first variable flipped is from UV whereas for a shortest path to c it is fromWV. Similar statements hold for the vertices band c. Thus along the shortest path from a to b the first bit flipped is from UV and the last bit flipped is from UW. On the other hand, if we go froma tocand then tob, all the bits fromUW are flipped before the bits from UV. We use this crucially to defineQ. We will add a set of 2-clauses that enforce the following rule on paths starting at a: Flip variables from UW before variables from UV. This will eliminate all shortest paths from a tob since they begin by flipping a variable inUV and end with UW. The paths from a to b via c survive since they flip UW while going from a to c and UV while going fromc tob. However all remaining paths have length at least |a−b|+ 2 since they flip twice some variables not in U.

Take all pairs of indices {(i, j)|i ∈ UW, jUV}. The following conditions hold from the definition of U, V, W: ai = ¯ci = ¯bi and aj =cj = ¯bj. Add the 2-clause Cij asserting that the pair of variables xixj must take values in {aiaj, cicj, bibj} = {aiaj,¯aiaj,¯ai¯aj}. The new relation isQ=Ri,jCij. Note thatQR. We verify that the distance between a and b in Q expands. It is easy to see that for any jU, the assignment aej 6∈ Q. Hence there are no shortest paths left from a to b. On the other hand, it is easy to see that a and b are still connected, since the vertex c is still reachable from both.

Step 2. Isolating a pair of assignments whose distance expands.

The relation Q obtained in Step 1 may have several disconnected components. This

(25)

cleanup step isolates a single pair of assignments whose distance expands. By adding 2-clauses, we show that one can express a path of lengthr+ 2 between assignments at distancer.

Take a,bQ whose distance expands in Q and dQ(a,b) is minimized. Let U = {i|ai 6=bi}, and|U|=r. Shortest paths betweenaandbhave certain useful properties:

1. Each shortest path flips every variable from U exactly once.

Observe that each index jU is flipped an odd number of times along any path froma tob. Suppose it is flipped thrice along a shortest path. Starting at a and going along this path, letb be the assignment reached after flippingj twice. Then the distance between a and b expands, since j is flipped twice along a shortest path between them in Q. Also dQ(a,b)< dQ(a,b), contradicting the choice of a and b.

2. Every shortest path flips exactly one variable i6∈U.

Since the distance between a and b expands, every shortest path must flip some variable i6∈U. Suppose it flips more than one such variable. Since a and b agree on these variables, each of them is flipped an even number of times. Let i be the first variable to be flipped twice. Let b be the assignment reached after flipping i the second time. It is easy to verify that the distance between a and b also expands, but dQ(a,b)< dQ(a,b).

3. The variable i6∈U is the first and last variable to be flipped along the path.

Assume the first variable flipped is noti. Let a be the assignment reached along the path before we flip i the first time. Then dQ(a,b)< dQ(a,b). The distance betweena and bexpands since the shortest path between them flips the variables i twice. This contradicts the choice of a and b. Assume jU is flipped twice.

Then as before we get a pair a,b that contradict the choice of a,b.

Every shortest path betweenaand bhas the following structure: first a variablei6∈U is flipped to ¯ai, then the variables fromU are flipped in some order, finally the variable i is flipped back to ai.

Different shortest paths may vary in the choice of i 6∈U in the first step and in the order in which the variables from U are flipped. Fix one such path TQ. Assume that U = {1, . . . , r} and the variables are flipped in this order, and the additional variable flipped twice is r+ 1. Denote the path by au0u1 → · · · → urb. Next we prove that we cannot flip ther+ 1th variable at an intermediate vertex along the path.

4. For 1 ≤ jr −1 the assignment ujer+1 6∈ Q. Suppose that for some j, we have c = ujer+1Q. Then c differs from a on {1, . . . , i} and from b on {i+ 1, . . . , r}. The distance from c to at least one of a or b must expand, else we get a path from a to b through c of length |ab| which contradicts the fact that this distance expands. However dQ(a,c) and dQ(b,c) are strictly less than dQ(a,b) so we get a contradiction to the choice of a,b.

We now construct the path of length r+ 2. For all ir+ 2 we set xi = ai to get a relation on r+ 1 variables. Note that b = ¯a1. . .¯arar+1. Take i < jU. Along the path T the variable i is flipped before j so the variables xixj take one of three values

Referenzen

ÄHNLICHE DOKUMENTE

The aim of this paper is to explore the question: What are the important aspects to consider when documenting Information Systems research results in scientific articles.. I am

Markedly better learning outcomes in private schools may also help to explain why around half of all parents in Uttar Pradesh—where the average rural household spends 57 percent

The second proposal from Council President Herman Van Rompuy – maintaining the cut of roughly €80 billion (in relation to the European Commission proposals) already suggested

En búsqueda del perfeccionamiento del sistema GES para los privados, es posible considerar un estudio realizado por la Superintendencia de Salud con un censo en relación a

To match the market stochasticity we introduce the new market-based price probability measure entirely determined by probabilities of random market time-series of the

We use Erd¨ os’ probabilistic method: if one wants to prove that a structure with certain desired properties exists, one defines an appropriate probability space of structures and

The following theorem (also from Chapter 2 of slides) has an analogous formulation..

● Alle boolschen Funktionen lassen sich auf. Kombinationen von NAND und NOR Gattern