Recognizing and deciding languages
Let be a language and a Turing Machine. The notation denotes the language accepted by M. The distinction between recursively enumerable and recursive languages concerns what a machine must do on inputs outside .
Recursively enumerable languages
A language is recursively enumerable (rekursiv aufzählbar) if for some TM . The class is
Such a machine accepts every input in . For inputs outside , it may reject or run forever.
Recursive languages
A language is recursive, or decidable (rekursiv / entscheidbar), if for a TM that halts on every input. For every ,
The corresponding class is
A TM that always halts models an algorithm that terminates with a correct answer on every input.
Comparison
| Requirement | Recursively enumerable | Recursive / decidable |
|---|---|---|
| Input | Accept after finitely many steps | Accept after finitely many steps |
| Input | Reject or run forever | Reject after finitely many steps |
| Halts on every input? | Not required | Required |
Relation between the classes
Directly from these definitions,
The definitions require the existence of a suitable machine. A particular machine that loops outside does not by itself show that is undecidable.