Characterizing Circuit Complexity Classes by Logics with Recursion∗
Total Page:16
File Type:pdf, Size:1020Kb
Characterizing Circuit Complexity Classes by Logics with Recursion∗ Anselm Haak1 1 Theoretische Informatik, Leibniz Universität Hannover, Appelstraße, D-30167, Germany, [email protected] In this submission we introduce a certain recursion scheme into first-order logic variants of which allow us to capture a number of classes from circuit complexity, namely AC1, SAC1 and NC1 as well as their counting analogues. The advantage of our new approach is that it allows for a unified characterization of multiple important classes. The idea of descriptive complexity is to characterize complexity classes in a model- theoretic way in order to better understand their structure and use logical methods in order to get new insights about the considered classes. The starting point for this strand of research was Fagin’s theorem [3]. It tells us that the complexity class NP of problems decidable by non-deterministic polynomial-time Turing machines can be characterized as the class of problems definable in existential second order logic. Many characterizations followed, among them characterizations of the circuit complexity classes AC0, NC1 and TC0, see e.g. [1, 5]. Characterizations of uniform classes from circuit complexity are of special interest, because the definitions of these classes usually build upon two disconnected models: The uniformity condition is defined via some logic or using a machine model, while the main power of computation stems from the name-giving circuits. Model-theoretic characterizations allow to define these classes in purely logical terms. Another important kind of classes are so called counting classes. These are classes of functions from inputs to natural numbers that are usually defined by counting the number of some kind of witness for membership in a language. Of course, what kind of witness is considered depends on the specific class. For these kind of classes, only very few model- theoretic characterizations are known. The most prominent one is probably the general- ization of Fagin’s theorem, stating that #P = #FO: Counting the number of accepting paths of NP-machines can be characterized as counting the number of satisfying assign- ments to free relational variables in FO-formulae [6]. Besides that, we recently showed that Immermans result AC0 = FO [5] can also be generalized to the counting setting, showing #AC0 = #Win-FO [4]. Since the area of descriptive complexity for counting classes is not really well devel- oped, more characterizations of such classes are desirable. In this regard we want to focus on classes from circuit complexity and try to give characterizations of classes defined via Boolean circuits that also extend to the counting setting. Towards this goal, the best known characterizations of NC1 [1] does not seem to be helpful. On the other hand, we feel like the generalization of AC0 = FO to the whole AC-hierarchy using formulae of logarithmic length does seem a little unnatural. Instead, we sought inspiration from a result by Compton and Laflamme, characterizing NC1 by FO with a certain kind of linear recursion [2]. This approach does not seem to generalize to the classes SAC1 and AC1, though. Instead of focus- ing on transferring this kind of recursion to other classes, we define a new kind of recursion that more direcly captures the essence of uniform circuit classes with the counting setting in mind. Introducing this kind of recursion into first-order logic allows us to characterize NC1, SAC1 and AC1 in similar ways. Furthermore, the approach also works in the counting ∗ This submission is based on joint research with Arnaud Durand and Heribert Vollmer. © Anselm Haak; licensed under Creative Commons License CC-BY Leibniz International Proceedings in Informatics Schloss Dagstuhl – Leibniz-Zentrum für Informatik, Dagstuhl Publishing, Germany XX:2 Characterizing Circuit Complexity Classes by Logics with Recursion setting. While the recursion scheme is more directly connected to the definition of uniform circuit complexity classes, the approach still bears the advantage of yielding descriptions of the classes in purely logical terms. We now want to briefly recall the definition of FO-uniform families of Boolean circuits. A Boolean circuit is a directed acyclic graph. The nodes of this graph—also called gates—are marked with “∧”, “∨” or with an index of an input position. Also, one gate is marked as the output gate. To talk about these circuits in first-order logic, we use the vocabulary τcirc = 2 1 1 2 2 1 (E ,G∧,G∨, Input , negatedInput , output ). The meaning of the predicates E, G∧,G∨ and output is straightforward. Input(x, i) holds, if gate x is an input gate and associated with the i-th input position. An FO-uniform circuit family is a family of circuits C = (Cn)n∈N for which there is an FO-interpretation (FO-query) I : STRUC[τstring] → STRUC[τcirc] such ∗ that for all w ∈ {0, 1} : I(Aw) = C|w|. Here, τstring is the vocabulary of binary strings, Aw is the structure representing string w and C|w| is given as a τcirc-structure. The recursion scheme we introduce allows for the recursive definition of a predicate P . Syntactically, the constructions looks as follows: [P (x, y) ≡ Qz.(z < y/2 ∧ ψ(y, z))θ(x, y, P (x, z))]. The recursion runs over the parameter y. Q is a quantifier, which will either be ∃ or ∀ depending on the parity of y. The quantification of z is guarded by the formula z < y/2 ∧ ψ(y, z). This means that the value of the second input is at least halved in each step. If Q is an existential quantifier, the semantics is: P (x, y), if there is a z among those satisfying z < y/2∧ψ(y, z) such that θ(x, y, P (x, z)) holds. If Q is a universal quantifier, the semantics is: P (x, y), if for all z among those satisfying z < y ∧ ψ(y, z) also θ(x, y, P (x, z)) holds. We denote this kind of recursion by GRP(guarded recursive predicate definition). In this unrestricted way, the recursion branches polynomially. The depth of the recursion is bounded logarithmically due to the condition z < y/2. This intuatively suggests, that this kind of recursion captures the essence of AC1-computations. The definition can be altered by bounding the quantifier Q in the universal case or in both cases, resulting in characaterizations of SAC1 and NC1, respectively. This is done by changing the semantics e.g. in the universal case to: P (x, y), if for all z among the maximal two satisfying z < y/2∧ ψ(y, z) also θ(x, y, P (x, z)) holds. We call the restricted versions GRPsemi and GRPbounded, respectively. In order to capture said classes, we add the above kind of recursive definition in FO- formulae. We call the resulting logics FO(GRP), FO(GRPsemi) and FO(GRPbounded), re- spectively. We define these logics as follows: I Definition 1. FO(GRP) is first-order logic with occurrences of GRP. That is, it consists of all formulae of the form [P1(x, y) ≡ Qz.(z < y/2 ∧ ψ1(y, z)) θ1(x, y, P (x, z))] ··· [Pk(x, y) ≡ Qz.(z < y/2 ∧ ψk(y, z)) θk(x, y, P (x, z))] ϕ(P1,...,Pk), where the semantics of the recursive definitions is as described above. FO(GRPsemi) and FO(GRPbounded) are defined analogously. As usual, we also denote by FO(GRP) the class of languages that exactly consist of those words that are encodings of structures with a specific FO(GRP)-definable property. Since we only consider τstring-structures here, this can be stated as L ∈ FO(GRP) ·⇐⇒ there is a formula ϕ ∈ FO(GRP) such that w ∈ L ⇔ Aw ϕ for all w Anselm Haak XX:3 We use FO(GRPsemi) and FO(GRPbounded) to denote classes of languages in the same way. This leads us to one of our main theorems. I Theorem 2. (i) FO(GRP) = AC1 1 (ii) FO(GRPsemi) = SAC 1 (iii) FO(GRPbounded) = NC We will sketch the proof for the unbounded version here. Proof Sketch for Theorem 2.(i). ⊇: Let L ∈ AC1 via the FO-uniform AC1 circuit family C = (Cn)n∈N. Let I = (ϕE, ϕG∧ , ϕG∨ , ϕInput, ϕnegatedInput, ϕoutput) be an FO-interpretation witnessing that C is FO-uniform. We can assume without loss of generality that within all Cn, all ∨-gates are even and all ∧-gates are odd. We can also assume that for all gates g1, g2 g1 in any Cn it holds that E(g1, g2) ⇒ g2 < 2 . Then we can express acceptance of an input by C with the FO(GRP)-formula [P (y) ≡ Qz.(z < y/2 ∧ ϕE(y, z)) P (z) ∧ ¬ϕLiteral(z) ∨ ϕtrueLiteral(z)] ∃out ϕoutput(out) ∧ P (out) with ϕLiteral(x) ·= ∃i ϕInput(x, i) ∨ ϕnegatedInput(x, i) and ϕtrueLiteral ·= ∃i (ϕInput(x, i) ∧ S(i)) ∨ (ϕnegatedInput(x, i) ∧ ¬S(i)). The predicate P defined recursively gives us exactly the evaluation of the gates in the circuit. Thus, the formula ∃out ϕoutput(out)∧P (out) expresses that the output gate of the circuit evaluates to 1. ⊆: Let L ∈ FO(GRP) via the formula [P (x, y) ≡ Qz.(z < y/2 ∧ ψ(y, z)) θ(x, y, P (x, z))] ϕ(P ). For simplicity in this proof sketch, we assume that only one predicate P is defined recur- sively within the formula. Also, P does not occur inside any negation in θ or ϕ. Ignoring occurrences of P , ϕ is an FO-formula. Hence, we can build an FO-uniform AC0 circuit family evaluating ϕ except for these occurrences. In order to compute the predicate P , we proceed as follows: For all x, y, z build a circuit that computes θ(x, y, P (x, z)) from P (x, z).