Emptiness Problems for Integer Circuits

We study the computational complexity of emptiness problems for circuits over sets of natural numbers with the operations union, intersection, complement, addition, and multiplication. For most settings of allowed operations we precisely characterize the complexity in terms of completeness for classes like NL, NP, and PSPACE. The case where intersection, addition, and multiplication is allowed turns out to be equivalent to the complement of polynomial identity testing (PIT). Our results imply the following improvements and insights on problems studied in earlier papers. We improve the bounds for the membership problem MC(∪,∩, ,+,×) studied by McKenzie and Wagner 2007 and for the equivalence problem EQ(∪,∩, ,+,×) studied by Glaßer et al. 2010. Moreover, it turns out that the following problems are equivalent to PIT, which shows that the challenge to improve their bounds is just a reformulation of a major open problem in algebraic computing complexity: membership problem MC(∩,+,×) studied by McKenzie and Wagner 2007 integer membership problems MCZ(+,×) and MCZ(∩,+,×) studied by Travers 2006 equivalence problem EQ(+,×) studied by Glaßer et al. 201


Introduction
Stockmeyer and Meyer [31] investigated membership and equivalence problems for integer expressions, which are built up from single natural numbers using set operations ( , ∪, ∩) and pairwise addition (+).They also suggested to study expressions involving pairwise multiplication (×).For example, the expression 1 × 1 ∩ 1 describes the set of primes P.
The membership problem for expressions is the question of whether the set described by a given expression contains some given natural number.The equivalence problem for expressions asks whether two given expressions describe the same set.Restricting the set of allowed operations results in problems of different complexities.
Wagner [33] introduced circuits over sets of natural numbers.These circuits describe expressions in a succinct way.The input gates of such a circuit are labeled with natural numbers, the inner gates compute set operations ( , ∪, ∩) and arithmetic operations (+, ×).
The following circuit has only 4 inner gates and describes the set of primes 1 × 1 ∩ 1.

× ∩
A slightly larger circuit describes the set {n ∈ P | n − 2 ∈ P}, i.e., the set of those twin primes p for which p − 2 is also prime.Hence the set described by this circuit is infinite if and only if the twin prime conjecture holds.

+ ∩
Wagner [33], Yang [34], and McKenzie and Wagner [22] studied the complexity of membership problems for circuits over natural numbers (MC): Here, for a given circuit C with numbers assigned to the input gates, one has to decide whether a given number b belongs to the set described by the circuit.Travers [32] and Breunig [6] considered membership problems for circuits over integers (MC Z ) and positive integers (MC N + ), respectively.Glaßer et al [11] investigated equivalence problems for circuits over sets of natural numbers (EQ), i.e., the problem of deciding whether two given circuits compute the same set.Satisfiability problems for circuits over sets of natural numbers, studied by Glaßer et al [13], are a generalization of the membership problems investigated by McKenzie and Wagner [22]: Here the circuits can have unassigned input gates.The question is, given a circuit C with gates from O ⊆ {∪, ∩, , +, ×}, and given a natural number b, does there exist an assignment of natural numbers to the unassigned input gates such that b is contained in the set described by the circuit?
Apart from the mentioned research on circuit problems there has been work on related variants like functions computed by circuits [24] and constraint satisfaction problems over natural numbers [12,8].
In the present paper, we study emptiness problems for circuits over sets of natural numbers.In contrast to membership and satisfiability problems, here the question is whether a given circuit C with gates from O ⊆ {∪, ∩, , +, ×} computes the empty set.We denote this problem with EC(O).In extension of that, we also consider circuits with unassigned input gates.For these we consider the problem Σ 1 -EC(O) (resp., Π 1 -EC(O)), which asks whether the circuit computes the empty set for at least one assignment (resp., for all assignments).
Our contribution to emptiness problems.For most of the emptiness problems we precisely characterize the complexity in terms of completeness for classes like NL, P, NP, PSPACE, and coNEXP.In the remaining cases we obtain lower and upper bounds that do not match.Our results are summarized in Table 1 in Section 6.
The case of EC(∩, +, ×) is particularly interesting.We show that it is logspace many-one equivalent to the complement of the polynomial identity testing (PIT), which asks whether a polynomial (given as a circuit) is identically zero.The problems are similar, still the proof of PIT ≤ log m EC(∩, +, ×) has to address two essential differences: First, PIT contains a universal quantifier (for all assignments the polynomial has to be zero), while EC(∩, +, ×) does not.Second, PIT is defined over Z, while EC(∩, +, ×) is defined over N.
In several cases we obtain upper bounds for Σ 1 -EC(O) and Π 1 -EC(O) by observing that if some assignment makes a circuit (non-)empty, then there exists a small such assignment.

