Enumerator (computer science)
An enumerator is a Turing machine with an attached printer.[src] The Turing machine can use that printer as an output device to print strings.[src] Every time the Turing machine wants to add a string to the list, it sends the string to the printer.[src] Enumerator is a type of Turing machine variant and is equivalent with Turing machine.[src]
An enumerator is a Turing machine with an attached printer.[src] The Turing machine can use that printer as an output device to print strings.[src] Every time the Turing machine wants to add a string to the list, it sends the string to the printer.[src] Enumerator is a type of Turing machine variant and is equivalent with Turing machine.[src] ==Formal definition== An enumerator E can be defined as a 2-tape Turing machine (Multitape Turing machine where k=2 ) whose language is \empty .[src] Initially, E receives no input, and all the tapes are blank (i.e., filled with blank symbols).[src] Newly defined symbol \#\in \Gamma\land\#\notin \Sigma is the delimiter that marks end of an element of S .[src] The second tape can be regarded as the printer, strings on it are separated by \# .[src] The language enumerated by an enumerator E denoted by L(E) is defined as set of the strings on the second tape (the printer).[src] ==Equivalence of Enumerator and Turing Machines== A language over a finite alphabet is Turing Recognizable if and only if it can be enumerated by an enumerator.[src] This shows Turing recognizable languages are also recursively enumerable.[src] Proof A Turing Recognizable language can be Enumerated by an Enumerator Consider a Turing Machine M and the language accepted by it be L(M) .[src] Since the set of all possible strings over the input alphabet \Sigma i.e.[src] the Kleene Closure \Sigma^{*} is a countable set, we can enumerate the strings in it as s_{1},s_{2},\dots ,s_{i}, etc.[src] Then the Enumerator enumerating the language L(M) will follow the steps: 1 for i = 1,2,3,...[src] 2 Run M with input strings s_{1}, s_{2}, \dots, s_{i} for i -steps 3 If any string is accepted, then print it.[src] Now the question comes whether every string in the language L(M) will be printed by the Enumerator we constructed.[src] For any string w in the language L(M) the TM M will run finite number of steps(let it be k for w ) to accept it.[src] Then in the k -th step of the Enumerator w will be printed.[src] Thus the Enumerator will print every string M recognizes but a single string may be printed several times.[src] An Enumerable Language is Turing Recognizable It's very easy to construct a Turing Machine M that recognizes the enumerable language L .[src] We can have two tapes.[src] On one tape we take the input string and on the other tape, we run the enumerator to enumerate the strings in the language one after another.[src] Once a string is printed in the second tape we compare it with the input in the first tape.[src] If it's a match, then we accept the input, otherwise we continue.[src] Note that if the string is not in the language, the turing machine will never halt, thus rejecting the string.[src]
30 sentences · 30 cited inline · 0 references stored
References
No reference rows published for this article.
Cite this article
MLA
"Enumerator (computer science)." encyclopegia.org, 2026, https://encyclopegia.org/wiki/enumerator-computer-science. Accessed 03 December 2026.
Chicago
"Enumerator (computer science)." encyclopegia.org. Accessed December 3, 2026. https://encyclopegia.org/wiki/enumerator-computer-science.
APA
encyclopegia.org. (2026). Enumerator (computer science). Retrieved December 3, 2026, from https://encyclopegia.org/wiki/enumerator-computer-science
Accessed December 3, 2026 · CC BY-SA 4.0 · citation page · JSON