On the Complexity of Real Functions
Total Page:16
File Type:pdf, Size:1020Kb
On the Complexity of Real Functions Mark Braverman1 Department of Computer Science University of Toronto [email protected] Abstract with the computability notion of a single real number. To- day, we still do not have a unified and widely accepted no- We establish a new connection between the two most tion of real computability and complexity. common traditions in the theory of real computation, the Consider the two simplest objects over Rn: real sets and Blum-Shub-Smale model and the Computable Analysis ap- real functions. Several different approaches to the com- proach. We then use the connection to develop a notion putability of these objects have been proposed over the last of computability and complexity of functions over the re- seven decades. Unlike the discrete case, most approaches als that can be viewed as an extension of both models. We deal with computability of functions before the decidability argue that this notion is very natural when one tries to de- of sets. In the current paper we consider the two approaches termine just how “difficult” a certain function is for a very that are most common today: the tradition of Computable rich class of functions. Analysis – the “bit model”, and the Blum-Shub-Smale ap- proach. These two approaches have been developed to cap- ture different aspects of real computation, and in general are 1 Introduction not equivalent. The bit-model is very natural as a model for scientific computing when continuous functions on compact domains Questions of computability and complexity over the re- are√ involved. In particular, the “calculator” functions, such als are of extreme importance for understanding the connec- as x, sin x and log x are bit-computable, at least on some tions between nature and computations. Assessing the pos- properly chosen domains. None of these functions are com- sibilities of scientific computing in simulating and predict- putable in the BSS model, because computability in the BSS ing natural processes depends on an agreed upon and well model requires the function to have a very special algebraic studied notion of “real computation”. Addressing issues of structure (essentially being piecewise-rational). This makes physics and the Church-Turing Thesis also requires a strong the BSS notion inapplicable to scientific computing unless notion of computability over continuous spaces [23]. some modifications are made. The BSS model mimics some In the discrete setting, where the objects are from aspects of the actual way numerical analysts think about { }∗ 0, 1 , the concepts of computability and complexity are problems, and in fact [4] contains many strong results on very well studied. There are different approaches that have solving fundamental numerical problems in algebra, such been proved to yield equivalent definitions of computabil- as finding roots of a polynomial. The model’s disadvan- ity and (almost) equivalent definitions of complexity. From tage is the difficulty in interpreting negative results. The the Formal Logic point of view we have the notion of re- function ex and its graph are not BSS computable, and yet cursiveness, from Computational Complexity we have the we can easily compute the exponential function and plot its notion of a Turing Machine, and modeling the usual com- graph. Modifications that can be made to the model to deal puter yields the notion of abstract RAM. All these converge with these problems have been discussed in [20]. To our to the same well accepted concept of computability. knowledge, these modifications have not been formalized. In the continuous setting, where the objects are numbers On the other hand, there are very natural and simple R in , the situation is far less clear. Real Computation has functions that are BSS computable but not bit-computable. been studied since Turing’s original 1936 paper [21], where The simplest step function χ[0,∞) is an example. he introduced the Turing Machine. In that paper he dealt In the set setting, the models also often give fundamen- 1Research is partially supported by an NSERC postgraduate scholar- tally different answers to questions of computability. Con- ship sider, for example, the Koch snowflake K, the Julia set J = Jz2+1/4, and the Mandelbrot set M. In the BSS model The paper is organized as follows. In Section 2 we dis- none of these sets are computable (see [4]). In the bit model, cuss the bit model, and present some old and some new re- K is very easy to draw and is computable, J is computable, sults. In Section 3 we discuss the BSS model and possible although not as easily as K [3], and the question of whether modifications to it. In Section 4 we propose a new com- M is computable is open and depends on some deep con- putability and complexity definition for some discontinuous jectures from complex dynamics [14]. For most “common” and multi-valued functions. sets BSS is a more restrictive model, but this is not always the case, as demonstrated in section 3.2. 2TheBitModel We propose three simple natural modifications to the BSS model. Firstly, we allow the machines to use only com- putable constants. This amounts to working on a smaller 2.1 The Model of Computation field of the computable reals. Secondly, we allow the ma- chines to make some errors. This has been done infor- The computability of functions in the bit model as we mally before by analyzing the “error+condition number” of know it today was first proposed by Grzegorczyk [13] and a problem in the BSS model. Thirdly, we require an apriori Lacombe [16]. It has since been developed and generalized. estimate on the running time given as a function of the error More recent references on the subject include [15], [18], parameter ε. In section 3.2 we present an example show- and [22]. ing the importance of this condition. We show that under The basic model of computation here is an oracle Turing these modifications the BSS model becomes equivalent to D { k ∈ N ∈ N} Machine. Denote by = 2 : k , the the bit-model for sets. This involves simulating an infinite- set of the dyadic numbers. These are the rationals that have precision machine with a finite precision one. It can only be a finite binary expansion. An oracle for a number x is a done symbolically using the algebraic structure of the ma- function φ : N → D such that |φ(n)−x| < 2−n. The oracle chine’s constants and Q, followed by a general quantifier terminology is just a natural way to separate the complexity elimination over R. of computing x from the complexity of computing on x as a parameter. For most purposes one can think of the oracle φ for x as an infinite tape containing the binary expansion of x. Consider a function f : R → R. In plain language, a program M computing f would output a good approx- imation of f(x), provided approximations of the input x. More formally, the oracle machine M φ(n) outputs a 2−n- approximation of f(x) for any valid oracle φ for x.The definition extends naturally to a function f : Rk → R. φ1,φ2,...,φk Figure 1. The sets K (left), J (center), and M Here M = M (n) is allowed to query each of (right) the k parameters with an arbitrarily good precision and is required to output the values of f with precision 2−n. The primary goals of this paper are: 2.2 Basic Properties and Examples • to show that under the reasonable modifications men- tioned above, the two models become computationally One of the main properties of computable functions is that they are continuous. For a computable f : R → R, equivalent for sets; φ the machine Mf (n) can query the input x via φ with only • to propose a new notion of computability for functions finite level of precision before it outputs an approximation which extends both models, and takes advantage of q of f(x). This means that q should be a good approxima- some positive features in both; and tion of f(x) for all x in some small neighborhood of x. • based on the above, to propose the “right” notion of Thus f(x ) should be close to f(x) whenever x is close computational complexity for discontinuous functions, enough to x. A formal proof can be found in most standard extending naturally from the continuous case. references, e.g. in [22]. The computable ⇒ continuous property implies that This gives us the “right” notion of complexity for func- even the simplest discontinuous function, the step function tions for which no such notion√ previously existed. For ex- ample, the 2-valued function : C → C, as well as its 0 x<0 s0(x)= (1) single-valued branches defined on subsets of C. 1 x ≥ 0 2 is not computable under this definition. This is in contrary 1. If a pixel contains a point from S, then it is colored to the intuition that s0 must be a “simple” function. One black. This ensured that the entire set appears on the could also argue that some physical systems, e.g. quantum screen. energy levels, are best described using step functions and −n other simple discontinuous functions. One of the goals of 2. If a pixel is far (say 2 -far) from S, then it is colored the present work is to develop notions which deal with this white. This ensures that the picture is a faithful image problem. of S. We recall the classical definition of computable real We can take the pixels to be balls of radius 2−n with a numbers, introduced by Turing in [21].