Sets that can be enumerated by algorithms and their role in semi-decidability and computability theory.
A set is recursively enumerable if there is an algorithm that can list its elements.
The older name is recursively enumerable, often abbreviated as r.e. The modern name is computably enumerable, often abbreviated as c.e. Both terms refer to the same idea.
A set is recursively enumerable if there is a Turing machine that prints exactly the elements of :
The machine may run forever. It does not need to print the elements in order. It may also print the same element more than once, although duplicates can be removed by another computable procedure.
Enumeration
The simplest way to understand an r.e. set is by listing.
For example, the set of even natural numbers is r.e.:
The set of prime numbers is also r.e.:
These examples are not only r.e.; they are computable. Given a number , we can decide whether is even or prime.
The important point is that r.e. sets may be harder than computable sets. An r.e. set can be listable without being decidable.
Semi-Decidability
There is another equivalent way to define r.e. sets.
A set is recursively enumerable if there is a machine such that:
and:
Usually, we simplify this by saying:
The machine must accept members of . For nonmembers, it has no obligation to halt.
This is called semi-decidability. Positive answers can be confirmed. Negative answers may remain unresolved forever.
Decidable Versus Recursively Enumerable
Every decidable set is recursively enumerable.
If is decidable, then we can enumerate it by checking:
For each number , run the decision procedure for . If it says yes, print .
So:
The converse fails. Some r.e. sets are not decidable.
The standard example is the halting set:
This set is r.e. because we can simulate programs step by step. Whenever program halts on input , we eventually discover that and print .
But is not decidable. There is no algorithm that always decides whether an arbitrary program halts on its own code.
Thus:
but:
Why the Halting Set Is Enumerable
The enumeration of uses dovetailing.
Instead of running one program forever, we run many computations in stages:
- stage : run program for steps
- stage : run programs for step
- stage : run programs for steps
- stage : run programs for steps
Whenever a computation halts, we print its program index.
This guarantees that every halting computation is eventually found. A nonhalting computation simply never contributes an output.
Complements
If is decidable, then both and its complement are r.e.
The complement is:
If we can decide membership in , then we can also decide membership in .
A key theorem says the converse is true:
The idea is simple. Run the enumerator for and the enumerator for in parallel. Given input , wait until appears in one of the two lists. Since every number belongs to exactly one of them, it must eventually appear in one list. Then we can decide correctly.
This theorem shows why r.e. is weaker than decidable. An r.e. set gives a way to eventually confirm membership, but it may give no way to confirm nonmembership.
Domains of Partial Computable Functions
Recursively enumerable sets also arise as domains.
A partial computable function may be defined on some inputs and undefined on others:
means that is defined, or equivalently, the computation halts.
The domain is:
$$ \operatorname{dom}(\varphi)
{x : \varphi(x)\downarrow} $$
Every such domain is r.e. We can enumerate the inputs on which the computation halts.
Conversely, every r.e. set is the domain of some partial computable function.
So r.e. sets are exactly the possible halting domains of partial computable functions.
Relation to Turing Degrees
R.e. sets are central in degree theory because they form a natural class of noncomputable sets.
The computable r.e. sets have degree:
The halting set has degree:
Between them, there can be r.e. sets of intermediate Turing degree:
This is the content of Post’s problem, discussed next.