The GATE Grind

GATE 2011 CS (CS1) – Question 52

Theory of Computation · Regular Expressions and Finite Automata · 2 marks · Multiple choice

Over alphabet {a}, $L=\{a^{nk}:k>0\}$, with fixed positive integer n. Find the smallest DFA state count.

  1. k+1
  2. n+1
  3. $2^{n+1}$
  4. $2^{k+1}$

Practise this question in The GATE Grind →

Show answer and explanation

Correct answer: (B) n+1

Explanation

The DFA must accept positive multiples of n but reject ε. Use n residue states after reading input, accepting residue zero, and an extra initial rejecting state with the same subsequent transitions as residue zero. These states are pairwise distinguishable by suffix length or empty-word acceptance. Thus n+1, B.

More Regular Expressions and Finite Automata questions

All Regular Expressions and Finite Automata questions →