1.

Generate a regular expression for the given language:lL(x): {xÎ{0,1}*| x ends with 1 nd does not contain a substring 01}(a) (0+01)*(b) (0+01)*1(c) (0+01)*(1+01)(d) All of the mentionedThis question was posed to me by my college director while I was bunking the class.The query is from DFA to Regular Expressions in portion Regular Expressions and Languages of Automata Theory

Answer»

Right option is (C) (0+01)*(1+01)

To explain I would SAY: (a) and (b) are the general cases where we restrict the acceptance of a string witrh substring 00 but we ignore the case where the string needs to end with 1 which therby, does not allows the acceptance of e.



Discussion

No Comment Found

Related InterviewSolutions