The GATE Grind

GATE 2016 CS (CS2) – Question 26

Theory of Computation · Regular Expressions and Finite Automata · 1 mark · Numerical answer

How many states are in a smallest DFA for $(0+1)^*(0+1)(0+1)^*$?

Practise this question in The GATE Grind →

Show answer and explanation

Correct answer: 2.0 to 2.0

Explanation

The language consists of all nonempty binary strings. One initial nonaccepting state distinguishes the empty string; either first symbol moves to an accepting state that loops on both symbols. The two states cannot merge because their empty-suffix acceptance differs. Hence 2.

More Regular Expressions and Finite Automata questions

All Regular Expressions and Finite Automata questions →