33:3
Depending on O we obtain this observation by one of the following techniques: The first technique (e.g., used for Π 1 -EC(∩, +) ∈ coNP in Theorem 6) uses specific systems of linear equations that consist of a large number of short equations.Such systems of equations have small solutions by the theory of integer programming.The second technique (e.g., used for EC(∩, +, ×) ≡ log m Σ 1 -EC(∩, +, ×) in Corollary 21) exploits the fact that the test of whether a multivariate polynomial is identically zero is possible by evaluating this polynomial for a fixed argument.The third technique (e.g., used for Σ 1 -EC(∪, ∩, , +) ∈ 2EXPSPACE and Σ 1 -EC(∪, ∩, , ×) ∈ 3EXPSPACE in Theorem 8) applies the decidability of Presburger and Skolem arithmetic.
We prove that PIT is logspace many-one equivalent to MC(∩, +, ×) studied in [22], MC Z (+, ×), MC Z (∩, +, ×) studied in [32], and EQ(+, ×) studied in [11].This characterizes the complexity of these problems and shows that the question for improved bounds is equivalent to a well-studied, open problem in algebraic computing complexity.
Finally we show that EQ(∩, +, ×) is ≤ log m -complete for the complement of the second level of the Boolean hierarchy over PIT.This characterizes the complexity of this equivalence problem and explains the difficulty of improving the known upper bound [11].
The intention of this article is to summarize results and to develop a feeling for the proofs.The emphasis is on sketching several ideas at the expense of details.A comprehensive presentation is provided in the technical report [4].

Preliminaries
Basic Notations.Let N (resp., Z) denote the set of natural numbers (resp., integers).N + is the set of positive integers.For x ∈ Z the absolute value of x is denoted by abs(x), and for a matrix of integers A = (a i,j ) ∈ Z m×n for positive natural numbers m and n we define L, NL, P, RP, BPP, NP, PSPACE, and NEXP denote standard complexity classes [23].For a nondeterministic machine M , let acc M (x) be the number of accepting paths of M on input x.The class #L consists of all functions acc M , where M is a nondeterministic logarithmic-space-bounded machine.C = L is the class of problems A for which there exist f, g ∈ #L such that for all inputs x it holds that x ∈ A ⇔ f (x) = g(x).Further information on counting classes can be found in [2].
Let Σ i and Π i denote the levels of the arithmetical hierarchy.2EXPSPACE, i.e., the class of problems decidable by a deterministic algorithm in double exponential space 2 2 n k for some k ∈ N, and 3EXPSPACE, which consists of the problems decidable in triple exponential space.For complexity classes C let coC = {A | A ∈ C}.We denote by K the Σ 1 -complete halting problem (for some fixed Gödelization).
Addition and multiplication are extended to sets of integers: Let A, B ⊆ Z. Then M F C S 2 0 1 7

