TIMED REVISION · 1-MINUTE PANIC SHEETS

Theory of Computation 10-Minute Rapid Revision

For the last few minutes before the exam hall: one core rule per topic, the formulas you must remember, and the traps that cost marks.

PANIC SHEET 01 · Finite Automata, DFA Minimization & State Equivalence

DFA Construction, NFA Conversion & Minimization

Full Lesson →
CORE INVARIANT ANCHOR:

“A DFA has exactly one transition per symbol per state; Myhill-Nerode merges indistinguishable states where delta*(p, w) and delta*(q, w) have identical acceptance outcomes.”

Must-Remember Principles:
  • —DFA 5-tuple: M = (Q, Sigma, delta, q_0, F); delta: Q x Sigma -> Q.
  • —NFA to DFA: Maximum possible states in equivalent DFA = 2^n for an n-state NFA.
  • —Modulo k Divisibility: Binary numbers divisible by k require exactly k states.
  • —DFA Minimization: Table-filling algorithm identifies distinguishable pairs in O(|Sigma| * |Q|^2).
Critical Exam Pitfalls:
  • —Never omit the dead trap state when counting DFA states! An NFA may simply omit invalid transitions, but a DFA must explicitly route them to a non-accepting dead state.
PANIC SHEET 02 · Finite Automata, DFA Minimization & State Equivalence

Regular Expressions, Arden's Theorem & State Elimination

Full Lesson →
CORE INVARIANT ANCHOR:

“Arden's Theorem solves R = Q + RP with unique solution R = QP* provided epsilon is not in P; state elimination removes intermediate states by creating bypass composite paths.”

Must-Remember Principles:
  • —Arden's Equation: R = Q + RP ==> R = QP*.
  • —If R = Q + PR ==> R = P*Q.
  • —State Elimination: Bypassing state k creates edge R_ij = R_ij + R_ik (R_kk)* R_kj.
  • —Thompson's Construction: Translates any regular expression into an epsilon-NFA with O(|r|) states.
Critical Exam Pitfalls:
  • —Check that epsilon is not in P before claiming a unique solution with Arden's theorem; if epsilon is in P, R = QP* is still a solution, but it is not unique.
PANIC SHEET 03 · Regular Language Properties & Pumping Lemma

Pumping Lemma & Closure Properties of Regular Languages

Full Lesson →
CORE INVARIANT ANCHOR:

“Regular Pumping Lemma partitions s = xyz with |xy| <= p and |y| > 0; regular languages are closed under virtually all standard operations including complement, intersection, and reversal.”

Must-Remember Principles:
  • —Pumping conditions: |xy| <= p, |y| >= 1, x y^i z in L for all i >= 0.
  • —Pump down: i = 0 (removes y); Pump up: i = 2 (duplicates y).
  • —Regular languages are closed under: Union, Intersection, Complement, Difference, Concatenation, Star, Reversal, Homomorphism, Inverse Homomorphism.
  • —If L is regular, then Prefixes(L), Suffixes(L), and Substrings(L) are all regular.
Critical Exam Pitfalls:
  • —The Pumping Lemma cannot be used to prove a language IS regular (it is necessary, not sufficient). Use DFA construction or regular expressions to prove regularity.
PANIC SHEET 04 · Regular Language Properties & Pumping Lemma

Decision Properties & Algorithms for Regular Languages

Full Lesson →
CORE INVARIANT ANCHOR:

“All standard decision questions for regular languages (Membership, Emptiness, Finiteness, Equivalence, Subset, Totality) are completely DECIDABLE.”

Must-Remember Principles:
  • —Membership w in L: Trace on DFA in O(|w|).
  • —Emptiness L = 0: Check if any final state is reachable from start state in O(V+E).
  • —Finiteness: Check for cycles on paths between start state and final states.
  • —Equivalence L1 = L2: Test if (L1 ∩ L2') ∪ (L1' ∩ L2) is empty.
Critical Exam Pitfalls:
  • —While equivalence is decidable for Regular languages, equivalence is UNDECIDABLE for Context-Free Languages!
PANIC SHEET 05 · Context-Free Grammars, Ambiguity & Pushdown Automata

CFG Derivations, Ambiguity Proofs & Chomsky Normal Form

Full Lesson →
CORE INVARIANT ANCHOR:

“A CFG is ambiguous if some string has >= 2 distinct leftmost derivations; in CNF (A -> BC or A -> a), deriving a string of length n takes exactly 2n - 1 steps.”

