Generate a regular expression for the given language:l L(x): {xÎ{0,1}*| x ends with 1 nd does not contain a substring 01}

Generate a regular expression for the given language:l
L(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 mentioned
 
Answer: C
Explanation: (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.
 

Tìm kiếm

Back
Top