Theory of Computation · Week 1
Formula and rules card
Transition, language and proof rules for Week 1.
Finite automata and regular languages
- DFA
- Exactly one next state per state and input symbol. Start at q₀, consume every symbol and accept if the last state is in F. On ε, test q₀.
- Remainder
- Binary value modulo m updates r to (2r+b) mod m on bit b. Unary length updates r to (r+1) mod m.
- Product and inclusion
- Move both coordinates on the same symbol. Accepting/rejecting reachable pairs refute inclusion. Strict inclusion requires an inclusion proof and an extra word on the larger side.
- Regular operations
- A ∪ B chooses either, AB = {xy | x ∈ A and y ∈ B}, and A* forms concatenations of zero or more strings from A. A⁰ = {ε}, ∅* = {ε}, and ∅≠{ε}.
- Closure and finiteness
- Regular languages are closed under union, concatenation, star, intersection, complement and difference. Every finite language is regular. For any L and finite F, L ∩ F is finite. Adding or removing finitely many words preserves regularity status.
- NFA and ε-closure
- Use the states reachable by zero or more ε-moves before the first symbol and after each move. Accept if the final set intersects F. One complete accepting path suffices.
- Subset construction
- Start at E({q₀}). On a, move from S to E(⋃q∈S δ(q,a)). A reachable ∅ loops on all input. An n-state NFA gives a DFA with at most 2n states. A q-state DFA is already a q-state NFA with singleton transitions.
- Regular expressions
- Star binds before concatenation, which binds before union. Eliminate k by using new Rij = Rij + Rik(Rkk)*Rkj. If a starred language contains a nonempty word u, the lengths of uk grow without bound.
- Overlapping occurrences
- Count every starting position. For |w| ≥ 2, #₁₁₀(w) − #₀₁₁(w) = I(first pair) − I(last pair), where I tests for 11.
- Pumping lemma
- For regular L, there is a p so every w ∈ L of length at least p has a split xyz with |xy| ≤ p and |y| ≥ 1, and xyiz ∈ L for every i ≥ 0. To disprove regularity, choose w using p and break the rule for every allowable split.
- Memory hook
- Name what the state remembers. For a language claim, find a machine, a cut, or a witness.
Sipser, Introduction to the Theory of Computation, §1.1–1.4.