Recursive language: Difference between revisions

Content deleted Content added
please use the preview button.. and don't mix up disambiguation and definition.
Minor- punctuation changed 'which' to 'that' for U.S. readers (makes no difference in UK, etc.)
Line 1:
{{About|a class of formal languages as they are studied in mathematics and theoretical computer science|computer languages that allow a function to call itself recursively |Recursion (computer science)}}
 
In [[mathematics]], [[logic]] and [[computer science]], a [[formal language]] (a [[set (mathematics)|set]] of finite sequences of [[symbol (formal)|symbol]]s taken from a fixed [[alphabet (computer science)|alphabet]]) is called '''recursive''' if it is a [[recursive set|recursive subset]] of the set of all possible finite sequences over the alphabet of the language. Equivalently, a formal language is recursive if there exists a [[total Turing machine]] (a [[Turing machine]] whichthat halts for every given input) whichthat, when given a finite sequence of symbols w from the alphabet of the language as input (any string containing only characters in the language's alphabet) accepts only those whichthat are part of the language and rejects all other strings. Recursive languages are also called '''decidable'''.
 
The concept of '''decidability''' may be extended to other [[models of computation]]. For example one may speak of languages decidable on a [[non-deterministic Turing machine]]. Therefore, whenever an ambiguity is possible, the synonym for "recursive language" used is '''Turing-decidable language''', rather than simply "''decidable"''.
 
The class of all recursive languages is often called '''[[R (complexity)|R]]''', although this name is also used for the class [[RP (complexity)|RP]].
Line 14:
 
# A recursive formal language is a [[recursive set|recursive]] [[subset]] in the [[set (mathematics)|set]] of all possible words over the [[alphabet]] of the [[formal language|language]].
# A recursive language is a formal language for which there exists a [[Turing machine]] which willthat, when presented with any finite input [[literal string|string]], halthalts and accept if the string is in the language, and halthalts and rejectrejects otherwise. The Turing machine always halts;: it is known as a [[Machine that always halts|decider]] and is said to ''decide'' the recursive language.
 
By the second definition, any [[decision problem]] can be shown to be decidable by exhibiting an [[algorithm]] for it that terminates on all inputs. An [[undecidable problem]] is a problem that is not decidable.