Five units move from finite automata to regular expressions/languages, grammars and normal forms, pushdown automata/CFL properties, and Turing machines/decidability. Each unit keeps its own formal model and closure/decision relation.
1. Basic Concepts and Automata Theory
Recall anchor. Automaton = states + input alphabet + transition function + start + accept states. DFA has exactly one transition per symbol; NFA may have several or ε-moves.
Scored points.
- Alphabets, strings, and languages: alphabet is a finite symbol set, string is a finite sequence over , language ; is empty string.
- DFA is with ; a string is accepted if the unique run ends in .
- NFA allows ; acceptance means some path reaches an accepting state. DFA and NFA recognize the same regular languages.
- NFA to DFA conversion uses subset construction: DFA states are sets of NFA states; ε-closure includes states reachable by ε-transitions.
- Mealy and Moore machines produce output: Moore output depends on state, Mealy output depends on state and input; they are equivalent with possible state conversion.
- Minimization of DFA uses partition refinement/equivalence classes to merge indistinguishable states, producing a minimal DFA for the same language.
Formula strip.
Micro-example. For NFA states with -move , ε-closure()=. In subset construction this set becomes one DFA start state.
Examiner line. For FA questions, write the formal tuple, show transition table/diagram, trace the input string stepwise, and state accept/reject with the final state.
2. Regular Expressions and Languages
Recall anchor. Regular expressions, finite automata, and regular grammars describe the same class of languages. Use Arden's theorem or state elimination for RE conversion.
Scored points.
- Regular expressions use union (), concatenation, and Kleene star (); identities include , , , and .
- Thompson/standard constructions convert RE to ε-NFA; subset construction and minimization convert to DFA. Conversely, state elimination or Arden's theorem converts FA to RE.
- Arden's theorem: if and , then ; it solves regular equation systems from DFA transitions.
- Closure properties of regular languages: closed under union, intersection, complement, concatenation, star, reversal, difference, and homomorphism.
- Pumping Lemma for regular languages: for regular , any sufficiently long has , , and for all ; used to prove non-regularity.
- Decision properties: emptiness, finiteness, membership, equivalence, and containment are decidable for regular languages using DFA/automata algorithms.
Formula strip.
Micro-example. Equations: , . By Arden, and substitute into to get RE for strings accepted at .
Examiner line. For regular languages, state the RE/FA conversion method, apply Arden/pumping lemma with all conditions, and conclude regular or not regular explicitly.
3. Regular and Non-Regular Grammars
Recall anchor. CFG generates strings by productions; parse trees expose derivation structure and ambiguity. Normal forms standardize productions for parsing and proofs.
Scored points.
- Grammar is ; CFG productions have form where . Derivation can be leftmost or rightmost; language is .
- Ambiguity: a CFG is ambiguous if some string has two different parse trees (or two leftmost/rightmost derivations); ambiguity can cause multiple meanings in programming languages.
- Simplification of CFG removes useless symbols, unreachable symbols, ε-productions (as needed), and unit productions while preserving language (except possibly ε).
- Chomsky Normal Form (CNF): productions are or ; useful for CYK parsing and proofs. Greibach Normal Form (GNF): , .
- Regular grammars: right-linear or left-linear generate regular languages and convert to/from finite automata.
- Chomsky hierarchy: Type 3 regular, Type 2 context-free, Type 1 context-sensitive, Type 0 recursively enumerable; each lower type is properly contained in higher.
Formula strip.
Micro-example. Convert by removing ε/unit productions, then binarize/terminalize to get CNF like , .
Examiner line. For grammar questions, write the grammar tuple, show derivation/parse tree, perform simplification/normal-form steps in order, and state the generated language.
4. Push Down Automata and Properties of Context Free Languages
Recall anchor. PDA = finite control + input + stack. Nondeterministic PDA recognizes exactly context-free languages; deterministic PDA is weaker.
Scored points.
- PDA is ; transition may read input, pop/push stack, and change state. Acceptance by final state or empty stack is equivalent for NPDAs.
- NPDA can guess nondeterministically, making it suitable for CFLs like or palindromes; DPDA cannot recognize all CFLs.
- CFG to PDA: construct PDA that simulates leftmost derivation using stack; PDA to CFG: create variables representing state-stack-state paths.
- Pumping Lemma for CFL: for CFL , sufficiently long has , , and ; used to prove non-CFL.
- CFL closure: closed under union, concatenation, Kleene star, reversal, homomorphism, inverse homomorphism, intersection with regular language; not closed under intersection or complement in general.
- CFL decision properties: emptiness, membership (CYK/Earley), and finiteness are decidable; equivalence, containment, ambiguity, and universality are undecidable in general.
Formula strip.
Micro-example. For , PDA pushes for each , pops for each , and accepts when stack returns to . For , stack sequence: .
Examiner line. For PDA/CFL, define the machine or grammar, show stack moves or pumping decomposition, and explicitly state the closure/decision property used.
5. Turing Machines and Recursive Function Theory
Recall anchor. Turing machine models effective computation with finite control and unbounded tape. Some languages are recognizable but not decidable.
Scored points.
- TM is with ; it can read/write tape and move left/right, giving unrestricted computation power.
- TM variants (multi-tape, nondeterministic, multi-track, universal TM) are equivalent in computational power; they may differ in convenience or time but not decidability class.
- Recursive (decidable) languages have a TM that halts on all inputs; recursively enumerable (RE) languages have a TM that halts and accepts strings in the language but may loop otherwise.
- Church-Turing thesis: any effectively computable function is computable by a Turing machine; it is a thesis supported by equivalence of models, not a formal theorem.
- Halting problem is undecidable: no algorithm can decide for all TM-input pairs whether the TM halts. Reduction from halting problem proves other undecidability results.
- Post Correspondence Problem (PCP) is undecidable; Rice's theorem states non-trivial semantic properties of RE language descriptions are undecidable.
Formula strip.
Micro-example. Halting reduction: assume decides halting; build that loops if halts else halts. Then creates contradiction, so cannot exist.
Examiner line. For TM/undecidability, write the transition or reduction clearly, state whether machine halts on all inputs, and conclude decidable, RE, or undecidable with reason.
Memory map
%%{init: {'theme': 'base', 'look': 'handDrawn', 'themeVariables': {'fontFamily': "'Nunito', sans-serif", 'fontSize': '17px', 'primaryColor': '#EFEAD6', 'primaryBorderColor': '#0F766E', 'lineColor': '#23211C'}}}%%
flowchart LR
U1["U1: Basic Concepts and Automata Theory"] --> U1a["DFA/NFA, epsilon-closure"] --> U1b["Moore/Mealy, minimization"]
U1b --> U2["U2: Regular Expressions and Languages"] --> U2a["RE<->FA, Arden"] --> U2b["Pumping lemma, closure"]
U2b --> U3["U3: Regular and Non-Regular Grammars"] --> U3a["CFG, derivation, ambiguity"] --> U3b["CNF/GNF, Chomsky hierarchy"]
U3b --> U4["U4: Push Down Automata and Properties of Context Free Languages"] --> U4a["PDA stack moves"] --> U4b["CFL pumping/closure/decision"]
U4b --> U5["U5: Turing Machines and Recursive Function Theory"] --> U5a["TM transitions, variants"] --> U5b["Halting, PCP, decidability"]
Rapid recall
- U1 Basic Concepts and Automata Theory — DFA has deterministic transitions; NFA/ε-NFA convert by subset construction; minimize by equivalent-state partitioning.
- U2 Regular Expressions and Languages — Arden: ; regular languages closed under union/intersection/complement; use pumping lemma for non-regularity.
- U3 Regular and Non-Regular Grammars — CFG: ; remove useless/ε/unit productions; CNF , GNF .
- U4 Push Down Automata and Properties of Context Free Languages — PDA uses stack for CFLs; CFLs not closed under intersection/complement; membership decidable, equivalence undecidable.
- U5 Turing Machines and Recursive Function Theory — TM may loop; recursive halts always, RE may not; halting problem and PCP are undecidable.
Final-answer checklist (BCS402)
- Write the formal model first: FA tuple, RE equation, grammar, PDA tuple, or TM transition.
- For conversions, show intermediate steps (ε-closure/subset table, Arden equations, simplification order, stack moves).
- For pumping lemma proofs, state , choose string, split into required parts, pump , and show contradiction.
- For closure/decision questions, name the property and give a one-line justification or counterexample.
- End by stating acceptance/rejection, generated language, normal form, or decidability class clearly.