Chomsky Hierarchy

2 min read Last updated Sat Jun 27 2026 08:46:52 GMT+0000 (Coordinated Universal Time)

Four language classes, nested by expressive power.

TypeLanguage ClassProduction FormAccepting Device
3RegularAaBA \to aB, AaA \to aFinite automaton
2Context-freeAαA \to \alphaPushdown automaton
1Context-sensitiveαβ\alpha \to \beta, βα\lvert \beta \rvert \geq \lvert\alpha\rvert, α\alpha has non-terminalLinear-bounded automaton
0Recursively enumerableαβ\alpha \to \beta, α\alpha has non-terminalTuring machine

Each type is a strict subset of the type below it.

Type 3  Type 2  Type 1  Type 0\text{Type 3 }\subsetneq\text{ Type 2 }\subsetneq\text{ Type 1 }\subsetneq\text{ Type 0}

Not all languages are RE. Proven by counting: languages>TMs|\text{languages}| > |\text{TMs}| (languages are uncountable, TMs are countable).

Closure Properties

OperationRegularCFLCSLRE
UnionYesYesYesYes
ConcatenationYesYesYesYes
Kleene starYesYesYesYes
IntersectionYesNoYesYes
ComplementYesNoYesNo
DifferenceYesNoYesNo
Was this helpful?