Hubbry Logo
Recursively enumerable languageRecursively enumerable languageMain
Open search
Recursively enumerable language
Community hub
Recursively enumerable language
logo
7 pages, 0 posts
0 subscribers
Be the first to start a discussion here.
Be the first to start a discussion here.
Recursively enumerable language
Recursively enumerable language
from Wikipedia

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:

  1. A recursively enumerable language is a recursively enumerable subset in the set of all possible words over the alphabet of the language.
  2. 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".
  3. 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:

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.
[edit]
Revisions and contributorsEdit on WikipediaRead on Wikipedia
from Grokipedia
In computability theory, a recursively enumerable language (also known as a semi-decidable language or type-0 language in the Chomsky hierarchy) is a formal language over a finite alphabet for which there exists a Turing machine that accepts exactly the strings in the language by halting in an accepting state, while it may either reject or loop indefinitely on strings not in the language. The term "recursively enumerable" was coined by Emil L. Post in 1944 to describe sets of positive integers that can be exhaustively listed by a recursive (computable) function, with the concept extending naturally to languages via the Church-Turing thesis equating recursive functions with Turing machine computability. Recursively enumerable languages are generated by unrestricted grammars, which allow production rules of the form α → β where α and β are arbitrary strings over the alphabet including nonterminals, making them the most expressive class in the . They encompass all decidable (recursive) languages but also include undecidable ones, such as the language of all Turing machines that halt on the empty input (a formulation of the ), which is recursively enumerable but whose complement is not. Key properties of recursively enumerable languages include closure under union, , , and , but not under complementation, highlighting their asymmetry in . Equivalently, a is recursively enumerable if it is the domain of a partial recursive function or if its strings can be systematically enumerated by a , though the enumeration process may never terminate for non-members. This class plays a central role in understanding the , as implies that all non-trivial properties of recursively enumerable languages are undecidable.

Core Concepts

Definition

In , a recursively enumerable language is a 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). 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. The foundational model for this concept is the , an abstract device capable of simulating any algorithmic process; a language is recursively enumerable if there exists a that accepts exactly the strings in the language by entering an accepting state upon halting for those inputs, while potentially looping forever otherwise. 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 , the question of whether there exists an to determine the truth of mathematical statements. introduced the model in 1936, laying the groundwork by defining computable processes and proving the undecidability of the , which implies the existence of semi-decidable but non-decidable sets. 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.

Formal Characterizations

A recursively enumerable language LΣL \subseteq \Sigma^* is formally characterized using Turing machines as the set of languages accepted by some Turing machine MM, denoted L=L(M)={wΣML = L(M) = \{ w \in \Sigma^* \mid M halts and accepts w}w \}. Specifically, on input wLw \in L, MM must enter an accepting state and halt, whereas on wLw \notin L, MM may either halt and reject or loop indefinitely without halting. This definition captures the semi-decidability of such languages, where membership can be verified but non-membership may be unverifiable. An equivalent characterization employs the enumerator model, in which a operates without input (starting from blank tapes) but with an auxiliary printer to output strings. A LL is recursively enumerable if there exists an enumerator that prints every string in LL (possibly with duplicates and in arbitrary order) and no strings outside LL. This model emphasizes the listable nature of these languages, as the enumerator systematically generates their elements over time. 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 LL is recursively enumerable if its (indicating membership) is partial recursive, or equivalently, if LL is the domain of some partial recursive function ϕe\phi_e, i.e., L={xϕe(x)}L = \{ x \mid \phi_e(x) \downarrow \}, where \downarrow denotes that the computation halts. Partial recursive functions are generated from primitive recursive base functions (such as zero, successor, and projection) via closure under composition, primitive recursion, and minimization. In the Chomsky hierarchy, recursively enumerable languages correspond exactly to type-0 grammars (unrestricted grammars), where productions are of the form αβ\alpha \to \beta with α\alpha containing at least one nonterminal and no other restrictions on α\alpha or β\beta. Thus, LL is recursively enumerable if and only if L=L(G)L = L(G) for some type-0 grammar GG. 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. 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). The link to partial recursive functions arises because Turing machines compute precisely these functions, with recursively enumerable languages as their domains.

