What is Chomsky hierarchy of grammar?
Moreover, what are the types of grammar in Chomsky hierarchy?
According to Chomsky hierarchy, grammars are divided of 4 types: Type 0 known as unrestricted grammar. Type 1 known as context sensitive grammar. Type 2 known as context free grammar.
Grammar Type | Grammar Accepted | Automaton |
---|---|---|
Type 0 | Unrestricted grammar | Turing Machine |
Type 1 | Context-sensitive grammar | Linear-bounded automaton |
Type 2 | Context-free grammar | Pushdown automaton |
Type 3 | Regular grammar | Finite state automaton |
Similarly, what is Chomsky grammar?
Chomsky Hierarchy represents the class of languages that are accepted by the different machine. The category of language in Chomsky's Hierarchy is as given below: Type 0 known as Unrestricted Grammar. Type 1 known as Context Sensitive Grammar. Type 2 known as Context Free Grammar.
As Tim said, unrestricted grammars are more powerful. In fact, they can generate the whole class of recursively enumerable (R.E.) languages, i.e., those that are accepted by Turing machines.