33:4 Emptiness Problems for Integer Circuits
An oracle Turing machine is nonadaptive, if its queries are independent of the oracle (i.e., for all x and all oracles B and B , the computations M B (x) and M B (x) have the same sequence of queries).For sets A and B we say that A is Turing reducible to B (A ≤ T B), if there exists an oracle Turing machine M that accepts A with B as its oracle.If M is nonadaptive, then A is truth-table reducible to B (A ≤ tt B).A is logspace Turing reducible to B (A ≤ log T B), if there exists a logarithmic-space-bounded oracle Turing machine M (with one oracle tape) that accepts A with B as its oracle.If M 's queries are nonadaptive (i.e., independent of the oracle), then A is logspace truth-table reducible to B (A ≤ log tt B).A is logspace disjunctive-truth-table reducible to B (A ≤ log dtt B), if there exists a logspace computable function f such that for all x, f (x) = (y 1 , y 2 , . . ., y n ) for some n ≥ 1 and χ A (x) = max{χ B (y 1 ), χ B (y 2 ), . . ., χ B (y n )}, where χ S for a set S is the characteristic function of S. A set A is logspace (resp., polynomial time) many-one reducible to B, in notation

Definition of circuits.
A circuit C = (V, E, g C ) is a finite, directed, acyclic graph with vertex set V ⊆ N and a designated vertex g C ∈ V .Here, graphs are allowed to have multi-edges and are not required to be connected.We require that whose nodes are labeled by the labeling function α : V → O ∪ N ∪ { } such that each node has indegree ≤ 2, nodes with indegree 0 have labels from N ∪ { }, nodes with indegree 1 have label , and nodes with indegree 2 have labels from O \ { }.In the context of circuits, nodes are also called gates.Input gates (i.e., gates with indegree 0) with labels from N are called assigned input gates.Input gates with label are called unassigned.An O-circuit whose input gates are all assigned is called completely assigned O-circuit.We use the term integer circuit for both partially assigned O-circuits and completely assigned O-circuits.
There exists a deterministic logarithmic-space-bounded algorithm which on input of a graph decides whether the input is a partially assigned O-circuit.

The set computed by a circuit. For an
For a completely assigned O-circuit C = (V, E, g C , α) we inductively define the set I(g; C) computed by a gate g ∈ V by The set computed by C is defined as Example.For unassigned inputs g 0 and g 1 , consider the circuit C: We write C = g 0 × g 1 ∩ 1 as an abbreviation.C(1, 1) computes the set of all primes, C(x, y) for x = y ∈ P ∪ {0} computes the set {x}, and C(x, y) for all other (x, y) computes the empty set.

MC(O)
The integer variants MC Z (O), EC Z (O), and Σ 1 -EC Z (O) are defined analogously (assigned and unassigned inputs are from Z, the complement is defined with respect to Z).A systematic study of the membership problems MC Z (O) was done by Travers [32].We use the following abbreviations: we write n for the singleton {n}; we write C for I(C), where C is a circuit; we write MC(∪, ∩, , +, ×) for MC({∪, ∩, , +, ×}) and the like.
The following bounds are obtained with minor effort from known results and Lemma 2.

4
Circuits with One Arithmetic Operation
It is straightforward to see that the question of whether an {∩, +}-circuit C is in E(∩, +) for E ∈ {EC, Σ 1 -EC, Π 1 -EC} can be answered by solving a system of linear equations in which each unassigned input gate is represented by one variable and constants have polynomial length in the size of the circuit.We extend this idea such that also emptiness problems that allow unions can be reduced to similar problems regarding (sets of) equation systems.This leads to the following results.
The problems Σ 1 -EC and EC for the sets of operations {∩, ×} and {∪, ∩, ×} will be solved by a general tool given in Theorems 19, 20, and Corollary 21.
The sets computed in the nodes of circuits over {∪, ∩, , +} and {∪, ∩, , ×} can be expressed by Presburger and Skolem formulas.These formulas can be constructed in polynomial time, which allows to transfer the upper bounds of Presburger and Skolem arithmetic.

