Monthly Archives: August 2014

Computable metric spaces in a nutshell

What are computable metric spaces?

We can generalize the notions of computability over the reals and in the euclidean space to metric spaces. A computable metric space is a triple (X,d,\alpha) where (X,d) is a metric space and \alpha is a sequence in X such that its image is dense in X and the function \mathbb{N}^2 \rightarrow \mathbb{R} defined as (i,j) \mapsto d(\alpha_i, \alpha_j),\ \forall i,j\in\mathbb{N}  is computable. For example, a definition of computable point is a generalization of the computable real: A point x \in X is computable in  (X,d,\alpha) if there exists a computable function f:\mathbb{N} \rightarrow \mathbb{N} such that d(\alpha_{f(k)}, x) < 2^{-k}  for every k \in \mathbb{N}. Similarly, we can define  a computable sequence of points in X and functions between metric spaces that are computable,... but for subsets of X it is not the same as definition of computability in \mathbb{R}^n but it borrows the definitions from classical recursion theory. First we fix some computable enumeration of rational balls in X for example let  (I_i) be a fixed such enumeration. Then for a set S \subseteq X we say that S is recursively enumerable T = \{i \in \mathbb{N} | S \cap I_i \not = \emptyset\} is recursively enumerable i.e. there exists a computable function f:\mathbb{N} \rightarrow \mathbb{N} such that f(\mathbb{N}) = T. A subset S is co-recursively enumerable if we have an algorithm that covers the complement of S with rational balls. In other words, S is co-recursively computable iff there exists a recursively enumerable subset A of \mathbb{N} such that X \setminus S = \bigcup_{i \in A} I_i. A subset S is computable iff S is recursively computable and co-recursively computable.

We can of course generalize further and define computable topological spaces but I shall not go further into that. That is a topic for another post. Note that as we generalize more and more there are pathological spaces that do not have nice computability properties and must be more and more careful when dealing with computability.

Copyright © 2014, Konrad Burnik

Introduction to computable analysis (Part 1/2)

What is Computable analysis anyway?

Roger Penrose in his book "The emperors new Mind" asked an interesting question regarding the Mandelbrot set: "Is the Mandelbrot set recursive?" The term "recursive" is an old name for "computable" and has nothing to do with recursion in programming.

The Mandelbrot Set zoomed in

The Mandelbrot Set (zoomed in)

Classical computability theory (also known as recursion theory) is a branch of mathematical logic that deals with studying what functions \mathbb{N}\rightarrow \mathbb{N} are computable. Computable analysis is in some sense an extension of this theory. It is a branch of mathematics that applies computability theory to problems in mathematical analysis. It is concerned with questions of effectivity in analysis and its main goal is to find what parts of analysis can be described by an algorithmic procedure, one of the basic questions being what functions f:\mathbb{R}\rightarrow\mathbb{R} are computable? (note the domain and codomain are now the reals).

emperor  Penrose_question

Computable reals

Suppose we take a real number x. Is x computable? What do we mean by x being computable? If we can find an algorithm A that calculates for each input k \in \mathbb{N} a rational approximation A_k of x; and such that the sequence (A_k) "converges fast" to x then we say that x is a computable real. More precisely, a real number x \in R is computable iff there exists a computable function f:\mathbb{N} \rightarrow \mathbb{Q} such that |f(k) - x| < 2^{-k} for each k \in \mathbb{N}. For example, every rational number is computable. The famous number \pi is computable, and in our previous post we proved that \sqrt{2} is computable. It turns out that the set of computable reals, denoted by \mathbb{R}_C is a field with respect to addition and multiplication. But there exist real numbers which are not computable. This is easy to see as there is only a countable number of computable functions \mathbb{N}\rightarrow\mathbb{N}, and since we know that \mathbb{R} is uncountable, so we have more real numbers than we have possible algorithms, we conclude that there must be a real number that is not computable. One example of an uncomputable real is the limit of a Specker sequence. And one other interesting one is the Chaitin constant. In fact, if we take any recursively enumerable but non-recursive set A \subseteq \mathbb{N}, then the number \alpha = \sum_{i \in A} 2^{-i} is an example of a real number which is not computable.

Computable sequences of reals

If we have a sequence of computable reals  (x_n) (and hence a sequence of algorithms) we may ask if this sequence is computable i.e. is there a single algorithm that describes the whole sequence? If there exists a computable function f : \mathbb{N}^2 \rightarrow \mathbb{Q}  such that  

    \[ |f(n,k) - x_n| < 2^{-k}\]

for each n,k \in \mathbb{N} then we say that (x_n) is a computable sequence. We have seen that each rational number is computable, but this is not true for sequences of rational numbers! One example of a sequence that has each term computable but it is not uniformly computable is the following:

Computable real functions

Real functions which are a main object of study in analysis can be studied in this computability setting, a function f:\mathbb{R} \rightarrow \mathbb{R} is computable iff  

  1. it maps computable sequences to computable sequences i.e. f(x_i) is computable for every computable sequence (x_i);
  2. it is effectively uniformly continous i.e. if there exists a computable sequence thatdescribes the modulus of continuity of f.

The fundamental theorem of computable analysis is that every computable real function is continuous.

There is also a notion of computability for the process of integration, derivation, solving partial differential equations, etc. and we shall look into that topic in another post.

Computable subsets of the Euclidean space

computable_circle

Unit circle approximated with dyadic points

Next, let's look at the subsets of the euclidean space \mathbb{R}^n and ask a simple question: what subsets are computable? First, note that saying S is computable iff its indicator function

    \[\chi_S(x) =\begin{cases} 1, & x \in S \\ 0, & x \not \in S \end{cases}\]

is computable is not a useful definition since the indicator function is not continous except when S =\mathbb{R}^n or S=\emptyset. A subset S of \mathbb{R}^n is computable iff the function  \mathbb{R}^n \rightarrow \mathbb{R} defined as x \mapsto d(x, S) is a computable function. For example, take the unit circle in \mathbb{R}^2.  

    \[\mathbb{S}^1 = \{(x,y): x^2 + y^2 =1\}\]

. The distance function is

    \[d((x,y), \mathbb{S}^1) = |x^2 + y^2 - 1|, \forall x,y \in \mathbb{R}^2.\]

  These are just some basic definitions and facts, but also interesting questions are studied in computable analysis like for example what mappings preserve computability of objects?  Is for example the Mandelbrot set computable? What about Julia Sets? For them, there are nice results presented in the book "Computability of Julia Sets" by Braverman and Yampolsky. Although Julia Sets have been thoroughly researched in the book, for the Mandelbrot set we still don't know the answer.

Basically for anything we do in analysis (finding derivatives, integration, finding roots, solving PDEs ...) we may ask: "Is it computable?" and that is a topic for another post.

(to be continued)

Copyright © 2014, Konrad Burnik