1.

What can be said about a regular language L over {a} whose minimal finite state automaton has two states?(a) L must be {an| n is odd}(b) L must be {an| n is even}(c) L must be {an| n is even}(d) Either L must be {an | n is odd}, or L must be {an | n is even}This question was posed to me in an interview.This interesting question is from Obtaining the regular Expression from the Finite automata topic in portion Finite Automata and Regular Expression of Compiler

Answer»

Correct option is (d) Either L must be {an | n is ODD}, or L must be {an | n is even}

Easy EXPLANATION: There are TWO STATES. When first state is final, it accepts even no. of a’s. When second state is final, it accepts odd no. of a’s.



Discussion

No Comment Found

Related InterviewSolutions