Lower Bounds
All emptiness problems covered by Section 4.2 -in particular EC( , +) and EC( , ×)are ≤ log m -hard for PSPACE.We show the same for MC( , +) and MC( , ×) improving unpublished results by Reinhardt, which were announced by McKenzie and Wagner [22] and which state that these problems are ≤ p m -hard for PSPACE.This section mainly sketches our proof for the ≤ log m -hardness of MC( , +) for PSPACE.For that we define a further problem.Definition 9. A { , +}-circuit over N k is a completely assigned { , +}-circuit C = ((V, E), g C , α) where all constants are elements of N k .The set I(g; C) ⊆ N k computed by a node g is defined analogously to the one-dimensional case.Further let I(C) = I(g C ; C) and The PSPACE-hardness of this problem is obtained by reducing CNF-QBF, which is the problem of whether a given quantified Boolean formula F in conjunctive normal form is true.It is known that CNF-QBF is ≤ log m -complete for PSPACE.The proof of the following lemma is based on an unpublished proof by Reinhardt [25] showing the ≤ p m -hardness of MC( , ×) for PSPACE.Indeed, ad n for sufficiently large n works as reduction if for example union and intersection are allowed instead of complement.However, in our case we have (0, 1, 0) / ∈ (0, 0, 0) + (0, 0, 1), but ad 8 (0, 1, 0) = ad 8 (0, 0, 7) + ad 8 (0, 0, 1) ∈ ad 8 (0, 0, 0) + ad 8 (0, 0, 1).Such "overflows" are the reason why ad n is not a reduction MC + ( , +) ≤ log m MC( , +) for any n.To address this problem we implement an operation similar to the bitwise 'or' for characteristic sequences: for two finite sets A and B (note that for problems of the form "(C, b) ∈ MC + ( , +)?" it suffices to consider the first b + 1 bits of characteristic sequences The following theorem is essentially due to Sigmund [30].He provided the proof of the second reduction and the main idea of the proof of the first one.

Upper and Lower Bounds for Possibly Undecidable Problems
We obtain upper bounds by improving a known decision algorithm [11] and lower bounds via the Matiyasevich-Robinson-Davis-Putnam theorem [21,7].

Connecting Emptiness with Membership and Equivalence Problems
We show that with the operations , +, and × one can express a Boolean combination of emptiness problems as a single emptiness problem.Therefore, truth-table reductions to certain emptiness problems can be transformed into many-one reductions.This allows us to show certain emptiness problems to be many-one equivalent to membership problems and equivalence problems.As a byproduct we improve the known lower and upper bounds of MC(∪, ∩, , +, ×) [22] and EQ(∪, ∩, , +, ×) [11].
) and these problems are For { , +, ×}-circuits there are further equivalences between membership and emptiness problems.
Goldbach conjectured that every even integer greater than 2 is the sum of two primes.At the time the conjecture was made 1 was considered to be prime, but later the opposite view became accepted.Let P 1 = P ∪ {1}.Below we formulate both variants, Goldbach's original conjecture (GC 1 ) and the one that nowadays is called Goldbach's conjecture (GC).

