∑GateAndNet
Practice MCQs
GATE CS / Theory of Computation
Edit
INTERMEDIATE🔥 High-Yield Exam Topic 4 min read 3 views

Minimal DFA Construction, Pumping Lemma, CFGs & Pushdown Automata

Exact state counts for common minimal DFAs, Myhill-Nerode theorem, Pumping Lemma traps, Chomsky Normal Form derivation steps (2n - 1), and DPDA vs NPDA expressive power.

1. High-Speed Minimal DFA State Count Patterns

Over binary alphabet Σ={0,1}\Sigma = \{0, 1\} (or {a,b}\{a, b\}):

  1. Strings of length divisible by kk: kk states
  2. Binary numbers divisible by kk: kk states if kk is odd; reduced if k=2mk = 2^m (m+1m+1 states when leading zeros allowed)
  3. Strings containing substring ww of length kk: k+1k + 1 states
  4. Strings starting with aa and ending with bb: 4 states
  5. Strings whose kk-th symbol from the right is 11: 2k2^k states in minimal DFA (only k+1k+1 in NFA!)

2. Expressive Power of Automata Across the Chomsky Hierarchy

Language ClassGrammar TypeAutomaton ModelDeterministic == Non-Deterministic?
Regular (Type 3)Right/Left-LinearFinite AutomatonYES: DFA≡NFA≡ϵ-NFA\text{DFA} \equiv \text{NFA} \equiv \epsilon\text{-NFA}
DCFL ⊊\subsetneq CFL (Type 2)Context-Free (A→αA \to \alpha)Pushdown AutomatonNO! DPDA⊊NPDA\text{DPDA} \subsetneq \text{NPDA}
CSL (Type 1)Context-Sensitive ($\alpha\le
RE (Type 0)UnrestrictedTuring MachineYES: DTM≡NTM≡k-tape TM\text{DTM} \equiv \text{NTM} \equiv k\text{-tape TM}
🚨 Exam Trap Alert

Classic DPDA vs NPDA Examples:

  • L1={wcwR∣w∈{a,b}∗}L_1 = \{ w c w^R \mid w \in \{a,b\}^* \} is a DCFL (center marker cc tells DPDA when to switch from push to pop).
  • L2={wwR∣w∈{a,b}∗}L_2 = \{ w w^R \mid w \in \{a,b\}^* \} is a CFL but NOT DCFL (requires NPDA to guess the midpoint!).
  • L3={ww∣w∈{a,b}∗}L_3 = \{ w w \mid w \in \{a,b\}^* \} and {anbncn∣n≥0}\{a^n b^n c^n \mid n \ge 0\} are NOT Context-Free (CSL)!
📐 Quick Revision Formula Sheet
Chomsky Normal Form (CNF) Parse Steps
Steps to derive string w of length n=2n−1\text{Steps to derive string } w \text{ of length } n = 2n - 1
💡 Every CNF rule has the form A -> BC or A -> a
Subset Construction Bound
n-state NFA  ⟹  at most 2n states in equivalent DFAn\text{-state NFA} \implies \text{at most } 2^n \text{ states in equivalent DFA}
💡 Language: k-th symbol from the end is 1 requires 2^k DFA states vs k+1 NFA states!
#Automata Theory#TOC#Minimal DFA#Pumping Lemma#CFG#PDA#CNF

🎯 Practice PYQs on This Topic (3)

Q1.GATE CS TOCMCQMEDIUM
+2 Marks • -0.67 Neg

What is the number of states in the minimal DFA over Σ={0,1}\Sigma = \{0, 1\} that accepts all binary strings whose 3rd symbol from the right end is 1?

Q2.GATE CS TOCMCQMEDIUM
+2 Marks • -0.67 Neg

Which of the following languages over Σ={a,b,c}\Sigma = \{a, b, c\} is accepted by a Non-Deterministic PDA (NPDA), NOT by any Deterministic PDA (DPDA)?

Q3.UGC NET / GATE TOCMCQEASY
+1 Marks • -0.33 Neg

If a Context-Free Grammar GG is in Chomsky Normal Form (CNF), how many derivation steps are required to derive a terminal string ww of length ∣w∣=12|w| = 12?

Previous TopicFormal Languages Closure Properties & Decidability Master MatrixNext Topic LL(1) & LR(0), SLR(1), LALR(1), CLR(1) Parsing Power & Conflicts