Professional Documents
Culture Documents
Recursive languages
A recursive language is a formal language for which there exists a Turing machine (or other
computable function) that will always halt and accept when presented with any string in the
language as input, and will always halt and reject when presented with a string not in the language.
In other words, a recursive language is a language that can be decided by a Turing machine.
Recursive languages are also called 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.
Recursively enumerable languages
A recursively enumerable language is a formal language for which there exists a Turing machine (or
other computable function) that will enumerate all valid strings of the language. In other words, a
recursively enumerable language is a language that can be generated by a Turing machine.
Recursively enumerable languages are also 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.
Relationship between recursive and recursively enumerable languages
Every recursive language is also recursively enumerable. However, not every recursively
enumerable language is recursive. In other words, the class of recursive languages is a subset of the
class of recursively enumerable languages.
The difference between recursive and recursively enumerable languages is that a recursive language
must have a Turing machine that always halts, while a recursively enumerable language only needs
to have a Turing machine that halts when presented with a string in the language.
Examples of recursive languages
The set of all positive integers.
The set of all strings over the alphabet {0, 1} that are divisible by 2.
The set of all palindromes.
Examples of recursively enumerable languages
The set of all halting Turing machine programs.
The set of all true theorems of propositional logic.
The set of all Gödel numbers.
Explain FSM
finite-state machines (FSMs), also known as finite-state automata (FSA), play a crucial role as
fundamental models of computation. These abstract machines, introduced by Warren McCulloch
and Walter Pitts in 1943, represent a simplified model of computation that can be used to recognize
patterns or sequences of symbols.