Connection between Emptiness and Σ 1 -Emptiness
We show that several emptiness problems are equivalent to their Σ 1 -emptiness variants.The proof exploits the fact that the test of whether a multivariate polynomial with coefficients bounded by some constant K is identically zero is possible by evaluating this polynomial for one fixed argument only dependent on K and the total degree of the polynomial.The following lemma shows that the test of whether multivariate polynomials are identically zero reduces to the univariate case.
Lemma 18 ([20]).Given a polynomial f (x 1 , . . ., x n ) over R with total degree at most d, the substitution x i → x (d+1) i−1 has the property that f is identically zero on R n if and only if the obtained univariate polynomial is identically zero on R.
The lemma allows a reduction from Σ 1 -EC(∩, +, ×) to EC(∩, +, ×): Consider a circuit C ∈ Σ 1 -EC(∩, +, ×) with unassigned inputs u 1 , . . ., u n and let z 1 , . . ., z n ∈ N such that C(z 1 , . . ., z n ) = ∅.So under this assignment there exists a ∩-gate g connected to the output and computing ∅ such that no ancestor of g computes ∅.The unique number computed in the left\right predecessor g l \g r of g (note that due to the absence of and ∪ each gate M F C S 2 0 1 7

33:10
Emptiness Problems for Integer Circuits computes a set containing at most one element) can be written as a multivariate polynomial p l \p r with variables u 1 , . . ., u n .It holds that p l = p r , since g computes ∅.By Lemma 18, the same holds for the univariate polynomials p l \p r obtained by the substitution.Note that p l (x) = p r (x) for every large enough x.Moreover, there is a circuit computable in logarithmic space that generates such an x.So the substitution rule provides the assignment x (d+1) 0 , x (d+1) 1 , . . ., x (d+1) n−1 under which g and hence also C computes ∅.This yields the following theorem.
We generalize this argument to {∪, ∩, +, ×}-circuits by unfolding such circuits C to a tree D, which exponentially increases the size, but not the depth.Then we observe that C(z 1 , . . ., z n ) = ∅ if and only if for possibilities to prune D to some D such that each ∪gate has exactly one predecessor it holds that D (z 1 , . . ., z n ) = ∅.Since a ∪-gate with exactly one predecessor acts like a wire, the D are {∩, +, ×}-circuits.Hence C ∈ Σ 1 -EC(∪, ∩, +, ×) if and only if for all D it holds that D ∈ Σ 1 -EC(∩, +, ×).So we reached a situation similar to Theorem 19.1 with the difference that D has exponential size and polynomial depth, which translates to polynomials with an exponential number of monomials and polynomially bounded degrees.Since the argument for Theorem 19 depends only on the polynomial's degree, but not on the number of monomials we obtain: From known results on MC(∩, +, ×) and MC(∩, ×) [22] and Theorem 6 we obtain: Corollary 21. 1. EC(∩, +, ×) ≡ log m Σ 1 -EC(∩, +, ×) ≡ log m MC(∩, +, ×) ≡ log m EQ(+, ×).
The 5th statement shows that improving the non-matching bounds for EC(∩, ×) is as difficult as improving the bounds for MC(∩, ×), which is an open problem from [22].
PIT (polynomial identity testing) is the following problem: For a given integer circuit consisting of input gates associated with variables/constants from Z and internal gates for addition/multiplication over Z, one has to decide whether the polynomial described by the circuit is identically zero or not.The term identically zero means that the polynomial must be formally zero, i.e., if we write it as a linear combination of monomials with coefficients from Z, then all coefficients are zero.For the ring Z this is equivalent to requiring that the polynomial is zero on Z n , where n is the number of unassigned input gates.(For other rings this makes a difference: for example over F 2 , the polynomial x 2 + x is not identically zero, although it is zero on F 2 .)Formally, we can define PIT as the following problem concerning {+, ×}-circuits over Z: the assigned inputs have labels from Z and for all x 1 , . . ., x n ∈ Z it holds that It is known that PIT ∈ coRP [15], but proving the exact complexity of PIT is considered as one of the greatest challenges in algebraic computing complexity [26] and theoretical computer science in general [29].This fundamental problem has many applications, e.g., a deterministic primality test [1].×).We simulate a {∩, +, ×}-circuit C over Z by a {∩, +, ×}-circuit C over N such that the value v ∈ Z computed in gate i of C is represented in C by two positive numbers i + v and i − v, where i = 2 3 i .This shift by i allows {∩, +, ×}-circuits over N to represent numbers from Z.A technical elaboration shows that the circuits can also process numbers represented in this way, i.e., there are subcircuits that simulate the operations ∩, +, and ×.
The equivalence to PIT shows the difficulty of understanding the complexity of the problems EC(∩, +, ×) and Σ 1 -EC(∩, +, ×) as well as the open problems from [22,32,11] mentioned above.Kabanets and Impagliazzo [16] substantiate the hardness of obtaining subexponential algorithms for PIT by showing that it implies that NEXP ⊂ P/poly or the permanent is not computable by polynomial size arithmetic circuits over Q with divisions.Both statements are expected to be difficult to prove.
In view of Theorem 22 it seems unlikely that EQ(∩, +, ×) is equivalent to PIT: A straightforward proof shows that EQ(∩, +, ×) is ≤ log m -complete for PIT ∨ coPIT = {L ∪ L | L ∈ PIT , L ∈ coPIT }, which is the complement of the second level of the Boolean hierarchy [18] over PIT .If EQ(∩, +, ×) ≡ log m PIT, then PIT = PIT ∨coPIT and hence PIT ≡ log m PIT ∈ RP ⊆ NP.Kabanets and Impagliazzo [16] show that PIT ∈ NP is unlikely, since it implies NEXP∩coNEXP ⊂ P/poly or the permanent is not computable by polynomial-size arithmetic circuits over Q with divisions.This also explains the difficulty of improving the upper bound for EQ(∩, +, ×) from BPP [11] to coRP, since this implies PIT ≤ log m EQ(∩, +, ×) ∈ coRP.
Acknowledgements.We thank Klaus Reinhardt for sharing an unpublished proof for the ≤ p m -hardness of MC( , ×) for PSPACE, which we slightly adapted to show the ≤ log m -hardness of MC + ( , +) for PSPACE (Lemma 10), and for helpful discussions on the ≤ log m -hardness