Illustrative Examples

Basic Recognizable Languages

Finite languages provide straightforward examples of recursively enumerable languages, as any of strings can be recognized by a 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 , denoted {ε}. A for this language immediately accepts if the input tape is blank and enters an otherwise, thereby recognizing exactly the strings in the language. Regular languages, being accepted by finite automata, are also recursively enumerable, as a 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 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. The universal language Σ*, comprising all possible finite strings over an Σ, is recursively enumerable and serves as a trivial example, recognized by a that unconditionally accepts any input without examining the tape contents. To illustrate the explicitly, consider the language {a^n | n ≥ 0} over the alphabet {a}. The following describes a 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.

This machine accepts all strings of zero or more a's and loops on any invalid input, confirming the language's recursively enumerable nature.

Languages with Non-halting Behavior

A quintessential example of a recursively enumerable exhibiting non-halting behavior is the halting problem H={M,wMH = \{ \langle M, w \rangle \mid M is a Turing machine that halts on input w}w \}. This is recognized by a Turing machine that simulates the execution of MM on ww; upon halting of the simulation, the recognizer accepts the input. If MM does not halt on ww, the simulation continues indefinitely without acceptance or rejection, illustrating the semi-decidable nature of HH, where membership is confirmed only for strings in the . Another illustrative example is the language L={anbnn0}L = \{ a^n b^n \mid n \geq 0 \}, which admits a recognizer that demonstrates non-halting on some non-members despite being recursive overall. The Turing machine scans the input to count the aa's, then attempts to match them pairwise with bb's by crossing off symbols iteratively. On strings with equal counts, it accepts after verification; however, on inputs with more aa's than bb's, after exhausting the bb's, it may enter an infinite loop searching the tape for additional unmatched bb's that are absent. This construction highlights how recognizers for recursively enumerable languages can be designed to loop on non-members, emphasizing the asymmetry between acceptance and rejection. The necessity of potential non-halting in recognizers for languages like HH stems from their undecidability: if a Turing machine existed that always halts and correctly decides membership in HH, it could be used to solve the for arbitrary machines and inputs by direct and query. Yet, as established through diagonalization, no such general solution exists, implying that any recognizer for HH must fail to halt on at least some non-members to avoid contradiction. This underscores the fundamental limitation in for recursively enumerable but non-recursive languages. Recursively enumerable languages, including those with non-halting recognizers, can also be characterized via without input processing. For HH, a enumerator generates all halting pairs by dovetailing simulations: it systematically runs all on all possible inputs for increasing numbers of steps (e.g., one step for all pairs, then two steps, and so on), outputting M,w\langle M, w \rangle whenever a halts during its turn. This infinite process lists every member of HH exactly once, without duplicates or omissions, providing an effective listing of the language.

Algebraic Properties

Closure Operations

