All mock tests are FREE till 31 December — register to save your progress

How many states are there in a minimum state automata equivalent to regular expression given below? a * b(a + b) Regular expression is

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

Show answer & explanation

Correct answer: C. 3

Explanation

States: start (loop on a), after b, and after one more symbol (accepting). That is 3 states, plus a dead state if the DFA must be complete.

Note: Counting the dead (trap) state as well gives 4.

More Theory of Computation and Compilers questions