Some structural complexity results for
Abstract
The complexity class , standing for the complexity of deciding the existential first order theory of the reals as real closed field in the Turing model, has raised considerable interest in recent years. It is well known that In their compendium [Schaefer2024], Schaefer, Cardinal, and Miltzow give a comprehensive presentation of results together with a rich collection of open problems. Here, we answer some of them dealing with structural issues of as a complexity class. We show analogues of the classical results of Baker, Gill, and Solovay finding oracles which do and do not separate NP form , of Ladner’s theorem showing the existence of problems in not being complete for (in case the two classes are different), as well as a characterization of by means of descriptive complexity.
1 Introduction
The existential theory of the reals collects all true sentences in existential first-order logic over i.e., sentences of the form where is a quantifier-free formula expressing a Boolean combination of polynomial equalities and inequalities. The complexity of deciding the truth of a given sentence plays a prominent role for several computational models and complexity classes. In the Blum-Shub-Smale model - henceforth BSS for short - over basic arithmetic operations can be executed with unit cost and the size of is basically the algebraic size of a dense encoding of all polynomials occuring in it. The above decision problem then turns out to be -complete, where the latter class is the real number analogue of classical NP [BSS]. However, the decision problem also makes perfect sense in the Turing model of computation if we restrict all coefficients for the polynomials in to be rational. Then, its size is the usual bit-size and the problem of deciding truth is easily seen to be NP-hard. In the Turing model, the exact complexity of the existential theory for the reals is (wide) open. Using deep results on quantifier elimination it has been shown that it can be decided within PSPACE, see [Canny] and also [Renegar]. The open placement of the problem somewhere between NP and PSPACE has led to the definition of an own complexity class denoted see a precise definition in the next subsection.
Beside many other things, in [Schaefer2024] the authors ask whether several structural results well known to hold for the classical class NP in the Turing model also can be settled for The latter include an analogue of the Baker-Gill-Solovay result [BGS] on existence of oracles separating from NP and the question whether can be characterized by means of descriptive complexity as done in [Fagin] for NP. In this paper we give positive answers to these questions and also show that Ladner’s result [Ladner] can be transformed showing that if we assume there exist problems in the set difference not being -complete.
A few words on the proofs might be appropriate. All above mentioned results for NP turn out to hold in the corresponding variants as well for . In some cases, though not completely straightforward, proofs follow from not too complicated modifications of known proofs of related results in the BSS model. One basic ingredient for the proofs to work is the characterization of via the BSS class BP in Theorem 1.1 below together with the most important observation that the class of -machines in the BSS model is countable. Therefore, we see the main value of the present paper in working out the necessary proof details of expected results in order to enlarge the body of structural results known to hold for
1.1 Basic definitions: and BSS-machines without constants
We now define precisely the class together with BSS computations using only rational machine constants as well as related discrete complexity classes BP and BP
The class was formally introduced in [Schaefer2009], but somehow was examined already earlier, see [Schaefer2024] for a historic account on questions related to this class being studied already in the 1990s. The class can most easily be defined starting from a complete problem and then building the downward closure under usual polynomial time many one reductions. In the meanwhile, several problems have been shown to be complete. For our purposes, the existence of real solutions of a polynomial system of degree-two equations is the most suitable one.
Definition 1
a) The decision problem Quadratic Polynomial Systems is defined as follows: Given and polynomials of degree at most , is there an such that for all The problem is understood as a decision problem in the Turing model, i.e., instances are coded as binary strings over .111The superscript 0 in results from the close relation of the approach to Blum-Shub-Smale machines that are only using rational constants and is common in that context, see below. Here it indicates rational coefficients.
b) The complexity class consists of all decision problems such that there exists a polynomial time many one reduction from to .
The completeness of for class , i.e., for the existential theory of the reals easily follows from the proof in [BSS] that the corresponding problem for quadratic polynomial systems with arbitrary real coefficients is -complete in the BSS model over . In the corresponding proof, no real constants are introduced and starting from decision problems in the reduction runs in polynomial time also in the Turing model.
The class can easily be characterized via a restriction of the class in the BSS model, see [BSS, BCSS97]. The full real number BSS model allows to compute with reals as entities, performing the basic arithmetic operations together with a test of the format ’is ’ at unit cost. Algorithms are allowed to use a fixed finite set of real numbers as so-called machine constants. The latter always include and The (algebraic) size of an instance then is the number of reals necessary to specify it (in a reasonable encoding), and the class of problems decidable in deterministic polynomial time is defined literally the same as P, i.e., there exists a polynomial time algorithm (measured with respect to the algebraic size measure for instances and the unit cost measure for algorithms) deciding the problem correctly. Similarly, stands for problems verifiable in polynomial time when having access to a witness that is a real vector of polynomial (algebraic) size in the size of the given instance. If we want to handle discrete problems in this model, i.e., problems , it is appropriate to restrict inputs to binary strings and to disallow BSS algorithms to use non-rational machine constants. This leads to complexity classes highly important in connection with .
Definition 2
The class BP consists of all such that there exists a BSS algorithm running in (algebraic) polynomial time, using only rational machine constants and deciding on inputs from . Similarly, the class BP consists of all such that there exists a BSS algorithm using only rational machine constants and verifying on inputs from . Moreover, for inputs the (algebraic) running time is polynomially bounded in the size of
Above, BP stands for ’Boolean Part’ and denotes the real number analogue of , i.e., finite sequences of real numbers. Note that for discrete inputs the bit-size and the algebraic size coincide. However, the cost measure for algorithms working with discrete data is the algebraic one. It is also important to stress again that for verification algorithms the certificate is allowed to be a vector of reals. This is the reason for the tight relation of BP to It follows immediately from the original completeness proof in [BSS]:
Theorem 1.1
BP
Below, a decisive aspect of this theorem is that can be characterized through a complexity class defined by a machine model which has a countable number of machines only.
2 Relativization of NP versus
The first question from the compendium [Schaefer2024] we want to deal with is whether there exist oracles which do and do not separate from NP and PSPACE, respectively. Comparing P and NP in the Turing model, these questions were answered affirmatively long ago [BGS], in the BSS model an analogue result holds [Emerson], see also [Gassner]. Usually, the construction of an oracle separating the representative classes is done via a diagonalization argument. As consequence, the separating oracles in both settings are not very natural (with an exception in [Gassner], where a Knapsack problem is used to separate other classes). As we shall see, for NP and a quite natural oracle work. The definition of oracle classes like PA and NPA naturally relies on a basic model for algorithms defining a complexity class, like deterministic or non-deterministic polynomial time Turing machines. Then, one equips them with the additional feature to use intermediate results as queries to an oracle. Following the same nearby ongoing for we should work with the following definition.
Definition 3
Let A problem belongs to the oracle class , if there exists an -algorithm which in addition has an oracle state. If enters this state, it can ask the oracle whether an element previously computed belongs to , receives the correct answer in one step, and continues its computation. Then, for there exists a computation of which accepts and for no computation accepts.
Note that though this is the straightforward definition of oracle classes , some subtleties are hidden. Since the basic machine is an -algorithm, it is allowed to produce real number oracle questions, something a Turing machine cannot. Vice versa, since a Turing machine only computes with discrete data, we know in advance that an NP-oracle machine will never produce arbitrary non-rational queries, an information which is undecidable for a BSS machine to know in general. Our results below establishing the integers as separating oracle implicitly make use of such effects. We further comment on this at the end of this section.
Theorem 2.1
Given the above definition of oracle classes based on , the following hold:
a) There exists an oracle such that
b) The oracle , seen as subset of , both satisfies and
c) In the full BSS model,
Proof
For a) we can choose as the PSPACE-complete problem Quantified Boolean Formulas QBF. Since PSPACE = NPSPACE = co-NPSPACE it is well known that Arguing about needs some care since the underlying machine model in the definition changes. Suppose to be a basic -oracle machine using oracle QBF. Let be the polynomial time running bound of for inputs in W.l.o.g. suppose for such inputs asks oracle queries, all being of polynomial size at most A PSPACE-algorithm deciding on input works as follows: First, consider a computable enumeration of bit-vectors and of strings , all strings over alphabet and of size at most Below, we interpret the as oracle queries poses during its computation and as the answers. A component in a query indicates that it does not belong to In case that computes such a query, the answer from the QBF-oracle is since the query does not code a correct QBF-instance. Now, given a fixed tuple in the enumeration, consider an existential first-order sentence over without non-rational constants claiming that there exists a computation of on which produces the queries under the assumption that are the correct answers to the previous queries, and then finally accepts. Since the are vectors over the requirement that a query computed by equals is easily expressible with such a first-order sentence. This holds for queries being bit-vectors as well as for a query containing a component , in which case the corresponding part of the first-order sentence has to express that the component does not belong to . This is easily doable. The resulting entire sentence is an instance of and thus can be decided in PSPACE by [Canny]. It remains to guarantee in addition that the are the correct answers to QBF-queries . This of course can be done in PSPACE. Note that if a contains a non-binary component, the corresponding must be . Now the algorithm does the above for all elements in the enumeration by re-using its space and accepts, if for at least one tuple all conditions are satisfied. It follows as well.
For part b) note that both and only contain problems being decidable in the Turing model. Moreover, if we consider a Turing machine over coding computations over in any usual way, then it is easy to decide for an intermediate result whether it encodes an integer or not. Since for an NP-machine the size of a query is polynomial in the input, we can also check in polynomial time whether a query is integral, thus NP = NP But contains problems being undecidable in the Turing model such as Hilbert’s 10th problem: Given a polynomial in variables with integer coefficients, an -algorithm can guess in a non-deterministic computation real numbers and then ask the oracle whether all are integers. If the answer is positive the algorithm evaluates in polynomial time in the algebraic model. It accepts iff the result is . Thus, the problem to decide whether there is an integer zero of belongs to but is well known to be undecidable [Matiyasevich].
For c) we can simplify Emerson’s construction by using a result from [Meer93]. Consider the set It is easy to see that the decision problem: Given , is belongs to For input guess a and check whether and by asking the oracle. Then compute and ask the oracle again whether it belongs to . All this can be done in constantly many algebraic steps. Note that in the BSS model has input size . However, in order to belong to the question should be decided in constant time using the oracle. In [Meer93] it is shown by using a ’typical path argument’ that this problem can not be decided by a polynomial time BSS machine which is allowed in addition to evaluate the sine-function in one step. Since in this ’sine-model’ one can decide in constant time whether a number is integral, it follows can can be decided by a sine-machine, but can not. We conclude that
Note that part c) alternatively to the proof in [Emerson] gives a more natural problem yielding the separation. As also for part b), this seems to be an effect observable at least for some results in the BSS setting, compare a similar statement for a real number version of Post’s problem [MeerZiegler2005]. A strange effect why the separation for NP and works is the fact that even though the former is a subset of the latter, this does not any longer hold for arbitrary relativized versions. Clearly, the reason for this is the use of different machine models to define the corresponding oracle classes. Such an effect concerning relativized classes is also known from classical complexity theory for less prominent classes and studied in [Vereshchagin]. It might be interesting to both find other oracles yielding the separation and to study the above effect in more detail in our framework.
3 Descriptive complexity for
The next question from the compendium [Schaefer2024] is whether can be characterized by purely logical means in the sense of descriptive complexity theory. Corresponding results were given in the early years of finite model theory for classical NP [Fagin] and later on for the real number version in the BSS model [GraedelMeer], based on the development of meta-finite model theory in [GraedelGurevich]; see [Graedeletal] for a more intensive introduction into such results. One special feature, given the above mentioned characterization of as BP, is the mixture of discrete inputs coded as in classical complexity theory over , and an algebraic cost measure for the arithmetic computations performed by the underlying machine. It turns out that this split can be modelled by a restriction of so-called -structures used in [GraedelMeer] to characterize (full) and respective logics on them. Thus, the focus below will be on defining the corresponding restriction which we call discrete -structures, and the suitable logics on them used to capture both and BP. Corresponding proofs then are quite similar to those given in [GraedelMeer] and are only sketched in the Appendix. Though below we work with restricted -structures, we have to recall their definition in full generality, except for disallowing arbitrary real constants in the so-called secondary part due to the fact that the BSS algorithms studied here do not use such constants.
Definition 4
Let be finite vocabularies, where may contain relation and function symbols, and contains function symbols only. An -structure of signature is a triple consisting of
- (i)
-
a finite structure of vocabulary , called the primary part or skeleton of ; its universe is also said to be the universe of ;
- ii)
-
the infinite structure called the secondary part. Here, denotes the sign-function being for negative values and otherwise;
- (iii)
-
a finite set of functions interpreting the function symbols in , where depends on the respective symbol only.
We denote the set of all -structures of signature by .
For the size of is
We now restrict -structures to so-called discrete -structures suitable for modelling computations in and on Boolean languages. In order to model bit-strings as structures the universe always will have the form and contains a unary relation interpreted as a bit-vector in via In addition, for well known reasons we include a linear order in order to capture polynomial time computations below. Finally, as the only element in we need a function which is able to change the type of an element in to become a real (like the cost operator in a programming language like We define
Definition 5
A discrete -structure is an -structure over vocabulary where for some contains at least a unary relation and a binary relation interpreted as bit-string and linear order, respectively, and where is interpreted as above.
We denote by all discrete -structures with vocabulary
Note that below when we use existential second-order (so) logic, both and can be avoided by claiming their existence as functions from to using an existential quantifier together with a fo-formula.
Discrete -structures and logics on them provide the right framework to model BSS-computations on Boolean languages that do not use constants other than rational ones. Inputs being discrete and measured by their usual bit size, the used logics will transfer those inputs into the real number part of a discrete -structure so that computations are modelled therein, including the use of the algebraic unit cost measure. Let denote a countable set of variables. The are supposed to be fo-variables ranging over the discrete universe of a discrete -structure.
Definition 6
Fix The language contains, for each signature a set of formulas and terms. Each term takes, when interpreted in some discrete -structure, values in either the skeleton, in which case we call it an index term, or in , in which case we call it a number term. Terms are defined inductively as follows
- (i)
-
The set of index terms is the closure of the set of variables under applications of function symbols of .
- (ii)
-
Any rational number is a number term.
- (iii)
-
If are index terms and is a -ary function symbol of then is a number term. In particular, for an index term, is a number term with value in
- (iv)
-
If are number terms, then so are , , , and . Here, the sign function is defined as
Atomic formulas are equalities of index terms, equalities and inequalities of number terms, and expressions where is a -ary predicate symbol in and are index terms.
The set of formulas of is the smallest set containing all atomic formulas and which is closed under Boolean connectives and quantification and .
Remark 1
Having a linear order available on it is folklore in finite model theory to define the first and the last element (denoted by and , respectively) of with respect to the order, as well as a linear order on every by means of fo-formulas. This is tacitly used below.
In order to capture complexity class as well as BP we have to extend fo-logic to existential second-order logic and first order logic, respectively. This is done similarly as in [GraedelMeer] and the proofs showing that the resulting logics capture the intended classes is a nearby variation of the corresponding ones in the full BSS model. The only technical aspect to respect is that for discrete -structures and the logics used we cannot introduce arbitrary real constants. This is rather a restriction for fixed point logic than for existential so-logic since for the latter we can existentially quantify such real objects and then express their desired properties via a fo-formula. Since fixed point logic also needs to work with so-objects, we first define existential so logic.
Definition 7
Second-order logic on discrete -structures is obtained starting from logic by adding the possibility to quantify over function symbols. More precisely, given a vocabulary where contains a function symbol interpreted as a function from some , together with a first-order formula over , both and are second-order formulas. If all quantified function symbols are existentially quantified we get existential second-order logic
Example 1
We express the core problem of , namely real solvability of an instance of QPS0 (Definition 1), as an existential so-property on suitable discrete -structures. Some (easy) technical aspects are only sketched. Consider as input instance a system of polynomials in some real variables having integer coefficients. All are supposed to have degree at most and the question is to decide whether there exists a common real zero. Recall that this is an -complete problem. Rational coefficients for sake of easiness in the further description can be removed by multiplying all by the least common multiple of the denominators of their respective coefficients. We represent the system as follows as a discrete -structure where has the discrete set as universe. Here, is an upper bound for the bit-size of the coefficients of all The vocabulary contains a linear ordering and a coefficient function , where for and we interpret as sign of the coefficient of monomial of here codes sign and codes sign Furthermore, is the bit (as element in ) of in the binary representation of the coefficient of in . Some technical comments are necessary. Formally, the above discrete part looks different from the definition of a discrete -structure. However, it is an easy task to change the above structure to one with a universe for some and an interpreted as bit-string coding the instance. Towards this aim, one has to use an additional relation coding the values and in Using the linear order on it is easy to express via fo-logic components representing variables, polynomials, and coefficients, respectively. Similarly, for a function it is easy to describe the correct arguments and their meaning using fo-logic to define arbitrarily on arguments having no interpretation. The interested reader might try to elaborate this coding; for sake of readability we prefer to use the above coding instead.
In the existential second order part we now ask for the existence of three functions mapping some to First, should represent the coefficients as real numbers in order to use them in number terms for expressing the evaluation of the in real arguments. This can be done using the following fo-formulas. Note that properties like can be expressed using the linear ordering; similarly, expressions like can be defined to have the natural meaning.
First, the correct sign of a coefficient is expressed as
Next, fixing the highest bit as real and describing the real represented by bit vector is done via
where of course is a real number term for . This way represents (as real) the absolute value of the coefficient of monomial in . Finally, we require for all to get the correct sign.
Next, use in order to existentially quantify a potential common real zero of all Finally, we have to express the evaluation of all in . However, this is easy and can be done similarly to the foregoing construction. Existentially quantify a function which represents the partial sums when evaluating all polynomials in . One component in the arguments of again addresses the respective polynomial to evaluate, the two others code Since all have degree at most , we need for every to cycle through , and this can be expressed similarly to the computation of a coefficient from a binary representation above. The proceeding is the same as that in [GraedelMeer] for evaluating a single degree-4 polynomial.
A logical characterization of now is possible in almost the same way as for in [GraedelMeer].
Theorem 3.1
Let be a decision problem of discrete -structures, i.e., is a set of such structures, where instance structures are coded as strings in as explained above, and Then if and only if there is an existential second-order sentence such that
Dealing with a logical characterization of BP this is not possible, the reason why at some places a bit more care for technical details is necessary. Nevertheless, this is at most tedious. The extension of FO to fixed point logic necessary in order to capture polynomial time in our setting once again was basically introduced already in [GraedelMeer], here we outline the technical differences due to the lack of arbitrary real constants. The only new technical demand in order to describe -computations using a logic on discrete -structures is to change at certain places discrete data (i.e., objects formalized in the discrete part of an -structure) to real numbers. Suppose, for example, we use the given order on some and express by FOR logic that is the successor of in this order, i.e., we have a formula saying We then often want to use the characteristic value as real number. Formally, this can be expressed in our logics as follows: is an abbreviation of a formula on the discrete part of an -structure. We can introduce a new discrete variable together with the fo-formula Now, is a number term expressing the truth value of as real (!) number or . We express this by writing Similar constructions are used below and should be clear from the context.
We need the following definitions, compare [GraedelMeer]. In order to deal with partially defined functions from some , enlarge by an element and extend the arithmetic operations via and For a number term with free first order variables , the operator is a number term with free variables and obvious semantics. Below, we use in order to cycle through some Typically, we want to be the direct predecessor of then express the characteristic value via FO-logic, take the corresponding number term as explained above, and then identify via That way, when a computation is in step we can formalize the next step In order to define fixed point logic on discrete -structures let be a function symbol of arity interpreted on as function from and let be a number term in FO logic on signature (i.e., the closure of FO logic under use of the operator) with free first order variables
Definition 8
The fixed point with respect to is a function symbol of arity Its interpretation on a discrete -structure is defined iteratively as follows: Set and for
After at most iterations this process becomes saturated, i.e., This fixed point then is
Definition 9
Functional fixed-point logic is obtained as closure of the set of first-order number terms under the maximization rule and the fixed-point rule. denotes the class of characteristic functions definable in functional fixed-point logic.
Theorem 3.2
On ranked discrete -structures the functions in are exactly those computable in polynomial time in the constant-free BSS model. In particular, the characteristic functions in are those of polynomial time solvable decision problems in i.e.
We finally note that another approach to characterize a certain fragment of by means of a so-called probabilistic independence logic was given in [Hannula].
4 A Ladner like theorem for NP and
The next classical result which can be transformed relatively straightforwardly to is Ladner’s theorem [Ladner] guaranteeing the existence of intermediate problems between P and the NP-complete ones. The range of the classical proof technique has been analyzed in [Schoening]. In relation with the BSS model of computation over uncountable structures the theorem has been shown in [MalajovichMeer] to hold as well over the complex numbers. Over it is open, but [BMM, ChapuisKoiran, Meer2012] give partial results. Especially, [BMM] addresses the importance of quantifier elimination QE algorithms when constructing intermediate problems. In the case of separating the class of -complete problems from NP under the assumption a combination of the arguments from [BMM, MalajovichMeer] works as well.
Theorem 4.1
Suppose Then, there exists a problem in which is not -complete.
For the rest of this section we outline the proof idea of how to construct such a problem. Technical details then easily can be filled following the presentations in [BMM, MalajovichMeer]. Our construction starts from the -complete problem of Definition 1. As mentioned before, the -completeness proof of the corresponding problem for the class in [BSS] shows as well completeness of in since given an -machine the reduction to the full problem, i.e., where polynomials are allowed to have real coefficients as well, does not introduce real constants and runs in polynomial time also in the Turing model; intermediate results can be subsumed under real existential quantification.222Note that guessing a real solution might lead to real intermediate results; they can be existentially quantified in in the reduction proof.
The main reasons why a proof of Theorem 4.1 can be done similarly to showing related results are the decidability of within a computable time bound in the Turing model due to real quantifier elimination, and effective countability of NP-machines together with polynomial time bounds. Starting from we build certain restricted languages depending on strictly increasing sequences of natural numbers. For input dimensions we let be the problem, for the remaining input dimensions equals the empty set. The strategy now is to define two such sequences so that both have the desired properties. We need two sequences in order to guarantee non-completeness.
Definition 10 (cf. [MalajovichMeer])
Let be two sequences of natural numbers.
a) The sequences have an exponential gap iff both are strictly increasing and for all satisfy as well as i.e.,
b) The decision problem (and similarly) is defined dimension-wise for inputs of size as follows:
Since -completeness is defined downward from by usual polynomial time reductions, it is easy to see that assuming neither nor can be -complete if and have an exponential gap.
Lemma 1
Suppose and let sequences have an exponential gap. Suppose furthermore that belong to Then both are not -complete.