Type 0 > Type 1 > Type 2 > Type 3 


Unrestricted Grammar > Context Sensitive Grammar > Context Free Grammar > Regular Grammar.


Power of Language which is generated by above grammer:

Recursive Enumerable > Recursive > Context Sensitive > Context Free > Regular 


Power of the machine: 

TM > LBA > PDA > F.A.


Type 0 or Unrestricted Grammar is superset of all grammars. 

Context-Sensitive Grammar ⊆ Unrestricted Grammar 

Context-Free Grammar ⊆ Context Sensitive Grammar

Regular Grammar ⊆ Context-Free Grammar


Important points: (This concept is very important to solve problems regarding grammar identification)


  • All given grammar is Unrestricted Grammar.
  • If a grammar is context-sensitive then it is Unrestricted Grammar also,

Context Sensitive Grammar → Unrestricted Grammar.          [→ Implies]

  • If a grammar is context-free then it is all upper-level grammar also like context-sensitive and unrestricted.

Context Free Grammar → Context Sensitive Grammar → Unrestricted Grammar.

  • Same way if a grammar is a upper-level regular grammar then it is all upper level grammar also because regular grammar is the smallest subset of the whole grammar family.

Regular Grammar → Context Free → Context Sensitive → Unrestricted Grammar.

But Opposite is not true because if P → Q is true then Q → P is not necessarily true.

At that same time P → Q ≈ Q′→ P′


For example:  If a grammar is not a context free grammar then obviously it is not a regular grammar also.

(Context Free Grammar)' → (Regular Grammar)′