Theory of Automata and Formal Languages (BCS402) Important Questions
AKTU B.Tech · 2nd Year · Exam 2026-27. Worked out from 13 real papers, 2017-18 to 2025-26.
- 13AKTU papers analysed
- 28must-do topics
- 23repeated 2-mark questions
The PDF has every topic with the years it came, a unit-wise plan and the sources. Free. Share it with your class.
Most likely question in each unit
| Unit | Most likely | Backup topics |
|---|---|---|
| 1Finite automata: DFA, NFA, ε-NFA, NFA → DFA, Moore & Mealy machines, minimisation | DFA/NFA design for a string pattern (9/13) or NFA → DFA / minimisation (2023-24 and 2024-25 BCS402) | DFA for divisibility · Moore ↔ Mealy conversion or Moore machine design |
| 2Regular expressions: Kleene's theorem, Arden's theorem, pumping lemma, closure & decision properties | Arden's theorem: FA → RE (9/13, all 3 BCS402 papers) | Pumping lemma: a^p (p prime) / aⁿb²ⁿ not regular · closure properties |
| 3CFG: derivations, ambiguity, regular grammars, simplification, CNF, GNF, Chomsky hierarchy | CNF or GNF conversion (CNF 5/13, GNF 6/13) | Ambiguity with parse trees · CFG for 0ᵐ1ⁿ (m ≠ n) / aᵖbᵠcʳ · simplification |
| 4PDA: NPDA, DPDA, CFG ↔ PDA, two-stack PDA, pumping lemma & closure of CFL | PDA design: wwᴿ / aⁿbⁿ / aⁿb²ⁿ (12/13) | CFG → PDA · PDA → CFG · two-stack PDA for aⁿbⁿcⁿ · DPDA vs NPDA |
| 5Turing machines: design, TM variants, UTM, LBA, Church's thesis, recursive/RE languages, halting problem, PCP | Turing machine design: aⁿbⁿcⁿ / a²ⁿbⁿ / 0²ⁿ (12/13) | PCP instance / undecidability · Universal TM · TM for f(n) = 2n, n+1 |
Must-do topics
These came in most of the 13 papers. Prepare them first.
Pumping lemma for regular languages (and pigeonhole principle)
came in 12 of 13 papersUnit 2 · 2017-18 to 2025-26
How to answer: State the lemma (w = xyz, |xy| ≤ n, |y| ≥ 1, xyⁱz ∈ L ∀ i). Proof by contradiction: pick w depending on n, consider every possible y, pump to i = 0 or 2 and show the string leaves L. Practise aⁿbⁿ, a^p (p prime), aⁿb²ⁿ. Pigeonhole principle is the reason the lemma works.
Last asked (2025-26, Section B): Using the pumping lemma, show that L = {aⁿb²ⁿ | n ≥ 1} is not a regular language.
PDA design for a language (wwᴿ, wcwᴿ, aⁿbⁿ, aⁿb²ⁿ, palindromes)
came in 12 of 13 papersUnit 4 · 2017-18 to 2025-26
How to answer: Give the 7-tuple, transition function, transition diagram and the ID (instantaneous description) trace for one string. aⁿbⁿ: push a, pop on b. aⁿb²ⁿ: push two symbols per a. wwᴿ: push, guess the middle with an ε-move, then pop-match (needs non-determinism). State acceptance by final state vs empty stack.
Last asked (2025-26 (carry-over), Section A): What is Pushdown Automaton (PDA)?
Turing machine design for a language (aⁿbⁿcⁿ, aⁿbⁿ, wwᴿ, ww, wcw)
came in 12 of 13 papersUnit 5 · 2017-18 to 2025-26
How to answer: Give the 7-tuple, the transition table, the diagram and an ID trace. aⁿbⁿcⁿ: mark a→X, move right to first b→Y, to first c→Z, return left; repeat; finally check only X/Y/Z remain. aⁿbⁿcⁿ alone has come in 6 papers — practise it until you can write it in 15 minutes.
Last asked (2025-26, Section C): Design a Turing machine that accepts L = {0²ⁿ | n ≥ 0}.
Basics: alphabet, string, language, DFA definition, DFA vs NFA, string acceptance
came in 11 of 13 papersUnit 1 · 2017-18 to 2025-26
How to answer: Definitions with one example each; DFA as 5-tuple (Q, Σ, δ, q0, F); table of DFA vs NFA differences; extended transition function δ̂; trace a string through a given table to decide accept/reject. Mostly 2-mark questions.
Last asked (2025-26 (carry-over), Section B): Explain basic concepts of Theory of Computation (automata, computability, complexity).
CFG construction for a language & language generated by a grammar
came in 11 of 13 papersUnit 3 · 2017-18 to 2025-26
How to answer: Define CFG as a 4-tuple (V, T, P, S). Typical designs: aⁿbⁿ (S → aSb | ab), a²ⁿbⁿ (S → aaSb), 0ᵐ1ⁿ with m ≠ n, aᵖbᵠcʳ with p + q = r (nest the c's around a's and b's), (0+1)*. For 'language generated' list the shortest strings and describe the pattern.
Last asked (2025-26 (carry-over), Section C): Solve programming problems based on CFG properties.
TM variants, Universal TM, LBA & basic TM model
came in 11 of 13 papersUnit 5 · 2017-18 to 2025-26
How to answer: Basic model (tape, head, finite control, 7-tuple). Variants: multi-tape, multi-track, non-deterministic, two-way infinite, multidimensional — all equivalent in power. UTM: encode M and w on the tape and simulate (model of a stored-program computer). LBA: tape bounded by input length, accepts CSLs.
Last asked (2025-26 (carry-over), Section C): Explain the basic model of Turing Machine / describe the representation of Turing Machines.
Derivations, parse trees & ambiguity (LMD, RMD, inherent ambiguity)
came in 10 of 13 papersUnit 3 · 2017-18 to 2025-26
How to answer: Show leftmost and rightmost derivations and the derivation tree. A grammar is ambiguous if some string has two different parse trees (or two LMDs) — show both trees. Remove ambiguity by precedence/associativity levels (E → E+T | T, T → T*F | F, F → id). Inherent ambiguity: {aⁱbʲcᵏ | i = j or j = k}.
Last asked (2025-26 (carry-over), Section B): Describe derivation trees and ambiguity.
DFA / NFA design for string patterns (substring, ends with, not ending with)
came in 9 of 13 papersUnit 1 · 2017-18 to 2025-26
How to answer: Write the 5-tuple, draw the transition diagram AND table, mark start/final states, add a dead state for a complete DFA. Trace 2 sample strings (one accepted, one rejected). For 'not ending with X' build the DFA for 'ending with X' and swap final/non-final states.
Last asked (2025-26, Section C): Define NFA. Design an NFA that accepts strings over {0, 1} containing the substring 1101.
FA → regular expression (Arden's theorem / algebraic method)
came in 9 of 13 papersUnit 2 · 2017-18 to 2025-26
How to answer: State Arden's theorem: R = Q + RP ⇒ R = QP* (if P has no ε). Write one equation per state (incoming edges; add ε for the start state), substitute and solve for the final state(s). Final RE = union over final states. Asked in every BCS402 paper.
Last asked (2025-26, Section C): Construct the regular expression for the given DFA using Arden's theorem.
Post Correspondence Problem (PCP / MPCP, find a solution, undecidability)
came in 9 of 13 papersUnit 5 · 2017-18 to 2025-26
How to answer: Define PCP: lists A, B; find indices i1..ik with A-string = B-string. Solve the given instance by trying the tile whose strings share a prefix first, and write the index sequence. MPCP = first tile fixed. State that PCP is undecidable (reduce from halting / MPCP).
Last asked (2025-26, Section B): Define the Post Correspondence Problem. Why is it considered undecidable?
Recursive & recursively enumerable languages (recursive function theory)
came in 9 of 13 papersUnit 5 · 2017-18 to 2025-26
How to answer: Recursive = some TM halts on every input (decidable); RE = some TM accepts every member but may loop on non-members. Every recursive language is RE, not vice versa; L and its complement both RE ⇒ L recursive. Recursive functions: initial functions (zero, successor, projection) + composition + primitive recursion.
Last asked (2025-26 (carry-over), Section A): What is a recursive function?
Minimisation of DFA (equivalence / partition method)
came in 8 of 13 papersUnit 1 · 2017-18 to 2024-25
How to answer: Remove unreachable states, then partition: P0 = {final}, {non-final}; split groups whose states go to different groups; repeat until stable. Draw the minimised DFA. The 8-state table (Q0–Q7, Q3 & Q4 final) has been asked twice — practise it.
Last asked (2024-25, Section C): Express the minimum state automaton equivalent to the given DFA.
Moore & Mealy machines (difference, Mealy ↔ Moore conversion, design)
came in 8 of 13 papersUnit 1 · 2017-18 to 2025-26
How to answer: Moore: output depends on state (λ: Q → Δ); Mealy: on state + input (λ: Q×Σ → Δ). Mealy → Moore: split each state by the different outputs on its incoming edges. Moore → Mealy: put the output of the target state on each edge. Know a design example (1's complement, residue mod 3).
Last asked (2025-26 (carry-over), Section C): Describe Moore and Mealy machines and compare them.
Writing regular expressions for a language (and RE identities)
came in 8 of 13 papersUnit 2 · 2017-18 to 2025-26
How to answer: Build from pieces: (a+b)* for 'anything', fix the required part. Standard ones: exactly two a's = b*ab*ab*; number of a's divisible by 3 = (b*ab*ab*ab*)* + b*; ending with 01 = (0+1)*01. Know identities: (S*)* = S*, (S⁺)* = S*, R + R = R, ε + RR* = R*.
Last asked (2025-26 (carry-over), Section A): What is a regular expression?
Closure & decision properties of regular languages
came in 8 of 13 papersUnit 2 · 2017-18 to 2025-26
How to answer: Union, concatenation, Kleene star (RE argument); complement (swap final states of a DFA); intersection (product automaton or De Morgan); difference; reversal; homomorphism & inverse homomorphism. Decision properties: emptiness, finiteness, membership, equivalence — say the algorithm for each.
Last asked (2025-26 (carry-over), Section C): Explain closure properties of regular languages.
DPDA vs NPDA, DCFL (NPDA more powerful)
came in 8 of 13 papersUnit 4 · 2017-18 to 2025-26
How to answer: DPDA: at most one move for any (state, input/ε, stack top) and no ε/input conflict. NPDA accepts all CFLs; DPDA only DCFLs. Example accepted by NPDA but not DPDA: wwᴿ (wcwᴿ is a DCFL). Table of differences + one example each.
Last asked (2025-26 (carry-over), Section B): Explain DPDA and DCFL.
Two-stack PDA (aⁿbⁿcⁿ, equivalence with TM)
came in 8 of 13 papersUnit 4 · 2017-18 to 2025-26
How to answer: Definition (two stacks, δ: Q × Σε × Γ × Γ → Q × Γ* × Γ*), it is as powerful as a Turing machine. Standard design: aⁿbⁿcⁿ — push a's on stack 1, b's pop stack 1 and push stack 2, c's pop stack 2. Draw the diagram.
Last asked (2025-26 (carry-over), Section C): Explain two-stack PDA and its importance.
Pumping lemma for CFL & closure properties of CFL
came in 8 of 13 papersUnit 4 · 2017-18 to 2025-26
How to answer: CFL pumping lemma: w = uvxyz, |vxy| ≤ n, |vy| ≥ 1, uvⁱxyⁱz ∈ L. Classic proof: aⁿbⁿcⁿ is not CFL (vxy can touch at most two letter blocks). Closure: CFLs are closed under union, concatenation, Kleene star (give grammar constructions) but NOT under intersection and complement (counter-example via aⁿbⁿcⁿ).
Last asked (2025-26 (carry-over), Section C): Explain closure properties of CFL.
NFA → DFA (subset construction, ε-NFA, ε-closure, equivalence proof)
came in 7 of 13 papersUnit 1 · 2017-18 to 2025-26
How to answer: ε-closure of each state first (for ε-NFA). Start state of DFA = ε-closure(q0); for each new subset and symbol take the union of moves, then ε-closure. Any subset containing an NFA final state is final. Give the table, then the diagram. Learn the proof that every NFA has an equivalent DFA.
Last asked (2025-26 (carry-over), Section C): Prove the equivalence of DFA and NFA.
Chomsky hierarchy (type 0–3 grammars, languages and machines)
came in 7 of 13 papersUnit 3 · 2017-18 to 2025-26
How to answer: Table of Type 0 (unrestricted, TM, RE languages), Type 1 (context-sensitive, LBA), Type 2 (context-free, PDA), Type 3 (regular, FA) with production restrictions and one example each; show the containment diagram. Be able to classify a given grammar.
Last asked (2025-26 (carry-over), Section C): Explain Chomsky hierarchy in detail.
DFA for divisibility (binary / ternary number divisible by n)
came in 6 of 13 papersUnit 1 · 2017-18 to 2024-25
How to answer: States = remainders 0..n-1; for base b, δ(r, d) = (b·r + d) mod n. Start = final = remainder 0. Show the remainder table and then the diagram. Practise binary ÷ 3, 4, 5 and ternary ÷ 4, 5.
Last asked (2024-25 (carry-over), Section C): Construct a minimal DFA for ternary numbers divisible by 5.
Kleene's theorem & RE → FA (transition graphs)
came in 6 of 13 papersUnit 2 · 2021-22 to 2025-26
How to answer: Kleene: a language is regular iff it is accepted by an FA. Proof idea: Thompson constructions for ε, a, R+S, RS, R* (RE → ε-NFA), and state elimination/Arden (FA → RE). For RE → FA, build the ε-NFA from parts then convert. Transition graph = edges labelled by strings/REs.
Last asked (2025-26 (carry-over), Section C): Describe transition graphs with examples.
Greibach Normal Form (GNF)
came in 6 of 13 papersUnit 3 · 2018-19 to 2025-26
How to answer: Convert to CNF, rename variables A1..An, make Ai → Aj... with j > i by substitution, remove left recursion (introduce Z), then back-substitute so every body starts with a terminal: A → aα. Practise S → AB, A → BS | a, B → SA | b (asked 2 times) and S → CD, C → DS | d, D → SC | c.
Last asked (2025-26, Section C): Define Greibach Normal Form. Convert S → CD, C → DS | d, D → SC | c into GNF.
CFG → PDA (construct PDA from grammar, check a string)
came in 6 of 13 papersUnit 4 · 2017-18 to 2024-25
How to answer: Single-state PDA accepting by empty stack: for every A → α add δ(q, ε, A) = (q, α); for every terminal a add δ(q, a, a) = (q, ε). Then show the move sequence for the given string (e.g. 'abaaaa'). The grammar S → aAA, A → aS | bS | a is a favourite.
Last asked (2024-25 (carry-over), Section B): Construct a PDA M equivalent to S → aAA, A → aS | bS | a; check whether 'abaaaa' is in M.
Halting problem, Church-Turing thesis & undecidability
came in 6 of 13 papersUnit 5 · 2017-18 to 2025-26
How to answer: Church-Turing thesis: every effectively computable function is TM-computable (a thesis, not provable). Halting problem: proof by contradiction — assume H(M, w) exists, build D that does the opposite on ⟨D⟩. Give 2–3 other undecidable problems (PCP, emptiness of TM language, ambiguity of CFG).
Last asked (2025-26 (carry-over), Section B): Discuss Church-Turing thesis.
Simplification of CFG (useless symbols, ε-productions, unit productions)
came in 5 of 13 papersUnit 3 · 2017-18 to 2025-26
How to answer: Order: remove ε-productions (find nullable variables, add all combinations), then unit productions (A → B), then useless symbols (non-generating first, then unreachable). Know the definitions of non-generating vs unreachable symbols.
Last asked (2025-26, Section B): Remove ε-productions from S → AB | BC, A → aA | ε, B → bB | ε, C → c.
Chomsky Normal Form (CNF)
came in 5 of 13 papersUnit 3 · 2017-18 to 2024-25
How to answer: Simplify first (ε, unit, useless). Replace terminals in long bodies by new variables (Cₐ → a), then break bodies longer than 2 into chains of 2 variables. Final form: A → BC | a. The grammar S → bA | aB, A → bAA | aS | a, B → aBB | bS | b is asked repeatedly.
Last asked (2024-25, Section C): Convert the CFG S → aSB | ε, B → b into Chomsky Normal Form.
PDA → CFG (triple construction [p X q])
came in 5 of 13 papersUnit 4 · 2018-19 to 2023-24
How to answer: Variables [p X q]. S → [q0 Z0 q] for every q. δ(p, a, X) = (r, ε) gives [p X r] → a; δ(p, a, X) = (r, Y1Y2) gives [p X s] → a[r Y1 t][t Y2 s] for all t, s. Then remove useless variables. The 2-state PDA over {0,1} with stack symbols x, z0 has come 3 times — practise it exactly.
Last asked (2023-24 (carry-over), Section C): Find the equivalent CFG of the given PDA P = ({q0, q1}, {a, b}, {a, z0}, δ, q0, z0).
High-chance topics
- Regular grammars (right/left linear, regular grammar ↔ FA)Unit 3 · came in 5 of 13 papers
- Turing machine as computer of integer functions (n+1, 2n, n²)Unit 5 · came in 3 of 13 papers
Repeated 2-mark questions (Section A)
- Define alphabet, string and language (with examples)asked 5 times
- Give the (mathematical) definition of a DFAasked 4 times
- Explain two-stack PDAasked 4 times
- Differentiate between DFA and NFAasked 3 times
- Explain the Chomsky hierarchyasked 3 times
- Explain Universal Turing Machineasked 3 times
- Explain / define the Halting problemasked 3 times
- Design a FA for strings ending with 101 / 010asked 3 times
- What is a PDA? Write its transition functionasked 3 times
- What is ε-closure in FA?asked 2 times
- State / explain Kleene's theoremasked 2 times
- Write the CFG for (0+1)* / (a+b)*asked 2 times
- RE for strings where the number of a's is divisible by 3 over {a, b}asked 2 times
- Construct the CFG for a²ⁿbⁿ / a³ⁿbⁿ (n ≥ 3)asked 2 times
- State the pumping lemma for regular languagesasked 2 times
- State / explain the pigeonhole principleasked 2 times
- Difference between Moore and Mealy machinesasked 2 times
- Recursive vs recursively enumerable languagesasked 2 times
- Leftmost derivation of 00110101 for S → 0B | 1A, A → 0 | 0S | 1AA, B → 1 | 1S | 0BBasked 2 times
- Language generated by S → SS | ab | ba | εasked 2 times
- What is ambiguity in a CFG?asked 2 times
- Explain Linear Bounded Automatonasked 2 times
- Define Context Free Grammarasked 2 times
The 10 problem types to practise by hand
- DFA for binary / ternary numbers divisible by 4 or 5 (remainder method)
- NFA with ε-moves → DFA (ε-closure + subset table)
- Minimise the 8-state DFA (Q0–Q7, Q3 and Q4 final) by the partition method
- Mealy → Moore conversion (and Moore → Mealy)
- Arden's theorem: regular expression from a 3-state DFA
- Pumping lemma proofs: a^p (p prime), aⁿbⁿ, aⁿb²ⁿ not regular; aⁿbⁿcⁿ not context free
- CNF of S → bA | aB, A → bAA | aS | a, B → aBB | bS | b; GNF of S → AB, A → BS | a, B → SA | b
- PDA for wwᴿ and aⁿb²ⁿ with ID trace; CFG → PDA for S → aAA, A → aS | bS | a ('abaaaa')
- PDA → CFG for the 2-state PDA over {0, 1} with stack symbols x, z0
- Turing machine for aⁿbⁿcⁿ (and a²ⁿbⁿ with IDs for aaaabb); solve a PCP instance
Get the Theory of Automata and Formal Languages PDF
Not official AKTU material. The important questions are based on 13 previous year papers (2017-18 to 2025-26). The real paper can differ. Syllabus cross-checked with the official AKTU 2nd-year CSE scheme (BCS402, 3-1-0, 70 marks: 5 units of 8 lectures). Research date: 20 Nov 2026.
More subjects: all B.Tech papers. Practise coding for free on Kinetic CodeGuide.