Set with algorithmic membership test
In computability theory , a set of natural numbers is computable (or decidable or recursive ) if there is an algorithm that computes the membership of every natural number in a finite number of steps. A set is noncomputable (or undecidable) if it is not computable.
A subset
S
{\displaystyle S}
of the natural numbers is computable if there exists a total computable function
f
{\displaystyle f}
such that:
f
(
x
)
=
1
{\displaystyle f(x)=1}
if
x
∈
S
{\displaystyle x\in S}
f
(
x
)
=
0
{\displaystyle f(x)=0}
if
x
∉
S
{\displaystyle x\notin S}
.
In other words, the set
S
{\displaystyle S}
is computable if and only if the indicator function
1
S
{\displaystyle \mathbb {1} _{S}}
is computable .
Every recursive language is a computable.
Every finite or cofinite subset of the natural numbers is computable.
The empty set is computable.
The entire set of natural numbers is computable.
Every natural number is computable.[ note 1]
The subset of prime numbers is computable.
The set of Gödel numbers is computable.[ note 2]
Both A , B are sets in this section.
If A is computable then the complement of A is computable.
If A and B are computable then:
In general, the image of a computable set under a computable function is computably enumerable, but possibly not computable.
A is computable if and only if it is at level
Δ
1
0
{\displaystyle \Delta _{1}^{0}}
of the arithmetical hierarchy .
A is computable if and only if it is either the image (or range) of a nondecreasing total computable function, or the empty set.
^ Markov, A. (1958). "The insolubility of the problem of homeomorphy". Doklady Akademii Nauk SSSR . 121 : 218– 220. MR 0097793 .