We investigate the complexity of languages that correspond to algebraic real numbers, and we present improved upper bounds on the complexity of these languages. Our key technical contribution is the presentation of improved uniform circuits for division, matrix powering, and related problems, where the improvement is in terms of “majority depth” (initially studied by Maciel and Thérien). As a corollary, we obtain improved bounds on the complexity of certain problems involving arithmetic circuits, which are known to lie in the counting hierarchy, and we answer a question posed by Yap.
In this article, we consider formal languages that are subsets of (where (the empty string), etc. in the standard order on , where short strings precede long strings, and strings of the same length are placed in lexicographic order. Any such language A can be identified with its characteristic sequence where if and otherwise. The sequence is also the binary representation of a real number in the interval . Thus, it is not uncommon to equate languages with real numbers. (The computability literature contains many investigations of this sort; see, for example, [27,50,53,75].)
Viewed in this light, the finite and co-finite languages correspond exactly to dyadic rational numbers. For instance, the sequences and (corresponding to the languages and , respectively) both denote the number . Any real number in that is not a dyadic rational has exactly one binary representation, and hence corresponds to exactly one language. The literature in computability theory (dating back to Turing’s original work [68]) has tended to focus on the placement of various classes of reals in the hierarchy of (non-)computability classes. (See, for example, [27,50,53,75].)
In contrast, the literature in computational complexity theory has tended to focus on the more “practical” questions of either computing approximations of various real numbers to a desired accuracy, or of obtaining all of the first n bits of their binary representations. For example, the original investigations of Hartmanis and Stearns [35], which can be said to have given birth to the field of computational complexity theory, focused on the question of classifying the complexity of various real numbers, in terms of computing the first n bits of their binary representations. Most other papers that have dealt with the complexity of real numbers (such as [3,39,42,52,74]) have continued in a related vein (focusing more often on approximations), as has most of the significant work formalizing the notions of computability and complexity of real functions (e.g., [20,43,71]). We do not dispute the motivations for defining the “complexity” of a real number in this way. After all, there are many applications that require knowing the bits of to desired accuracy, whereas we struggle to conceive of a practical application that requires us to take a large string x as input (such as ) and return the bit of .
Nonetheless, there are important theoretical considerations that argue in favor of precisely this sort of investigation. Freivalds [32] provides a very compelling survey of the history of mathematical considerations that have led investigators over the centuries to study “normal” reals and “automatic” reals. (Briefly, a real number corresponding to a language A is automatic if and only if A is regular. For more on this topic, we refer the reader to the book by Allouche and Shallit [11].) It was viewed as a very significant achievement when Adamczewski, Bugeaud, and Luca proved that no irrational algebraic number is automatic [1,2]. (It is an easy exercise to see that every rational number corresponds to a regular language, and hence is automatic.)
In this paper, we give an upper bound on the complexity of languages corresponding to algebraic real numbers. We show that all such languages2
It is mistakenly claimed in [25] that these languages lie in . We do not know how to obtain that stronger upper bound.
lie in : the fifth level of the “counting hierarchy”, whose levels are defined as follows.
.
A real number is algebraic if it is a root of some (non-zero) univariate polynomial with integer coefficients. Jeřábek [39] showed that, for any given constant d, there is a uniform family of circuits that will take as input a degree d univariate polynomial p (represented by its sequence of integer coefficients), along with , and produce as output the first n bits of the binary representation of each of the roots of p. Because of well-known connections between and the counting hierarchy (see Proposition 2), this easily implies that every algebraic number lies in the counting hierarchy. However, Jeřábek’s techniques yield threshold circuits whose depth depends on the degree of the polynomial p, and consequently his approach does not provide any constant k such that every algebraic real would lie3
A referee points out that the argument of [39] requires depth related to the degree d primarily because it is finding all of the roots of a polynomial p. The referee asserts that the algorithm in [39] can be modified, by hardwiring information related to a specific root of p, to show that every algebraic number lies in , not quite matching the bound that we present.
in ; we show that this does hold, for . (We actually prove a better upper bound: , which (by Toda’s theorem [67]) is contained in .) It is fair to ask how tight this upper bound is. Thus we also consider lower bounds, although the lower bounds we present are quite weak. For every prime modulus m, we show that there are algebraic numbers (in fact, rational numbers) that lie outside of ). For rational numbers, this lower bound is rather tight; the language corresponding to any rational number lies in (and hence lies in for some ). Although it seems reasonable to conjecture that irrational algebraic numbers are even more difficult than rational ones, we currently do not know of any irrational algebraic number that lies outside of ; nor do we know of any irrational algebraic number that lies in. Our upper bound of is the best upper bound that we know of, for any irrational algebraic number.
Our techniques also apply to certain transcendental numbers, such as π. Yap [73] showed that there is a logspace-computable function that, on input , will output the first n bits of π. (This theorem is also discussed by Lipton in [47, Chapter 31].) Thus the language corresponding to π lies in . We improve this, to show that (and we show that the first n bits of π can be computed in uniform ). We also answer a question posed by Yap, by showing that, for any base b, the first n digits of π expressed in base b can be produced in , and hence in logspace.
The main technical contribution of our work consists of improved algorithms for integer division and related problems. The chain that connects integer division and the complexity of algebraic numbers consists of the following links:
Our upper bound on algebraic numbers relies on an improved upper bound on the problem of computing a given bit of a number represented by an arithmetic circuit (or straight-line program). This problem, known as was introduced in [8], where it was shown to be hard for [8], and was also shown to lie in the counting hierarchy.4
This connection between numerical computation and arithmetic circuits has also been exploited in other work, such as [23,46,54,55].
The best previously-known upper bound for the complexity of is the bound mentioned in [8] and credited there to [10]: .
That bound of follows via a straightforward translation of a uniform algorithm for division and for conversion to and from Chinese Remainder Representation, which was presented in [37]. The algorithms presented in [37] also play a central role in the root-finding algorithm of [39]. We give improved uniform algorithms for these problems, which in turn yield a upper bound on , and on algebraic reals.
The rest of the paper is organized as follows. In Section 2 we present the necessary background and definitions for our theorems that deal with (arithmetic and Boolean) circuits. In Section 3 we give improved algorithms for a variety of problems, including integer division, iterated product, and matrix powering, and we show how these algorithms yield improved upper bounds in the Counting Hierarchy for some fundamental problems about arithmetic circuits. In Section 4 we review background material about algebraic numbers and root-finding algorithms. Then in Section 4.2 we present our upper bound on the complexity of languages A whose characteristic sequence is an algebraic number, and we also present related results about certain transcendental numbers (including π). We conclude with a discussion of open problems in Section 5.
Arithmetic and Boolean circuits
The algorithms that we present depend on Chinese Remainder Representation (CRR). Let us fix the notation that we will use. Given a list of primes and a number , the representation of X is the list . We omit the subscript Π when it is clear from context.
We need to refer (repeatedly) to the binary expansion of a rational number. Furthermore, we want to avoid possible confusion caused by the fact that some numbers have more than one binary expansion (e.g. ). Thus the following definition fixes a unique binary representation for every rational number.
The binary expansion of a nonnegative rational number is the unique expression , where each , and where the binary expansion of any integer multiple of has for all .
The binary expansion ofcorrect to m places is the sequence of bits representing .
A circuit is a directed acyclic graph, whose nodes are called gates and whose edges are called wires. Gates with indegree zero are input gates. We usually restrict attention to circuits with exactly one gate of outdegree zero; this gate is called the output gate. In this paper, all input gates will be connected either to constants or to input variables, which can be assigned values in .
In an arithmetic circuit, all gates other than input gates are labeled with an operation in , and the constants that we will allow are . Thus each wire leading from gate g to gate h will “carry” the integer value that is computed at g to be fed into gate h.
Arithmetic circuits of polynomial size can produce numbers that require exponentially-many bits to represent in binary. The problem5
“SLP” stands for “straight-line program”; which is a model equivalent to arithmetic circuits. Throughout the rest of the paper, we will stick with the arithmetic circuit formalism.
known as is the problem of determining a given bit of this binary representation. Formally, is
A related problem,
and a host of other problems on inferring properties of succinctly represented numbers were introduced in an article by Allender, Bürgisser, Kjeldgaard-Pedersen and Miltersen [8]. The main goal of [8] was to provide a complexity-theoretic framework to study problems arising in numerical analysis. It is shown in [8] that is hard for , and it also conjectured there that .
It is important to note that the arithmetic circuits considered in and do not have any input variables. Let us emphasize this point: In this paper, we focus on arithmetic circuitswithout input variables. Thus an arithmetic circuit is a (possibly very compact) representation of an integer.
The Boolean circuits that we will consider will have gates (other than input gates) labeled with an operation in {NOT, AND, OR, MAJORITY}. These gates (which have unbounded fan-in, except for NOT gates, which have fan-in 1) produce as output the logical NOT, AND, OR, and MAJORITY of their inputs, respectively (where MAJORITY evaluates to 1 iff strictly more than of the input bits are 1).
The depth of a circuit is the length of the longest path from an input gate to the output gate. A circuit family is a set where each has n input gates. A circuit family is dlogtime-uniform if there is a Turing machine takes an input string of length m and determines in time the labels of g and h in and also reports if there is a wire in from g to h. A circuit family is said to be nonuniform if no uniformity condition is imposed. is the set of languages that are recognized by dlogtime-uniform circuit families of polynomial size and depth . is the set of languages that are recognized by such circuit families that have no MAJORITY gates.
We also need to refer to functions computable in circuit classes. The function f is said to be in (such as or ) if the length of is polynomial in the length of x, and the language {: the bit of is b} is in .
For more on circuit complexity classes such as and , as well as a discussion of dlogtime uniformity, see [69]. For background on other standard complexity classes such as etc., consult a standard text such as [12].
There are several possible variants of “depth” that one could choose to study. For instance, several papers have studied circuits consisting only of MAJORITY gates, and tight bounds are known for the depth required for several problems, in that model. (See, for instance [34,61,63,70] and other work referenced there.) Since our motivation comes largely from the desire to understand the complexity of problems in the counting hierarchy, it turns out that it is much more relevant to consider the notion of majority depth that was considered by Maciel and Thérien [48]. The class consists of functions computable by families of threshold circuits of polynomial size and constant depth such that no path from an input to an output gate encounters more than d MAJORITY gates. Thus the class of functions with majority depth zero, , is precisely . In order to explain the connection between and the counting hierarchy, recall how the levels of the counting hierarchy are defined:
The counting hierarchy is analogous in some ways to the polynomial hierarchy The following proposition can be interpreted as saying that is an exponential analog of .
Let A be a set such that, for some k, some polynomial-time computable function f and for some dlogtime-uniformcircuit family, it holds thatif and only ifaccepts. Then.
(One important part of the proof of Proposition 2 is the fact that, by Toda’s theorem [67], for every oracle A, . Thus all of the circuitry inside the circuit can be swallowed up by the part of the simulation.)
Note that the dlogtime-uniformity condition is crucial for Proposition 2. Thus, for the remainder of this paper, all references to will refer to the dlogtime-uniform version of this class, unless we specifically refer to nonuniform circuits.
Overview of the new algorithmic results
In this section, we present new uniform algorithms for integer division, converting from CRR to binary, computing a power of a given integer, and computing a power of a given matrix (of bounded dimension). Table 1 compares the complexity bounds that Maciel and Thérien obtained in the nonuniform setting with the bounds that we are able to obtain in the uniform setting. (Maciel and Thérien also considered several problems for which they gave uniform circuit bounds; the problems listed in Table 1 were not known to lie in dlogtime-uniform until the subsequent work of [37].) All previously-known dlogtime-uniform algorithms for these problems rely on the CRR-to-binary algorithm of [37], and thus have at least majority-depth 4 (as analyzed by [10]); no other depth analysis beyond was attempted.
Prior bounds and new bounds on majority-depth for various problems
In all of the cases where our uniform majority-depth bounds are worse than the nonuniform bounds given by [48], our algorithms also give rise to nonuniform algorithms that match the bounds of [48] (by hardwiring in some information that depends only on the length), although in all cases the algorithms differ in several respects from those of [48].
The most efficient previously-known algorithms for the problems considered in this paper all make use of clever decompositions of the problem at hand, in terms of partial evaluations or approximations. The technical innovations in our improved algorithms rely on introducing yet another approximation, as discussed in Lemmas 7 and 10.
Table 1 also lists one problem that was not considered by Maciel and Thérien: the problem of taking as input and a matrix A, and producing . For any fixed k, this problem was shown to be in nonuniform by Mereghetti and Palano6
The reader should be cautioned that it is stated in [49] that iterated matrix product of integer matrices is computable in . In fact, the best known upper bound is [21].
[49]; it follows from [37] that their algorithm can be implemented in dlogtime-uniform . The corresponding problem of computing large powers of a matrix (i.e., when m is given in binary) has been discussed recently [33,54]. We show that this version of matrix powering is in , by making use of the improved algorithm for CRR-to-binary, which plays an important role in our algorithm for .
In addition to , there has also been interest in the related problem [29,41,44,45]. , and is not known to be in [8], but in contrast to , it is not known (or believed [29]) to be -hard. Our theorems do not imply any new bounds on the complexity of , but we do conjecture that and both lie in . This conjecture is based mainly on the heuristic that says that, for problems of interest, if a nonuniform circuit is known, then corresponding dlogtime-uniform circuits usually also exist. Converting from CRR to binary can be done nonuniformly in majority-depth one, and there is no reason to believe that this is not possible uniformly – although it seems clear that a different approach will be needed, to reach this goal.
The well-studied Sum-of-Square-Roots problem reduces to [8], which in turn reduces to . But the relationship between and the matrix powering problem (given a matrix A and an n-bit integers , output the bit of a given entry of ) is unclear, since matrix powering corresponds to evaluating very restricted arithmetic circuits. Note that some types of arithmetic involving large numbers can be done in ; see [33,38]. Might matrix powering also lie in ?
In Section 3.6, we provide a very weak “hardness” result for the problem of computing the bits of large powers of 2-by-2 matrices, to shed some dim light on this question. We show that the Sum-of-Square-Roots problem reduces to matrix powering via -Turing reductions.
Improved uniform circuits for division
Our new algorithm for division makes use of several useful subroutines that are computable in and . These are summarized in the following lemma:
Letbe numbers in the interval(whereis a constant). Letand letbe prime. Then the following operations have the indicated complexities:
is in.
is in.
is in.
is inwhereis a generator of the multiplicative group modulo p.
is in.
is in.
is in.
We list the proofs of items in the Lemma above:
Follows from Lemma 4.2 and Corollary 6.2 in [37]. In Section 4.3, we will also need the fact that the base-β representation of is also computable in . (See also Note 12.) Thus we present the details here.
The language {and thesymbol in the base-β representation ofis σ} is in.
Let a and b be such that with . The digit of the base-β expansion of the rational number is equal to the low-order digit of a. Since is congruent to zero modulo β, it follows that the low-order digit of a is equal to , where is the multiplicative inverse of . The result now follows from the fact that computing is in [37], and that can be computed in . □
Follows from Proposition 3.7 in [48] and the fact that two -bit integers can be multiplied in .
Follows from the reduction of multiplication to addition of discrete logs and the previous parts.
□
A new division algorithm
We now give a construction of efficient threshold circuits for division.
The function taking as input, andand producing as output the binary expansion ofcorrect to m places is in.
This task is trivial if ; thus in the rest of this argument assume that .
Computing the binary expansion of correct to m places is equivalent to computing . Thus we will focus on the task of computing , given integers X and Y.
The basic structure of all known algorithms for division (reducing the problem to iterated product, and computing iterated product via a reduction to iterated addition, via conversion to and from Chinese Remainder Representation) has remained unchanged since the pioneering work of [17]. Subsequent improvements [22,37,48,63] have focused on finding more efficient implementations of these various tasks.
Our approach will be to compute , a strict underestimate of , such that . Since , we have that if and only if . It follows that in all cases , since
Note that, in order to compute , we actually compute an approximation to .
The approximation is actually defined in terms of another rational approximation , which will have the property that . ( is easier to compute, which is why we introduce it.) We postpone the definition of , and focus for now on , an under approximation of with error at most .
Using circuitry, we can compute a value such that7
In Section 4.3, we will need to consider a variant algorithm, where, in this first step, a value t is computed such that . Observe that this is easy to do, if Y is expressed in base-β notation. Also, in this case, if we set . Then , and . This will also involve changing the definition of W and , so that is , and hence . We will refer to this variant of the algorithm as the β-variant. The analysis of the β-variant differs from that of the binary version in only trivial respects.
.
Let . Then . Thus, . Set , then
Define to be . Hence, .
We find it useful to use this equivalent expression for :
Define to be . Thus .
Let Π be any set of primes such that the product M of these primes lies infor some. Then, givenwe can compute therepresentations of thenumbers(for) in.
With the aid of Lemma 3, we see that using circuitry, we can compute
for each prime and various powers j, and
a generator mod p for each prime .
In we can compute and (each of which has bits). Using those results, with circuitry we can compute the powers and then do additional arithmetic on numbers of bits to obtain the product for each . (The condition that ensures that the numbers that we are representing are all less than M.) □
Having the representation of the number , our goal might be to convert the to binary, and take their sum. In order to do this efficiently, we instead first show how to obtain an approximation (in binary) to where , and then in Lemma 10 we build on this to compute our approximation to .
Recall that . Thus the number is an integer with the same significant bits as .
Let Π be any set of primes such that the product M of these primes lies infor a fixed constant, and let b be any natural number. Then, givenwe can compute the binary representation of a good approximation toin(where by good we mean that it under-estimates the correct value by at most an additive term of).
Let for each prime .
If we were to first compute a good approximation to the fractional part of:
i.e. if were a good approximation to , then would be a good approximation to . This follows from observing that the fractional part of is exactly (as in [37, Lemma 4.3] and [8, Theorem 4.2]).
Instead of working with , we will work with
Note that the exact magnitudes of the two quantities are not the same but their fractional parts will be the same. Thus we will compute as a good approximation to the fractional part of . Since we are adding up approximate quantities it suffices to compute each of them to bits of accuracy to ensure:
Now we analyze the complexity. By Lemma 6, we obtain in the representation of for . Also, by Lemma 3, each can be computed in , and polynomially-many bits of the binary expansion of can be obtained in .
Using circuitry we can multiply together the -bit numbers and , and then obtain the binary expansion of (since multiplying an n-bit number by a bit number can be done in ).
Thus, with one more layer of majority gates, we can compute a good approximation to
and strip off the integer part, to obtain the desired approximation . □
Let Π be any set of primes such that the product M of these primes lies infor a fixed constant. Then, given Z inrepresentation and the numbersfor each, we can compute the binary representation of a good approximation toin.
This follows from the analysis presented in the proof of Lemma 7, in the special case when and for all . □
Before presenting our approximation , first we present a claim, which helps motivate the definition. In the claim, and in the subsequent discussion, let for be pairwise disjoint sets of primes such that (for some constants ). Let .
For any value A, it holds that
It suffices to show that
where the final inequality is trivial. Let and let . Then and . Thus the claim holds if we show that, for all and for all integers ,
This holds by induction. Assume that . (This holds for .) Then . This completes the induction, and the proof of the claim. □
Now, finally, we present our desired approximation. is , where is an approximation (within ) of
Note that
and
Thus is equal to
and hence
for all .
Letforbepairwise disjoint sets of odd primes such that(for some constants). Let. Then, givenand the, we can computein.
Via Lemma 3, in we can compute the representation of each , as well as the numbers (using Lemma 6). Also, as in Lemma 7, we can compute the values for each prime p.
Then, via Lemma 3, with one more layer of majority gates we can compute the CRR representation of , as well as the CRR representation of . The CRR representation of the product can then be computed with circuitry to obtain the CRR representation of the numerator of the expression for . (It is important to note that , so that it is appropriate to talk about this CRR representation. Indeed, that is the reason why we divide each factor by two.)
This value can then be converted to binary with one additional layer of majority gates, via Corollary 8, to obtain . □
Let Π be any set of primes that is the union of pairwise disjoint sets, such that, for all i,lies infor fixed constants. Then, given Z inrepresentation, the binary representation of Z can be computed in.
Recall from the proof of Theorem 5 that, in order to compute the bits of , our circuit actually computes an approximation to . Although, of course, it is trivial to compute if Z is given to us in binary, let us consider how to modify the circuit described in the proof of Lemma 10, if we were computing , where we are given Z in CRR representation.
With one layer of majority gates, we can compute the representation of each and the values for each prime p. (We will not need the numbers .)
Then, with one more layer of majority gates we can compute the CRR representation of . In place of the gates that store the value of the CRR representation of , we insert the CRR representation of Z (which is given to us as input) and using circuitry store the value of . The CRR representation of the product can then be computed with circuitry to obtain the CRR representation of the numerator of the expression for .
Then this value can be converted to binary with one additional layer of majority gates, from which the bits of Z can be read off. □
Although we have stated our results in terms of converting from CRR to binary notation, there is nothing special about base 2. As observed in [6,37], the approach from Lemma 10 (and in Lemma 7) carries over with only trivial adjustments, to convert from CRR to base ten or to representation in any other base. The only “new” ingredient that is required is that the base-β expansion of can be computed to a polynomial number of bits of accuracy in . (See Claim 4.8
It should be mentioned that the β-variant of the division algorithm is not required, for conversion from CRR to base-β. The β-variant is introduced for other considerations that arise in Section 4.3.
)
It is rather frustrating to observe that the input values Z are not used until quite late in the computation (when just one layer of majority gates remains). However, we see no simpler uniform algorithm to convert CRR to binary.
For our application regarding problems in the counting hierarchy, it is useful to consider the analog to Theorem 5 where the values X and Y are presented in CRR notation.
The function taking as input(in CRR) as well as, and producing as output the binary expansion ofcorrect to m places is in.
We assume that the CRR basis consists of pairwise disjoint sets of primes , as in Lemma 10.
The algorithm is much the same as in Theorem 5, but there are some important differences that require comment. The first step is to determine if , which can be done using circuitry (since the CRR of 1 is easy to recognize). The next step is to determine a value t such that . Although this is trivial when the input is presented in binary, when the input is given in CRR it requires the following lemma:
(Adapted from [4,8,26]).
Let X be an integer fromspecified by its residues modulo each. Then, the predicateis in
Since we are able to determine inequalities in majority-depth two, we will carry out the initial part of the algorithm from Theorem 5 using all possible values of t, and then select the correct value between the second and third levels of MAJORITY gates.
Thus, for each t, and for each j, we compute the values in CRR, along with the desired number of bits of accuracy of for each p in our CRR basis.
With this information available, as in Lemma 10, in majority-depth one we can compute , as well as the CRR representation of each , and thus with circuitry we obtain and the CRR for each .
Next, with our second layer of majority gates we sum the values (over all j), and at this point we also will have been able to determine which is the correct value of t, so that we can take the correct sum, to obtain .
Thus, after majority-depth two, we have obtained the same partial results as in the proof of Lemma 10, and the rest of the algorithm is thus identical. □
The following generalization of Theorem 13 will be useful for us in Section 4.3.
There is a function computable inthat takes as input the CRR representation of a sequence, as well asandwith the property that, for each i,, and produces as output the binary expansion ofcorrect to m places.
The naïve approach, of simply taking the sum of the circuits that result from Theorem 13, would be too expensive in terms of majority-depth. Thus we dive deeper into the details of how each quotient is computed.
Recall the definition of (immediately before Lemma 6), and recall also that is approximated by .
Thus , where the approximation is a correct underapproximation to bits
As in the proof of Theorem 13, after one level of majority gates, we can have computed the values of (in CRR notation), and with another level of majority gates, we can compute the CRR of , and (as in the proof of Theorem 13) with one more level of majority gates, we obtain the binary encoding of the desired result. □
Iterated product is in uniform.
The overall algorithm is identical to the algorithm outlined in [48], although the implementation of the basic building blocks is different. In majority-depth one, we convert the input from binary to CRR. With one more level of majority gates, we compute the CRR of the product.
Simultaneously, in majority-depth two we compute the bottom two levels of our circuit that converts from CRR to binary, as in Corollary 11.
Thus, with one final level of majority gates, we are able to convert the answer from CRR to binary. □
Consequences for the counting hierarchy
.
This is immediate from Proposition 2 and Corollary 11.
Let f be the function that takes as input a tuple and if p is a prime, evaluates the arithmetic circuit C mod p and outputs the j-th bit of the result. This function f, taken together with the circuit family promised by Corollary 11, satisfies the hypothesis of Proposition 2. (There is a minor subtlety, regarding how to partition the set of primes into the groupings , but this is easily handled by merely using all of the primes of a given length, at most polynomially-larger than .) □
Via essentially identical methods, using Theorem 13, we obtain:
{: the Nth bit of the quotient, where X and Y are represented by arithmetic circuitsand, respectively} is in.
We will appeal to Proposition 2 and Theorem 13. Let f be the polynomial-time-computable function that, on input outputs “p not prime” if p is not prime, and otherwise outputs the value of if , and outputs the value of if . Note that the string can be viewed as providing the CRR representation of the numbers represented by and . (Technically, in order to directly appeal to Proposition 2 and Theorem 13, the definition of f will need to be modified slightly, so that also ends in a sequence of exponentially-many zeros. This is conceptually quite easy – by only considering numbers p whose length, in bits, is polynomially-related to the length of N, and making some minor formatting changes. In order to avoid introducing distracting technicalities, we leave these minor details to the interested reader.)
Now, let A be the language in that takes the CRR representation of X and Y as input, along with the number , and outputs the bit of , as follows from Theorem 13. The theorem now follows from Proposition 2. □
Integer powering
In this section, we continue presenting our algorithmic results, concentrating on the problem of computing powers of integer matrices.
We begin by presenting an alternative algorithm for integer powering, which serves to illustrate our approach for matrix powering. (Note that the upper bound of already follows from our algorithm for iterated integer multiplication. Here, we are merely presenting an alternative algorithm as a warm-up for matrix powering.)
The function taking as input,and(where) and producing as output the i-th bit ofis in.
Our algorithm is as follows:
Convert X to CRR. Let for . This is implementable in by item 5 in Lemma 3. In parallel, compute the first two phases of our uniform algorithm to convert CRR to binary (Corollary 11). (Note that these first two stages depend only on the moduli Π, and do not depend on X)
Compute by appealing to Fermat’s little theorem. More precisely: Since for any prime p, we can compute where for . This step is in via item 3 in Lemma 3.
At this stage, we have the answer encoded in CRR, and we invoke the final layer of the circuit from Corollary 11, convert the answer to binary.
Putting these three together, we have integer powering in . □
Integer matrix powering
The functiontaking as input ainteger matrix,,, where,and producing as output the i-th bit of the-th entry ofis in.
For a matrix A, the characteristic polynomial is a univariate polynomial of degree at most d. Let be univariate polynomials of degree at most and such that . By the Cayley–Hamilton theorem, we have that . So, in order to compute , it suffices to compute .
Given amatrix A with entries that are n-bit integers, the coefficients of the characteristic polynomial of A in CRR can be computed in.
We convert the entries of A to CRR and compute the determinant of . This involves an iterated sum of integers each of which is an iterated product of d n-bit integers. The conversion to CRR is in by item 5 in Lemma 3. Since addition, multiplication, and powering of numbers of bits is computable in (by Lemma 3, items and 6), it follows that the coefficients of the characteristic polynomial can be computed in . □
Given the coefficients of the polynomial r, in CRR, and given A in CRR, we can computein CRR usingcircuitry.
Recall that . Let . Computing any entry of in CRR involves an iterated sum of many numbers which are themselves an iterated product of many -bit integers. The claim follows by appeal to Lemma 3. □
Let p be a prime of magnitude. Letof degree m andof degree d be monic univariate polynomials over, such thatfor some polynomialsof degreeandof degree. Then, given the coefficients of g and f, the coefficients of r can be computed in.
Following [36], let , , and . Since are monic, we have . Denote by and respectively the polynomial with the i-th coefficient and respectively. Then note that , , and .
We use the Kung–Sieveking algorithm (as implemented in [36]). The algorithm is as follows:
Compute via interpolation modulo p.
Compute . from which the coefficients of can be obtained as .
Compute .
To prove the correctness of our algorithm, note that we have . Scaling the whole equation by , we get . Hence when we compute in step 2 of our algorithm, we get
Note that (a telescoping sum). Since f is monic, has a constant term which is 1 and hence does not contain a monomial of degree less than . This is also the case with , and hence all the monomials of degree less than belong to .
Now we justify why the algorithm above is amenable to a implementation: Firstly, note that given and , the coefficients of and can be computed in . To compute the coefficients of , we use interpolation via the discrete Fourier transform (DFT) using arithmetic modulo p. Find a generator w of the multiplicative group modulo p and substitute to obtain a system of linear equations in the coefficients F of , where Y is the vector consisting of evaluated at the various powers of w. Since the underlying linear transformation is a DFT, it is invertible; the inverse DFT is equal to , which is equivalent to . We can find each coefficient of by evaluating , i.e., by an inner product of a row of the inverse DFT-matrix with the vector formed by evaluating at various powers of w and dividing by . The terms in this sum can be computed in , and then the sum can be computed in majority-depth one, to obtain the coefficients of . The coefficients of in step 2 can be obtained by iterated addition of the product of certain coefficients of and , but since the coefficients of are themselves obtained by iterated addition of certain terms t, we roll steps 1 and 2 together by multiplying these terms t by the appropriate coefficients of . Thus steps 1 and 2 can be accomplished in majority-depth 1. Then step 3 can be computed using circuitry. □
Our circuit C that implements the ideas above is the following:
At the input, we have the entries , of A, a set Π of short primes (such that Π can be partitioned into sets that are pairwise disjoint, i.e., ), and the numbers .
In majority-depth one, we obtain (1) for each prime p in our basis, and (2) for each of the sets that constitute Π, and (3) the CRR of the characteristic polynomial of A (via appeal to Lemma 21).
In the next layer of threshold gates, we compute (1) in CRR, and (2) the coefficients of the polynomial r in CRR, by appeal to Lemma 23.
At this point, by Lemma 22, circuitry can obtain in CRR, and with one more layer of MAJORITY gates we can convert to binary, by appeal to Corollary 11.
□
Now we consider the “succinct” versions of the problems of computing powers of integers and matrices (i.e., where the power is given in binary, instead of in unary notation), and show that these problems reduce to . (We do not consider taking powers of integers as a separate problem; an integer can be viewed as a 1-by-1 matrix.) Define:
(Here, the matrix A is represented by arithmetic circuits, with one circuit for each entry.)
For every,Bit-k-MatPowpolynomial time reduces to.
It is sufficient to produce arithmetic circuits computing . This is easily obtained via repeated squaring:
Since M is a matrix with entries that are represented as arithmetic circuits, we can again compute using additional arithmetic gates, by repeated squaring (where N is an n-bit number). Again, it is easy to construct this circuit, in polynomial time. □
Reducing sum-of-square-roots to matrix powering
In this section, we digress slightly from our presentation of efficient algorithms (in or in ), in order to address the question of whether the problems that we have shown to lie in might have much more efficient algorithms. Evidence for the intractability of and is presented in [8]. But there is much less evidence that matrix powering is difficult. Here, we show that if one could power 2-by-2 matrices in , then it would yield an improved upper bound on the well-known Sum-of-Square-Roots problem. More formally, we present a reduction, showing that the Sum-of-Square-Roots problem is reducible to the problem of computing large powers of 2-by-2 integer matrices, where the power of the reduction lies low in .
(The Sum-of-Square-Roots Problem).
Let be a list of n-bit positive integers, and let . Define to be the problem of determining if:
.
Our proof makes use of Linear Fractional Transformations (LFTs), which in turn correspond directly to 2-by-2 matrices. We introduce LFTs in the next subsection.
Linear fractional transformations (LFTs)
Here we give a brief introduction to LFTs based on the expositions in [28,56,57], concentrating only on the aspects required in this paper.
A linear fractional transformation is a function mapping for reals (and preferably integers) ; we associate the matrix to this mapping. The interesting thing about LFTs is that the matrix corresponding to the composition of two LFTs is the usual product of the matrices corresponding to the two LFTs. In other words, if the matrix corresponding to is (for ), then a matrix corresponding to (which abbreviates ) is , as can be easily verified. In this paper we deal only with nonsingular LFTs (i.e., LFTs whose matrices have non-zero determinant). An LFT is said to be positive if all four entries in its matrix have the same sign.
Let ϕ be an LFT and let be its matrix. Then ϕ acts as a bijection between any interval and a subset of the extended reals . Further, this subset is also an interval (possibly including ∞): either or . Notice that we do not claim that there is a linear order on the reals augmented with ∞. Instead, we refer to these sets as “intervals” in the same sense that connected subsets of the unit circle can be called intervals.
For a concrete example, is the interval if and the interval if . Notice that is taken to be . Notice also that is the interval containing ∞.
An LFT is said to be refining for an interval if . We will need the following two propositions from [56]:
Given two non-trivial intervalsandwithand, there exists an LFT ϕ with.
For LFTs ϕ and ψ we haveifffor a positive LFT γ.
Thus for any sequence of nested intervals we have where is an LFT and all other ’s are positive LFTs.9
We call , the convergent of the LFT sequence ϕ.
Thus if a sequence of nested intervals converges to a real number r, then the corresponding infinite sequence of LFTs or the corresponding infinite product of matrices represents r; and the initial finite subsequence of LFTs applied to the interval yields increasingly finer approximations to r.
LFTs are closely related to continued fractions; in fact, the continued fraction
corresponds to the LFT
An LFT for the square root function is:
for . This differs slightly from the LFT specified in [56,57]. We establish its correctness below.
To see that this LFT ϕ is an LFT for the square root function, we first establish a bound on the length of the convergent. We use the following notation: denotes the length of the interval . The following two subsections show that as .
Length of the convergent
Let and . Then the length of the interval is given by:
Length of the convergent for the square root
Using the notation above with , we get
Thus, inductively, .
Thus for some and all . In particular, and thus as . Thus, , so that
Hence .
This establishes that ϕ is a LFT for the square root function.
Ifdenotes theconvergent for the matrix sequencewhere each, then. Thus if, then, and for all. Furthermore,.
From the foregoing, we have that . But . This yields .
The other parts of the lemma follow immediately. □
Let be an input instance for . Let be a positive integer satisfying . Further, let be a rational in . Hence, by an application of Lemma 29, any number, say in the convergent interval of approximates with an error of at most . To obtain an approximation of from this we need to multiply by (and if is odd then we must also multiply this by an approximation to – which can also be approximated in this way by setting and ).
How good an approximation is needed? That is, how large must M be? Tiwari has shown [66] that if a sum of n square roots is not zero, where each has binary representation of length at most s, then the sum is bounded from below by
Thus taking and obtaining an approximation of each to within provides enough accuracy to determine the sign of the result. By Lemma 29, a suitable approximation is provided by (or – if is odd – by the expression ). Denote this fraction by . (Note that each .)
Note that
We will need to re-write the expression in order to make it easier to evaluate. First, note that this expression is of the form for integers whose binary representation is of length less than . Thus this expression can written in the form where each is easily computable from the input and from the oracle . Via the distributive law, this can be rewritten as .
Thus there is a function f computable in polynomial time with an oracle for that, on input outputs the bit of the number . (Namely, the algorithm queries the n oracle bits corresponding to and combines this information with to obtain the sign , and computes the value of the exponent , and from this easily determines the value of bit ℓ of the binary representation.)
Since addition of m numbers, each consisting of m bits is computable in , it is now immediate that the bits of this expression are computable in . Thus in , using the bits of this expression as an oracle, one can determine if the number represented in this manner is positive or not. (Namely, is there some bit that is non-zero, and is the sign bit positive?) □
Computing bits of algebraic numbers
In this section, we use the tools developed in the previous section to derive upper bounds on the problem of computing bits of algebraic numbers.
Mathematical preliminaries
(Algebraic number, Minimal Polynomial, Degree).
A real number α is called algebraic if there is a univariate polynomial p with rational (or – equivalently – integer) coefficients such that . There is a unique monic10
A univariate polynomial is monic if .
univariate polynomial of minimal degree (and rational coefficients) such that ; is said to be the defining polynomial or the minimal polynomial of the algebraic number α. The degree of α is the degree of . The roots of are called the Galois conjugates of α.
The minimal polynomial is irreducible; all of the Galois conjugates of α have the same degree d. In particular, no root of is also a root of the first derivatives of p (denoted ).
The Newton–Raphson method is a well-known algorithm for computing an approximation to a root of a univariate polynomial. For background, the reader can consult a textbook that explains the method, such as [31,65].
(Newton–Raphson).
Given a polynomial p and a starting point , recursively define:
whenever is defined and is non-zero.
Note that if p is an irreducible polynomial (such as the minimal polynomial for an algebraic number α), then there is an interval around α such that has no roots in I, since and has only finitely-many roots. In fact, it is known that if β is small enough, then for any starting point in I, the sequence not only is infinite (because ), but it converges “rapidly” to α. Let us make precise the notion of “rapid” convergence.
Let denote the error in the ith iteration of Newton–Raphson: . We say that the Newton–Raphson sequence (with starting point ) converges quadratically (with parameter ) if, for all , . Note that we can assume (pessimistically) that .
Much more is known about sufficient conditions on the size of the interval that are sufficient to guarantee quadratic convergence (for every choice of , for the same parameter M), but for our purposes it is sufficient to know that this interval exists, and hence there is a rational number that we can use as the starting point for a Newton–Raphson sequence that converges quadratically to α. The constant will be hard-wired into our algorithm. We will impose some additional requirements on ; in particular, we will pick so that . With this restriction on , a simple induction shows that, for all , .
Since the Newton–Raphson sequence converges quadratically, this means that the number of bits of accuracy is doubling with each iteration (so that, after a polynomial number of iterations, the approximation is accurate to an exponential number of bits). But if the bit of is 0 (for example), do we really know that the bit of α is 0? If the next 100 bits of are all 1, it could still be possible that in our next underestimate , the i-th bit would be 1, followed by 100 0’s and then a 1. How far do we need to “look ahead”, in order to be confident about the value of the bit of α?
The answer is provided by Liouville’s Theorem, which provides useful bounds on approximating algebraic numbers by rational numbers (see e.g. Shidlovskii [62] or Yap [72]).
(Liouville’s Theorem).
If α is a real algebraic number of degree, then there exists a constantsuch that the following inequality holds for anyand,:
Roth’s theorem sharpens the inequality in Liouville’s theorem:
If α is a real irrational algebraic number then there exists a constantsuch that the following inequality holds for anyand,
Roth’s theorem is optimal, in some ways: the number 2 in the exponent cannot be decreased.
The rest of this subsection is an adaptation of the corresponding material in [73], which gives a logspace algorithm to compute the digits of π. In contrast to the development in [73], we choose to utilize Liouville’s Theorem for algebraic numbers, instead of the advanced arguments required for bounding the irrationality measure of π. We could throughout replace the use of Liouville’s theorem by the much stronger and deeper Roth’s theorem, but we prefer not to do so, in order to retain the elementary nature of the arguments. We now introduce some terminology and notation that we will be using (some of which is standard, and some of which was introduced in [73]).
Let α be a real number. Let be the fractional part of α. Further, let and let be the n-th bit after the binary point.
It is clear that iff . For algebraic numbers we can sharpen this:
Let α be an irrational algebraic number of degree d, and letbe the constant guaranteed by Liouville’s theorem. Let. Then we have:
iff.
iff.
Taking , and letting be the number whose binary representation corresponds to the first n bits in the binary representation of α, Liouville’s theorem implies that , so . Also, we have that , where is the first bits of the binary representation of α.
Thus . This is greater than if . A similar calculation establishes the claim also in the case when . □
As a consequence of Lemma 35, in order to be confident that our approximation to α is giving us the correct value for the bit of α, it is sufficient to have an approximation with error at most . In other words, there is a constant b such that, if the bit of α is 1, then the binary representation of α will have another 1 appearing no later than position number ; there is a bound on how many consecutive 1’s can appear in the binary representation of α. (And similarly, if the bit of α is 0, there will be another 0 that appears not too much later.) More specifically, recalling that our starting point is in the interval I where Newton–Raphson converges quadratically to α, and where , this means that there is a constant such that, given an n-bit number N, the bit of α is equal to the bit of .
Algebraic numbers in
In this section, we prove our main result concerning algebraic numbers.
Letbe an algebraic number, where each. Then the languageis in.
Let be the starting point for the Newton–Raphson method as described in Section 4.1. Since is rational, let for integers a and b. Let p be the minimal polynomial for α. Recall that the Newton–Raphson sequence is defined as for all i. Thus and more generally , where denotes the i-fold composition of f.
Consider an input string j of length n. As discussed in Section 4, if and only bit j of is equal to 1 (for some constant c). Our algorithm will create arithmetic circuits N and D (in polynomial time) so that the rational number is equal to . Then we will use our algorithm from Corollary 18, to obtain the bit of .
First, note that any polynomial , with rational coefficients, when applied to a rational input , (where ) can be written as the quotient of two bivariate integer polynomials and :
where L is the least common multiple of the denominators of the rational coefficients .
We are especially interested in the polynomials and . Thus
for integer bivariate polynomials F and G.
For a positive integer t, let the t-bicomposition of be the pair of bivariate polynomials defined as follows:
and,
A straightforward induction shows that .
Recall that p is the minimal polynomial for α, and it does not depend on the input j to . Similarly, the starting point is a fixed constant. Thus there are arithmetic circuits and of size computing , and , respectively. For each , the circuit computing can be constructed by running wires from the output gates of and to the input gates, respectively, of a copy of the circuit for . The circuit for is constructed similarly.
In this way, we construct in polynomial time the circuits and so that the rational number is equal to , as desired. This completes the proof. □
Certain transcendentals in
Our results on algebraic numbers made use of Liouville’s Theorem, which shows that algebraic numbers can not be “too close” to rational numbers with small denominators. A similar property holds for several important transcendental numbers. This motivates the following definition:
The irrationality measure of a transcendental number α is the infimum of
The irrationality measure of π is no more than 7.10321 [76]. The irrationality measure of e is equal to 2 (see [19]).
Yap took as his starting point a remarkable expression for π, discovered by Borwein, Borwein, and Plouffe [13]:
Borwein, Borwein, and Plouffe exhibited similar series for other transcendental numbers, such as and . Yap defined a series to be BBP-like if there are integer polynomials p and q and an integer c so that .
With these definitions in hand, we can state Yap’s theorem:
then there is a logspace-computable functionsuch that.
We note that some of the motivation for the algorithms presented in [13], as well as some of the exposition in [73], comes from the ability to compute individual bits, without having to compute all of the earlier bits. In spite of this, the algorithm presented in [73] does yield a logspace algorithm computing all of the first n bits.
We improve on Theorem 39, by placing the function in the (seemingly) smaller complexity class . (We discuss additional improvements to Theorem 39 later in this section.)
Ifis a transcendental real number that
has finite irrationality measure, and
can be expressed as a BBP-like series,
then there is a-computable functionsuch that.
Yap showed in [73] that the finite irrationality measure condition on α implies that, in order to compute , it is sufficient to compute (for some constant ) to bits of accuracy, and then output the first bits.
Let . Then .
The numerator and denominator are both computable in . Thus the theorem follows immediately by an application of Theorem 5. □
Both [73] and [13] explicitly ask if the algorithms that they present for π and similar numbers hold only for the binary representation, or if they can be modified to yield algorithms for the base-b representations for other bases b. But, as observed in Note 12, our techniques work equally well for base 10 or any other base.
Similarly, our proof of Theorem 40 applies not only to series that satisfy Yap’s BBP-like criterion, but for any series that converges rapidly to a transcendental number with bounded irrationality measure, if and the functions n and d are computable by circuits of size polynomial in n. They do not need to be polynomials (or polynomials multiplied by ). For example, to the best of our knowledge, no BBP-like series is known to converge to Euler’s constant e, but since where the error term , and where the numerator and denominator are easily computable by circuits of size polynomial in n if , this shows that the bits of e can also be computed in . (This can also be derived from the earlier work of Reif and Tate [59], who showed that various numerical computations can be performed in P-uniform ; their algorithms can be made dlogtime-uniform by appeal to [37].)
Much of the motivation in [13] (and, to a lesser extent, in [73]) comes from efficient implementations of programs to compute various constants. We do not claim that the algorithms presented here lend themselves to efficient implementation. They merely show that certain computations can be performed in .
We now wish to prove a result that is analogous to Theorem 36, for various important transcendental numbers. However, in Theorem 36 we equate the characteristic sequence of a language with a real number in , whereas the constants such as π and e that we consider lie outside of this interval. Thus, when we say “” and “”, we mean that the languages corresponding to the fractional parts of π and e ( and , respectively, using the notation introduced above) lie in .
First, we show that the transcendental numbers that Yap studied in [73] all lie in .
Letbe a transcendental real number having finite irrationality measure and a BBP-like series. Then.
We follow the same basic strategy as in the proof of Theorem 36, but we make use of the circuits constructed in Theorem 15.
Given an input string j of length n, our goal is to compute the bit of the fractional part of α. As in Theorem 40, because of bounded irrationality measure and the rapid convergence of our series
(for integer polynomials p and q), it suffices to compute the bit of , for some constant . As in the proof of Corollary 18, we first make use of some polynomial-time computation (in this case, it will be computation), to prepare the CRR-representation of an exponentially-large input instance for a circuit.
First, let us assume that for all k. (This is true for the series for π.) Then we will modify the algorithm for more general BBP-like series.
The input instances for Theorem 15 need to be of the form , where there is a natural number t such that for all i. Using computation, we can compute . To see this, note that the number will require an exponential number of bits to write in binary for k at the high end of this range. However, the number requires only bits, and similarly requires only bits. Thus each such number can be expressed exactly as , for values that are easy to compute, given k, and furthermore, it is easy to determine, given and , if . Thus, with a oracle, a polynomial-time machine can find k such that, for all , it holds that . This determines B. Then, with B in hand, we can compute t such that .
Given k, we can compute and such that , and can compute a number such that . Let . Note that , and for every .
Now, similar to the proof of Corollary 18, we can let f be the function that, on input outputs “p is not prime” if p is not prime, and otherwise outputs if and outputs if . Thus, we now have the CRR representation that satisfies the input requirements of Theorem 15, and we can appeal to Proposition 2.
This completes the argument, in the case when for all k. Now we consider the more general case.
Since p and q are polynomials, they each tend to either ∞ or for large k. If they are both positive or both negative for large k, then for all large k, and the analysis is very similar to what appears above. Namely, let for all Let . Then we can compute an approximation to as above, and then simply add Q to the result.
In the remaining case, for all large k. In that case, we can compute Q as above, and compute our underestimate A to as above, and then the desired answer is – but note that is an overestimate to α, which means that, if the bit of is 1, it is still possible that the bit of α is 0. However, here we can once again appeal to the bounded irrationality measure of α. If we increase the accuracy of our approximation A (by summing up to for some ), we are guaranteed to obtain an approximation that yields the correct bit for j. □
.
There has been considerable progress using the BBP framework since the original paper [13] appeared. An extensive list can be found in [14]. Many of the “BBP-like” series presented in [14] do not actually fit Yap’s definition of “BBP-like”; the definition in [73] requires that be of the form , whereas many of the series presented in [14] have of the form for some integer β where . With some minor adjustments, we can accommodate this broader definition, too.
Letbe a transcendental real number having finite irrationality measure, where there are integer polynomials p and q and integer β with, and. Then.
First we deal with the case when .
As above, given an input string j of length n, our goal is to compute the bit of the fractional part of α, and once again it suffices to compute the bit of , for some constant , and once again we begin with a computation, to prepare the CRR-representation of an exponentially-large input instance for a circuit.
Now, however, we will compute and in β-ary notation, and begin by computing , and then find t such that , and let f be the function that, on input outputs “p is not prime” if p is not prime, and otherwise outputs if and outputs if . Instead of the circuits that were presented in the proof of Theorem 15, we make use of the β-variant of those circuits (as defined in the footnotes to the proof of Theorem 5). This is because determining if a number B is less than is easy in base β, but less easy in base 2. Note that these β-variant circuits still produce the final answer in binary; it is merely the case that some of the intermediate computations take place using powers of β rather than powers of 2.
The analysis proceeds precisely as in the preceding theorem.
Now, we consider the case where . In this case, note that for and integer polynomials r and s. Thus this case reduces to the previous case. □
We can, in principle, handle even more general terms . Our proof requires only that for numerator and denominator functions n and d, such that and be “easy” to compute (in ), and also that it be possible (in ) to find t such that . We have no examples at hand, to show that this generalization is useful for transcendental reals of interest. In particular, we do not see how to give a upper bound for e.
It is clear from the discussion after Theorem 40 that . The “naïve approach” mentioned at the start of the proof of Theorem 15 leads to a proof that .
Lower bound
In this section, we complement our upper bounds on algebraic numbers by giving (rather weak) lower bounds for certain algebraic numbers. We emphasize that our lower bounds are only for rational numbers; we do not have any lower bounds at all for irrational algebraic numbers. Our lower bounds for rational numbers are fairly tight; we observe that all such numbers lie in , and for any prime m there is a rational number that lies outside .
First, we show membership in . The binary expansion of any rational number is ultimately periodic, meaning that it has the form where the sequence has the property that there is some k and some N such that, for all . Let for some . Thus the language is equal to , where F is a finite set (of some strings that lexicographically precede N) and . Each is therefore a linear set, and A is a semi-linear set (defined as the union of linear sets). Barrington and Corbett [16] showed that all semi-linear sets lie in . Thus we have shown:
For a given odd modulus m, there is a rational numberwhose languageis hard forunder-Turing reductions. More precisely, thefunction reduces tounder Dlogtime-uniform projections.
Let m be an odd number, , and let be the rational corresponding to the language .
The well-known Carmichael function from number theory has the property that, for any odd , and .
The function is defined so that if the number of 1’s in x is a multiple of m, and otherwise. Thus our goal is to take x as input and produce as output a number that is a multiple of m if and only if the number of 1’s in x is a multiple of m. We make use of a construction that was used earlier in [9,18]. If , let be the number with binary representation
where . Thus , which is equivalent to mod m. It is clear that f is easy to compute via a Dlogtime-uniform projection. The lemma follows, since the language is complete for under -Turing reductions. □
For every prime m, there is a rational numbersuch that.
Let p be any prime other than m. If the language from Lemma 45 were in , then the language would also be in , contrary to the lower bounds of [58,64]. □
The restriction to prime moduli in Corollary 46 is essential, given the current state of lower bound techniques. It is still not known whether . The best lower bounds against for composite m are those of [5,51].
It should perhaps be mentioned that there are rationals in , other than dyadic rationals. For instance, corresponds to the set given by the regular expression , which is clearly in . Since every rational number corresponds to a regular language, and since there are nice characterizations of the regular languages in [15,24], there is probably a very crisp characterization of the rational numbers in .
Open questions and discussion
Is conversion from CRR to binary in dlogtime-uniform? This problem has been known to be in -uniform starting with the seminal work of Beame, Cook, and Hoover [17], but the subsequent improvements on the uniformity condition [22,37] introduced additional complexity that translated into increased depth. We have been able to reduce the majority-depth (relative to the construction in [37]) by rearranging the algorithmic components introduced in this line of research, but it appears to us that a fresh approach will be needed, in order to decrease the depth further.
Isin? An affirmative answer to the first question implies an affirmative answer to the second, and this would pin down the complexity of between and . We have not attempted to determine a small value of k such that for some set , because we suspect that does reside lower in , and any improvement in majority-depth will be more significant than optimizing the depth of circuitry, since .
Isin? Some interesting observations related to this problem were announced recently [30,40].
Is it easy to compute bits of large powers of small matrices? We remark in this regard, that there are some surprising things that one can compute, regarding large powers of integers [38] and the most significant bits of matrices [33].
Does every transcendental real with a BBP-like series have finite irrationality measure?
Is? Is there any fundamental reason why e should be more complex than π in this sense?
Is any irrational algebraic number in? Is every irrational algebraic number in? We strongly conjecture that the answer to the second question is “no”, and we suspect that the answer to the first question is also “no”, although there is absolutely no evidence to support either conjecture. We think that it would be very instructive see an example of an irrational algebraic number that is outside of . It would be remarkable and important, if it should turn out that irrational algebraic numbers reside in .
Footnotes
Acknowledgements
The first author acknowledges the support of NSF grants CCF-1909216 and CCF-1909683. The second and the third authors were partially funded by a grant from Infosys Foundation. We would like to thank anonymous referees for help in improving the presentation of the paper, and we thank Howard Straubing and Bruno Grenet for helpful comments.
References
1.
B.Adamczewski and Y.Bugeaud, On the complexity of algebraic numbers I. Expansions in integer bases, Annals of Mathematics (2007), 547–565. doi:10.4007/annals.2007.165.547.
2.
B.Adamczewski, Y.Bugeaud and F.Luca, Sur la complexité des nombres algébriques, Comptes Rendus Mathematique339(1) (2004), 11–14. doi:10.1016/j.crma.2004.04.012.
3.
B.Adamczewski, J.Cassaigne and M.Le Gonidec, On the computational complexity of algebraic numbers: The Hartmanis–Stearns problem revisited, Transactions of the American Mathematical Society373(5) (2020), 3085–3115. doi:10.1090/tran/7915.
4.
M.Agrawal, E.Allender and S.Datta, On TC0, AC0, and arithmetic circuits, Journal of Computer and System Sciences60(2) (2000), 395–421. doi:10.1006/jcss.1999.1675.
5.
E.Allender, The permanent requires large uniform threshold circuits, Chicago J. Theor. Comput. Sci.1999 (1999). doi:10.4086/cjtcs.1999.007.
6.
E.Allender, The division breakthroughs, in: Current Trends in Theoretical Computer Science, the Challenge of the New Century, Vol. 1: Algorithms and Complexity, G.Paun, G.Rozenberg and A.Salomaa, eds, World Scientific, 2004, pp. 147–164. doi:10.1142/9789812562494_0011.
7.
E.Allender, N.Balaji and S.Datta, Low-depth uniform threshold circuits and the bit-complexity of straight line programs, in: Mathematical Foundations of Computer Science (MFCS), Vol. 8635, Springer, 2014, pp. 13–24.
8.
E.Allender, P.Bürgisser, J.Kjeldgaard-Pedersen and P.B.Miltersen, On the complexity of numerical analysis, SIAM J. Comput.38(5) (2009), 1987–2006. doi:10.1137/070697926.
9.
E.Allender, M.E.Saks and I.E.Shparlinski, A lower bound for primality, Journal of Computer and System Sciences62(2) (2001), 356–366. doi:10.1006/jcss.2000.1725.
10.
E.Allender and H.Schnorr, The complexity of the BitSLP problem, 2005, Unpublished Manuscript.
11.
J.-P.Allouche and J.Shallit, Automatic Sequences: Theory, Applications, Generalizations, Cambridge University Press, 2003. ISBN 0521823323.
12.
S.Arora and B.Barak, Computational Complexity: A Modern Approach, Vol. 1, Cambridge University Press, 2009.
13.
D.Bailey, P.Borwein and S.Plouffe, On the rapid computation of various polylogarithmic constants, Mathematics of Computation66(218) (1997), 903–913. doi:10.1090/S0025-5718-97-00856-9.
14.
D.H.Bailey, A Compendium of BBP-Type Formulas for Mathematical Constants, Report, Lawrence, Berkeley National Laboratory, Berkeley, CA, USA, 2017.
15.
D.A.M.Barrington, K.J.Compton, H.Straubing and D.Thérien, Regular languages in NC1, Journal of Computer and System Sciences44(3) (1992), 478–499. doi:10.1016/0022-0000(92)90014-A.
16.
D.A.M.Barrington and J.C.Corbett, A note on some languages in uniform ACC0, Theor. Comput. Sci.78(2) (1991), 357–362. doi:10.1016/0304-3975(91)90357-8.
17.
P.W.Beame, S.A.Cook and H.J.Hoover, Log depth circuits for division and related problems, SIAM Journal on Computing15 (1986), 994–1003. doi:10.1137/0215070.
18.
R.B.Boppana and J.C.Lagarias, One-way functions and circuit complexity, Information and Computation74(3) (1987), 226–240. doi:10.1016/0890-5401(87)90022-8.
19.
J.M.Borwein and P.B.Borwein, Pi and the AGM: A Study in the Analytic Number Theory and Computational Complexity, Wiley-Interscience, 1987.
20.
V.Brattka and P.Hertling, Handbook of Computability and Complexity in Analysis, Springer, 2021. doi:10.1007/978-3-030-59234-9.
21.
H.Caussinus, P.McKenzie, D.Thérien and H.Vollmer, Nondeterministic computation, Journal of Computer and System Sciences57 (1998), 200–212. doi:10.1006/jcss.1998.1588.
22.
A.Chiu, G.I.Davida and B.E.Litow, Division in logspace-uniform NC1, RAIRO Theoretical Informatics and Applications35(3) (2001), 259–275. doi:10.1051/ita:2001119.
23.
V.Chonev, J.Ouaknine and J.Worrell, The orbit problem in higher dimensions, in: Proc. Symposium on Theory of Computing Conference (STOC), ACM, 2013, pp. 941–950. doi:10.1145/2488608.2488728.
24.
K.J.Compton and H.Straubing, Characterizations of regular languages in low level complexity classes, in: Current Trends in Theoretical Computer Science, Entering the 21th Century, G.Paun, G.Rozenberg and A.Salomaa, eds, World Scientific, 2001, pp. 235–246.
25.
S.Datta and R.Pratap, Computing bits of algebraic numbers, in: Proc. 9th Theory and Applications of Models of Computation (TAMC), Lecture Notes in Computer Science, Vol. 7287, Springer, 2012, pp. 189–201. doi:10.1007/978-3-642-29952-0_22.
26.
P.Dietz, I.Macarie and J.Seiferas, Bits and relative order from residues, space efficiently, Information Processing Letters50(3) (1994), 123–127. doi:10.1016/0020-0190(94)00021-2.
27.
R.G.Downey, D.R.Hirschfeldt, A.Nies and F.Stephan, Trivial reals, in: Proceedings of the 7th and 8th Asian Logic Conferences, World Scientific, 2003, pp. 103–131. doi:10.1142/9789812705815_0005.
28.
A.Edalat and P.M.Potts, A new representation for exact real numbers, Electronic Notes in Theoretical Computer Science6 (1997), 119–132. doi:10.1016/S1571-0661(05)80166-5.
29.
K.Etessami and M.Yannakakis, On the complexity of Nash equilibria and other fixed points, SIAM J. Comput.39(6) (2010), 2531–2597. doi:10.1137/080720826.
30.
P.Etessami Probability, Recursion, Games, and Fixed Points, 2013, Talk presented at Horizons in TCS: A Celebration of Mihalis Yannakakis’ 60th Birthday.
31.
J.D.Faires and R.L.Burden, Numerical Methods, PWS Publishing, Boston, 1993. ISBN 0-534-93136-7.
32.
R.Freivalds, Hartmanis–Stearns conjecture on real time and transcendence, in: Computation, Physics and Beyond – International Workshop on Theoretical Computer Science, WTCS 2012, Dedicated to Cristian S. Calude on the Occasion of His 60th Birthday, Revised Selected and Invited Papers, M.J.Dinneen, B.Khoussainov and A.Nies, eds, Lecture Notes in Computer Science, Vol. 7160, Springer, 2012, pp. 105–119. doi:10.1007/978-3-642-27654-5_9.
33.
E.Galby, J.Ouaknine and J.Worrell, On matrix powering in low dimensions, in: Proc. 32nd International Symposium on Theoretical Aspects of Computer Science (STACS), LIPIcs, Vol. 30, Schloss Dagstuhl – Leibniz-Zentrum für Informatik, 2015, pp. 329–340. doi:10.4230/LIPIcs.STACS.2015.329.
34.
M.Goldmann and M.Karpinski, Simulating threshold circuits by majority circuits, SIAM J. Comput.27(1) (1998), 230–246. doi:10.1137/S0097539794274519.
35.
J.Hartmanis and R.E.Stearns, On the computational complexity of algorithms, Transactions of the American Mathematical Society117 (1965), 285–306. doi:10.1090/S0002-9947-1965-0170805-7.
36.
A.Healy and E.Viola, Constant-depth circuits for arithmetic in finite fields of characteristic two, in: Proc. 23rd International Symposium on Theoretical Aspects of Computer Science (STACS), Lecture Notes in Computer Science, Vol. 3884, Springer, 2006, pp. 672–683. doi:10.1007/11672142_55.
37.
W.Hesse, E.Allender and D.A.M.Barrington, Uniform constant-depth threshold circuits for division and iterated multiplication, Journal of Computer and System Sciences65 (2002), 695–716. doi:10.1016/S0022-0000(02)00025-9.
38.
M.Hirvensalo, J.Karhumäki and A.Rabinovich, Computing partial information out of intractable: Powers of algebraic numbers as an example, Journal of Number Theory130 (2010), 232–253. doi:10.1016/j.jnt.2009.08.009.
G.Jindal and T.Saranurak, Subtraction makes computing integers faster, 2012, CoRR arXiv:1212.2549.
41.
N.Kayal and C.Saha, On the sum of square roots of polynomials and related problems, ACM Transactions on Computation Theory4(4) (2012), 9:1–9:15. doi:10.1145/2382559.2382560.
42.
K.Ko, On the definitions of some complexity classes of real numbers, Mathematical Systems Theory16(2) (1983), 95–109. doi:10.1007/BF01744572.
43.
K.Ko and H.Friedman, Computational complexity of real functions, Theor. Comput. Sci.20 (1982), 323–352. doi:10.1016/S0304-3975(82)80003-0.
44.
P.Koiran and S.Perifel, The complexity of two problems on arithmetic circuits, Theor. Comput. Sci.389(1–2) (2007), 172–181. doi:10.1016/j.tcs.2007.08.008.
45.
P.Koiran and S.Perifel, Interpolation in valiant’s theory, Computational Complexity20(1) (2011), 1–20. doi:10.1007/s00037-011-0002-8.
46.
A.Lechner, J.Ouaknine and J.Worrell, On the complexity of linear arithmetic with divisibility, in: 30th Annual ACM/IEEE Symposium on Logic in Computer Science (LICS), IEEE Computer Society, 2015, pp. 667–676. doi:10.1109/LICS.2015.67.
47.
R.J.Lipton and K.W.Regan, People, Problems, and Proofs – Essays from Gödel’s Lost Letter: 2010, Springer, 2013. doi:10.1007/978-3-642-41422-0.
48.
A.Maciel and D.Thérien, Threshold circuits of small majority-depth, Inf. Comput.146(1) (1998), 55–83. doi:10.1006/inco.1998.2732.
49.
C.Mereghetti and B.Palano, Threshold circuits for iterated matrix product and powering, ITA34(1) (2000), 39–46.
50.
J.S.Miller, Every 2-random real is Kolmogorov random, Journal of Symbolic Logic69(3) (2004), 907–913. doi:10.2178/jsl/1096901774.
51.
C.D.Murray and R.R.Williams, Circuit lower bounds for nondeterministic quasi-polytime from a new easy witness lemma, SIAM Journal on Computing49(5) (2020). doi:10.1137/18M1195887.
52.
M.Nakanishi and M.Villagra, Computational Complexity of Space-Bounded Real Numbers, 2018, CoRR, arXiv:1805.02572.
53.
A.Nies, F.Stephan and S.A.Terwijn, Randomness, relativization and Turing degrees, The Journal of Symbolic Logic70(2) (2005), 515–535. doi:10.2178/jsl/1120224726.
54.
J.Ouaknine and J.Worrell, Positivity problems for low-order linear recurrence sequences, in: Proceedings of the Twenty-Fifth Annual ACM-Siam Symposium on Discrete Algorithms, Society for Industrial and Applied Mathematics, 2014, pp. 366–379.
55.
J.Ouaknine and J.Worrell, On the positivity problem for simple linear recurrence sequences, in: Proc. 41st International Colloquium on Automata, Languages, and Programming (ICALP), Part II, Lecture Notes in Computer Science, Vol. 8573, Springer, 2014, pp. 318–329. doi:10.1007/978-3-662-43951-7_27.
56.
P.M.Potts, Efficient on-line computation of real functions using exact floating point, in: Manuscript, Dept. of Computing, Imperial College, London, 1997.
57.
P.M.Potts, Exact Real Arithmetic using Möbius Transformations, PhD thesis, Imperial College, University of London, 1999.
58.
A.A.Razborov, Lower bounds on the size of bounded depth networks over a complete basis with logical addition, Matematicheskie Zametki41 (1987), 598–607, In Russian. English translation in Mathematical Notes of the Academy of Sciences of the USSR 41:333–338, 1987.
59.
J.H.Reif and S.R.Tate, On threshold circuits and polynomial computation, SIAM J. Comput.21(5) (1992), 896–908,
citeseer.nj.nec.com/reif87threshold.html
. doi:10.1137/0221053.
60.
K.F.Roth, Rational approximations to algebraic numbers, Mathematika. A Journal of Pure and Applied Mathematics2 (1955), 1–20.
A.B.Shidlovskii, Transcendental Numbers, de Gruyter, New York, 1989.
63.
K.-Y.Siu and V.P.Roychowdhury, On optimal depth threshold circuits for multiplication and related problems, SIAM J. Discrete Math.7(2) (1994), 284–292. doi:10.1137/S0895480192228619.
64.
R.Smolensky, Algebraic methods in the theory of lower bounds for Boolean circuit complexity, in: Proceedings, 19th ACM Symposium on Theory of Computing, 1987, pp. 77–82.
65.
P.Stark, Introduction to Numerical Methods, Macmillan, 1970.
66.
P.Tiwari, A problem that is easier to solve on the unit-cost algebraic RAM, J. Complexity8(4) (1992), 393–397. doi:10.1016/0885-064X(92)90003-T.
67.
S.Toda, PP is as hard as the polynomial time hierarchy, SIAM J. Comput.20 (1991), 865–877. doi:10.1137/0220053.
68.
A.M.Turing, On computable numbers, with an application to the entscheidungsproblem, Proc. London Math. Soc.2(42) (1936), 230–265.
69.
H.Vollmer, Introduction to Circuit Complexity, Springer-Verlag, 1999.
70.
I.Wegener, Optimal lower bounds on the depth of polynomial-size threshold circuits for some arithmetic functions, Inf. Process. Lett.46(2) (1993), 85–87. doi:10.1016/0020-0190(93)90202-K.
71.
K.Weihrauch, Computable Analysis – an Introduction, Texts in Theoretical Computer Science. An EATCS Series, Springer, 2000. doi:10.1007/978-3-642-56999-9.
72.
C.Yap, Fundamental Problems in Algorithmic Algebra, Oxford University Press, 2000.
73.
C.Yap, Pi is in Log Space, 2010, manuscript available at: https://cs.nyu.edu/exact/doc/pi-log.pdf.
74.
F.Yu and K.Ko, On logarithmic-space computable real numbers, Theoretical Computer Science469 (2013), 127–133. doi:10.1016/j.tcs.2012.10.004.
75.
L.Yu, D.Ding and R.Downey, The Kolmogorov complexity of random reals, Annals of Pure and Applied Logic129(1–3) (2004), 163–180. doi:10.1016/j.apal.2004.01.006.
76.
D.Zeilberger and W.Zudilin, The irrationality measure of π is at most 7.103205334137…, Moscow Journal of Combinatorics and Number Theory9(4) (2020), 407–419. doi:10.2140/moscow.2020.9.407.