1.

The set of all strings over ∑ ={a,b} in which a single a is followed by any number of b’s a single bfollowed by any number of a’s is?(a) ab* + ba*(b) ab*ba*(c) a*b + b*a(d) None of the mentionedThe question was posed to me by my school teacher while I was bunking the class.Origin of the question is Obtaining the regular Expression from the Finite automata topic in division Finite Automata and Regular Expression of Compiler

Answer» RIGHT option is (a) ab* + ba*

Easiest explanation: ab*+ba* is the expression in which a SINGLE a is FOLLOWED by any NUMBER of B’s a single b followed by any number of a’s.


Discussion

No Comment Found

Related InterviewSolutions