The class of recursively enumerable (RE) languages is closed under several key operations, including union, , , , , and inverse homomorphism. These closure properties arise from constructive proofs using Turing machines (TMs), leveraging techniques such as nondeterminism, parallel simulation via product constructions, or dovetailing to simulate multiple computations simultaneously. Such methods ensure that if L1L_1 and L2L_2 are RE languages recognized by TMs M1M_1 and M2M_2, respectively, then the resulting language after the operation is also recognized by some TM. Union. If L1L_1 and L2L_2 are RE, then L1L2L_1 \cup L_2 is RE. To see this, construct a TM MM that, on input xx, nondeterministically branches into two paths: one simulates M1M_1 on xx, and the other simulates M2M_2 on xx. MM accepts if either simulation accepts (halting on yes instances from either branch) and may loop otherwise, mirroring the RE acceptance behavior. Alternatively, using a deterministic TM, MM can run M1M_1 and M2M_2 in parallel via a product , dovetailing their steps to simulate both computations interleaved until one accepts. Intersection. If L1L_1 and L2L_2 are RE, then L1L2L_1 \cap L_2 is RE. Construct a TM MM that, on input xx, simulates M1M_1 on xx and M2M_2 on xx in parallel using dovetailing. MM accepts only if both simulations accept. If xx is in the intersection, both will eventually halt and accept, so MM accepts; otherwise, at least one may loop, causing MM to loop. Concatenation and Kleene Star. RE languages are closed under concatenation: if L1L_1 and L2L_2 are RE, then L1L2={yzyL1,zL2}L_1 L_2 = \{ yz \mid y \in L_1, z \in L_2 \} is RE. The TM MM for L1L2L_1 L_2 generates all possible splits of input xx into yy and zz (there are x+1|x| + 1 ways), then simulates M1M_1 on each yy and M2M_2 on the corresponding zz in parallel using dovetailing across all splits; MM accepts if any pair of simulations both accept. For Kleene star, L1L_1^* (including the empty string) is RE via a similar construction: MM accepts ϵ\epsilon, or generates all ways to split xx into k1k \geq 1 non-empty substrings w1wkw_1 \dots w_k (a finite number of ordered splits, 2x12^{|x|-1} ways, simulated via nondeterminism or dovetailing), running M1M_1 on each wiw_i in parallel and accepting if all accept. These rely on the finite number of splits for fixed-length inputs, ensuring computability. Homomorphism and Inverse Homomorphism. A h:ΣΔh: \Sigma^* \to \Delta^* is a string mapping computable by a TM (e.g., replacing each ). RE languages are closed under : if LL is RE recognized by MM, then h(L)={h(w)wL}h(L) = \{ h(w) \mid w \in L \} is RE. The TM for h(L)h(L) uses an enumerator for LL (dovetailing all possible strings and simulating MM on them) to generate candidates ww such that h(w)=xh(w) = x (solving for preimages, feasible since hh is computable), accepting if any such ww is accepted by MM. For inverse , h1(L)={wh(w)L}h^{-1}(L) = \{ w \mid h(w) \in L \} is RE: the TM computes h(x)h(x) (a single computable step) and simulates MM on h(x)h(x), accepting if it does. These constructions exploit the computability of hh and simulation capabilities of TMs. In general, these proofs employ product TMs (simulating multiple machines on coordinated inputs) or dovetailing (interleaving simulations diagonally by total steps) to handle potentially non-halting computations without requiring decidability. Notably, RE languages are not closed under complement, as the complement of an RE language may not be RE, though full proofs of this limitation lie beyond the scope of closure affirmations here.

Non-closure Results

Recursively enumerable (RE) languages are not closed under complementation, meaning that if LL is RE, its complement L\overline{L} need not be RE. This failure of closure is a fundamental limitation arising from the semi-decidable nature of RE languages, where Turing machines recognize strings in the language by halting and accepting but may loop indefinitely on strings outside it. A canonical example is the halting problem, defined as the language H={M,wH = \{ \langle M, w \rangle \mid Turing machine MM halts on input w}w \}. The language HH is RE, as a Turing machine can simulate MM on ww and accept upon halting. However, its complement H={M,w\overline{H} = \{ \langle M, w \rangle \mid Turing machine MM does not halt on input w}w \} is not RE. This was originally demonstrated in the context of undecidable problems by Alan Turing in 1936. To see why closure under complement fails, consider the following proof by contradiction. Assume the class of RE languages is closed under complementation. For any RE language LL with recognizer MLM_L, the complement L\overline{L} would have a recognizer MLM_{\overline{L}}. To decide membership in LL on input xx, simulate MLM_L and MLM_{\overline{L}} in parallel using dovetailing. Exactly one will halt and accept, since xLx \in L or xLx \in \overline{L}, allowing a decision procedure that always halts. This would imply every RE language is recursive (decidable), contradicting the fact that HH is RE but not recursive. Thus, RE languages cannot be closed under complementation. These non-closure results underscore why RE languages model semi-decidability: membership can be verified positively but non-membership may be unverifiable due to potential non-halting computations, distinguishing them from the fully decidable recursive languages. The gaps prevent RE from coinciding with recursive languages and explain key undecidability phenomena, such as the inability to algorithmically determine non-halting behaviors across all inputs.

Comparative Analysis

Relation to Recursive Languages

