Regular languages and finite automata
A DFA has exactly one transition per state per symbol; an NFA may have multiple or none. Both recognize the same class of languages: regular languages. Regular expressions, DFAs, and NFAs are equivalent in power. Closure properties: regular languages are closed under union, intersection, complement, and concatenation.
Check yourself: Does your DFA have a transition for every symbol in every state?
Pumping lemma for regular languages
To prove a language L is not regular: assume L is regular, then for any pumping length p chosen by the adversary, find a string w in L with |w| ≥ p such that every valid decomposition xyz (with |xy| ≤ p, |y| ≥ 1) produces some xy^i z not in L. The string choice is yours; the decomposition is the adversary's.
Check yourself: Have you shown the failure for every valid decomposition, not just one?
Context-free grammars and pushdown automata
A CFG generates strings through productions from a start symbol. A language is context-free if and only if some PDA recognizes it. CFLs are closed under union, concatenation, and Kleene star, but not under intersection or complement. Ambiguity means more than one parse tree for some string.
Check yourself: Can you derive the same string via two distinct leftmost derivations?
Turing machines and decidability
A Turing machine can read, write, and move on an unbounded tape. A language is decidable if some TM halts on every input and correctly accepts or rejects. A language is recognizable (recursively enumerable) if some TM accepts every member, but may loop on non-members. Decidable languages are closed under complement.
Check yourself: Does the machine halt on every input, or only on members of the language?
Undecidability and reductions
The halting problem is undecidable: no TM can decide whether an arbitrary TM halts on a given input. Reductions prove undecidability: if deciding L would let you decide a known undecidable problem, then L is also undecidable. The reduction must transform instances correctly in both directions.
Check yourself: Does your reduction map yes-instances to yes-instances and no-instances to no-instances?