All mock tests are FREE till 31 December — register to save your progress
Unit 8 · Theory of Computation and Compilers Paper 2 CS · December 2018

Consider the language L = {a^(nk) | k > 0}, where n is a fixed non-negative integer. The minimum number of states of a finite automaton accepting L is

Pick an option to check yourself, or open the answer below.

Show answer & explanation

Correct answer: B. n + 1

Explanation

L has strings of length n, 2n, 3n, …, excluding ε. A cycle of n states counts length mod n, plus a separate start state so that ε is rejected: n + 1 states.

More Theory of Computation and Compilers questions