Computable number
In mathematics and theoretical computer science, a real number a is said to be computable if it can be approximated by some algorithm (or Turing machine), in the following sense: given any integer n≥1, the algorithm produces an integer k such that:
| Table of contents |
|
2 Computing digit strings 3 References 4 See also |
The computable complex numbers form an algebraically closed field, and arguably this field contains all the numbers we ever need in practice. It contains all algebraic numbers as well as many known transcendental mathematical constants. There are however many real numbers which are not computable: the set of all computable numbers is countable (because the set of algorithms is) while the set of real numbers is not (see Cantor's diagonal argument).
The arithmetical operations on computable numbers are themselves computable. Take addition as example: there exists an algorithm or Turing machine which on input (A,B,ε) produces output r, where A is the description of a Turing machine approximating a (in the sense of the above definition), B is the description of a Turing machine approximating b, and r is an ε approximation of a+b.
However, order relations on computable numbers are not computable. There is no Turing machine which on input A (the description of a Turing machine approximating the number a) outputs "YES" if a>0 and "NO" if a≤0. The reason: suppose the machine described by A keeps outputing 0 as ε approximations. It is not clear how long to wait before deciding that the machine will never output an approximation which forces a to be positive.
Every computable number is definable, but not vice versa. An example of a definable, non-computable real number is
Chaitin's constant, &Omega.
Turing's original paper defined computable numbers as follows:
There is no algorithm which takes as input the description of a Turing machine which produces ε approximations for the computable number a, and produces as output a Turing machine which enumerates the digits of a in the sense of Turing's definition. So while the two definitions are equivalent, they are not "computably equivalent".
While the set of computable numbers is countable, it cannot be enumerated by any algorithm, program or Turing machine. Formally: it is not possible to provide a complete list x1, x2, x3, ... of all computable real numbers and a Turing machine which on input (m, n) produces the n-th digit of xm. This is proved with a slight modification of Cantor's diagonal argument.
The problem with Turing's definition is this: addition is not computable if we use descriptions of digit-enumerating Turing machines as input and require a digit enumeration as ouput. The reason is similar to the one described earlier, when talking about order relations: if you want to add two numbers and the first machine keeps outputing the digit 9 and the second machine the digit 0, how long do you wait before deciding that no carry-over to the current digit position is needed?
Properties
Computing digit strings
Turing was already aware of the fact that this definition is equivalent to the ε-approximation definition given above. The argument proceeds as follows: if a number is computable in the Turing sense, then it is also computable in the ε sense: if n > log10(1/ε), then the first n digits of a provide an ε approximation of a. For the converse, we pick an ε computable real number a and distinguish two cases. If a is rational, then a is also Turing computable, since the digit expansions of rational numbers are eventually periodic and can therefore be produced by simple algorithms. Now if a is not rational and you want to compute its n-th digit, keep computing ever more precise ε-approximations until the n-th digit is certain. Eventually this will happen, since a is not rational and the case of "zeros forever" or "nines forever" is therefore excluded.References
See also