Lemma 10 .
MC + ( , +) is ≤ log m -hard for PSPACE.From now on our proof differs from Reinhardt's proof.Instead of showing directly MC + ( , +) ≤ p m MC( , ×) via a simple reduction, we first prove MC + ( , +) ≤ log m MC( , +) and then show MC( , +) ≤ log m EC( , +) ≤ log m EC( , ×) ≤ log m MC( , ×).To show MC + ( , +) ≤ log m MC( , +) it is convenient to represent a vector of natural numbers a = (a 0 , . . ., a k ) as a natural number ad n (a) = k i=0 a k−i n i for n ≥ 2. We denote the function mapping (C, b) onto (C , ad n (b)) by ad n , where C is the circuit obtained from C by replacing each input x with ad n (x).

11 .
of sets) let m = max(A ∪ B) and considerM = A + {m − 1} + 1 + B + {m − 1} + 1 = ((A + {m}) ∪ {0}) + ((B + {m}) ∪ {0}).Observe that M ∩ {m, . . ., 2m} = {m + x | x ∈ A ∪ B},which equals the union of A and B shifted by the offset m.Now a circuit over N k can be simulated by a circuit over N: Roughly speaking, we use ad 8 and after computing the operation of some node g, the numbers x with ||ad −1 8 (x)|| > 3 can be deleted from I(g) by adding them into I(g) via the 'or'-operation mentioned above.Every 'or'-operation yields an offset which has to be taken into account.This leads to: MC( , +) is ≤ log m -hard for PSPACE.

3 . 4 .
The problems are either decidable or outside Σ 1 ∪ Π 1 .The problems are ≤ m -hard for Σ 1 if and only if they are ≤ m -complete for R tt (Σ 1 ).

Table 1
Upper bounds mean membership in the class, lower bounds stand for ≤ log m -hardness for the class.Numbers refer to results in this paper.Gray cells do not contain references, since by statement 5 of Lemma 2 these results are obtained from white cells.Subsets O that are missing in the first column either correspond to trivial problems (statement 3 of Lemma 2) or can be transformed by De Morgan's law to an equivalent subset (statement 4 of Lemma 2).PIT is the class of problems that are logspace many-one reducible to polynomial identity testing, which is a well-studied problem in algebraic computing complexity.It is known that P ⊆ PIT ⊆ coRP and it is an open problem to improve these bounds.