Four language classes, nested by expressive power.
| Type | Language Class | Production Form | Accepting Device |
|---|
| 3 | Regular | A→aB, A→a | Finite automaton |
| 2 | Context-free | A→α | Pushdown automaton |
| 1 | Context-sensitive | α→β, ∣β∣≥∣α∣, α has non-terminal | Linear-bounded automaton |
| 0 | Recursively enumerable | α→β, α has non-terminal | Turing machine |
Each type is a strict subset of the type below it.
Type 3 ⊊ Type 2 ⊊ Type 1 ⊊ Type 0
Not all languages are RE. Proven by counting: ∣languages∣>∣TMs∣ (languages are uncountable, TMs are countable).
Closure Properties
| Operation | Regular | CFL | CSL | RE |
|---|
| Union | Yes | Yes | Yes | Yes |
| Concatenation | Yes | Yes | Yes | Yes |
| Kleene star | Yes | Yes | Yes | Yes |
| Intersection | Yes | No | Yes | Yes |
| Complement | Yes | No | Yes | No |
| Difference | Yes | No | Yes | No |