You are on page 1of 11

Welcome To

Computer Science HUB


Chomsky Hierarchy
Chomsky Classification of languages
Noam Chomsky classified grammars and their generated languages
into different types known as Chomsky Hierarchy
The 4 types of languages are
Type 0 language – Recursively enumerable language
Type 1 language – Context sensitive language
Type 2 language – Context free language
Type 3 language – Regular language
Chomsky Hierarchy
Type 0 Languages
Also known as Recursively Enumerable languages
These languages are generated by type 0 grammars or unrestricted
grammars(Phrase structured grammars)
Their production rule is of the form
α→β , α ≠ ε
Where α & β are strings of terminals or non terminals
These languages are recognised using Turing machine
Type 1 Languages
Also known as Context Sensitive languages
These languages are generated by type 1 grammars or Context
Sensitive grammars
Their production rule is of the form
α→β , α ≠ ε , | β | ≥ | α |
Where α & β are strings of terminals or non terminals
This language includes any strings of terminals and non terminals
where length of strings on the right side must be grater than or equal
to length of strings on the left side
These languages are recognised using Linear Bounded automata
Type 1 Grammar
Ex: S→ AB
A→a |Ac
B→ b
S→ AB
S→ AcB
S→ acB
S→ acb
Generated string is acb
Type 2 Languages
Also known as Context free languages
These languages are generated by type 2 grammars or Context free
grammars
Their production rule is of the form
A→α
Where α is arbitrary strings of grammar symbols and left side is a
single non terminal
These languages are recognised using Push Down Automata(PDA)
Type 3 Languages
Also known as Regular languages
These languages are generated by type 3 grammars or Regular
grammars and described using Regular Expressions
These are the most specific languages and is the smallest subset of
all the languages
Their production rule is of the form
A→a
A→a β
Where β is strings of terminals or non terminals
A – Non terminal
a- Terminal
These languages are recognised using Finite State Automata(FSA)
α & β are strings of terminals or non terminals
A →Strings of non terminals
a→Strings of terminals
Thank you!!

You might also like