Regular language given by its description:
The set of all strings of {0,1, a}, which contain the substring ’01a’ and an even number of ‘1’. For example, ’01a1 ‘, ‘101a’, ‘101a101’.
How to construct a regular expression that specifies the language?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
a oneliner for the heck of it:
basically, it checks for
string with odd number of 1s + 01a + string with even number of ones
OR
string with even number of 1s + 01a + string with odd number of ones