A hierarchy of languages in terms of the power of the machine needed to recognize (parse) them and the complexity of the grammar that describes them:
Type 3: recognized by Finite State Automaton, Described by Regular Expressions and right linear grammars. Note that the programming construct commonly referred to by the name Regular Expressions are not equivalent to a true Regular Expression; the construct that came out of various Unix tools (sed, etc.) and is now commonplace in Perl Language and other programming languages, can handle many grammars which are Type 2 and Type 1.
Type 2: Context Free recognized by Push Down Automaton (that is, an non-deterministic Finite State Automaton with a stack), described by Backus Naur Form type grammars. There are many sub-categories of Type 2 grammars; a non-deterministic Push Down Automaton is more powerful than (that is, can recognize more languages than) a deterministic Push Down Automaton. On the other hand, a non-deterministic Finite State Automaton is not more powerful than a deterministic Finite State Automaton; nor is a non-deterministic Turing Machine more powerful than a deterministic Turing Machine.
Type 1: Context-sensitive recognized by linear bound Turing Machine, described by grammars that include the context in the Left Hand Side of the definitions
Type 0: Recursively enumerable, that needs a Turing Machine, described by really horrible grammars:-( /Ahem: These are described by a Phrase Structure Grammar.)
And there are languages which are are not Recursively Enumerable; there is no computational model (which we can build or approximate) which can recognize such a language. Also, if a set is not denumerable, can it fall under the definition of a language?
See also Noam Chomsky
See original on c2.com ![]()