Recent from talks
Nothing was collected or created yet.
Recursively enumerable language
View on WikipediaThis article includes a list of references, related reading, or external links, but its sources remain unclear because it lacks inline citations. (December 2024) |
In mathematics, logic and computer science, a formal language is called recursively enumerable (also recognizable, partially decidable, semidecidable, Turing-acceptable or Turing-recognizable) if it is a recursively enumerable subset in the set of all possible words over the alphabet of the language, i.e., if there exists a Turing machine which will enumerate all valid strings of the language.
Recursively enumerable languages are known as type-0 languages in the Chomsky hierarchy of formal languages. All regular, context-free, context-sensitive and recursive languages are recursively enumerable.
The class of all recursively enumerable languages is called RE.
Definitions
[edit]There are three equivalent definitions of a recursively enumerable language:
- A recursively enumerable language is a recursively enumerable subset in the set of all possible words over the alphabet of the language.
- A recursively enumerable language is a formal language for which there exists a Turing machine (or other computable function) which will enumerate all valid strings of the language. Note that if the language is infinite, the enumerating algorithm provided can be chosen so that it avoids repetitions, since we can test whether the string produced for number n is "already" produced for a number which is less than n. If it already is produced, use the output for input n+1 instead (recursively), but again, test whether it is "new".
- A recursively enumerable language is a formal language for which there exists a Turing machine (or other computable function) that will halt and accept when presented with any string in the language as input but may either halt and reject or loop forever when presented with a string not in the language. Contrast this to recursive languages, which require that the Turing machine halts in all cases.
All regular, context-free, context-sensitive and recursive languages are recursively enumerable.
Post's theorem shows that RE, together with its complement co-RE, correspond to the first level of the arithmetical hierarchy.
Example
[edit]The set of halting Turing machines is recursively enumerable but not recursive. Indeed, one can run the Turing machine and accept if the machine halts, hence it is recursively enumerable. On the other hand, the problem is undecidable.
Some other recursively enumerable languages that are not recursive include:
Closure properties
[edit]Recursively enumerable languages (REL) are closed under the following operations. That is, if L and P are two recursively enumerable languages, then the following languages are recursively enumerable as well:
- the Kleene star of L
- the concatenation of L and P
- the union
- the intersection .
Recursively enumerable languages are not closed under set difference or complementation. The set difference is recursively enumerable if is recursive. If is recursively enumerable, then the complement of is recursively enumerable if and only if is also recursive.
See also
[edit]Sources
[edit]- Sipser, Michael (1997). Introduction to the Theory of Computation (1st ed.). PWS Publishing. ISBN 978-0-534-94728-6. (accessible to patrons with print disabilities)
- Kozen, D.C. (1997), Automata and Computability, Springer.
External links
[edit]Recursively enumerable language
View on GrokipediaCore Concepts
Definition
In computability theory, a recursively enumerable language is a formal language consisting of strings whose membership can be verified by an algorithmic procedure that halts and accepts on positive instances (strings in the language) but may continue running indefinitely without halting on negative instances (strings not in the language).[10] This property captures the notion of semi-decidability, where the procedure provides a one-sided guarantee of correctness: it confirms membership reliably but cannot always disprove it.[11] The foundational model for this concept is the Turing machine, an abstract device capable of simulating any algorithmic process; a language is recursively enumerable if there exists a Turing machine that accepts exactly the strings in the language by entering an accepting state upon halting for those inputs, while potentially looping forever otherwise.[12] This semi-decidable nature distinguishes recursively enumerable languages from fully decidable ones, highlighting the limits of computation in verifying non-membership. The concept emerged in the 1930s and 1940s through efforts to address the Entscheidungsproblem, the question of whether there exists an algorithm to determine the truth of mathematical statements. Alan Turing introduced the Turing machine model in 1936, laying the groundwork by defining computable processes and proving the undecidability of the halting problem, which implies the existence of semi-decidable but non-decidable sets.[12] Emil Post formalized the term "recursively enumerable sets" in 1944, building on this to analyze decision problems for such sets and their role in recursion theory.[3]Formal Characterizations
A recursively enumerable language is formally characterized using Turing machines as the set of languages accepted by some Turing machine , denoted halts and accepts . Specifically, on input , must enter an accepting state and halt, whereas on , may either halt and reject or loop indefinitely without halting.[13] This definition captures the semi-decidability of such languages, where membership can be verified but non-membership may be unverifiable.[14] An equivalent characterization employs the enumerator model, in which a Turing machine operates without input (starting from blank tapes) but with an auxiliary printer to output strings. A language is recursively enumerable if there exists an enumerator Turing machine that prints every string in (possibly with duplicates and in arbitrary order) and no strings outside .[15] This model emphasizes the listable nature of these languages, as the enumerator systematically generates their elements over time.[13] Recursively enumerable languages are also characterized through partial recursive functions, which form the class of functions computable by Turing machines and may be undefined on certain inputs. A language is recursively enumerable if its characteristic function (indicating membership) is partial recursive, or equivalently, if is the domain of some partial recursive function , i.e., , where denotes that the computation halts.[11] Partial recursive functions are generated from primitive recursive base functions (such as zero, successor, and projection) via closure under composition, primitive recursion, and minimization.[14] In the Chomsky hierarchy, recursively enumerable languages correspond exactly to type-0 grammars (unrestricted grammars), where productions are of the form with containing at least one nonterminal and no other restrictions on or . Thus, is recursively enumerable if and only if for some type-0 grammar .[16] These characterizations are equivalent, as demonstrated by constructive simulations between the models. A Turing recognizer can be transformed into an enumerator by systematically simulating the recognizer on all strings in dovetailed (lexicographical and length-ordered) fashion, printing only accepted inputs; conversely, a recognizer can simulate an enumerator by generating its outputs and checking for a match with the input.[15] For type-0 grammars, equivalence to Turing machines follows from a nondeterministic Turing machine simulating forward derivations (applying rules to build the string on one tape while matching the input on another) and a grammar simulating backward Turing computations (reversing transitions from an accepting configuration to the input via encoded rules).[17] The link to partial recursive functions arises because Turing machines compute precisely these functions, with recursively enumerable languages as their domains.[14]Illustrative Examples
Basic Recognizable Languages
Finite languages provide straightforward examples of recursively enumerable languages, as any finite set of strings can be recognized by a Turing machine that systematically checks the input against each string in the set and accepts if a match is found, while looping indefinitely otherwise. For instance, consider the language consisting solely of the empty string, denoted {ε}. A Turing machine for this language immediately accepts if the input tape is blank and enters an infinite loop otherwise, thereby recognizing exactly the strings in the language.[18] Regular languages, being accepted by finite automata, are also recursively enumerable, as a Turing machine can simulate the finite automaton's state transitions on the input tape and halt in an accepting state for valid strings. A simple example is the language of all even-length binary strings over the alphabet {0,1}. Here, the Turing machine maintains a two-state counter (even or odd parity) while scanning the tape from left to right, accepting if the final state indicates even length and rejecting otherwise, though for recognizability, it could loop on odd-length inputs if desired.[19] The universal language Σ*, comprising all possible finite strings over an alphabet Σ, is recursively enumerable and serves as a trivial example, recognized by a Turing machine that unconditionally accepts any input without examining the tape contents.[20] To illustrate the construction explicitly, consider the language {a^n | n ≥ 0} over the alphabet {a}. The following pseudocode describes a Turing machine that recognizes it by verifying that the input consists entirely of a's and accepting upon reaching the end:On input string w:
1. If the tape is blank (empty string), accept.
2. Move the head right while the current symbol is 'a', replacing each 'a' with a blank to mark progress (or simply scan without modification).
3. If the next symbol is blank, accept.
4. If a non-'a' symbol is encountered, enter a loop: repeatedly move the head left and right indefinitely without halting.
On input string w:
1. If the tape is blank (empty string), accept.
2. Move the head right while the current symbol is 'a', replacing each 'a' with a blank to mark progress (or simply scan without modification).
3. If the next symbol is blank, accept.
4. If a non-'a' symbol is encountered, enter a loop: repeatedly move the head left and right indefinitely without halting.
