Four language classes, nested by expressive power.
| Type | Language Class | Production Form | Accepting Device |
|---|---|---|---|
| 3 | Regular | , | Finite automaton |
| 2 | Context-free | 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.
Not all languages are RE. Proven by counting: (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 |