The hierarchy of language classes
The whole course, on one picture. Each ring is a class of languages and a kind of machine, and each contains the one inside it — every regular language is context-free, every context-free language is recursive, and so on outwards. What makes it a course rather than a diagram is that every containment is proper, and the proof of each is a separate technique: the pumping lemma of §4.1 pushes a language out of the innermost ring, the pumping lemma of §7.2 pushes it out of the next, and diagonalization pushes Ld out of them all.
Open a ring for its machine, its grammar, what it is closed under, its pumping lemma and what can be decided about it. The languages plotted in each ring link to the page that proves they belong there.
How to place a language you have been given
- Try to build a finite automaton or a regular expression. If one works, it is regular and you are finished — draw it.
- If it will not, try the pumping lemma for regular languages: pick the adversary’s side and see whether every split can be broken. Play it out.
- Try a context-free grammar or a pushdown automaton. One counter’s worth of memory is what a stack buys you, so 0ⁿ1ⁿ works and aⁿbⁿcⁿ does not. Write the grammar or run the PDA.
- If that fails, use the pumping lemma for context-free languages — the one that splits a string five ways (§7.2.2). Same game, CFL variant.
- Beyond that, the question is whether a Turing machine can decide it, merely accept it, or neither. That is Chapter 9, and the answers come from reductions rather than from constructions.