Chomsky Hierarchy
Chomsky Hierarchy
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:
1. Type 0 known as Unrestricted Grammar.
2. Type 1 known as Context Sensitive Grammar.
3. Type 2 known as Context Free Grammar.
4. Type 3 Regular Grammar.
This is a hierarchy. Therefore every language of type 3 is also of type 2, 1 and 0. Similarly,
every language of type 2 is also of type 1 and type 0, etc.
Type 0: Unrestricted Grammar:
Type-0 grammars include all formal grammar. Type 0 grammar languages are
recognized by turing machine. These languages are also known as the Recursively
Enumerable languages.
Grammar Production in the form of where
is ( V + T)* V ( V + T)*
V : Variables
T : Terminals.
is ( V + T )*.
In type 0 there must be at least one variable on the Left side of production.
For example:
Sab --> ba
A --> S
For Example:
S --> AB
AB --> abc
B --> b
.
For example:
S --> AB
A --> a
B --> b
For example:
S --> a
For example :
S --> ab