Must-Remember Principles:
  • —CNF form: A -> BC or A -> a.
  • —CNF Derivation Steps: 2n - 1 steps for string of length n.
  • —Testing ambiguity is UNDECIDABLE for general CFGs.
  • —CYK Algorithm parses any string of length n in O(n^3 * |P|) time using dynamic programming on CNF grammars.
Critical Exam Pitfalls:
  • —Remember that the start symbol can derive epsilon (S -> epsilon) only if epsilon is in the language, in which case S cannot appear on the right side of any production in CNF.
PANIC SHEET 06 · Context-Free Grammars, Ambiguity & Pushdown Automata

Pushdown Automata (PDA), DPDA vs NPDA & Acceptance Modes

Full Lesson →
CORE INVARIANT ANCHOR:

“DPDA is strictly less powerful than NPDA; DCFL is closed under complement but not union; CFL is closed under union but not complement.”

Must-Remember Principles:
  • —PDA 7-tuple: M = (Q, Sigma, Gamma, delta, q_0, Z_0, F).
  • —Acceptance by Final State == Acceptance by Empty Stack for NPDA.
  • —DCFL is closed under: Complement, Intersection with Regular, Inverse Homomorphism.
  • —CFL is closed under: Union, Concatenation, Kleene Star, Reversal, Homomorphism.
  • —Neither DCFL nor CFL is closed under intersection.
Critical Exam Pitfalls:
  • —Do not assume palindromes are always non-deterministic: w c w^R has an explicit center marker and is easily recognized by a deterministic PDA.
PANIC SHEET 07 · CFL Pumping Lemma & Decision Algorithms

Pumping Lemma for CFLs & Non-Context-Free Proofs

Full Lesson →
CORE INVARIANT ANCHOR:

“CFL Pumping partitions s = uvxyz with |vxy| <= p and |vy| >= 1; for CFGs, Emptiness, Finiteness, and Membership are Decidable, but Equivalence and Universality are Undecidable.”

Must-Remember Principles:
  • —CFL Pumping conditions: |vxy| <= p, |vy| >= 1, u v^i x y^i z in L for all i >= 0.
  • —Classic Non-CFLs: a^n b^n c^n, a^n b^n c^n d^n, w w, a^(n^2), a^prime.
  • —Decidable for CFG: Membership, Emptiness, Finiteness.
  • —Undecidable for CFG: Equivalence, Universality (L = Sigma*), Inclusion, Disjointness, Ambiguity.
Critical Exam Pitfalls:
  • —Do not confuse grammar ambiguity with language inherent ambiguity: a language may have an ambiguous grammar yet still be unambiguous if an alternative unambiguous grammar exists.
PANIC SHEET 08 · Turing Machines, Computability & Rice's Theorem

Turing Machines, Undecidability & Rice's Theorem

Full Lesson →
CORE INVARIANT ANCHOR:

“A language is Recursive iff both it and its complement are RE; any non-trivial semantic property of the language of a TM is undecidable by Rice's theorem.”

Must-Remember Principles:
  • —Recursive (REC): Decider halts on ALL inputs (never loops).
  • —Recursively Enumerable (RE): TM halts and accepts on valid inputs; may loop on invalid inputs.
  • —Halting Problem is RE but NOT Recursive; its complement is NOT RE.
  • —Rice's Theorem applies to ANY non-trivial semantic property of L(M).
  • —Syntactic properties of M (state count, step bounds) are DECIDABLE.
Critical Exam Pitfalls:
  • —Do not apply Rice's theorem to questions about whether M halts on a specific input string w (that is the Halting Problem directly, not a pure language property).
PANIC SHEET 09 · Turing Machines, Computability & Rice's Theorem

Mapping Reductions, Post Correspondence Problem & Chomsky Hierarchy

Full Lesson →
CORE INVARIANT ANCHOR:

“In reduction A <=_m B: if B is decidable, A is decidable; if A is undecidable, B is undecidable; PCP is undecidable for alphabet size >= 2.”

Must-Remember Principles:
  • —A <=_m B: Decidability flows LEFT (B decidable => A decidable).
  • —A <=_m B: Undecidability flows RIGHT (A undecidable => B undecidable).
  • —PCP over unary alphabet (|Sigma| = 1) is DECIDABLE.
  • —Chomsky Hierarchy: Type 3 (Regular) ⊂ Type 2 (CFL) ⊂ Type 1 (CSL) ⊂ Recursive ⊂ Type 0 (RE).
  • —Context-Sensitive Languages (Type 1) are recognized by Linear Bounded Automata (LBA) and are completely DECIDABLE.
Critical Exam Pitfalls:
  • —Context-Sensitive Languages are recursive (decidable). Do not confuse CSL with Recursively Enumerable languages.