Recursive languages, also known as decidable languages, are a proper of the recursively enumerable (RE) languages. A language is recursive if there exists a that accepts exactly the strings in the language and rejects all others, halting on every input—whether it is in the language or not. In contrast, for RE languages, the recognizing halts and accepts on strings in the language but may loop indefinitely on strings not in the language. This halting requirement for recursive languages ensures that membership can be definitively decided in finite time for all inputs. Every recursive language is RE, since a halting Turing machine for a recursive language can be modified to loop on rejecting inputs, thereby recognizing the same language in the RE sense. However, the converse does not hold: there exist RE languages that are not recursive. The canonical example is the halting problem, which consists of the set of pairs M,w\langle M, w \rangle where Turing machine MM halts on input ww; this language is RE because a universal Turing machine can simulate MM on ww and accept if it halts, but it is not recursive due to the undecidability of the halting problem. This strict inclusion demonstrates that while RE languages capture all computable recognitions, recursive languages impose the stronger condition of total computability. No can decide membership for all RE languages, as this would require solving non-trivial properties of RE languages, which is impossible by . states that any non-trivial semantic property of the RE languages—meaning a property that holds for some but not all RE languages—is undecidable. For instance, determining whether the language recognized by a given contains a particular or is empty is undecidable. This theorem underscores the boundary between decidability and semi-decidability in . A key distinction between RE and recursive languages lies in enumeration versus decision: RE languages can be enumerated by systematically simulating all Turing machines on all inputs using dovetailing, producing the strings in the language in some order without needing to decide non-membership. Recursive languages, however, support both enumeration and decisive membership testing due to their total halting behavior. This foundational insight traces back to Alan Turing's work, where he proved the undecidability of the , establishing the limits of recursive computation and introducing the concept of computable functions via Turing machines.

Position in Formal Language Hierarchy

Recursively enumerable (RE) languages occupy the apex of the , corresponding to Type-0 grammars, also known as unrestricted grammars, which impose no restrictions on production rules beyond the standard format of . These grammars can generate any RE language, encompassing all languages that can be recognized by a , potentially without halting on non-members. In contrast, the lower levels—Type-3 (regular), Type-2 (context-free), and Type-1 (context-sensitive)—feature progressively more constrained grammars that produce proper subsets of RE languages. This hierarchy, introduced by , establishes a containment structure where each class includes all languages from the levels below it, reflecting increasing expressive power aligned with computational models from finite automata to Turing machines. The inclusion chain in the is strict: regular languages are a proper of context-free languages, which are a proper of context-sensitive languages, which in turn are a proper of RE languages. Regular languages are generated by right-linear grammars and recognized by finite automata; context-free languages by context-free grammars and pushdown automata; and context-sensitive languages by context-sensitive grammars and linear bounded automata (LBAs). RE languages, however, require the full power of Turing machines with unbounded tape, allowing recognition of languages that may involve arbitrary computation lengths. This progression underscores how RE languages subsume all formal languages definable within the hierarchy, serving as the broadest class of effectively generatable languages. Context-sensitive languages (CSLs) form a significant subclass of RE languages, as every CSL is RE, but the converse does not hold due to the space restrictions in their recognizing automata. Specifically, CSLs are precisely the languages accepted by nondeterministic LBAs, which are Turing machines whose tape is bounded by a of the input , typically the input size itself plus endmarkers. In RE languages, Turing machines permit unbounded tape usage, enabling the acceptance of languages that demand exponential or superlinear space, such as certain undecidable problems' semidecidable variants. This distinction highlights RE languages' greater generality while maintaining inclusion within the recursive enumerable framework. Extensions beyond RE languages appear in higher computability structures, such as the hyperarithmetic hierarchy, which iterates the Turing jump along well-founded ordinals to define sets of higher descriptive complexity than RE sets. Oracle Turing machines, which access an external oracle for non-computable information, further generalize RE recognition to relative computability degrees, capturing languages outside the RE class. These constructs illustrate the boundaries of RE languages within broader recursion theory, where RE sets represent the baseline of semidecidability.

References

Add your contribution
Related Hubs
User Avatar
No comments yet.